Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions
pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar > Class Template Reference

TransformationEstimation2D implements a simple 2D rigid transformation estimation (x, y, theta) for a given pair of datasets. More...

#include <pcl/registration/transformation_estimation_2D.h>

+ Inheritance diagram for pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >:
+ Collaboration diagram for pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >:

Public Types

using Ptr = shared_ptr< TransformationEstimation2D< PointSource, PointTarget, Scalar > >
 
using ConstPtr = shared_ptr< const TransformationEstimation2D< PointSource, PointTarget, Scalar > >
 
using Matrix4 = typename TransformationEstimation< PointSource, PointTarget, Scalar >::Matrix4
 
- Public Types inherited from pcl::registration::TransformationEstimation< PointSource, PointTarget, float >
using Matrix4 = Eigen::Matrix< float, 4, 4 >
 
using Ptr = shared_ptr< TransformationEstimation< PointSource, PointTarget, float > >
 
using ConstPtr = shared_ptr< const TransformationEstimation< PointSource, PointTarget, float > >
 

Public Member Functions

 TransformationEstimation2D ()=default
 
virtual ~TransformationEstimation2D ()=default
 
void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const
 Estimate a rigid transformation between a source and a target point cloud in 2D. More...
 
void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::Indices &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, Matrix4 &transformation_matrix) const
 Estimate a rigid transformation between a source and a target point cloud in 2D. More...
 
virtual 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
 Estimate a rigid transformation between a source and a target point cloud in 2D. More...
 
virtual 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 transformation between a source and a target point cloud in 2D. More...
 
- 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. More...
 
virtual void estimateRigidTransformation (const pcl::PointCloud< PointSource > &cloud_src, const pcl::Indices &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 pcl::Indices &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const pcl::Indices &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

void estimateRigidTransformation (ConstCloudIterator< PointSource > &source_it, ConstCloudIterator< PointTarget > &target_it, Matrix4 &transformation_matrix) const
 Estimate a rigid rotation transformation between a source and a target. More...
 
void getTransformationFromCorrelation (const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &cloud_src_demean, const Eigen::Matrix< Scalar, 4, 1 > &centroid_src, const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &cloud_tgt_demean, const Eigen::Matrix< Scalar, 4, 1 > &centroid_tgt, Matrix4 &transformation_matrix) const
 Obtain a 4x4 rigid transformation matrix from a correlation matrix H = src. More...
 

Detailed Description

template<typename PointSource, typename PointTarget, typename Scalar = float>
class pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >

TransformationEstimation2D implements a simple 2D rigid transformation estimation (x, y, theta) for a given pair of datasets.

The two datasets should already be transformed so that the reference plane equals z = 0.

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
Suat Gedikli

Definition at line 58 of file transformation_estimation_2D.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::ConstPtr = shared_ptr<const TransformationEstimation2D<PointSource, PointTarget, Scalar> >

Definition at line 62 of file transformation_estimation_2D.h.

◆ Matrix4

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::Matrix4 = typename TransformationEstimation<PointSource, PointTarget, Scalar>::Matrix4

Definition at line 65 of file transformation_estimation_2D.h.

◆ Ptr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::Ptr = shared_ptr<TransformationEstimation2D<PointSource, PointTarget, Scalar> >

Definition at line 61 of file transformation_estimation_2D.h.

Constructor & Destructor Documentation

◆ TransformationEstimation2D()

template<typename PointSource , typename PointTarget , typename Scalar = float>
pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::TransformationEstimation2D ( )
default

◆ ~TransformationEstimation2D()

template<typename PointSource , typename PointTarget , typename Scalar = float>
virtual pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::~TransformationEstimation2D ( )
virtualdefault

Member Function Documentation

◆ estimateRigidTransformation() [1/5]

template<typename PointSource , typename PointTarget , typename Scalar >
void pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::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
inlinevirtual

Estimate a rigid transformation between a source and a target point cloud in 2D.

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 interest points from indices_src
[out]transformation_matrixthe resultant transformation matrix

Definition at line 89 of file transformation_estimation_2D.hpp.

◆ estimateRigidTransformation() [2/5]

template<typename PointSource , typename PointTarget , typename Scalar >
void pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::estimateRigidTransformation ( const pcl::PointCloud< PointSource > &  cloud_src,
const pcl::Indices indices_src,
const pcl::PointCloud< PointTarget > &  cloud_tgt,
Matrix4 transformation_matrix 
) const
inline

Estimate a rigid transformation between a source and a target point cloud in 2D.

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 68 of file transformation_estimation_2D.hpp.

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

◆ estimateRigidTransformation() [3/5]

template<typename PointSource , typename PointTarget , typename Scalar >
void pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::estimateRigidTransformation ( const pcl::PointCloud< PointSource > &  cloud_src,
const pcl::PointCloud< PointTarget > &  cloud_tgt,
const pcl::Correspondences correspondences,
Matrix4 transformation_matrix 
) const
virtual

Estimate a rigid transformation between a source and a target point cloud in 2D.

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 111 of file transformation_estimation_2D.hpp.

◆ estimateRigidTransformation() [4/5]

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

Estimate a rigid transformation between a source and a target point cloud in 2D.

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

Definition at line 47 of file transformation_estimation_2D.hpp.

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

◆ estimateRigidTransformation() [5/5]

template<typename PointSource , typename PointTarget , typename Scalar >
void pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::estimateRigidTransformation ( ConstCloudIterator< PointSource > &  source_it,
ConstCloudIterator< PointTarget > &  target_it,
Matrix4 transformation_matrix 
) const
inlineprotected

Estimate a rigid rotation transformation between a source and a target.

Parameters
[in]source_itan iterator over the source point cloud dataset
[in]target_itan iterator over the target point cloud dataset
[out]transformation_matrixthe resultant transformation matrix

Definition at line 124 of file transformation_estimation_2D.hpp.

References pcl::compute3DCentroid(), pcl::demeanPointCloud(), and pcl::ConstCloudIterator< PointT >::reset().

◆ getTransformationFromCorrelation()

template<typename PointSource , typename PointTarget , typename Scalar >
void pcl::registration::TransformationEstimation2D< PointSource, PointTarget, Scalar >::getTransformationFromCorrelation ( const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &  cloud_src_demean,
const Eigen::Matrix< Scalar, 4, 1 > &  centroid_src,
const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > &  cloud_tgt_demean,
const Eigen::Matrix< Scalar, 4, 1 > &  centroid_tgt,
Matrix4 transformation_matrix 
) const
protected

Obtain a 4x4 rigid transformation matrix from a correlation matrix H = src.

  • tgt'
    Parameters
    [in]cloud_src_demeanthe input source cloud, demeaned, in Eigen format
    [in]centroid_srcthe input source centroid, in Eigen format
    [in]cloud_tgt_demeanthe input target cloud, demeaned, in Eigen format
    [in]centroid_tgtthe input target cloud, in Eigen format
    [out]transformation_matrixthe resultant 4x4 rigid transformation matrix

Definition at line 157 of file transformation_estimation_2D.hpp.


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