地平面检测和去除机器人在3D数据中的定位

时间:2017-03-07 16:13:03

标签: 3d computer-vision point-cloud-library point-clouds ransac

我正在使用SACSegmentation from PCL segmentation module来过滤掉地平面。

该方法适合3D物体的前表面,而不是如下面的第二个pcd文件所示安装地平面。

任何建议我应该怎样做才能适应和过滤地平面点。

提前致谢。

pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients);

pcl::SACSegmentation<pcl::PointXYZ> segmentation;

segmentation.setInputCloud(cloudAll);

segmentation.setOptimizeCoefficients(true);

segmentation.setModelType(pcl::SACMODEL_PLANE );

segmentation.setMethodType(pcl::SAC_RANSAC );

segmentation.setDistanceThreshold(20.20);

Scene*.PCD

After the ground plane segmentation

afterApplyingPassthrough

1 个答案:

答案 0 :(得分:2)

问题在于Ransac找到了适合更高点数的平面,点云中的点对应于前表面。

如果您对场景和坐标系有一定的了解,那么您可以轻松解决问题,如下所示:

  1. 使用PCL的PassThrough filter仅选择高于某个y值的点云的点。

  2. 这里我假设y代表给定点云坐标系中的垂直轴。

    此阈值应基于您对场景尺寸的了解。

    根据您的点云,您应该使用y > 200选择点。

    你的观点云:

    enter image description here

    仅选择y > 200点:

    enter image description here

    1. 按照您的方式执行细分,但这次只使用选定的点子集。
    2. 以下是使用所选点的正确拟合平面的可视化:

      enter image description here