PCL - Extract bounding box and vertical plane

asked 2021-06-17 03:02:47 -0500

MadeleineP gravatar image

I have a point cloud (pcl::PointCloud<pcl::PointXYZ>) loaded from a .pcd file that I would like to do 2 reductions to. In this example it is 640x480, and the cloud / .pcd file is "shaped" with those dimensions.

I have a bounding box in pixel values that I want to crop out. Say, for example, that it is the middle 200x200 points. I can pretty easily iterate over these points and pull them out manually.

In addition, I want to remove a vertical plane (the floor).

I'd like to remove the floor first, since it may only make up a very small portion of the bounding-box cropped image, and therefore more difficult to identify after cropping. However, when I do plane segmentation as the first step, the resulting point cloud is no longer "shaped". It is 1-dimensional. And therefore my manual method of bounding-box cropping no longer works.

Is there a PCL-based way to accomplish these two tasks in the order of plane segmentation and then bounding-box cropping?

Regards and thanks! Madeleine

edit retag flag offensive close merge delete