Generating data from a Cloud

Feel free to ask any question here
Post Reply
tamir.e
Posts: 5
Joined: Wed Apr 16, 2014 11:49 am

Generating data from a Cloud

Post by tamir.e »

Hello,
I'm trying to retrieve specific data of a cloud.
iv'e cropped a certain cloud and by using tools>fit>plane , discovered my desired plane.
by choosing the plane and the rest of the cloud and using the compute cloud/mesh function iv'e got a great cloud describing distances of each pixel from my plane (by color).

i would LOVE to extract this certain data now. (st. dev, distance of each point from plane, etc). especially in xls format, so i can generate my graphs (if i had the distance of each pixel from the plane i could generate an awesome graph).
is there any way to generate such data using CC?
attached is a pic with the current plane (and deviated pixels).
thnx in advance.

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

Re: Generating data from a Cloud

Post by daniel »

Indeed, first if you simply want to get an histogram you can use the 'Edit > Scalar Fields > Show histogram" method or the "Edit > Scalar Fields > Compute stat. params" to get some statistics.

And if you want to export all distances, you can simply save the cloud in ASCII format (with the semicolon as separator you'll get a real CSV file than can be imported in excel for instance). In this file you'll get typically 4 columns: X, Y, Z and distance.
Daniel, CloudCompare admin
tamir.e
Posts: 5
Joined: Wed Apr 16, 2014 11:49 am

Re: Generating data from a Cloud

Post by tamir.e »

Firstly, thnx alot for the quick reply!
when i save the ASCII file, its format is:

X Y Z R G B C2M_signed_distances
-1005.024536 752.8677979 -1998.517944 126 126 126 -4.554881
-1007.760315 757.6328125 -2011.166748 124 124 124 -7.465148

just making sure, the signed distance is the distance between the plane and each point in the cloud? (i.e the normal between each point and the plane?)

btw, i tried taking a sample of points (500 of them) and put them in mathlab to generate a 3d graph, which looked nothing like the original.
any idea why?
thnx alot for your help.
Tamir.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Generating data from a Cloud

Post by daniel »

The distance is the distance to the nearest "point" on the triangle. So in this case it is equivalent to the orthogonal distance.

And for Matlab, hard to tell without a screenshot: what are you displaying? how did you chose your samples?
Daniel, CloudCompare admin
tamir.e
Posts: 5
Joined: Wed Apr 16, 2014 11:49 am

Re: Generating data from a Cloud

Post by tamir.e »

-"on the triangle" you mean on the plane?
- i just took the first 500 points CC generated on the ASCII file.
- another issue - is there any way to get the number of non-valid points?
i mean the points in the cloud that are just missing (infinity or 0 depth).

thanks allot for all your help Daniel!
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Generating data from a Cloud

Post by daniel »

Indeed internally a plane is composed of two triangles.

And if you take only the 500 first points (don't know how much there are in your cloud) you may only take a very partial area that has a totally different histogram compared to the global cloud.

And by default there shouldn't be any 'invalid' points?! (but if there are some, in ASCII format you should see a "nan", "+inf" or "-inf" literal string in place of their scalar values).
Daniel, CloudCompare admin
tamir.e
Posts: 5
Joined: Wed Apr 16, 2014 11:49 am

Re: Generating data from a Cloud

Post by tamir.e »

the system i'm using to generate 3D PLYs isn't perfect, so there are some "missing points" in the cloud.
on a certain plane, i'm expecting to get a specific number of pixels.. when the ASCII output is generated it works only on the pixels it recognizes.

i'm wondering if there's a way, for example to:
align all the pixels to the plane, and then, count how many pixels i'm expecting the plane to have v.s how many there really are.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Generating data from a Cloud

Post by daniel »

Well I'm not sure to understand all: when the PLY file is loaded, all points are loaded into the memory (the 'missing' points are not in the file, am I wrong?).

Then when you compute the distances between those points and the plane, all points are processed. So the number of missing points is simply the total number of points minus the number of loaded points.

I may have missed something though ;)
Daniel, CloudCompare admin
Post Reply