Point Cloud Library (PCL)  1.8.1-dev
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar > Class Template Reference

TransformationEstimationLM implements Levenberg Marquardt-based estimation of the transformation aligning the given correspondences. More...

#include <pcl/registration/transformation_estimation_lm.h>

+ Inheritance diagram for pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >:

Classes

struct  Functor
 Base functor all the models that need non linear optimization must define their own one and implement operator() (const Eigen::VectorXd& x, Eigen::VectorXd& fvec) or operator() (const Eigen::VectorXf& x, Eigen::VectorXf& fvec) dependening on the choosen _Scalar. More...
 
struct  OptimizationFunctor
 
struct  OptimizationFunctorWithIndices
 

Public Types

typedef boost::shared_ptr
< TransformationEstimationLM
< PointSource, PointTarget,
MatScalar > > 
Ptr
 
typedef boost::shared_ptr
< const
TransformationEstimationLM
< PointSource, PointTarget,
MatScalar > > 
ConstPtr
 
typedef Eigen::Matrix
< MatScalar, Eigen::Dynamic, 1 > 
VectorX
 
typedef Eigen::Matrix
< MatScalar, 4, 1 > 
Vector4
 
typedef
TransformationEstimation
< PointSource, PointTarget,
MatScalar >::Matrix4 
Matrix4
 
- Public Types inherited from pcl::registration::TransformationEstimation< PointSource, PointTarget, MatScalar >
typedef Eigen::Matrix
< MatScalar, 4, 4 > 
Matrix4
 
typedef boost::shared_ptr
< TransformationEstimation
< PointSource, PointTarget,
MatScalar > > 
Ptr
 
typedef boost::shared_ptr
< const
TransformationEstimation
< PointSource, PointTarget,
MatScalar > > 
ConstPtr
 

Public Member Functions

 TransformationEstimationLM ()
 Constructor. More...
 
 TransformationEstimationLM (const TransformationEstimationLM &src)
 Copy constructor. More...
 
TransformationEstimationLMoperator= (const TransformationEstimationLM &src)
 Copy operator. More...
 
virtual ~TransformationEstimationLM ()
 Destructor. More...
 
void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const
 Estimate a rigid rotation transformation between a source and a target point cloud using LM. More...
 
void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const std::vector< int > &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const
 Estimate a rigid rotation transformation between a source and a target point cloud using LM. More...
 
void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const std::vector< int > &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const std::vector< int > &indices_tgt, Matrix4 &transformation_matrix) const
 Estimate a rigid rotation transformation between a source and a target point cloud using LM. More...
 
void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const pcl::Correspondences &correspondences, Matrix4 &transformation_matrix) const
 Estimate a rigid rotation transformation between a source and a target point cloud using LM. More...
 
void setWarpFunction (const boost::shared_ptr< WarpPointRigid< PointSource, PointTarget, MatScalar > > &warp_fcn)
 Set the function we use to warp points. More...
 
- Public Member Functions inherited from pcl::registration::TransformationEstimation< PointSource, PointTarget, MatScalar >
 TransformationEstimation ()
 
virtual ~TransformationEstimation ()
 
virtual void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const =0
 Estimate a rigid rotation transformation between a source and a target point cloud. More...
 
virtual void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const std::vector< int > &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const =0
 Estimate a rigid rotation transformation between a source and a target point cloud. More...
 
virtual void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const std::vector< int > &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const std::vector< int > &indices_tgt, Matrix4 &transformation_matrix) const =0
 Estimate a rigid rotation transformation between a source and a target point cloud. More...
 
virtual void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const pcl::Correspondences &correspondences, Matrix4 &transformation_matrix) const =0
 Estimate a rigid rotation transformation between a source and a target point cloud. More...
 

Protected Member Functions

virtual MatScalar computeDistance (const PointSource &p_src, const PointTarget &p_tgt) const
 Compute the distance between a source point and its corresponding target point. More...
 
virtual MatScalar computeDistance (const Vector4 &p_src, const PointTarget &p_tgt) const
 Compute the distance between a source point and its corresponding target point. More...
 

Protected Attributes

const PointCloudSourcetmp_src_
 Temporary pointer to the source dataset. More...
 
const PointCloudTargettmp_tgt_
 Temporary pointer to the target dataset. More...
 
const std::vector< int > * tmp_idx_src_
 Temporary pointer to the source dataset indices. More...
 
const std::vector< int > * tmp_idx_tgt_
 Temporary pointer to the target dataset indices. More...
 
boost::shared_ptr
< pcl::registration::WarpPointRigid
< PointSource, PointTarget,
MatScalar > > 
warp_point_
 The parameterized function used to warp the source to the target. More...
 

Detailed Description

template<typename PointSource, typename PointTarget, typename MatScalar = float>
class pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >

TransformationEstimationLM implements Levenberg Marquardt-based estimation of the transformation aligning the given correspondences.

Note
The class is templated on the source and target point types as well as on the output scalar of the transformation matrix (i.e., float or double). Default: float.
Author
Radu B. Rusu

Definition at line 59 of file transformation_estimation_lm.h.

Member Typedef Documentation

template<typename PointSource, typename PointTarget, typename MatScalar = float>
typedef boost::shared_ptr<const TransformationEstimationLM<PointSource, PointTarget, MatScalar> > pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::ConstPtr

Definition at line 72 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
typedef TransformationEstimation<PointSource, PointTarget, MatScalar>::Matrix4 pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::Matrix4

Definition at line 76 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
typedef boost::shared_ptr<TransformationEstimationLM<PointSource, PointTarget, MatScalar> > pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::Ptr

Definition at line 71 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
typedef Eigen::Matrix<MatScalar, 4, 1> pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::Vector4

Definition at line 75 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
typedef Eigen::Matrix<MatScalar, Eigen::Dynamic, 1> pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::VectorX

Definition at line 74 of file transformation_estimation_lm.h.

Constructor & Destructor Documentation

template<typename PointSource , typename PointTarget , typename MatScalar >
pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::TransformationEstimationLM ( )

Constructor.

Definition at line 51 of file transformation_estimation_lm.hpp.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::TransformationEstimationLM ( const TransformationEstimationLM< PointSource, PointTarget, MatScalar > &  src)
inline

Copy constructor.

Parameters
[in]srcthe TransformationEstimationLM object to copy into this

Definition at line 84 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
virtual pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::~TransformationEstimationLM ( )
inlinevirtual

Destructor.

Definition at line 106 of file transformation_estimation_lm.h.

Member Function Documentation

template<typename PointSource, typename PointTarget, typename MatScalar = float>
virtual MatScalar pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::computeDistance ( const PointSource &  p_src,
const PointTarget &  p_tgt 
) const
inlineprotectedvirtual

Compute the distance between a source point and its corresponding target point.

Parameters
[in]p_srcThe source point
[in]p_tgtThe target point
Returns
The distance between p_src and p_tgt
Note
Older versions of PCL used this method internally for calculating the optimization gradient. Since PCL 1.7, a switch has been made to the computeDistance method using Vector4 types instead. This method is only kept for API compatibility reasons.

Reimplemented in pcl::registration::TransformationEstimationPointToPlane< PointSource, PointTarget, Scalar >, and pcl::registration::TransformationEstimationPointToPlane< PointSource, PointTarget, MatScalar >.

Definition at line 182 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
virtual MatScalar pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::computeDistance ( const Vector4 p_src,
const PointTarget &  p_tgt 
) const
inlineprotectedvirtual

Compute the distance between a source point and its corresponding target point.

Parameters
[in]p_srcThe source point
[in]p_tgtThe target point
Returns
The distance between p_src and p_tgt
Note
A different distance function can be defined by creating a subclass of TransformationEstimationLM and overriding this method. (See TransformationEstimationPointToPlane)

Reimplemented in pcl::registration::TransformationEstimationPointToPlane< PointSource, PointTarget, Scalar >, and pcl::registration::TransformationEstimationPointToPlane< PointSource, PointTarget, MatScalar >.

Definition at line 199 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar >
void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::estimateRigidTransformation ( const pcl::PointCloud< PointSource > &  cloud_src,
const pcl::PointCloud< PointTarget > &  cloud_tgt,
Matrix4 transformation_matrix 
) const
inline

Estimate a rigid rotation transformation between a source and a target point cloud using LM.

Parameters
[in]cloud_srcthe source point cloud dataset
[in]cloud_tgtthe target point cloud dataset
[out]transformation_matrixthe resultant transformation matrix

Definition at line 62 of file transformation_estimation_lm.hpp.

References pcl::PointCloud< T >::points.

template<typename PointSource, typename PointTarget, typename MatScalar >
void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::estimateRigidTransformation ( const pcl::PointCloud< PointSource > &  cloud_src,
const std::vector< int > &  indices_src,
const pcl::PointCloud< PointTarget > &  cloud_tgt,
Matrix4 transformation_matrix 
) const
inline

Estimate a rigid rotation transformation between a source and a target point cloud using LM.

Parameters
[in]cloud_srcthe source point cloud dataset
[in]indices_srcthe vector of indices describing the points of interest in cloud_src
[in]cloud_tgtthe target point cloud dataset
[out]transformation_matrixthe resultant transformation matrix

Definition at line 116 of file transformation_estimation_lm.hpp.

References pcl::PointCloud< T >::points.

template<typename PointSource, typename PointTarget, typename MatScalar >
void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::estimateRigidTransformation ( const pcl::PointCloud< PointSource > &  cloud_src,
const std::vector< int > &  indices_src,
const pcl::PointCloud< PointTarget > &  cloud_tgt,
const std::vector< int > &  indices_tgt,
Matrix4 transformation_matrix 
) const
inline

Estimate a rigid rotation transformation between a source and a target point cloud using LM.

Parameters
[in]cloud_srcthe source point cloud dataset
[in]indices_srcthe vector of indices describing the points of interest in cloud_src
[in]cloud_tgtthe target point cloud dataset
[in]indices_tgtthe vector of indices describing the correspondences of the interst points from indices_src
[out]transformation_matrixthe resultant transformation matrix

Definition at line 142 of file transformation_estimation_lm.hpp.

template<typename PointSource, typename PointTarget, typename MatScalar >
void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::estimateRigidTransformation ( const pcl::PointCloud< PointSource > &  cloud_src,
const pcl::PointCloud< PointTarget > &  cloud_tgt,
const pcl::Correspondences correspondences,
Matrix4 transformation_matrix 
) const
inline

Estimate a rigid rotation transformation between a source and a target point cloud using LM.

Parameters
[in]cloud_srcthe source point cloud dataset
[in]cloud_tgtthe target point cloud dataset
[in]correspondencesthe vector of correspondences between source and target point cloud
[out]transformation_matrixthe resultant transformation matrix

Definition at line 197 of file transformation_estimation_lm.hpp.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
TransformationEstimationLM& pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::operator= ( const TransformationEstimationLM< PointSource, PointTarget, MatScalar > &  src)
inline

Copy operator.

Parameters
[in]srcthe TransformationEstimationLM object to copy into this

Definition at line 96 of file transformation_estimation_lm.h.

template<typename PointSource, typename PointTarget, typename MatScalar = float>
void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::setWarpFunction ( const boost::shared_ptr< WarpPointRigid< PointSource, PointTarget, MatScalar > > &  warp_fcn)
inline

Set the function we use to warp points.

Defaults to rigid 6D warp.

Parameters
[in]warp_fcna shared pointer to an object that warps points

Definition at line 165 of file transformation_estimation_lm.h.

Member Data Documentation

template<typename PointSource, typename PointTarget, typename MatScalar = float>
const std::vector<int>* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_idx_src_
mutableprotected

Temporary pointer to the source dataset indices.

Definition at line 212 of file transformation_estimation_lm.h.

Referenced by pcl::registration::TransformationEstimationLM< PointSource, PointTarget, Scalar >::operator=().

template<typename PointSource, typename PointTarget, typename MatScalar = float>
const std::vector<int>* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_idx_tgt_
mutableprotected

Temporary pointer to the target dataset indices.

Definition at line 215 of file transformation_estimation_lm.h.

Referenced by pcl::registration::TransformationEstimationLM< PointSource, PointTarget, Scalar >::operator=().

template<typename PointSource, typename PointTarget, typename MatScalar = float>
const PointCloudSource* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_src_
mutableprotected

Temporary pointer to the source dataset.

Definition at line 206 of file transformation_estimation_lm.h.

Referenced by pcl::registration::TransformationEstimationLM< PointSource, PointTarget, Scalar >::operator=().

template<typename PointSource, typename PointTarget, typename MatScalar = float>
const PointCloudTarget* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_tgt_
mutableprotected

Temporary pointer to the target dataset.

Definition at line 209 of file transformation_estimation_lm.h.

Referenced by pcl::registration::TransformationEstimationLM< PointSource, PointTarget, Scalar >::operator=().

template<typename PointSource, typename PointTarget, typename MatScalar = float>
boost::shared_ptr<pcl::registration::WarpPointRigid<PointSource, PointTarget, MatScalar> > pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::warp_point_
protected

The documentation for this class was generated from the following files: