How to create a mesh from a point cloud and transfer the colors of the points

Following this method: http://gmv.cast.uark.edu/scanning/point-clouds-to-mesh-in-meshlab/

- open the point cloud in MeshLab  (this will be the mean_original_shape.ply file)
- reconstruct the normals so Meshlab knows which side of the point is outside and which side is inside
   - Filters -> Point Set -> Compute Normals for point set
   - Number of neighbors should be 50 (or whatever you wish)
   - check the box Flip normals w.r.t. viewpoint

- reconstruct the surface 
  - can be done using Filters -> Point Set -> Surface Reconstruction: Poisson
  - crashed when I tried it, but may need to try again

  - or can be done using Filters -> Point Set -> Marching Cubes (APSS)
  - this is what I used and with these settings:


  -Once the surface is reconstructed it might be a dark gray color, you will need to invert the faces orientation 
  - Filters -> Normals, Curvature, and Orientation -> Invert Faces Orientation
  - It should then be a light gray color

  - There might also be holes that you need to fill
  - Filters -> Remeshing, Simplification, and Reconstruction -> close holes
  - might have to first select the edges (border), delete the edges, and then close holes. The surface reconstruction process seals the edges in a way that they are not recognized as holes.


Transfering the color of the point cloud to the mesh:
Open the newly created mesh in Meshlab and make it a dark grey color
- Filters -> Color Creation and Processing -> Per Face Color function
- set all the r g b to 50
- do the same for Filters - Color Creation and Processing -> Per Vertex Color function

Open the point cloud in Meshlab with the mesh
- If I remember correctly, you may need to change the size of the points to make them larger and more easily visible:
   This can be done by going (on a Mac) to Meshlab -> Preferences -> Meshlab::Appearance::pointSize and changing it to a larger number (like 40)
Then:
- Filters -> Sampling -> Vertex Attribute Transfer
- check Transfer Color and make sure the source and target meshes are correct
- Apply






No comments:

Post a Comment