[PCL]ApproximateVoxelGrid

时间:2022-04-24 10:59:42

点云滤波继承自Filter模板类

注意Filter类的filter 方法调用了虚方法applyFilter:

 inline void  filter (PointCloud &output)
{
if (!initCompute ())
return; if (input_.get () == &output) // cloud_in = cloud_out
{
PointCloud output_temp;
applyFilter (output_temp);
output_temp.header = input_->header;
output_temp.sensor_origin_ = input_->sensor_origin_;
output_temp.sensor_orientation_ = input_->sensor_orientation_;
pcl::copyPointCloud (output_temp, output);
}
else
{
output.header = input_->header;
output.sensor_origin_ = input_->sensor_origin_;
output.sensor_orientation_ = input_->sensor_orientation_;
applyFilter (output);
} deinitCompute ();
}

ApproximateVoxelGrid进行点云Filter

效果图:

原始点云66901个点,点云平均距离0.038253,采样参数(Grid size 0.2)后点云数目11924

[PCL]ApproximateVoxelGrid [PCL]ApproximateVoxelGrid