Is there any implementation Available for 'Euclidean Cluster Extraction' using Open3D ?
I am looking to Separate a point cloud into unconnected objects, as shown in the image. There are 6 Unconnected objects. that means 6 Clusters of points in one file, right? I just want to Separate them in 6 different point cloud files.

Found a solution using PCL Euclidean Cluster Extraction But I am implementing the code using Open3D The file is .ply with ASCII true, all the point (x y z r g b) Is there any solution to achieve the target?
DBCluster might work. Look here.
Thanks for the response, I'm a bit newbie with of open3D so can you provide any example with
cluster_dbscan(self, eps, min_points, print_progress=False)
eps means? I have point cloud file and how to use it with cluster_dbscan ?
For an example you can have a look here.
Getting errors:
File "C:/Open3D/examples/Python/Basic/clustering.py", line 35, in <module>
for pcl_name, pcl, eps in pointcloud_generator():
File "C:/Open3D/examples/Python/Basic/clustering.py", line 15, in pointcloud_generator
yield 'cube', o3d.geometry.TriangleMesh.create_sphere().sample_points_uniformly(int(1e4)), 0.4
AttributeError: type object 'open3d.open3d.geometry.TriangleMesh' has no attribute 'create_sphere'
what should i do ?
Which version of Open3D is installed?
The examples assumes v0.8.
Im usig v0.7, tried with this code as well, error is same:
def pointcloud_generator():
yield 'cube', o3d.geometry.TriangleMesh.create_sphere(
).sample_points_uniformly(int(1e4)), 0.4
mesh = o3d.geometry.TriangleMesh.create_torus().scale(5)
mesh += o3d.geometry.TriangleMesh.create_torus()
yield 'torus', mesh.sample_points_uniformly(int(1e4)), 0.75
d = 4
mesh = o3d.geometry.TriangleMesh.create_tetrahedron().translate((-d, 0, 0))
mesh += o3d.geometry.TriangleMesh.create_octahedron().translate((0, 0, 0))
mesh += o3d.geometry.TriangleMesh.create_icosahedron().translate((d, 0, 0))
mesh += o3d.geometry.TriangleMesh.create_torus().translate((-d, -d, 0))
mesh += o3d.geometry.TriangleMesh.create_moebius(twists=1).translate(
(0, -d, 0))
mesh += o3d.geometry.TriangleMesh.create_moebius(twists=2).translate(
(d, -d, 0))
yield 'shapes', mesh.sample_points_uniformly(int(1e4)), 0.5
if __name__ == "__main__":
cmap = plt.get_cmap('Set2')
for pcl_name, pcl, eps in pointcloud_generator():
labels = np.array(pcl.cluster_dbscan(eps=eps, min_points=10))
max_label = labels.max()
print('%s has %d clusters' % (pcl_name, max_label + 1))
colors = cmap(labels / (max_label if max_label > 0 else 1))
colors[labels < 0] = 0
pcl.colors = o3d.utility.Vector3dVector(colors[:, :3])
o3d.visualization.draw_geometries([pcl])
Some how code is working now, but getting this in console
File "C:Open3D/examples/Python/reg_combined/clustering.py", line 45, in <module>
pcl.cluster_dbscan(eps=eps, min_points=10, print_progress=True))
AttributeError: 'open3d.open3d.geometry.PointCloud' object has no attribute 'cluster_dbscan'
am I doing something wrong or what? .. don't have any idea
你好,我想请问一下,我自己的ply文件进行聚类分割,为什么出来没有颜色,报颜色被毁
请问怎么jie'jue解决
@griegler anything similar to directly apply for TriangleMesh available in our toolbox?
@scimad not at the moment. But you could convert the mesh to a pointcloud first, either using sampling or directly using the vertices.
Thanks @griegler . Found that but was wondering if there was better more direct way.