problem with random sample

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with random sample

Taleb Ashkar
I have a problem with Random Sample. I am trying to decrase the number of vertexes in my point clouds into a fixed size. I am using this code of Random Sample.

  // Create the filtering object
   pcl::RandomSample<pcl::PointXYZ> random_sample;
  random_sample.setInputCloud(cloud);      //the size of it 6500
  random_sample.setSample( goal_samples ); //5000
  random_sample.setSeed(rand());
  random_sample.filter(*cloud_filtered);

But, the result of strange, all deleted vertexes were from the upper part of the orginal point cloud.

Any problems in the code !

Thanks
Taleb
Reply | Threaded
Open this post in threaded view
|

Re: problem with random sample

aichim
Administrator
Hi,


This is a known problem: http://dev.pointclouds.org/issues/964

We still need some man-power there, contributions are welcome.


Cheers,
Alex

On Apr 29, 2013, at 6:25 PM, seafather <[hidden email]> wrote:

> I have a problem with Random Sample. I am trying to decrase the number of
> vertexes in my point clouds into a fixed size. I am using this code of
> Random Sample.
>
>  // Create the filtering object
>   pcl::RandomSample<pcl::PointXYZ> random_sample;
>  random_sample.setInputCloud(cloud);      //the size of it 6500
>  random_sample.setSample( goal_samples ); //5000
>  random_sample.setSeed(rand());
>  random_sample.filter(*cloud_filtered);
>
> But, the result of strange, all deleted vertexes were from the upper part of
> the orginal point cloud.
>
> Any problems in the code !
>
> Thanks
> Taleb
>
>
>
>
> --
> View this message in context: http://www.pcl-users.org/problem-with-random-sample-tp4027562.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: problem with random sample

Taleb Ashkar
Hi,
Thanks aichim
please is there any other classes to do the same mission in PCL?

Greeting
Reply | Threaded
Open this post in threaded view
|

Re: problem with random sample

Taleb Ashkar
In reply to this post by aichim
I mean, is there any other ways to downsample point cloud into a fixed size number !