problem with random sample

classic Classic list List threaded Threaded
7 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 !
Reply | Threaded
Open this post in threaded view
|

Re: problem with random sample

M rezaei
HI
did you find response of your question?
I have similar problem
thanks




--
Sent from: http://www.pcl-users.org/
_______________________________________________
[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

Ed-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: problem with random sample

MarkL
In reply to this post by M rezaei
This problem was addressed at:
https://github.com/PointCloudLibrary/pcl/pull/2141 (Avoid huge index jumps
in RandomSample)

Fixed and committed on Dec 20, 2017 (so not in 1.8.1). You would need to use
the latest version.

Alternatively you can try to implement something yourself. Take a look at:
http://www.pcl-users.org/Sample-random-points-from-each-voxel-of-a-point-cloud-tp4045394p4045473.html




M rezaei wrote
> HI
> did you find response of your question?
> I have similar problem
> thanks
> --
> Sent from: http://www.pcl-users.org/
> _______________________________________________

> PCL-users@

>  / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users





--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users