Quantcast

The cloud size decreases sharply after downsampling the point cloud

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

The cloud size decreases sharply after downsampling the point cloud

aijim
This post was updated on .
Hi everyone,

Please help!
I removed some points from a point cloud and then down sampled the point cloud. As a result, the size of the cloud decreases sharply, from 300000 to below 100.

I removed points by creating another point cloud.
pcl::PointCloud<pcl::PointXYZ>::iterator ipt = cloud_pcl_xyz -> begin();
  for(int j = 0; j<nr+2*cut_edge_size ; j++)
  {
    for(int i = 0; i<nc+2*cut_edge_size; i++)
    {
      if(j>=cut_edge_size && j<cut_edge_size+nr && i>=cut_edge_size && i< cut_edge_size+nc)
      {
        if(navi_flags.at<unsigned char>(0,((j-cut_edge_size)/cell_size)*(nc/cell_size)+(i-cut_edge_size)/cell_size))
        {
          cloud_pcl_1->points.push_back(*ipt);
        }
      }else{
        cloud_pcl_1->points.push_back(*ipt);
      }
      ipt++;
    }
  }

This process just removes a few dozens of points from the point cloud.

If this process is not executed, downsampling does not make sharp decrease in the size of the point cloud.

Why making holes in the point cloud and then downsampling removed so many points from the point cloud?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: The cloud size decreases sharply after downsampling the point cloud

aijim
Problem solved. Instead of creating a new point cloud, I assigned nan to the points I wanted to remove. And then downsample works, even though I still don't know what happened.
Loading...