Mesh vs. Pointcloud

Feel free to ask any question here
Post Reply
freemountain
Posts: 11
Joined: Mon Jan 13, 2014 10:05 am

Mesh vs. Pointcloud

Post by freemountain »

Hey there,
I am looking for a way to get distances between points and a referenced mesh. A table with the distance for each point to the closest face of the mesh would be the aim. Is there a way to do this?
Thanks for your help!
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh vs. Pointcloud

Post by daniel »

Indeed: just select a point cloud and a mesh, call the "Tools > Distances > Cloud/Mesh dist." method (click on the "Compute" button once the tool dialog is displayed). You'll get a scalar field on the cloud corresponding to the distance of each point to the nearest triangle.

Eventually you can export ("File > Save") the cloud and its distances as an ASCII file (you'll get "X Y Z distance" per line for each point).
Daniel, CloudCompare admin
freemountain
Posts: 11
Joined: Mon Jan 13, 2014 10:05 am

Re: Mesh vs. Pointcloud

Post by freemountain »

Bonjour Daniel,
I could figure it out before you answered, the export as a .txt or rather .xyz was the probleme;)
I do have another question, though but don't want to start a new thread as it might be answered quickly again: Can you tell me about the roughness calculation? How is that done as I haven't seen it in comparable software, yet. I was close to asking someone to write something like that for me in Matlab but now I see, it already works. Do you use a standard deviation from a convex hull??
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh vs. Pointcloud

Post by daniel »

Roughness computation is very... simple: see http://www.cloudcompare.org/doc/wiki/in ... =Roughness
Daniel, CloudCompare admin
freemountain
Posts: 11
Joined: Mon Jan 13, 2014 10:05 am

Re: Mesh vs. Pointcloud

Post by freemountain »

Seems truely... simple! I get the kernel size and I get the LS plane but my brain can't connect the two. Is a new surface generated by the sphere around each vertice?
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh vs. Pointcloud

Post by daniel »

No we simply compute the distance between the point and the plane fitted on its neighbors. If the surface is flat, then the point is very close to the corresponding plane. Otherwise, if the surface is very rough, the plane can be in about any direction and will pass through the center of gravity of the neighbors. And the point will be more likely quite far from it (therefore the roughness measure will be statistically higher).
Daniel, CloudCompare admin
freemountain
Posts: 11
Joined: Mon Jan 13, 2014 10:05 am

Re: Mesh vs. Pointcloud

Post by freemountain »

were do I get that plane from? Is it generated automatically when hitting the roughness button...its inactive after loading a single mesh/pointcloud. Thanks for your help! merci beaucoup
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh vs. Pointcloud

Post by daniel »

In fact the "plane" is computed for each point: we consider a small neighborhood around it (for instance the 6 neighbors around each point) and we compute the best fitting plane that pass through those points. The plane is not "created", we just compute its parameters. Then we compute the distance between the central point and this plane and this gives us the roughness value for this point. The process is repeated for each point.
Daniel, CloudCompare admin
freemountain
Posts: 11
Joined: Mon Jan 13, 2014 10:05 am

Re: Mesh vs. Pointcloud

Post by freemountain »

One last question (hopefully;)): Is there also a tool (e.g. slicing tool) to cut out and erase points that are at a certain height above the mean surface of a plane? I just need the roughness of some 0,5cm above the ground, everything else will spoil the mean value and the histogram. Besides being quoted you deserve some kind of gift for that program!
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Mesh vs. Pointcloud

Post by daniel »

You have multiple ways to do this:
  • either your plane is simple (like "z=0") and you can simply convert the Z values to a scalar field (with "Tools > Projection > Export coordinate(s) to scalar field") then segment the cloud based on the Z values (with "Edit > Scalar fields > Filter by value")
  • or you can ask CC to compute the "mean plane" (if it suits your need) with "Tools > Fit > Plane" and then compute the distances between the points and this plane and eventually segment the cloud based on the distance values (still with "Edit > Scalar fields > Filter by value")
  • you can do the same as above by creating your own plane with the 'Primitive factory' ("File > Primitive factory'")
  • eventually you can use the "Cross section" tool (in the main toolbar, next to the 'scissors' and the 'red arrows' icons) to manually define a box - potentially oblique - and export the points falling inside as a new cloud
Daniel, CloudCompare admin
Post Reply