Skip to content

Commit b76f846

Browse files
committed
added a description for using open3d or meshlab as tool of choice for mesh reconstruction
1 parent 81942ba commit b76f846

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

docs/tutorials/mesh_mapping.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ It is also possible to convert certain data structures to others. Here a list:
6969
| Name | Link | Comments | MeshNav-proved? |
7070
|:----|:----|:--------|:-----|
7171
| lvr2 | https://github.com/uos/lvr2 | `lvr2_reconstruct` executable | yes |
72-
| Open3D | https://www.open3d.org/ | Example Open3D scripts: [Link](https://github.com/naturerobots/open3d_scripts) | yes |
7372
| meshlab | https://www.meshlab.net/ | | yes |
73+
| Open3D | https://www.open3d.org/ | Example Open3D scripts: [Link](https://github.com/naturerobots/open3d_scripts) | yes |
7474

7575

7676
#### LVR2
@@ -108,6 +108,55 @@ Some important parameters are:
108108
There are more parameters that influence the way lvr2 is reconstructing surfaces from point clouds.
109109
My advise is to just test them and see what changes.
110110

111+
112+
#### Meshlab
113+
114+
MeshLab is an open-source software designed for processing and editing 3D triangular meshes, widely used for reconstructing surfaces from point clouds.
115+
It supports various algorithms to convert unstructured point clouds into coherent triangular meshes, such as Poisson surface reconstruction, and Marching Cubes.
116+
117+
Further resources:
118+
- "Meshing Point Clouds": [https://meshlabstuff.blogspot.com/2009/09/meshing-point-clouds.html](https://meshlabstuff.blogspot.com/2009/09/meshing-point-clouds.html)
119+
120+
#### Open3D
121+
122+
Open3D is a versatile open-source library for 3D data processing that provides tools for surface reconstruction from point clouds using methods like Poisson reconstruction and alpha shapes. The following example showcases the usage of the python API to Poission reconstruction to extract surfaces:
123+
124+
```python
125+
import open3d as o3d
126+
import sys
127+
128+
"""
129+
This script reconstructs surfaces from a point cloud using Poisson Surface reconstruction
130+
using Open3D's API (version 0.18.0)
131+
132+
Input: point cloud -> Output: mesh
133+
"""
134+
if __name__ == '__main__':
135+
file_in = sys.argv[1]
136+
file_out = sys.argv[2]
137+
138+
pcd = o3d.io.read_point_cloud(file_in)
139+
140+
print("Estimating point normals...")
141+
pcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
142+
143+
# Tweek the following parameters
144+
depth = 11 # the higher the more details, the more RAM is used
145+
density_filter = 0.05
146+
147+
print("Starting Poisson surface reconstruction...")
148+
mesh, densities = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(pcd, depth=depth)
149+
150+
print("Removing vertices with low Poission density")
151+
vertices_to_remove = densities < np.quantile(densities, density_filter)
152+
mesh.remove_vertices_by_index(np.where(vertices_to_remove)[0])
153+
154+
# Save the mesh
155+
o3d.io.write_triangle_mesh(file_out, mesh)
156+
```
157+
158+
Further examples can be inferred from the official Open3D documention page: [https://www.open3d.org/docs/release/](https://www.open3d.org/docs/release/).
159+
111160
## Optimization
112161

113162
After we generated a mesh using SLAM approaches, it often has a high resolution; normally, exactly as high as the internal voxel representation.

0 commit comments

Comments
 (0)