Remove points outside defined 3D box inside PCL visualizer

后端 未结 2 2058
情歌与酒
情歌与酒 2021-01-06 03:04

In a given point cloud, I want to remove all the points which are less than min and greater than max for all x, y and

2条回答
  •  粉色の甜心
    2021-01-06 03:43

    What about using pcl::CropBox? (documentation)

    pcl::CropBox boxFilter;
    boxFilter.setMin(Eigen::Vector4f(minX, minY, minZ, 1.0));
    boxFilter.setMax(Eigen::Vector4f(maxX, maxY, maxZ, 1.0));
    boxFilter.setInputCloud(body);
    boxFilter.filter(*bodyFiltered);
    

    To know why this filter takes Vector4f (and not Vector3f) see the comments below and this question.

提交回复
热议问题