Extract statistics from primitive fitting result

Feel free to ask any question here
Post Reply
roy.korin
Posts: 7
Joined: Wed Feb 19, 2014 8:46 am

Extract statistics from primitive fitting result

Post by roy.korin »

Dear CloudCompare member,

I am a new user to CC and I enjoy it.
I am trying to fit a primitive shape, currently a plane, to a part of my PLY image which I segmented. Let's call it 'PLY_segmented'. What I want to do is to define a threshold in mm, and get the number of points in PLY_segmented that fitted the plane up to that threshold, and the number of points outside this threshold, i.e. percentage of inliers and outliers.

Is this possible?

Thanks and regards,
Roy Korin.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract statistics from primitive fitting result

Post by daniel »

If you have used the 'Tools > Fit > Plane' option (or "Tools > Fit > 2D Polygon", it should be the same) you can select both the cloud and the resulting plane primitive in order to compute the distances between the points and the plane (with "Tool > Distances > Cloud/Mesh dist.").

Once done, just select the point cloud (it should now have an active scalar field with the distances to the plane). Then use the 'Edit > Scalar Fields > Filter by value' method to keep only the points inside your {-threshold ; threshold] interval. Eventually, you can look at the number of points inside the output cloud and this should let you compute the ratios you need.

Cheers,
Daniel, CloudCompare admin
roy.korin
Posts: 7
Joined: Wed Feb 19, 2014 8:46 am

Re: Extract statistics from primitive fitting result

Post by roy.korin »

Hey Daniel,

Thanks a lot for the prompt reply. I was able to do as you recommended and it looks like what I wanted. This can help me a lot to evaluate the quality of the 3D images that I inspect.

I have a small question: the thresholds in which I pick in 'Edit > Scalar Fields > Filter by value' are in millimeters units?

Best regards,
Roy Korin.
Dimitri
Posts: 156
Joined: Mon Oct 18, 2010 9:01 am
Location: Rennes (France)
Contact:

Re: Extract statistics from primitive fitting result

Post by Dimitri »

Hi Roy,

they are in the units of your original point cloud.

Dimitri
roy.korin
Posts: 7
Joined: Wed Feb 19, 2014 8:46 am

Re: Extract statistics from primitive fitting result

Post by roy.korin »

Thanks Dimitri.

Roy.
Post Reply