[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset 报错解决,亲测可行
1. 报错日志:
Python-pcl 点云下采样时报错如下:
[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow
首先得了解下采样/抽稀的原理:
点云VoxelGridFilter,称为体素格下采样,也叫抽稀。下采样是一种能显著减少点云的数据量,并保持其形状特征和空间结构信息与原始点云基本没差别的算法。
其核心是: 将点云分割成一个个微小的立方体,落在立方体内的所有点用一个重心点来最终表示,对所有的小立方体处理后得到最终的点云结果。
- 取重心点比所有点取平均值的算法稍慢,但是其结果更准确;
下采样设置的voxelGridFilter.set_leaf_size(rate,rate,rate)