Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing filterKeypointsByDepth step #1150

Merged
merged 2 commits into from
Oct 26, 2023
Merged

Conversation

borongyuan
Copy link
Contributor

filterKeypointsByDepth is missing in this if-branch

@borongyuan
Copy link
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
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
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
Copy link
Member

matlabbe commented Oct 25, 2023

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
7 checks passed
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