头文件:
#include <pcl/filters/voxel_grid.h>
函数示例:
void pclDownsize(pcl::PointCloud<pcl::PointXYZ>::Ptr in, pcl::PointCloud<pcl::PointXYZ>::Ptr out)
{
pcl::VoxelGrid<pcl::PointXYZ> down_filter;
float leaf = 0.05;
down_filter.setLeafSize(leaf, leaf, leaf);
down_filter.setInputCloud(in);
down_filter.filter(*out);
}