PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.64k stars 4.59k forks source link

[features] Fix ShapeContext3DEstimation #6050

Open mvieth opened 1 month ago

mvieth commented 1 month ago

Currently, the x-axis (and consequently also the y-axis) are chosen randomly, which makes this feature useless without further processing. The paper by Frome et al says in section 2.1:

We have a degree of freedom in the azimuth direction that we must remove in order to compare shape contexts calculated in different coordinate systems. To account for this, we choose some direction to be Φ0 in an initial shape context, and then rotate the shape context about its north pole into L positions, such that each Φl division is located at the original 0 position in one of the rotations. For descriptor data sets derived from our reference scans, L rotations for each basis point are included, whereas in the query data sets, we include only one position per basis point

It seems like the PCL implementation is missing this additional step. There is a so far unimplemented function, seemingly for this purpose: https://github.com/PointCloudLibrary/pcl/blob/master/features/include/pcl/features/3dsc.h#L224 The task is to implement this function and call it in computeFeature, after computePoint.

When the implementation is fixed, the test in test_shot_estimation.cpp probably has to be updated. Ideally, a new test should be added where this feature is computed twice on the same cloud, and the outputs should be very similar.