从PCL样本一致性中获得异常值

Get outliers from PCL sample consensus

本文关键字:异常 PCL 样本 一致性      更新时间:2023-10-16

我使用PCL提供的SampleConsensus功能,如下所示:http://pointclouds.org/documentation/tutorials/random_sample_consensus.php#random-sample-consensus

问题是,该实现允许通过使用getInliers检索ransac内层,然后可以使用公共函数copyPointCloud(in, inliers, out)轻松地转移到点云中。我感兴趣的是观察异常值。似乎没有返回异常值列表的功能。如果初始列表是有序的,那么我可以循环遍历点列表并检查当前的初始值,如下所示:

for i in point cloud
   if i == currentInlier
       currentInlier++
   else
       add point cloud (i) to new outlier cloud

但我不确定,即使它看起来像它将被创建的方式,前面的列表是保证排序?

也肯定有一个本地的方法来做到这一点在PCL?

您几乎肯定需要pcl::ExtractIndices。文档在这里:

http://docs.pointclouds.org/1.7.0/classpcl_1_1_extract_indices.html

你可以看到它在这里是如何使用的:

http://pointclouds.org/documentation/tutorials/extract_indices.php extract-indices

具体参见:

pcl::ExtractIndices<pcl::PointXYZ> extract;
...
extract.setInputCloud (cloud_filtered);
extract.setIndices (inliers);
...
extract.setNegative (true);
extract.filter (*cloud_f);