semantic-meshes icon indicating copy to clipboard operation
semantic-meshes copied to clipboard

Point cloud instead of mesh

Open abrahamezzeddine opened this issue 10 months ago • 3 comments

Hello,

I am wondering if this is possible to make it work with the point cloud (both sparse and dense) from colmap rather than the mesh?

Thank you.

abrahamezzeddine avatar Apr 26 '24 07:04 abrahamezzeddine

Hey,

point clouds are currently not supported. It could probably be done in pure Python, although you would have to figure out a way to handle occlusion properly (so that class labels are not projected to locations in the scene that are not visible from the camera location). Maybe something like this: https://www.open3d.org/docs/latest/python_api/open3d.geometry.PointCloud.html#open3d.geometry.PointCloud.hidden_point_removal

fferflo avatar Apr 26 '24 10:04 fferflo

Could the opposite be done perhaps?

after creating the mesh, reverse back to point cloud or is that data lost in theory?

thank you for the quick answer.

abrahamezzeddine avatar Apr 26 '24 11:04 abrahamezzeddine

One way of reverting back to a point cloud would be to extract the vertices of the triangles (although this wouldn't necessarily coincide with the original point cloud used to create the mesh). The class probabilities are computed per triangle though, so you could maybe average the labels of all triangles that a given vertex is part of to compute the label of that vertex.

aggregator.get() contains the class probabilities of all triangles in the input_ply file.

fferflo avatar Apr 26 '24 12:04 fferflo