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.
- Set of indices of the cloud forming a 2D polygon. Eg : 21480, 4491, 20399, 19034, 21322, 5240, 5870, 21480
- Set of coordinates(x,y,z) which correspond to the above indices in the cloud.
May I politelly suggest you the documentation pcl::CropHull
In your case. the methods:
setHullCloud (PointCloudPtr points)
setCropOutside (bool crop_outside)
and thenfilter (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)