Point Cloud Library (PCL)
1.7.0
|
UniformSampling assembles a local 3D grid over a given PointCloud, and downsamples + filters the data. More...
#include <pcl/keypoints/uniform_sampling.h>
Classes | |
struct | Leaf |
Simple structure to hold an nD centroid and the number of points in a leaf. More... | |
Public Types | |
typedef boost::shared_ptr < UniformSampling< PointInT > > | Ptr |
typedef boost::shared_ptr < const UniformSampling < PointInT > > | ConstPtr |
![]() | |
typedef boost::shared_ptr < Keypoint< PointInT, int > > | Ptr |
typedef boost::shared_ptr < const Keypoint< PointInT, int > > | ConstPtr |
typedef PCLBase< PointInT > | BaseClass |
typedef pcl::search::Search < PointInT > | KdTree |
typedef pcl::search::Search < PointInT >::Ptr | KdTreePtr |
typedef pcl::PointCloud< PointInT > | PointCloudIn |
typedef PointCloudIn::Ptr | PointCloudInPtr |
typedef PointCloudIn::ConstPtr | PointCloudInConstPtr |
typedef pcl::PointCloud< int > | PointCloudOut |
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 |
![]() | |
typedef pcl::PointCloud< PointInT > | PointCloud |
typedef PointCloud::Ptr | PointCloudPtr |
typedef PointCloud::ConstPtr | PointCloudConstPtr |
typedef boost::shared_ptr < PointIndices > | PointIndicesPtr |
typedef boost::shared_ptr < PointIndices const > | PointIndicesConstPtr |
Public Member Functions | |
UniformSampling () | |
Empty constructor. More... | |
virtual | ~UniformSampling () |
Destructor. More... | |
virtual void | setRadiusSearch (double radius) |
Set the 3D grid leaf size. More... | |
![]() | |
Keypoint () | |
Empty constructor. More... | |
virtual | ~Keypoint () |
Empty destructor. More... | |
virtual void | setSearchSurface (const PointCloudInConstPtr &cloud) |
Provide a pointer to the input dataset that we need to estimate features at every point for. More... | |
PointCloudInConstPtr | getSearchSurface () |
Get a pointer to the surface point cloud dataset. More... | |
void | setSearchMethod (const KdTreePtr &tree) |
Provide a pointer to the search object. More... | |
KdTreePtr | getSearchMethod () |
Get a pointer to the search method used. More... | |
double | getSearchParameter () |
Get the internal search parameter. More... | |
void | setKSearch (int k) |
Set the number of k nearest neighbors to use for the feature estimation. More... | |
int | getKSearch () |
get the number of k nearest neighbors used for the feature estimation. More... | |
void | setRadiusSearch (double radius) |
Set the sphere radius that is to be used for determining the nearest neighbors used for the key point detection. More... | |
double | getRadiusSearch () |
Get the sphere radius used for determining the neighbors. More... | |
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 () More... | |
int | searchForNeighbors (int index, double parameter, std::vector< int > &indices, std::vector< float > &distances) const |
Search for k-nearest neighbors using the spatial locator from setSearchmethod, and the given surface from setSearchSurface. More... | |
![]() | |
PCLBase () | |
Empty constructor. More... | |
PCLBase (const PCLBase &base) | |
Copy constructor. More... | |
virtual | ~PCLBase () |
Destructor. More... | |
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... | |
PointCloudConstPtr const | getInputCloud () |
Get a pointer to the input point cloud dataset. More... | |
virtual void | setIndices (const IndicesPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... | |
virtual void | setIndices (const IndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... | |
virtual void | setIndices (const PointIndicesConstPtr &indices) |
Provide a pointer to the vector of indices that represents the input data. More... | |
virtual void | setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols) |
Set the indices for the points laying within an interest region of the point cloud. More... | |
IndicesPtr const | getIndices () |
Get a pointer to the vector of indices used. More... | |
const PointInT & | operator[] (size_t pos) |
Override PointCloud operator[] to shorten code. More... | |
Protected Member Functions | |
void | detectKeypoints (PointCloudOut &output) |
Downsample a Point Cloud using a voxelized grid approach. More... | |
![]() | |
virtual bool | initCompute () |
const std::string & | getClassName () const |
Get a string representation of the name of this class. More... | |
virtual void | detectKeypoints (PointCloudOut &output)=0 |
Abstract key point detection method. More... | |
![]() | |
bool | initCompute () |
This method should get called before starting the actual computation. More... | |
bool | deinitCompute () |
This method should get called after finishing the actual computation. More... | |
Protected Attributes | |
boost::unordered_map< size_t, Leaf > | leaves_ |
The 3D grid leaves. More... | |
Eigen::Vector4f | leaf_size_ |
The size of a leaf. More... | |
Eigen::Array4f | inverse_leaf_size_ |
Internal leaf sizes stored as 1/leaf_size_ for efficiency reasons. More... | |
Eigen::Vector4i | min_b_ |
The minimum and maximum bin coordinates, the number of divisions, and the division multiplier. More... | |
Eigen::Vector4i | max_b_ |
Eigen::Vector4i | div_b_ |
Eigen::Vector4i | divb_mul_ |
![]() | |
std::string | name_ |
The key point detection method's name. More... | |
SearchMethod | search_method_ |
The search method template for indices. More... | |
SearchMethodSurface | search_method_surface_ |
The search method template for points. More... | |
PointCloudInConstPtr | surface_ |
An input point cloud describing the surface that is to be used for nearest neighbors estimation. More... | |
KdTreePtr | tree_ |
A pointer to the spatial search object. More... | |
double | search_parameter_ |
The actual search parameter (casted from either search_radius_ or k_). More... | |
double | search_radius_ |
The nearest neighbors search radius for each point. More... | |
int | k_ |
The number of K nearest neighbors to use for each point. More... | |
![]() | |
PointCloudConstPtr | input_ |
The input point cloud dataset. More... | |
IndicesPtr | indices_ |
A pointer to the vector of point indices to use. More... | |
bool | use_indices_ |
Set to true if point indices are used. More... | |
bool | fake_indices_ |
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More... | |
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.
Definition at line 61 of file uniform_sampling.h.
typedef boost::shared_ptr<const UniformSampling<PointInT> > pcl::UniformSampling< PointInT >::ConstPtr |
Definition at line 74 of file uniform_sampling.h.
typedef boost::shared_ptr<UniformSampling<PointInT> > pcl::UniformSampling< PointInT >::Ptr |
Definition at line 73 of file uniform_sampling.h.
|
inline |
Empty constructor.
Definition at line 77 of file uniform_sampling.h.
References pcl::Keypoint< PointInT, int >::name_.
|
inlinevirtual |
Destructor.
Definition at line 90 of file uniform_sampling.h.
References pcl::UniformSampling< PointInT >::leaves_.
|
protected |
Downsample a Point Cloud using a voxelized grid approach.
output | the resultant point cloud message |
Definition at line 46 of file uniform_sampling.hpp.
References pcl::UniformSampling< PointInT >::Leaf::idx.
|
inlinevirtual |
Set the 3D grid leaf size.
radius | the 3D grid leaf size |
Definition at line 99 of file uniform_sampling.h.
References pcl::UniformSampling< PointInT >::inverse_leaf_size_, pcl::UniformSampling< PointInT >::leaf_size_, and pcl::Keypoint< PointInT, int >::search_radius_.
|
protected |
Definition at line 128 of file uniform_sampling.h.
|
protected |
Definition at line 128 of file uniform_sampling.h.
|
protected |
Internal leaf sizes stored as 1/leaf_size_ for efficiency reasons.
Definition at line 125 of file uniform_sampling.h.
Referenced by pcl::UniformSampling< PointInT >::setRadiusSearch().
|
protected |
The size of a leaf.
Definition at line 122 of file uniform_sampling.h.
Referenced by pcl::UniformSampling< PointInT >::setRadiusSearch().
|
protected |
The 3D grid leaves.
Definition at line 119 of file uniform_sampling.h.
Referenced by pcl::UniformSampling< PointInT >::~UniformSampling().
|
protected |
Definition at line 128 of file uniform_sampling.h.
|
protected |
The minimum and maximum bin coordinates, the number of divisions, and the division multiplier.
Definition at line 128 of file uniform_sampling.h.