-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Is your feature request related to a problem? Please describe.
I am developing segmentation algorithms in which I need to calculate the area of segments to make selections and I think the implementation of area calculation i did works well and can be applied general purpouse, so it could be merged in PCL
Solution
Essentially there are a few steps:
(1) optional voxeling of the segment
(2) NormalEstimationOMP
(3) GreedyProjectionTriangulation
(4) Sum the area of greedy triangles
Loop: area += 0.5 * P.cross(Q).norm();
where P and Q are two vectorial sides of the triangles
Describe alternatives you've considered
one might consider alternative surface mesh/triangulations but this seems to work fine on the samples I tested it
there is a little are overestimate due to the fact that the mesh is not perfectly smooth. the voxeling is aimed at reducing this effect.
the area += loop is done as double
An alternative would be to extract optionally this info directly inside the greedy alg. as it comes available so to minimnize the total processing time