Usage of pcl::CropHull

683 Views Asked by At

Hello I am looking for a way to find out points/indices of point cloud which lie within a set of pre-defined polygon points/indices.

My Input would be either of the following.

  1. Set of indices of the cloud forming a 2D polygon. Eg : 21480, 4491, 20399, 19034, 21322, 5240, 5870, 21480
  2. Set of coordinates(x,y,z) which correspond to the above indices in the cloud.

enter image description here

1

There are 1 best solutions below

0
On

May I politelly suggest you the documentation pcl::CropHull

In your case. the methods: setHullCloud (PointCloudPtr points) setCropOutside (bool crop_outside) and then filter (PointCloud &output)

should do the job.

If this did not answer your problem please be more specific to which problems you are exactly facing when using pcl::CropHull (with code if possible)