Point Cloud Library (PCL)
1.9.1
|
38 #ifndef PCL_FILTERS_RANDOM_SUBSAMPLE_H_
39 #define PCL_FILTERS_RANDOM_SUBSAMPLE_H_
41 #include <pcl/filters/filter_indices.h>
55 template<
typename Po
intT>
74 typedef boost::shared_ptr< RandomSample<PointT> >
Ptr;
75 typedef boost::shared_ptr< const RandomSample<PointT> >
ConstPtr;
81 seed_ (static_cast<unsigned int> (time (NULL)))
145 return (
static_cast<float>(rand () /
double (RAND_MAX)));
166 typedef boost::shared_ptr<RandomSample<pcl::PCLPointCloud2> >
Ptr;
167 typedef boost::shared_ptr<const RandomSample<pcl::PCLPointCloud2> >
ConstPtr;
170 RandomSample () : sample_ (UINT_MAX), seed_ (static_cast<unsigned int> (time (NULL)))
172 filter_name_ =
"RandomSample";
226 applyFilter (std::vector<int> &indices);
234 return (
static_cast<float> (rand () /
double (RAND_MAX)));
239 #ifdef PCL_NO_PRECOMPILE
240 #include <pcl/filters/impl/random_sample.hpp>
243 #endif //#ifndef PCL_FILTERS_RANDOM_SUBSAMPLE_H_
This file defines compatibility wrappers for low level I/O functions.
boost::shared_ptr< PointCloud< PointT > > Ptr
unsigned int seed_
Random number seed.
void setSeed(unsigned int seed)
Set seed of random function.
boost::shared_ptr< const RandomSample< PointT > > ConstPtr
unsigned int getSample()
Get the value of the internal sample parameter.
float unifRand()
Return a random number fast using a LCG (Linear Congruential Generator) algorithm.
boost::shared_ptr< RandomSample< pcl::PCLPointCloud2 > > Ptr
PointCloud represents the base class in PCL for storing collections of 3D points.
unsigned int seed_
Random number seed.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > PCLPointCloud2ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.
void setSample(unsigned int sample)
Set number of indices to be sampled.
unsigned int getSeed()
Get the value of the internal seed parameter.
unsigned int getSample()
Get the value of the internal sample parameter.
PointCloud::Ptr PointCloudPtr
unsigned int sample_
Number of indices that will be returned.
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< const RandomSample< pcl::PCLPointCloud2 > > ConstPtr
void setSample(unsigned int sample)
Set number of indices to be sampled.
unsigned int getSeed()
Get the value of the internal seed parameter.
FilterIndices represents the base class for filters that are about binary point removal.
std::string filter_name_
The filter name.
float unifRand()
Return a random number fast using a LCG (Linear Congruential Generator) algorithm.
boost::shared_ptr< ::pcl::PCLPointCloud2 > PCLPointCloud2Ptr
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void setSeed(unsigned int seed)
Set seed of random function.
unsigned int sample_
Number of indices that will be returned.
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
RandomSample applies a random sampling with uniform probability.
RandomSample(bool extract_removed_indices=false)
Empty constructor.
void applyFilter(PointCloud &output)
Sample of point indices into a separate PointCloud.
boost::shared_ptr< RandomSample< PointT > > Ptr
boost::shared_ptr< ::pcl::PCLPointCloud2 > Ptr
RandomSample()
Empty constructor.