dbscan clustering is very memory intensive. I'd like to downsample, calculate clusters, then approximately relate these calculated clusters to the original image.
This is the standard way to downsample is:
# examples/Python/Basic/pointcloud.py
import numpy as np
import open3d as o3d
if __name__ == "__main__":
print("Load a ply point cloud, print it, and render it")
pcd = o3d.io.read_point_cloud("../../TestData/fragment.ply")
print(pcd)
print(np.asarray(pcd.points))
o3d.visualization.draw_geometries([pcd])
print("Downsample the point cloud with a voxel of 0.05")
downpcd = pcd.voxel_down_sample(voxel_size=0.05)
o3d.visualization.draw_geometries([downpcd])
#Then this could be clustered via dbscan
labels = np.array(
downpcd.cluster_dbscan(eps=0.05, min_points=30, print_progress=True))
How would I then relate these labels back to the original PCD (pcd)?
Thanks!
I have used open3d fragments.ply file, and results are as follows:
A few notes
Best