Point Cloud Library (PCL)
1.7.0
|
RandomSample applies a random sampling with uniform probability. More...
#include <pcl/filters/random_sample.h>
Public Types | |
typedef boost::shared_ptr < RandomSample < pcl::PCLPointCloud2 > > | Ptr |
typedef boost::shared_ptr < const RandomSample < pcl::PCLPointCloud2 > > | ConstPtr |
Public Member Functions | |
RandomSample () | |
Empty constructor. | |
void | setSample (unsigned int sample) |
Set number of indices to be sampled. | |
unsigned int | getSample () |
Get the value of the internal sample parameter. | |
void | setSeed (unsigned int seed) |
Set seed of random function. | |
unsigned int | getSeed () |
Get the value of the internal seed parameter. | |
Protected Member Functions | |
void | applyFilter (PCLPointCloud2 &output) |
Sample of point indices into a separate PointCloud. | |
void | applyFilter (std::vector< int > &indices) |
Sample of point indices. | |
float | unifRand () |
Return a random number fast using a LCG (Linear Congruential Generator) algorithm. | |
Protected Attributes | |
unsigned int | sample_ |
Number of indices that will be returned. | |
unsigned int | seed_ |
Random number seed. |
RandomSample applies a random sampling with uniform probability.
Definition at line 155 of file random_sample.h.
typedef boost::shared_ptr<const RandomSample<pcl::PCLPointCloud2> > pcl::RandomSample< pcl::PCLPointCloud2 >::ConstPtr |
Reimplemented from pcl::Filter< pcl::PCLPointCloud2 >.
Definition at line 167 of file random_sample.h.
typedef boost::shared_ptr<RandomSample<pcl::PCLPointCloud2> > pcl::RandomSample< pcl::PCLPointCloud2 >::Ptr |
Reimplemented from pcl::Filter< pcl::PCLPointCloud2 >.
Definition at line 166 of file random_sample.h.
pcl::RandomSample< pcl::PCLPointCloud2 >::RandomSample | ( | ) | [inline] |
Empty constructor.
Definition at line 170 of file random_sample.h.
void pcl::RandomSample< pcl::PCLPointCloud2 >::applyFilter | ( | PCLPointCloud2 & | output | ) | [protected, virtual] |
Sample of point indices into a separate PointCloud.
output | the resultant point cloud |
Implements pcl::Filter< pcl::PCLPointCloud2 >.
void pcl::RandomSample< pcl::PCLPointCloud2 >::applyFilter | ( | std::vector< int > & | indices | ) | [protected, virtual] |
Sample of point indices.
indices | the resultant point cloud indices |
Implements pcl::FilterIndices< pcl::PCLPointCloud2 >.
unsigned int pcl::RandomSample< pcl::PCLPointCloud2 >::getSample | ( | ) | [inline] |
Get the value of the internal sample parameter.
Definition at line 187 of file random_sample.h.
unsigned int pcl::RandomSample< pcl::PCLPointCloud2 >::getSeed | ( | ) | [inline] |
Get the value of the internal seed parameter.
Definition at line 204 of file random_sample.h.
void pcl::RandomSample< pcl::PCLPointCloud2 >::setSample | ( | unsigned int | sample | ) | [inline] |
Set number of indices to be sampled.
sample |
Definition at line 179 of file random_sample.h.
Referenced by pcl::outofcore::OutofcoreOctreeBaseNode< ContainerT, PointT >::addPointCloud_and_genLOD(), and pcl::outofcore::OutofcoreOctreeBaseNode< ContainerT, PointT >::queryBBIncludes_subsample().
void pcl::RandomSample< pcl::PCLPointCloud2 >::setSeed | ( | unsigned int | seed | ) | [inline] |
float pcl::RandomSample< pcl::PCLPointCloud2 >::unifRand | ( | ) | [inline, protected] |
Return a random number fast using a LCG (Linear Congruential Generator) algorithm.
See http://software.intel.com/en-us/articles/fast-random-number-generator-on-the-intel-pentiumr-4-processor/ for more information.
Definition at line 232 of file random_sample.h.
unsigned int pcl::RandomSample< pcl::PCLPointCloud2 >::sample_ [protected] |
Number of indices that will be returned.
Definition at line 212 of file random_sample.h.
unsigned int pcl::RandomSample< pcl::PCLPointCloud2 >::seed_ [protected] |
Random number seed.
Definition at line 214 of file random_sample.h.