Point Cloud Library (PCL)  1.3.1
Classes | Public Types | Public Member Functions
pcl::UniformSampling Class Reference

UniformSampling assembles a local 3D grid over a given PointCloud, and downsamples + filters the data. More...

#include <pcl/keypoints/uniform_sampling.h>

Inheritance diagram for pcl::UniformSampling:
Inheritance graph
[legend]
Collaboration diagram for pcl::UniformSampling:
Collaboration graph
[legend]

List of all members.

Classes

struct  Leaf
 Simple structure to hold an nD centroid and the number of points in a leaf. More...

Public Types

typedef PCLBase< PointInT > BaseClass
typedef pcl::search::Search
< PointInT > 
KdTree
typedef pcl::search::Search
< PointInT >::Ptr 
KdTreePtr
typedef PointCloudIn::Ptr PointCloudInPtr
typedef PointCloudIn::ConstPtr PointCloudInConstPtr
typedef boost::function< int(int,
double, std::vector< int >
&, std::vector< float > &)> 
SearchMethod
typedef boost::function< int(const
PointCloudIn &cloud, int index,
double, std::vector< int >
&, std::vector< float > &)> 
SearchMethodSurface

Public Member Functions

 UniformSampling ()
 Empty constructor.
virtual ~UniformSampling ()
 Destructor.
virtual void setRadiusSearch (double radius)
 Set the 3D grid leaf size.
void setSearchSurface (const PointCloudInConstPtr &cloud)
 Provide a pointer to the input dataset that we need to estimate features at every point for.
PointCloudInConstPtr getSearchSurface ()
 Get a pointer to the surface point cloud dataset.
void setSearchMethod (const KdTreePtr &tree)
 Provide a pointer to the search object.
KdTreePtr getSearchMethod ()
 Get a pointer to the search method used.
double getSearchParameter ()
 Get the internal search parameter.
void setKSearch (int k)
 Set the number of k nearest neighbors to use for the feature estimation.
int getKSearch ()
 get the number of k nearest neighbors used for the feature estimation.
double getRadiusSearch ()
 Get the sphere radius used for determining the neighbors.
void compute (PointCloudOut &output)
 Base method for key point detection for all points given in <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in setSearchMethod ()
int searchForNeighbors (int index, double parameter, std::vector< int > &indices, std::vector< float > &distances)
 Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface from setSearchSurface.

Detailed Description

UniformSampling assembles a local 3D grid over a given PointCloud, and downsamples + filters the data.

The UniformSampling class creates a *3D voxel grid* (think about a voxel grid as a set of tiny 3D boxes in space) over the input point cloud data. Then, in each *voxel* (i.e., 3D box), all the points present will be approximated (i.e., *downsampled*) with their centroid. This approach is a bit slower than approximating them with the center of the voxel, but it represents the underlying surface more accurately.

Author:
Radu Bogdan Rusu

Member Typedef Documentation

typedef PCLBase<PointInT> pcl::Keypoint::BaseClass [inherited]

Definition at line 60 of file keypoint.h.

typedef pcl::search::Search<PointInT> pcl::Keypoint::KdTree [inherited]

Definition at line 61 of file keypoint.h.

typedef pcl::search::Search<PointInT>::Ptr pcl::Keypoint::KdTreePtr [inherited]

Definition at line 62 of file keypoint.h.

typedef PointCloudIn::ConstPtr pcl::Keypoint::PointCloudInConstPtr [inherited]

Definition at line 65 of file keypoint.h.

typedef PointCloudIn::Ptr pcl::Keypoint::PointCloudInPtr [inherited]

Definition at line 64 of file keypoint.h.

typedef boost::function<int (int, double, std::vector<int> &, std::vector<float> &)> pcl::Keypoint::SearchMethod [inherited]

Definition at line 67 of file keypoint.h.

typedef boost::function<int (const PointCloudIn &cloud, int index, double, std::vector<int> &, std::vector<float> &)> pcl::Keypoint::SearchMethodSurface [inherited]

Definition at line 68 of file keypoint.h.


Constructor & Destructor Documentation

pcl::UniformSampling::UniformSampling ( ) [inline]

Empty constructor.

Definition at line 74 of file uniform_sampling.h.

virtual pcl::UniformSampling::~UniformSampling ( ) [inline, virtual]

Destructor.

Definition at line 82 of file uniform_sampling.h.


Member Function Documentation

void pcl::Keypoint::compute ( PointCloudOut output) [inline, inherited]

Base method for key point detection for all points given in <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in setSearchMethod ()

Parameters:
outputthe resultant point cloud model dataset containing the estimated features
int pcl::Keypoint::getKSearch ( ) [inline, inherited]

get the number of k nearest neighbors used for the feature estimation.

Definition at line 106 of file keypoint.h.

double pcl::Keypoint::getRadiusSearch ( ) [inline, inherited]

Get the sphere radius used for determining the neighbors.

Definition at line 117 of file keypoint.h.

KdTreePtr pcl::Keypoint::getSearchMethod ( ) [inline, inherited]

Get a pointer to the search method used.

Definition at line 92 of file keypoint.h.

double pcl::Keypoint::getSearchParameter ( ) [inline, inherited]

Get the internal search parameter.

Definition at line 96 of file keypoint.h.

PointCloudInConstPtr pcl::Keypoint::getSearchSurface ( ) [inline, inherited]

Get a pointer to the surface point cloud dataset.

Definition at line 82 of file keypoint.h.

int pcl::Keypoint::searchForNeighbors ( int  index,
double  parameter,
std::vector< int > &  indices,
std::vector< float > &  distances 
) [inline, inherited]

Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface from setSearchSurface.

Parameters:
indexthe index of the query point
parameterthe search parameter (either k or radius)
indicesthe resultant vector of indices representing the k-nearest neighbors
distancesthe resultant vector of distances representing the distances from the query point to the k-nearest neighbors

Definition at line 135 of file keypoint.h.

void pcl::Keypoint::setKSearch ( int  k) [inline, inherited]

Set the number of k nearest neighbors to use for the feature estimation.

Parameters:
kthe number of k-nearest neighbors

Definition at line 102 of file keypoint.h.

virtual void pcl::UniformSampling::setRadiusSearch ( double  radius) [inline, virtual]

Set the 3D grid leaf size.

Parameters:
radiusthe 3D grid leaf size

Reimplemented from pcl::Keypoint< PointInT, int >.

Definition at line 91 of file uniform_sampling.h.

void pcl::Keypoint::setSearchMethod ( const KdTreePtr tree) [inline, inherited]

Provide a pointer to the search object.

Parameters:
treea pointer to the spatial search object.

Definition at line 88 of file keypoint.h.

void pcl::Keypoint::setSearchSurface ( const PointCloudInConstPtr cloud) [inline, inherited]

Provide a pointer to the input dataset that we need to estimate features at every point for.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 78 of file keypoint.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines