Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
pcl::Registration< PointSource, PointTarget > Class Template Reference

Registration represents the base registration class. More...

#include <pcl/registration/registration.h>

Inheritance diagram for pcl::Registration< PointSource, PointTarget >:
Inheritance graph
[legend]
Collaboration diagram for pcl::Registration< PointSource, PointTarget >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< Registration< PointSource,
PointTarget > > 
Ptr
typedef boost::shared_ptr
< const Registration
< PointSource, PointTarget > > 
ConstPtr
typedef pcl::KdTree< PointTarget > KdTree
typedef pcl::KdTree
< PointTarget >::Ptr 
KdTreePtr
typedef pcl::PointCloud
< PointSource > 
PointCloudSource
typedef PointCloudSource::Ptr PointCloudSourcePtr
typedef PointCloudSource::ConstPtr PointCloudSourceConstPtr
typedef pcl::PointCloud
< PointTarget > 
PointCloudTarget
typedef PointCloudTarget::Ptr PointCloudTargetPtr
typedef PointCloudTarget::ConstPtr PointCloudTargetConstPtr
typedef
KdTree::PointRepresentationConstPtr 
PointRepresentationConstPtr
typedef
pcl::registration::TransformationEstimation
< PointSource, PointTarget > 
TransformationEstimation
typedef
TransformationEstimation::Ptr 
TransformationEstimationPtr
typedef
TransformationEstimation::ConstPtr 
TransformationEstimationConstPtr
typedef pcl::PointCloud
< PointSource > 
PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

Public Member Functions

 Registration ()
 Empty constructor.
virtual ~Registration ()
 destructor.
void setTransformationEstimation (const TransformationEstimationPtr &te)
 Provide a pointer to the transformation estimation object.
virtual void setInputTarget (const PointCloudTargetConstPtr &cloud)
 Provide a pointer to the input target (e.g., the point cloud that we want to align the input source to)
PointCloudTargetConstPtr const getInputTarget ()
 Get a pointer to the input point cloud dataset target.
Eigen::Matrix4f getFinalTransformation ()
 Get the final transformation matrix estimated by the registration method.
Eigen::Matrix4f getLastIncrementalTransformation ()
 Get the last incremental transformation matrix estimated by the registration method.
void setMaximumIterations (int nr_iterations)
 Set the maximum number of iterations the internal optimization should run for.
int getMaximumIterations ()
 Get the maximum number of iterations the internal optimization should run for, as set by the user.
void setRANSACIterations (int ransac_iterations)
 Set the number of iterations RANSAC should run for.
double getRANSACIterations ()
 Get the number of iterations RANSAC should run for, as set by the user.
void setRANSACOutlierRejectionThreshold (double inlier_threshold)
 Set the inlier distance threshold for the internal RANSAC outlier rejection loop.
double getRANSACOutlierRejectionThreshold ()
 Get the inlier distance threshold for the internal outlier rejection loop as set by the user.
void setMaxCorrespondenceDistance (double distance_threshold)
 Set the maximum distance threshold between two correspondent points in source <-> target.
double getMaxCorrespondenceDistance ()
 Get the maximum distance threshold between two correspondent points in source <-> target.
void setTransformationEpsilon (double epsilon)
 Set the transformation epsilon (maximum allowable difference between two consecutive transformations) in order for an optimization to be considered as having converged to the final solution.
double getTransformationEpsilon ()
 Get the transformation epsilon (maximum allowable difference between two consecutive transformations) as set by the user.
void setEuclideanFitnessEpsilon (double epsilon)
 Set the maximum allowed Euclidean error between two consecutive steps in the ICP loop, before the algorithm is considered to have converged.
double getEuclideanFitnessEpsilon ()
 Get the maximum allowed distance error before the algorithm will be considered to have converged, as set by the user.
void setPointRepresentation (const PointRepresentationConstPtr &point_representation)
 Provide a boost shared pointer to the PointRepresentation to be used when comparing points.
template<typename FunctionSignature >
bool registerVisualizationCallback (boost::function< FunctionSignature > &visualizerCallback)
 Register the user callback function which will be called from registration thread in order to update point cloud obtained after each iteration.
double getFitnessScore (double max_range=std::numeric_limits< double >::max())
 Obtain the Euclidean fitness score (e.g., sum of squared distances from the source to the target)
double getFitnessScore (const std::vector< float > &distances_a, const std::vector< float > &distances_b)
 Obtain the Euclidean fitness score (e.g., sum of squared distances from the source to the target) from two sets of correspondence distances (distances between source and target points)
bool hasConverged ()
 Return the state of convergence after the last align run.
void align (PointCloudSource &output)
 Call the registration algorithm which estimates the transformation and returns the transformed source (input) as output.
void align (PointCloudSource &output, const Eigen::Matrix4f &guess)
 Call the registration algorithm which estimates the transformation and returns the transformed source (input) as output.
const std::string & getClassName () const
 Abstract class get name method.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
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.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointSource & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

Detailed Description

template<typename PointSource, typename PointTarget>
class pcl::Registration< PointSource, PointTarget >

Registration represents the base registration class.

All 3D registration methods should inherit from this class.

Author:
Radu Bogdan Rusu, Michael Dixon

Definition at line 61 of file registration.h.


Member Typedef Documentation

template<typename PointSource, typename PointTarget>
typedef boost::shared_ptr< const Registration<PointSource, PointTarget> > pcl::Registration< PointSource, PointTarget >::ConstPtr

Definition at line 70 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef pcl::KdTree<PointTarget> pcl::Registration< PointSource, PointTarget >::KdTree

Definition at line 72 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef pcl::KdTree<PointTarget>::Ptr pcl::Registration< PointSource, PointTarget >::KdTreePtr

Definition at line 73 of file registration.h.

typedef pcl::PointCloud<PointSource > pcl::PCLBase< PointSource >::PointCloud [inherited]

Definition at line 74 of file pcl_base.h.

typedef PointCloud::ConstPtr pcl::PCLBase< PointSource >::PointCloudConstPtr [inherited]

Definition at line 76 of file pcl_base.h.

typedef PointCloud::Ptr pcl::PCLBase< PointSource >::PointCloudPtr [inherited]

Definition at line 75 of file pcl_base.h.

template<typename PointSource, typename PointTarget>
typedef pcl::PointCloud<PointSource> pcl::Registration< PointSource, PointTarget >::PointCloudSource
template<typename PointSource, typename PointTarget>
typedef PointCloudSource::ConstPtr pcl::Registration< PointSource, PointTarget >::PointCloudSourceConstPtr
template<typename PointSource, typename PointTarget>
typedef PointCloudSource::Ptr pcl::Registration< PointSource, PointTarget >::PointCloudSourcePtr
template<typename PointSource, typename PointTarget>
typedef pcl::PointCloud<PointTarget> pcl::Registration< PointSource, PointTarget >::PointCloudTarget
template<typename PointSource, typename PointTarget>
typedef PointCloudTarget::ConstPtr pcl::Registration< PointSource, PointTarget >::PointCloudTargetConstPtr

Reimplemented in pcl::PPFRegistration< PointSource, PointTarget >.

Definition at line 81 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef PointCloudTarget::Ptr pcl::Registration< PointSource, PointTarget >::PointCloudTargetPtr

Reimplemented in pcl::PPFRegistration< PointSource, PointTarget >.

Definition at line 80 of file registration.h.

typedef PointIndices::ConstPtr pcl::PCLBase< PointSource >::PointIndicesConstPtr [inherited]
typedef PointIndices::Ptr pcl::PCLBase< PointSource >::PointIndicesPtr [inherited]
template<typename PointSource, typename PointTarget>
typedef KdTree::PointRepresentationConstPtr pcl::Registration< PointSource, PointTarget >::PointRepresentationConstPtr

Definition at line 83 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef boost::shared_ptr< Registration<PointSource, PointTarget> > pcl::Registration< PointSource, PointTarget >::Ptr

Definition at line 69 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef pcl::registration::TransformationEstimation<PointSource, PointTarget> pcl::Registration< PointSource, PointTarget >::TransformationEstimation

Definition at line 85 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef TransformationEstimation::ConstPtr pcl::Registration< PointSource, PointTarget >::TransformationEstimationConstPtr

Definition at line 87 of file registration.h.

template<typename PointSource, typename PointTarget>
typedef TransformationEstimation::Ptr pcl::Registration< PointSource, PointTarget >::TransformationEstimationPtr

Definition at line 86 of file registration.h.


Constructor & Destructor Documentation

template<typename PointSource, typename PointTarget>
pcl::Registration< PointSource, PointTarget >::Registration ( ) [inline]

Empty constructor.

Definition at line 90 of file registration.h.

template<typename PointSource, typename PointTarget>
virtual pcl::Registration< PointSource, PointTarget >::~Registration ( ) [inline, virtual]

destructor.

Definition at line 113 of file registration.h.


Member Function Documentation

template<typename PointSource , typename PointTarget >
void pcl::Registration< PointSource, PointTarget >::align ( PointCloudSource output) [inline]

Call the registration algorithm which estimates the transformation and returns the transformed source (input) as output.

Parameters:
outputthe resultant input transfomed point cloud dataset

Definition at line 113 of file registration.hpp.

template<typename PointSource , typename PointTarget >
void pcl::Registration< PointSource, PointTarget >::align ( PointCloudSource output,
const Eigen::Matrix4f &  guess 
) [inline]

Call the registration algorithm which estimates the transformation and returns the transformed source (input) as output.

Parameters:
outputthe resultant input transfomed point cloud dataset
guessthe initial gross estimation of the transformation

Definition at line 120 of file registration.hpp.

template<typename PointSource, typename PointTarget>
const std::string& pcl::Registration< PointSource, PointTarget >::getClassName ( ) const [inline]

Abstract class get name method.

Definition at line 280 of file registration.h.

template<typename PointSource, typename PointTarget>
double pcl::Registration< PointSource, PointTarget >::getEuclideanFitnessEpsilon ( ) [inline]

Get the maximum allowed distance error before the algorithm will be considered to have converged, as set by the user.

See setEuclideanFitnessEpsilon

Definition at line 217 of file registration.h.

template<typename PointSource, typename PointTarget>
Eigen::Matrix4f pcl::Registration< PointSource, PointTarget >::getFinalTransformation ( ) [inline]

Get the final transformation matrix estimated by the registration method.

Definition at line 133 of file registration.h.

template<typename PointSource , typename PointTarget >
double pcl::Registration< PointSource, PointTarget >::getFitnessScore ( double  max_range = std::numeric_limits<double>::max ()) [inline]

Obtain the Euclidean fitness score (e.g., sum of squared distances from the source to the target)

Parameters:
max_rangemaximum allowable distance between a point and its correspondence in the target (default: double::max)

Definition at line 72 of file registration.hpp.

template<typename PointSource , typename PointTarget >
double pcl::Registration< PointSource, PointTarget >::getFitnessScore ( const std::vector< float > &  distances_a,
const std::vector< float > &  distances_b 
) [inline]

Obtain the Euclidean fitness score (e.g., sum of squared distances from the source to the target) from two sets of correspondence distances (distances between source and target points)

Parameters:
[in]distances_athe first set of distances between correspondences
[in]distances_bthe second set of distances between correspondences

Definition at line 61 of file registration.hpp.

IndicesPtr const pcl::PCLBase< PointSource >::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

PointCloudConstPtr const pcl::PCLBase< PointSource >::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointSource, typename PointTarget>
PointCloudTargetConstPtr const pcl::Registration< PointSource, PointTarget >::getInputTarget ( ) [inline]

Get a pointer to the input point cloud dataset target.

Definition at line 129 of file registration.h.

template<typename PointSource, typename PointTarget>
Eigen::Matrix4f pcl::Registration< PointSource, PointTarget >::getLastIncrementalTransformation ( ) [inline]

Get the last incremental transformation matrix estimated by the registration method.

Definition at line 137 of file registration.h.

template<typename PointSource, typename PointTarget>
double pcl::Registration< PointSource, PointTarget >::getMaxCorrespondenceDistance ( ) [inline]

Get the maximum distance threshold between two correspondent points in source <-> target.

If the distance is larger than this threshold, the points will be ignored in the alignment process.

Definition at line 185 of file registration.h.

template<typename PointSource, typename PointTarget>
int pcl::Registration< PointSource, PointTarget >::getMaximumIterations ( ) [inline]

Get the maximum number of iterations the internal optimization should run for, as set by the user.

Definition at line 147 of file registration.h.

template<typename PointSource, typename PointTarget>
double pcl::Registration< PointSource, PointTarget >::getRANSACIterations ( ) [inline]

Get the number of iterations RANSAC should run for, as set by the user.

Definition at line 157 of file registration.h.

template<typename PointSource, typename PointTarget>
double pcl::Registration< PointSource, PointTarget >::getRANSACOutlierRejectionThreshold ( ) [inline]

Get the inlier distance threshold for the internal outlier rejection loop as set by the user.

Definition at line 171 of file registration.h.

template<typename PointSource, typename PointTarget>
double pcl::Registration< PointSource, PointTarget >::getTransformationEpsilon ( ) [inline]

Get the transformation epsilon (maximum allowable difference between two consecutive transformations) as set by the user.

Definition at line 200 of file registration.h.

template<typename PointSource, typename PointTarget>
bool pcl::Registration< PointSource, PointTarget >::hasConverged ( ) [inline]

Return the state of convergence after the last align run.

Definition at line 261 of file registration.h.

const PointSource & pcl::PCLBase< PointSource >::operator[] ( size_t  pos) [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

template<typename PointSource, typename PointTarget>
template<typename FunctionSignature >
bool pcl::Registration< PointSource, PointTarget >::registerVisualizationCallback ( boost::function< FunctionSignature > &  visualizerCallback) [inline]

Register the user callback function which will be called from registration thread in order to update point cloud obtained after each iteration.

Parameters:
[in]visualizerCallbackreference of the user callback function

Definition at line 233 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setEuclideanFitnessEpsilon ( double  epsilon) [inline]

Set the maximum allowed Euclidean error between two consecutive steps in the ICP loop, before the algorithm is considered to have converged.

The error is estimated as the sum of the differences between correspondences in an Euclidean sense, divided by the number of correspondences.

Parameters:
epsilonthe maximum allowed distance error before the algorithm will be considered to have converged

Definition at line 211 of file registration.h.

void pcl::PCLBase< PointSource >::setIndices ( const IndicesPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

void pcl::PCLBase< PointSource >::setIndices ( const IndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

void pcl::PCLBase< PointSource >::setIndices ( const PointIndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

void pcl::PCLBase< PointSource >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
) [inline, inherited]

Set the indices for the points laying within an interest region of the point cloud.

Note:
you shouldn't call this method on unorganized point clouds!
Parameters:
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

virtual void pcl::PCLBase< PointSource >::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 103 of file pcl_base.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setInputTarget ( const PointCloudTargetConstPtr cloud) [inline, virtual]

Provide a pointer to the input target (e.g., the point cloud that we want to align the input source to)

Parameters:
cloudthe input point cloud target

Definition at line 42 of file registration.hpp.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setMaxCorrespondenceDistance ( double  distance_threshold) [inline]

Set the maximum distance threshold between two correspondent points in source <-> target.

If the distance is larger than this threshold, the points will be ignored in the alignment process.

Parameters:
distance_thresholdthe maximum distance threshold between a point and its nearest neighbor correspondent in order to be considered in the alignment process

Definition at line 179 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setMaximumIterations ( int  nr_iterations) [inline]

Set the maximum number of iterations the internal optimization should run for.

Parameters:
nr_iterationsthe maximum number of iterations the internal optimization should run for

Definition at line 143 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setPointRepresentation ( const PointRepresentationConstPtr point_representation) [inline]

Provide a boost shared pointer to the PointRepresentation to be used when comparing points.

Parameters:
point_representationthe PointRepresentation to be used by the k-D tree

Definition at line 223 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setRANSACIterations ( int  ransac_iterations) [inline]

Set the number of iterations RANSAC should run for.

Parameters:
ransac_iterationsis the number of iterations RANSAC should run for

Definition at line 153 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setRANSACOutlierRejectionThreshold ( double  inlier_threshold) [inline]

Set the inlier distance threshold for the internal RANSAC outlier rejection loop.

The method considers a point to be an inlier, if the distance between the target data index and the transformed source index is smaller than the given inlier distance threshold. The value is set by default to 0.05m.

Parameters:
inlier_thresholdthe inlier distance threshold for the internal RANSAC outlier rejection loop

Definition at line 167 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setTransformationEpsilon ( double  epsilon) [inline]

Set the transformation epsilon (maximum allowable difference between two consecutive transformations) in order for an optimization to be considered as having converged to the final solution.

Parameters:
epsilonthe transformation epsilon in order for an optimization to be considered as having converged to the final solution.

Definition at line 194 of file registration.h.

template<typename PointSource, typename PointTarget>
void pcl::Registration< PointSource, PointTarget >::setTransformationEstimation ( const TransformationEstimationPtr te) [inline]

Provide a pointer to the transformation estimation object.

(e.g., SVD, point to plane etc.)

Parameters:
teis the pointer to the corresponding transformation estimation object

Definition at line 119 of file registration.h.


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