Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. void decimate_cloud(pcl::PointCloud<pcl::PointXYZ::Ptr in_cloud, pcl::PointCloud & out_cloud>, uint32 factor)
  2. {
  3.     for(uint32 i=0; i < in_cloud->size(); ++i)
  4.     {
  5.         if(i % factor == 0)
  6.         {
  7.             out_cloud.push_back(pcl::PointXYZ((*in_cloud)[i].x,(*in_cloud)[i].y,(*in_cloud)[i].z));
  8.         }
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement