Calculate the median/average point of a segmented cloud

Feel free to ask any question here
Post Reply
Grillteller
Posts: 7
Joined: Thu May 19, 2016 7:58 am

Calculate the median/average point of a segmented cloud

Post 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.
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post by daniel »

Oh, by the way you have a 'Tools > Fit > Plane' tool ;).

The resulting plane will pass through the barycenter.
Daniel, CloudCompare admin
Grillteller
Posts: 7
Joined: Thu May 19, 2016 7:58 am

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

Post 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
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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.
Daniel, CloudCompare admin
DA523
Posts: 166
Joined: Mon May 25, 2020 4:02 pm

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

Post 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
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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.
Daniel, CloudCompare admin
Post Reply