CloudCompare-PythonRuntime icon indicating copy to clipboard operation
CloudCompare-PythonRuntime copied to clipboard

Automating Point Cloud Classification Based on Distance to OBJ Model (Mesh), by using pycc;

Open SaadBoudarbala opened this issue 8 months ago • 3 comments

I’m working on a project where I have an OBJ model (mesh) with several children (more than 700 mesh objects) and its corresponding point cloud. The mesh and the point cloud are perfectly aligned. My goal is to automate the classification of the point cloud based on the distance to these mesh objects, giving the label of each object to points (Wall:1 , Floor :2 , ...).

Is this task achievable using pycc and cccorelib? If yes, do you have any suggestions or ready-to-use code examples to help me get started?

Thanks in advance for your help!

SaadBoudarbala avatar Mar 20 '25 13:03 SaadBoudarbala

It's a bit hard to know

Is it something that you can manually do in CC ?

Otherwise there is the cloud distance functions

tmontaigu avatar Mar 22 '25 08:03 tmontaigu

Yes, I was able to make this task manually feasible, by classifying the existing meshes into 5 classes (Walls, Floor, Ceiling, Fence, Door).

Then calculate each time a scaler field to the point cloud by calculating the cloud/mesh distance, and filter the cloud at a ditance threshold of 2 cm by Edit>Scaler field>Filter by value. With this meshode, I extract the point clouds of the 5 classes. This method remains somewhat semi-automatic.

Now, if we can automate it just from the step of 5 mesh classes, it will be better.

SaadBoudarbala avatar Mar 24 '25 09:03 SaadBoudarbala

So computing cloud/mesh distance is not yet possible, but it will soon be

Then filtering by distance should be fairly simple

tmontaigu avatar Mar 26 '25 18:03 tmontaigu