Skip to content

Conversation

@zatchbell1311-wq
Copy link

This PR fixes instability in ShapeContext3D caused by the random azimuth axis selection used during descriptor computation.

Instead of expanding the descriptor with multiple azimuth rotations (as proposed in the original paper), this change applies a deterministic azimuth normalization step after computePoint(). The azimuth block with the highest accumulated energy
is rotated to the first position.

This keeps the descriptor length unchanged (1980) and preserves compatibility with existing PCL feature pipelines while making the output stable across runs.

Fixes #6050

@mvieth
Copy link
Member

mvieth commented Jan 30, 2026

Thanks for the pull request, but I have to say, some of the changes seem quite random (especially changes to comments and formatting changes), and some modifications even make the code worse IMO, for example the changes to doxygen comments in 3dsc.h, some documentation is even completely removed??? All of these make in unnecessarily difficult to review this pull request. Please undo all changes except those that fix the specific problem!

Additionally, the tests have to be updated to make the CI jobs pass. I think the expected descriptor values in test_shot_estimation.cpp can simply be updated to reflect the new output, but we also need some new test to make sure that the new function which stabilizes the orientation actually does a good job. My suggestion would be: Compute the ShapeContext3D features on a cloud, apply some rotation to the cloud, then compute the features again, and check that they are very similar to the original features (rotation invariance).

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.

[features] Fix ShapeContext3DEstimation

2 participants