大部分摘自大神的博客。
程序例子:
1.
std::vector<int> indices; //保存去除的点的索引
pcl::removeNaNFromPointCloud(*m.cloud,*m.cloud, indices); //去除点云中的NaN点,(m是个结构体对象,参数1是输入,参数二是输出。indices一般不用)
2.
//the mapping tells you to that points of the oldcloud the new ones correspond //but we will not use it std::vector<int> mapping; pcl::removeNaNFromPointCloud(*cloud, *cloud, mapping);
很简单,需要一个索引向量和输入输出对象。
官方文档解释在这。