在对点云数据预处理中使用统计滤波,结果报错,错误如下
[pcl::OrganizedNeighbor::radiusSearch] Input dataset is not from a projective device! Residual (MSE) 0.001363, using 1056 valid points
网上查询无果,终端打印点云数值发现有NaN点。之后使用pcl::removeNaNFromPointCloud去除无效的NaN点,有序点云变成了无序点云,之后的预处理都很顺利。
std::vector<int> indices; //保存去除的点的索引,一般后面用不到
pcl::removeNaNFromPointCloud(*cloud, *cloud, indices); //去除点云中的NaN点
总结就是,在确保点云数据有效的前提下再进行其他的预处理。