Quantcast

bilaterfilter gird error on px!=0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bilaterfilter gird error on px!=0

patrick
This post has NOT been accepted by the mailing list yet.
 void applyBilFilterNormal(pcl::PointCloud<PointXYZI>::Ptr & inCloud , pcl::PointCloud<PointXYZI> & outCloud, float sigmaS, float sigmaR)
  {
      ROS_INFO("%s:%d:bilateralfilterNormal:enter",__FILENAME__,__LINE__);
      ROS_INFO("%s:%d:bilateralfilterNormal:WARNING NOT FULLY IMPLEMENTED",__FILENAME__,__LINE__);
      pcl::BilateralFilter<pcl::PointXYZI> filter;
savePCLFILE("jnkxyzi.pcd", *inCloud,true);
       pcl::search::KdTree<pcl::PointXYZI>::Ptr tree (new pcl::search::KdTree<PointXYZI>);

      filter.setInputCloud(inCloud);
      filter.setStdDev(0.2);
      filter.setHalfSize(1.0);
      filter.setSearchMethod(tree);
      filter.applyFilter(outCloud);

     ROS_INFO("%s:%d:bilateralfilterNormal:leave",__FILENAME__,__LINE__);
  }


This is version 1.71

z_filters: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = std::vector<int>; typename boost::detail::sp_member_access<T>::type = std::vector<int>*]: Assertion `px != 0' failed.
../start_fusion_zfilter.bsh: line 11: 24039 Aborted                 (core dumped) stdbuf -o L rosrun z_filters


Patrick Brown (pmh786@zebra.com)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bilaterfilter gird error on px!=0

patrick
This post has NOT been accepted by the mailing list yet.
Ok after looking at it a bit the software needs an indices values of values that are not NAN.
Also the program only affect the intensity value and has no affect on the x,y,z value.
Please correctly if i am wrong here.

      std::vector<int> indices2;
      outCloud = *inCloud;
      pcl::removeNaNFromPointCloud(*inCloud, outCloud, indices2);

      pcl::PointIndices::Ptr  indices (new pcl::PointIndices);

      indices->indices = indices2;

      pcl::BilateralFilter<pcl::PointXYZI> filter;

      outCloud = *inCloud;

      filter.setInputCloud(inCloud);
      filter.setStdDev(sigmaR);
      filter.setHalfSize(sigmaS);
     filter.setIndices(indices);

      filter.applyFilter(outCloud);
Patrick Brown (pmh786@zebra.com)
Loading...