Skip to content

[features] Add isNormalFinite check in ShapeContext3DEstimation#4883

Merged
kunaltyagi merged 2 commits intoPointCloudLibrary:masterfrom
mvieth:3dsc_check_finite
Aug 10, 2021
Merged

[features] Add isNormalFinite check in ShapeContext3DEstimation#4883
kunaltyagi merged 2 commits intoPointCloudLibrary:masterfrom
mvieth:3dsc_check_finite

Conversation

@mvieth
Copy link
Copy Markdown
Member

@mvieth mvieth commented Aug 8, 2021

If any normal component is e.g. nan, the assertion later in the code would trigger.
As a minor side-edit, the rf parameter is an output (it is not read from, but written to).

Fixes #4497 . Contrary to what I commented in the issue, the assert would not trigger if the normal was (0, 0, 0) because the left part, x_axis[0]*normal[0] + x_axis[1]*normal[1] + x_axis[2]*normal[2] would also be zero, which would make the assert pass.

If any normal component is e.g. nan, the assertion later in the code would trigger.
As a minor side-edit, the rf parameter is an output (it is not read from, but written to).
Comment thread features/include/pcl/features/impl/3dsc.hpp Outdated
@kunaltyagi kunaltyagi changed the title Add isfinite check in ShapeContext3DEstimation [features] Add isNormalFinite check in ShapeContext3DEstimation Aug 9, 2021
@kunaltyagi kunaltyagi added the changelog: fix Meta-information for changelog generation label Aug 9, 2021
@kunaltyagi kunaltyagi added this to the pcl-1.12.1 milestone Aug 9, 2021
@larshg
Copy link
Copy Markdown
Contributor

larshg commented Aug 9, 2021

Should we emit a warning about the normals containing NaN?

@mvieth
Copy link
Copy Markdown
Member Author

mvieth commented Aug 9, 2021

Should we emit a warning about the normals containing NaN?

I'm not sure if a warning is appropriate or if it is too intrusive. I think it is not too uncommon that estimated normals contain NaNs, especially in sparse regions.

@kunaltyagi kunaltyagi merged commit fad821e into PointCloudLibrary:master Aug 10, 2021
@mvieth mvieth deleted the 3dsc_check_finite branch August 12, 2021 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: fix Meta-information for changelog generation module: features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion `pcl::utils::equal (x_axis[0]*normal[0] + x_axis[1]*normal[1] + x_axis[2]*normal[2], 0.0f, 1E-6f)' failed. Aborted (core dumped)

3 participants