Skip to content

Add missing filterKeypointsByDepth step - #1150

Merged
matlabbe merged 2 commits into
introlab:masterfrom
borongyuan:master
Oct 26, 2023
Merged

matlabbe merged 2 commits into
introlab:masterfrom
borongyuan:master

Conversation

@borongyuan

Copy link
Copy Markdown
Contributor

filterKeypointsByDepth is missing in this if-branch

@borongyuan

Copy link
Copy Markdown
Contributor Author

Keypoints with no valid 3D points are mostly because they are too far away to be measured. filterKeypointsByDepth() will remove them. But this doesn't seem to be what we want. Should we consider retaining this part?

@matlabbe

Copy link
Copy Markdown
Member

The features should be already filtered by depth there if _depthAsMask is true and if RGB-D data is provided. For stereo, that could be indeed added. Suggestion:

if(depthMask.empty() && (_feature2D->getMinDepth() > 0.0f || _feature2D->getMaxDepth() > 0.0f))

@borongyuan

Copy link
Copy Markdown
Contributor Author
if(depthMask.empty() && (_feature2D->getMinDepth() > 0.0f || _feature2D->getMaxDepth() > 0.0f))

I noticed this doesn't work with ORBOctree.

// Mask is ignored in the current implementation.

Do other types of features have similar problems?

@matlabbe

matlabbe commented Oct 25, 2023 •

Copy link
Copy Markdown
Member
if(depthMask.empty() && (_feature2D->getMinDepth() > 0.0f || _feature2D->getMaxDepth() > 0.0f))

I noticed this doesn't work with ORBOctree.

// Mask is ignored in the current implementation.

Do other types of features have similar problems?

I added a new commit to fix OrbOctree ignoring the mask. I think it was the only one ignoring it. I also added my suggestion. It seems to work as expected now.

@matlabbe
matlabbe merged commit 8da6ea1 into introlab:master Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants