You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble filling small holes in a mesh created from a point cloud. I'm using the following function...
def pointcloud_to_mesh(point_cloud):
"""
Convert an Open3D point cloud to a mesh using Ball Pivoting Algorithm.
"""
distances = point_cloud.compute_nearest_neighbor_distance()
avg_dist = np.mean(distances)
radius = 0.5 * avg_dist
print('Calculating normals...')
point_cloud.estimate_normals(
search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=radius, max_nn=30)
)
print('Creating mesh...')
bpa_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting(
point_cloud,
o3d.utility.DoubleVector([radius, radius*2, radius*4, radius*8, radius*16, radius*32]),
)
bpa_mesh = bpa_mesh.remove_degenerate_triangles()
bpa_mesh = bpa_mesh.remove_duplicated_triangles()
bpa_mesh = bpa_mesh.remove_non_manifold_edges()
bpa_mesh = bpa_mesh.remove_unreferenced_vertices()
# Post-process the mesh to clean and fill small holes
mesh = o3d.t.geometry.TriangleMesh.from_legacy(bpa_mesh)
filled_mesh = mesh.fill_holes(1000000)
bpa_mesh = filled_mesh.to_legacy()
return bpa_mesh
You can see that some have been filled by the stretched out triangle marked as 'filled' but there are lots of small ones that should be easily filled but are not... what am I missing?
I tried create_from_point_cloud_poisson() from #3913 but the results were destroyed all details.
I'm using open3d 0.18.0 installed from pypi
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm having trouble filling small holes in a mesh created from a point cloud. I'm using the following function...
You can see that some have been filled by the stretched out triangle marked as 'filled' but there are lots of small ones that should be easily filled but are not... what am I missing?
I tried create_from_point_cloud_poisson() from #3913 but the results were destroyed all details.
I'm using open3d 0.18.0 installed from pypi
Beta Was this translation helpful? Give feedback.
All reactions