PCL point cloud filter
发布时间
阅读量:
阅读量
该函数的作用是依据x、y、z三个坐标轴的方向对点云数据实施筛选操作,例如若需移除x轴坐标值超过1的点,则可通过调用range_remove(cloud, "x", 1, ">")实现。
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <iostream>
typedef pcl::PointCloud<pcl::PointXYZRGB> PointCloudRGB;
PointCloudRGB::Ptr range_remove(PointCloudRGB::Ptr cloud, std::string axis, float threshold, std::string op)
{
// axis 想要操作的轴
// threshold 坐标值
// op 大于还是小于
std::cout << "start removing points outside the range "<<op +to_string(threshold) <<" along "<<axis+" axis"<< std::endl;
PointCloudRGB::Ptr filtered(new Po
全部评论 (0)
还没有任何评论哟~
