IntegralImageNormaEstimation could/should return signed curvature
#2,289 opened on Apr 26, 2018
Description
Your Environment
- Operating System and version: Ubuntu 18.04
- Compiler: gcc 7.3
- PCL Version: 1.8.1 & trunk
Context
IntegralImageNormalEstimation computes curvature of the surface when used with normal_estimation_method=COVARIANCE_MATRIX. It does not provide the information about the direction of curvature (towards the normal or away from it) as the sign is discarded - https://github.com/PointCloudLibrary/pcl/blob/9084aec8cdd4bc040f24193b5a767d8dfe153299/features/include/pcl/features/impl/integral_image_normal.hpp#L247 (note the fabsf). In my application (height map), this information is important for further processing (distinguising valleys from hills).
Expected Behavior
I am proposing to make the curvature optionally signed, by adding a flag (false by default, not to break existing code) which would keep curvature sign, plus take in account whether the normal was flipped (in that case, curvature would have to be negated to be consistent).
Current Behavior
Sign of curvature is currently discarded by the fabsf as explained above.
Possible Solution
I suggest I will do a PR to implement this, but I would like to have opinion/guidance from upstream as to whether the chane is mergeable or I better subclass IntegralImageNormalEstimation and keep using that one in my project. Thanks!