How to remove clusters from point cloud clustered by DBSCAN #5560
naoki-fuse
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there!
I want to remove only specific clusters after clustering with DBSCAN.
For example, I want to remove the wire-like noise in the middle of the attached clustered point cloud data.
Any idea please.
pcd_clustered.zip
with o3d.utility.VerbosityContextManager(
o3d.utility.VerbosityLevel.Debug) as cm:
labels = np.array(
pcd.cluster_dbscan(eps=0.3, min_points=100, print_progress=True))
max_label = labels.max()
print(f"point cloud has {max_label + 1} clusters")
colors = plt.get_cmap("tab20")(labels / (max_label if max_label > 0 else 1))
colors[labels < 0] = 0
pcd.colors = o3d.utility.Vector3dVector(colors[:, :3])
Beta Was this translation helpful? Give feedback.
All reactions