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

[filters] FrustumCulling: fix for plane corner calculation #5449

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

keineahnung2345
Copy link
Contributor

Ref: #5438 (comment)

I just noticed something strange: np_h_u seems to be switched with np_h_d, and fp_h_u seems to be switched with fp_h_d. Then later, while computing fp_tl, fp_tr, np_br, ... (the corners), there shouldn't be any minus signs because the upper/lower height and left/right width are already signed. Could you look into this?

@keineahnung2345
Copy link
Contributor Author

This change breaks the old tests, have updated the tests to extract following objects:
frustum_test

@mvieth
Copy link
Member

mvieth commented Oct 16, 2022

Sorry for the delay. Here are my thoughts:
It is suspicious that you had to adapt the tests. For the ROI, I believe the old test values (0.44f, 0.30f, 0.16f, 0.38f) are the correct ones that we should use as reference. We have to consider that in images, the upper left corner is almost always the origin, and the y-axis then points down. In contrast to this, the up vector in the frustum cullling computations should indeed point up in the point cloud. So it might be necessary to switch the direction of the ROI y-axis in the computation (roi_ymin, roi_ymax)? For the laundry detergent, the new values (-6.0f, 12.0f) look correct, since about a third of the object seems to be below the (central) line of sight, and two thirds above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants