-
Notifications
You must be signed in to change notification settings - Fork 552
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
Bug fix in SurfaceNormalOutlierFilter
#457
Conversation
Example: if `maxAngle = 0.2`, an angle of 3.1 radians should obviously be reject. But with the current code, `eps = cos (0.2)` ~= 0.98, and `abs(cos(3.1)` ~= 0.999, so it is accepted. With this fix, `cos(3.1` ~= -0.999, it is rejected.
Can one of the admins verify this patch? |
ok to test |
@simonpierredeschenes could you have a look? |
I don't think this is the wanted behavior, the call to |
Then the name and this documentation are misleading: "Maximum authorised angle between the 2 surface normals (in radian) - min: 0.0 - max: 3.1416". If it was meant to work like you say, the max would be PI/2, not PI. I use this filter to prevent matching points that are on two different faces of a wall, so this is really useful. A solution could be to add a parameter to choose between both behaviors. |
@cjamin I discussed with my colleagues and it appears I was mistaken, the filter is meant to avoid matching different faces of a wall, as you said. The fix you did solves the issue. Could you please add a small sentence to the documentation that says that the filter must be used in combination with the |
All right, thanks. The "official" documentation only mention this filter in this page, without any explanation. This documentation (this link I gave earlier) seems unofficial. So, if I'm not mistaken, I can't change it here in the repository. |
Oh, I meant in the outlier filter description (here). This code is used to auto-generate this documentation. This documentation also comes from us, we will link it in the tutorials in the future. |
The utest are not passing:
|
I updated the documentation. Regarding the test, I can only guess that the test used to pass for bad reasons... |
I've updated the test results on your branch. I'll merge as soon as the CI is letting me. Thanks for the patch! |
Thanks for integration! |
This call to
anyabs
should not be here.Here is an example: if
maxAngle = 0.2
, an angle of 3.1 radians should obviously be reject. But with the current code,eps = cos (0.2)
~= 0.98, andabs(cos(3.1)
~= 0.999, so it is accepted. With this fix,cos(3.1
~= -0.999, it is rejected.