Extract statistics from a point cloud

Feel free to ask any question here
Post Reply
Nico
Posts: 12
Joined: Mon Feb 01, 2016 3:02 pm

Extract statistics from a point cloud

Post by Nico »

Hi there,

Can anyone tell me how can i extract basic statistics (point count, sum, mean, median, stddev, min, max) of a point cloud ?

Is there a tool or something like that (code) ?

Thanks
daniel
Site Admin
Posts: 7396
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract statistics from a point cloud

Post by daniel »

You can get some statistics with the somehow hidden 'Tools > Sand-box > Export cloud(s) info' method (creates a CSV file for all selected clouds with the name, number of points, and barycenter coordinates (what you call 'mean'?). The min and max values correspond to the cloud bounding-box (see the cloud properties).

Otherwise, for each scalar field, you can read the min and max values in the SF section of the cloud properties. You can also get the mean and std. dev. with the 'Edit > SF > Compute Stat. params'. You can't get the median through the GUI.

Through the API it is of course possible to access to everything (and computing the median should be quite easy).
Daniel, CloudCompare admin
Nico
Posts: 12
Joined: Mon Feb 01, 2016 3:02 pm

Re: Extract statistics from a point cloud

Post by Nico »

Thanks for the answer.

The problem is that I have hundreds of small point clouds (aprox 400) from which I want to obtain this data. By clicking every single point cloud and writing down all the values will take a quite a bit of time.

I was thinking, there may exist a tool for that.
daniel
Site Admin
Posts: 7396
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract statistics from a point cloud

Post by daniel »

Well, the 'Export cloud(s) info' works with all selected clouds.

But to add more info you'll have to update the code of this function.
Daniel, CloudCompare admin
Nico
Posts: 12
Joined: Mon Feb 01, 2016 3:02 pm

Re: Extract statistics from a point cloud

Post by Nico »

How could I do that?
daniel
Site Admin
Posts: 7396
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Extract statistics from a point cloud

Post by daniel »

See the 'MainWindow::doActionExportCloudsInfo()' method:
https://github.com/cloudcompare/trunk/b ... .cpp#L8348

The method is pretty straightforward. Of course you'll have to tinker a little to save the pieces of info you need (and of course you'll need to compile CC yourself ;).
Daniel, CloudCompare admin
Post Reply