I have the segmentation results from one algorithm, however, the generated triangle surface is not manifold geometry. I am asking this question here if there is any C++ library that can be used for converting the non-manifold geometry to manifold surfaces?
PS, I have already cleaned the result by filling the holes, but it seems that there are still some non-smoothed parts and holes.
Thanks
Yes, there is CGAL, the Computational Geometry Algorithms Library.
In CGAL, a polygon mesh is considered to have the topology of a 2-manifold.
And when the faces of a polygon mesh are given but the connectivity is unknown, this set of faces is called a polygon soup. That is to say, all the triangles of your surface will be treated separately.
To convert a non-manifold surface into manifold, you can first load your data into a polygon soup.
Then convert it into a polygon mesh using the function
polygon_soup_to_polygon_mesh
. The following code snippet from CGAL gives an example:Or you can try to repair the surface mesh as depicted in here.