rasunag27
rasunag27

Reputation: 65

How to clean up the mesh in Open3D?

I created surface mesh from 3D cloud points using Open3D library in python. I have a lot of cases where the domains are similar to each other. For most of the cases, the open3D does a fine job in creating a closed surface mesh, but for few cases it creates some outlier meshes from the domain. Below is the code for surface mesh from Open3D.

pcd = o3d.io.read_point_cloud('./mesh.xyz')
pcd.estimate_normals()

# to obtain a consistent normal orientation
pcd.orient_normals_towards_camera_location(pcd.get_center())
pcd.normals = o3d.utility.Vector3dVector( - np.asarray(pcd.normals))

# surface reconstruction using Poisson reconstruction
mesh, _ = o3d.geometry.TriangleMesh.create_from_point_cloud_poisson(pcd, depth=9)

o3d.io.write_triangle_mesh('mesh.stl', mesh)

I have attached pics of the outlier mesh obtained from the domain. How to clean those mesh from Open3D?. This occurs for only few of the test cases. We can easily see in the outlier image how the mesh is outside the domain.

Complete mesh after completion

Outlier when the mesh is zoomed in

Any leads will be appreciated.

Regards, Sunag R A.

Upvotes: 1

Views: 4537

Answers (1)

Sonam Kumar
Sonam Kumar

Reputation: 43

You can use Open3D Connected-components to remove outliers. Example link - http://www.open3d.org/docs/release/tutorial/geometry/mesh.html#Connected-components

Note - Please remove the duplicate vertices from mesh before using Connected-components.

Upvotes: 3

Related Questions