2 April 2014

From point cloud to mesh


Now that we have point clouds what can we do with them?
Well my first idea was to use them as a reference to create meshes in a 3D editor.
But if you want to make a mesh from the point cloud itself, how can we do it?

This is a basic tutorial to create meshes from point clouds in Cloud Compare.
For that we need to install Cloud Compare.
Just go to:  http://www.danielgm.net/cc/  and download the program.
It's free but you can make a donation to the creator, he really deserves.

PVS creates point clouds and the ones from the sample project are stored in the folder ".../PVS/Sample Project/Reconstruction/Absolute". They are in the ASCII PLY format.
If you are interested in knowing more about the format, please visit  http://paulbourke.net/dataformats/ply/ .

Ok now let's start:

1 - Open Cloud Compare and drag the point clouds you want to treat inside.

2 - Cloud compare asks for each point cloud some questions, just click "Ok" for all. This may take a while.
If you are aware of a faster way, please share with me.

3 - You will see all the point clouds in the viewer.
Usually I change from orthographic projection to object centred projection. For that use the button on the left pane and change from

3 - The point clouds are separated, let's merge them.
Keep the "Alt" key pressed and with the mouse select all the points on the viewer or in the left list, select all the point clouds.

Now go to the menu and select "Edit->Merge".

4 - Now we have a merged point cloud.
We need to sub sample the point cloud to remove overlapping points and to get a workable mesh.
Once again, select the point cloud you want to sub sample.
Next go to the menu and select "Edit->Subsample".

  • On the method I use "Space".
  • I'm using 0,05 meters on the space between points.
  • Click "Ok" and wait.

We now have two point clouds. The original one (now hidden) and the sub sampled one.

5 - Now let's make the mesh.
You must have the sub sampled point cloud selected.
On the menu select "Edit->Mesh->Delaunay 2D (axis aligned plane)"

  • Select a value of 0.8 meters for the maximum edge length.
  • Pres "Ok" and wait.

The mesh is created. Uncheck "Normals" to see the coloured faces and check "Wireframe" to see the wire frame.

6 - Ok this is a bit chaotic, let's smooth the surfaces.
Select the mesh and on the menu go to "Edit->Mesh->Smooth (Laplacian)".

  • Keep default values.
  • Click "Ok"and wait.

Once again, uncheck "Normals" to see the coloured faces and check "Wireframe" to see the wire frame.

That's it, you now have a smoothed mesh reconstruction.
Play with the values.