Loading...
Searching...
No Matches
pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar > Class Template Reference
Module registration

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) depending on the chosen _Scalar. More...
struct | OptimizationFunctor
struct | OptimizationFunctorWithIndices

## Public Types

using | Ptr
using | ConstPtr
using | VectorX = Eigen::Matrix<MatScalar, Eigen::Dynamic, 1>
using | Vector4 = Eigen::Matrix<MatScalar, 4, 1>
using | Matrix4
Public Types inherited from pcl::registration::TransformationEstimation< PointSource, PointTarget, float >
using | Matrix4
using | Ptr
using | ConstPtr

## Public Member Functions

| TransformationEstimationLM ()
| Constructor.
| TransformationEstimationLM (const TransformationEstimationLM &src)
| Copy constructor.
TransformationEstimationLM & | operator= (const TransformationEstimationLM &src)
| Copy operator.
| ~TransformationEstimationLM () override=default
| Destructor.
void | estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const override
| Estimate a rigid rotation transformation between a source and a target point cloud using LM.
void | estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::Indices &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const override
| Estimate a rigid rotation transformation between a source and a target point cloud using LM.
void | estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::Indices &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const pcl::Indices &indices_tgt, Matrix4 &transformation_matrix) const override
| Estimate a rigid rotation transformation between a source and a target point cloud using LM.
void | estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const pcl::Correspondences &correspondences, Matrix4 &transformation_matrix) const override
| Estimate a rigid rotation transformation between a source and a target point cloud using LM.
void | setWarpFunction (const typename WarpPointRigid< PointSource, PointTarget, MatScalar >::Ptr &warp_fcn)
| Set the function we use to warp points.
Public Member Functions inherited from pcl::registration::TransformationEstimation< PointSource, PointTarget, float >
| TransformationEstimation ()=default
virtual | ~TransformationEstimation ()=default
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.

## 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.
virtual MatScalar | computeDistance (const Vector4 &p_src, const PointTarget &p_tgt) const
| Compute the distance between a source point and its corresponding target point.

## Protected Attributes

const PointCloudSource * | tmp_src_ {nullptr}
| Temporary pointer to the source dataset.
const PointCloudTarget * | tmp_tgt_ {nullptr}
| Temporary pointer to the target dataset.
const pcl::Indices * | tmp_idx_src_ {nullptr}
| Temporary pointer to the source dataset indices.
const pcl::Indices * | tmp_idx_tgt_ {nullptr}
| Temporary pointer to the target dataset indices.
pcl::registration::WarpPointRigid< PointSource, PointTarget, MatScalar >::Ptr | warp_point_
| The parameterized function used to warp the source to the target.

## 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 58 of file transformation_estimation_lm.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointSource, typename PointTarget, typename MatScalar = float>

using pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::ConstPtr

Initial value:
shared_ptr<const TransformationEstimationLM<PointSource, PointTarget, MatScalar>>

Definition at line 72 of file transformation_estimation_lm.h.

## Matrix4

template<typename PointSource, typename PointTarget, typename MatScalar = float>

using pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::Matrix4

Initial value:
typename TransformationEstimation<PointSource, PointTarget, MatScalar>::Matrix4
pcl::registration::TransformationEstimation::Matrix4
Eigen::Matrix< Scalar, 4, 4 > Matrix4
Definition transformation_estimation.h:64

Definition at line 77 of file transformation_estimation_lm.h.

## Ptr

template<typename PointSource, typename PointTarget, typename MatScalar = float>

using pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::Ptr

Initial value:
shared_ptr<TransformationEstimationLM<PointSource, PointTarget, MatScalar>>

Definition at line 70 of file transformation_estimation_lm.h.

## Vector4

template<typename PointSource, typename PointTarget, typename MatScalar = float>

using pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::Vector4 = Eigen::Matrix<MatScalar, 4, 1>

Definition at line 76 of file transformation_estimation_lm.h.

## VectorX

template<typename PointSource, typename PointTarget, typename MatScalar = float>

using pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::VectorX = Eigen::Matrix<MatScalar, Eigen::Dynamic, 1>

Definition at line 75 of file transformation_estimation_lm.h.

## Constructor & Destructor Documentation

## TransformationEstimationLM() [1/2]

template<typename PointSource, typename PointTarget, typename MatScalar>

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

Constructor.

Definition at line 49 of file transformation_estimation_lm.hpp.

References tmp_src_, tmp_tgt_, and warp_point_.

Referenced by operator=(), pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::OptimizationFunctor::OptimizationFunctor(), pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::OptimizationFunctorWithIndices::OptimizationFunctorWithIndices(), and TransformationEstimationLM().

## TransformationEstimationLM() [2/2]

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] | src | the TransformationEstimationLM object to copy into this

Definition at line 86 of file transformation_estimation_lm.h.

References tmp_idx_src_, tmp_idx_tgt_, tmp_src_, tmp_tgt_, TransformationEstimationLM(), and warp_point_.

## ~TransformationEstimationLM()

template<typename PointSource, typename PointTarget, typename MatScalar = float>

pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::~TransformationEstimationLM | ( |  | ) |

override default

Destructor.

## Member Function Documentation

## computeDistance() [1/2]

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

inline protected virtual

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

Parameters

  [in] | p_src | The source point
  [in] | p_tgt | The 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 >, pcl::registration::TransformationEstimationPointToPlane< PointSource, PointTarget, float >, and pcl::registration::TransformationEstimationPointToPlane< PointSource, PointTarget, MatScalar >.

Definition at line 182 of file transformation_estimation_lm.h.

## computeDistance() [2/2]

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

inline protected virtual

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

Parameters

  [in] | p_src | The source point
  [in] | p_tgt | The 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)

Definition at line 198 of file transformation_estimation_lm.h.

## estimateRigidTransformation() [1/4]

template<typename PointSource, typename PointTarget, typename MatScalar>

void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::estimateRigidTransformation | ( | const pcl::PointCloud< PointSource > & | cloud_src,
|  | const pcl::Indices & | indices_src,
|  | const pcl::PointCloud< PointTarget > & | cloud_tgt,
|  | const pcl::Indices & | indices_tgt,
|  | Matrix4 & | transformation_matrix ) const

inline override

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

Parameters

  [in] | cloud_src | the source point cloud dataset
  [in] | indices_src | the vector of indices describing the points of interest in cloud_src
  [in] | cloud_tgt | the target point cloud dataset
  [in] | indices_tgt | the vector of indices describing the correspondences of the interest points from indices_src
  [out] | transformation_matrix | the resultant transformation matrix

Definition at line 152 of file transformation_estimation_lm.hpp.

References tmp_idx_src_, tmp_idx_tgt_, tmp_src_, tmp_tgt_, and warp_point_.

## estimateRigidTransformation() [2/4]

template<typename PointSource, typename PointTarget, typename MatScalar>

void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::estimateRigidTransformation | ( | const pcl::PointCloud< PointSource > & | cloud_src,
|  | const pcl::Indices & | indices_src,
|  | const pcl::PointCloud< PointTarget > & | cloud_tgt,
|  | Matrix4 & | transformation_matrix ) const

inline override

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

Parameters

  [in] | cloud_src | the source point cloud dataset
  [in] | indices_src | the vector of indices describing the points of interest in cloud_src
  [in] | cloud_tgt | the target point cloud dataset
  [out] | transformation_matrix | the resultant transformation matrix

Definition at line 121 of file transformation_estimation_lm.hpp.

References estimateRigidTransformation(), and pcl::PointCloud< PointT >::size().

## estimateRigidTransformation() [3/4]

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 override

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

Parameters

  [in] | cloud_src | the source point cloud dataset
  [in] | cloud_tgt | the target point cloud dataset
  [in] | correspondences | the vector of correspondences between source and target point cloud
  [out] | transformation_matrix | the resultant transformation matrix

Definition at line 219 of file transformation_estimation_lm.hpp.

References estimateRigidTransformation().

## estimateRigidTransformation() [4/4]

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 override

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

Parameters

  [in] | cloud_src | the source point cloud dataset
  [in] | cloud_tgt | the target point cloud dataset
  [out] | transformation_matrix | the resultant transformation matrix

Definition at line 58 of file transformation_estimation_lm.hpp.

References pcl::PointCloud< PointT >::size().

Referenced by estimateRigidTransformation(), and estimateRigidTransformation().

## operator=()

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] | src | the TransformationEstimationLM object to copy into this

Definition at line 97 of file transformation_estimation_lm.h.

References tmp_idx_src_, tmp_idx_tgt_, tmp_src_, tmp_tgt_, TransformationEstimationLM(), and warp_point_.

## setWarpFunction()

template<typename PointSource, typename PointTarget, typename MatScalar = float>

void pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::setWarpFunction | ( | const typename WarpPointRigid< PointSource, PointTarget, MatScalar >::Ptr & | warp_fcn | ) |

inline

Set the function we use to warp points.

Defaults to rigid 6D warp.

Parameters

  [in] | warp_fcn | a shared pointer to an object that warps points

Definition at line 165 of file transformation_estimation_lm.h.

References warp_point_.

## Member Data Documentation

## tmp_idx_src_

template<typename PointSource, typename PointTarget, typename MatScalar = float>

const pcl::Indices* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_idx_src_ {nullptr}

mutable protected

Temporary pointer to the source dataset indices.

Definition at line 211 of file transformation_estimation_lm.h.

Referenced by estimateRigidTransformation(), operator=(), and TransformationEstimationLM().

## tmp_idx_tgt_

template<typename PointSource, typename PointTarget, typename MatScalar = float>

const pcl::Indices* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_idx_tgt_ {nullptr}

mutable protected

Temporary pointer to the target dataset indices.

Definition at line 214 of file transformation_estimation_lm.h.

Referenced by estimateRigidTransformation(), operator=(), and TransformationEstimationLM().

## tmp_src_

template<typename PointSource, typename PointTarget, typename MatScalar = float>

const PointCloudSource* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_src_ {nullptr}

mutable protected

Temporary pointer to the source dataset.

Definition at line 205 of file transformation_estimation_lm.h.

Referenced by estimateRigidTransformation(), operator=(), TransformationEstimationLM(), and TransformationEstimationLM().

## tmp_tgt_

template<typename PointSource, typename PointTarget, typename MatScalar = float>

const PointCloudTarget* pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::tmp_tgt_ {nullptr}

mutable protected

Temporary pointer to the target dataset.

Definition at line 208 of file transformation_estimation_lm.h.

Referenced by estimateRigidTransformation(), operator=(), TransformationEstimationLM(), and TransformationEstimationLM().

## warp_point_

template<typename PointSource, typename PointTarget, typename MatScalar = float>

pcl::registration::WarpPointRigid<PointSource,PointTarget,MatScalar>::Ptr pcl::registration::TransformationEstimationLM< PointSource, PointTarget, MatScalar >::warp_point_

protected

The parameterized function used to warp the source to the target.

Definition at line 218 of file transformation_estimation_lm.h.

Referenced by estimateRigidTransformation(), operator=(), setWarpFunction(), TransformationEstimationLM(), and TransformationEstimationLM().

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

- pcl/registration/transformation_estimation_lm.h
- pcl/registration/impl/transformation_estimation_lm.hpp