我正在按照此处的示例使用 PCL 提供的 SampleConsensus
功能:http://pointclouds.org/documentation/tutorials/random_sample_consensus.php#random-sample-consensus
问题是,该实现允许通过使用 getInliers
检索 ransac 内点,然后可以使用常用函数 copyPointCloud(in, inliers) 轻松将其转移到点云中, 出)
。我有兴趣查看异常值。似乎没有返回异常值列表的功能。如果内点列表已排序,那么我可以遍历点列表并检查当前内点:
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);
关于c++ - 从 PCL 样本共识中获取异常值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24132773/