Point Cloud Library (PCL)
1.10.1
|
40 #include <pcl/filters/filter_indices.h>
54 template<
typename Po
intT>
80 seed_ (static_cast<unsigned int> (time (nullptr)))
144 return (
static_cast<float>(rand () /
double (RAND_MAX)));
169 RandomSample () : sample_ (UINT_MAX), seed_ (static_cast<unsigned int> (time (nullptr)))
171 filter_name_ =
"RandomSample";
225 applyFilter (std::vector<int> &indices)
override;
233 return (
static_cast<float> (rand () /
double (RAND_MAX)));
238 #ifdef PCL_NO_PRECOMPILE
239 #include <pcl/filters/impl/random_sample.hpp>
This file defines compatibility wrappers for low level I/O functions.
unsigned int seed_
Random number seed.
void setSeed(unsigned int seed)
Set seed of random function.
shared_ptr< Filter< PointT > > Ptr
typename PointCloud::ConstPtr PointCloudConstPtr
typename PointCloud::Ptr PointCloudPtr
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
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.
shared_ptr< const Filter< pcl::PCLPointCloud2 > > ConstPtr
PCLPointCloud2::ConstPtr PCLPointCloud2ConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points.
unsigned int seed_
Random number seed.
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.
PCLPointCloud2::Ptr PCLPointCloud2Ptr
shared_ptr< Filter< pcl::PCLPointCloud2 > > Ptr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
shared_ptr< const Filter< PointT > > ConstPtr
unsigned int sample_
Number of indices that will be returned.
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.
shared_ptr< PointCloud< PointT > > Ptr
float unifRand()
Return a random number fast using a LCG (Linear Congruential Generator) algorithm.
void setSeed(unsigned int seed)
Set seed of random function.
void applyFilter(PointCloud &output) override
Sample of point indices into a separate PointCloud.
unsigned int sample_
Number of indices that will be returned.
shared_ptr< const PointCloud< PointT > > ConstPtr
RandomSample applies a random sampling with uniform probability.
RandomSample(bool extract_removed_indices=false)
Empty constructor.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
RandomSample()
Empty constructor.