Point cloud library 彩色滤光片

Point cloud library 彩色滤光片,point-cloud-library,point-clouds,Point Cloud Library,Point Clouds,我想过滤掉点云中具有特定“r”值的点 我查看了文档,发现pcl/filters/color.h在PCL1.7及以上版本中不再可用,这令人费解。() 我可能可以用一个朴素的for循环来实现这一点,但我想知道是否有一种方法可以使用直通过滤器条件,因为这可能是多线程的 我最后使用了条件_删除,RGB有一个模板专门化。下面是一个片段,我们从中得到一个名为cloud_msg的ROS点云 #include <pcl/filters/conditional_removal.h> //and th

我想过滤掉点云中具有特定“r”值的点

我查看了文档,发现pcl/filters/color.h在PCL1.7及以上版本中不再可用,这令人费解。()


我可能可以用一个朴素的for循环来实现这一点,但我想知道是否有一种方法可以使用直通过滤器条件,因为这可能是多线程的

我最后使用了条件_删除,RGB有一个模板专门化。下面是一个片段,我们从中得到一个名为cloud_msg的ROS点云

 #include <pcl/filters/conditional_removal.h> //and the other usuals

 pcl::PointCloud<pcl::PointXYZRGB>::Ptr rgb_cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
 pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZRGB>);
 pcl::fromROSMsg(*cloud_msg, *rgb_cloud);
 pcl::PCLPointCloud2 cloud_filtered_ros;

 pcl::ConditionalRemoval<pcl::PointXYZRGB> color_filter;

 pcl::PackedRGBComparison<pcl::PointXYZRGB>::Ptr
     red_condition(new pcl::PackedRGBComparison<pcl::PointXYZRGB>("r", pcl::ComparisonOps::GT, 90));
 pcl::ConditionAnd<pcl::PointXYZRGB>::Ptr color_cond (new pcl::ConditionAnd<pcl::PointXYZRGB> ());
 color_cond->addComparison (red_condition);

 // Build the filter
 color_filter.setInputCloud(rgb_cloud);
 color_filter.setCondition (color_cond);
 color_filter.filter(*cloud_filtered)
#包括//和其他常用术语
pcl::PointCloud::Ptr rgb_cloud(新pcl::PointCloud);
pcl::PointCloud::Ptr cloud_过滤(新pcl::PointCloud);
pcl::fromROSMsg(*cloud\u msg,*rgb\u cloud);
pcl::PCLPointCloud2 cloud\u filtered\u ros;
pcl::条件去除颜色过滤器;
pcl::PackedRGBComparison::Ptr
红色_条件(新的pcl::PackedRGBComparison(“r”,pcl::ComparisonOps::GT,90));
pcl::ConditionAnd::Ptr color_cond(新的pcl::ConditionAnd());
颜色条件->添加比较(红色条件);
//构建过滤器
颜色过滤器。setInputCloud(rgb_cloud);
颜色过滤器设置条件(颜色条件);
颜色过滤器。过滤器(*云过滤器)