Page 1 of 1

Calculate the median/average point of a segmented cloud

Posted: Tue Jun 21, 2016 8:11 am
by Grillteller
Hi,

I segmented a part of my point cloud and now I want to calculate the median or average point of that segmented cloud. Later i want to use this point for a planefitting. Is this possible in CloudCompare or do I have to extract the point list.

Best regards.

Re: Calculate the median/average point of a segmented cloud

Posted: Tue Jun 21, 2016 10:02 am
by daniel
I believe you could use the 'Tools > Sand box (research) > Export cloud(s) info' tool.

It will create a CSV file with various information about the selected clouds (name, number of points, then 3 columns corresponding to the X, Y and Z coordinates of the cloud barycenter - and then additional info about the scalar fields if the clouds have any).

Re: Calculate the median/average point of a segmented cloud

Posted: Tue Jun 21, 2016 10:03 am
by daniel
Oh, by the way you have a 'Tools > Fit > Plane' tool ;).

The resulting plane will pass through the barycenter.

Re: Calculate the median/average point of a segmented cloud

Posted: Tue Jun 21, 2016 1:40 pm
by Grillteller
Thank you. I think this will work.

Can you tell me how the barycenter is calculated? What about outliers? Do they get eliminated for the calculation?

Best regards

Re: Calculate the median/average point of a segmented cloud

Posted: Tue Jun 21, 2016 2:26 pm
by daniel
The barycenter is simply the average of the 3 coordinates (average is done separately on each coordinate).

You need to remove the outliers yourself (with SOR for instance) if you need a robust barycenter estimation.

Re: Calculate the median/average point of a segmented cloud

Posted: Fri Jul 30, 2021 11:36 pm
by DA523
daniel wrote: Tue Jun 21, 2016 10:02 am I believe you could use the 'Tools > Sand box (research) > Export cloud(s) info' tool.
This post was in 2016

Now in 2021 (Cloudcoapre 2.12)
Is it the same ? what is the difference?
Tools --> Sand box --> create cloud from selected entity centers
Tools --> Batch Export >> Export Cloud info

Re: Calculate the median/average point of a segmented cloud

Posted: Sun Aug 01, 2021 5:01 pm
by daniel
Well, the 'Tools > Sand box > Create cloud from selected entity centers' only does that (a cloud with the barycenter of each selected entities). I believe It would answer the need of this user directly (Grillteller).

The other method outputs a text file with different pieces of information about the selected clouds only (among which the barycenter). It could help achieve the same result, but indirectly.