Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don segmentation #112

Open
akashverma1995 opened this issue Nov 27, 2023 · 0 comments
Open

Don segmentation #112

akashverma1995 opened this issue Nov 27, 2023 · 0 comments

Comments

@akashverma1995
Copy link

akashverma1995 commented Nov 27, 2023

I tried the difference of normal(DON) for MLS data. I am facing some issue

  1. after loading data in PCLpy, a gap is coming in the input data
  2. The difference of normal is not coming properly

I want to remove vegetation from the data, and for that, I am trying to apply don segmentation.
if you have any suggestions please share them with me
and how can I check normal computed by pclpy is correct

and I am using below given code

pc_subsampled = pclpy.octree_voxel_downsample(pc, 0.05)
subsampled = pclpy.octree_voxel_downsample(pc_subsampled, 0.4)

normals_large = pcl.PointCloud.PointNormal()
pc_subsampled.compute_normals(radius=4, output_cloud=normals_large, num_threads=8, search_surface=subsampled)
normals_small = pcl.PointCloud.PointNormal()
pc_subsampled.compute_normals(radius=0.10, output_cloud=normals_small, num_threads=8)

don = pcl.features.DifferenceOfNormalsEstimation.PointXYZRGBA_PointNormal_PointNormal()
don.setInputCloud(pc_subsampled)
don.setNormalScaleLarge(normals_large)
don.setNormalScaleSmall(normals_small)
output = pcl.PointCloud.PointNormal(pc_subsampled.xyz)
don.computeFeature(output)
indices = np.argwhere(output.curvature > 0.4)
output2 = pcl.PointCloud.PointNormal(output, pcl.vectors.Int(indices))

clusters = pclpy.extract_clusters(pcl.PointCloud.PointXYZ(output2.xyz), 0.1, 50, 100000)
assert len(clusters) in range(30, 35)  # there is some randomness to the results

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant