'Usage of pcl::CropHull

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



Solution 1:[1]

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)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joachim D