从PCL样本一致性中获得异常值
Get outliers from PCL sample consensus
我使用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://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++方法
- 我在c++代码中生成了一个运行时#3异常
- 孤立代码块在结构中引发异常
- C++中的赋值发生,尽管右侧出现异常
- 从构造函数抛出异常时如何克服内存泄漏
- 异常属于C++中的线程还是进程
- 当类定义不可见时捕获异常
- 引发异常:读取访问冲突**dynamicArray**为0x1118235.发生
- 为什么异常不退出程序?
- 为什么我应该在异常处理中使用std::cerr而不是std::cout
- 如何修复链表类实现的未处理异常0xDDDDDDDD
- 关于:C++中异常对象的范围:为什么我没有得到副本?
- 是什么导致了Unity 3D中的"错误线程异常"?
- 如何将strftime中的格式错误作为异常捕获
- 创建具有 new in 函数和"this is nullptr"异常的对象
- 尝试使用智能指针时引发异常
- 函数如何通知用户它基于函数原型抛出异常?
- 是否值得降低我的代码的可读性,以便在出现内存不足错误时提供异常安全性?
- PCL 和 CMake 的问题:链接时未定义统计异常值删除
- PCL可视化器-退出可视化器窗口时从Eigen抛出异常