PCL
pcl::RigidTransformation Class Reference

Rigid geometric transformation. More...

#include <RigidTransformation.h>

Public Member Functions

 RigidTransformation ()
 
 RigidTransformation (const Matrix &H)
 
template<class point_list1 , class point_list2 >
 RigidTransformation (const point_list1 &P1, const point_list2 &P2)
 
 RigidTransformation (const RigidTransformation &)=default
 
 RigidTransformation (RigidTransformation &&)=default
 
template<typename T >
GenericPoint< T > & Apply (GenericPoint< T > &p) const
 
template<typename T1 , typename T2 >
void Apply (T1 &x, T2 &y) const
 
void EnsureUnique ()
 
RigidTransformation Inverse () const
 
bool IsValid () const
 
 operator const Matrix & () const
 
template<typename T >
DPoint operator() (const GenericPoint< T > &p) const
 
DPoint operator() (double x, double y) const
 
RigidTransformationoperator= (const RigidTransformation &)=default
 
RigidTransformationoperator= (RigidTransformation &&)=default
 
const MatrixTransformationMatrix () const
 

Detailed Description

A two-dimensional rigid transformation, or Euclidean transformation, preserves the Euclidean distance between every pair of transformed points. Rigid transformations may include rotations, translations and reflections in any order.

Definition at line 79 of file RigidTransformation.h.

Constructor & Destructor Documentation

◆ RigidTransformation() [1/5]

pcl::RigidTransformation::RigidTransformation ( )
inline

Default constructor. Constructs a no-op transformation with a unit transformation matrix.

Definition at line 87 of file RigidTransformation.h.

◆ RigidTransformation() [2/5]

pcl::RigidTransformation::RigidTransformation ( const Matrix H)
inline

Constructor from a given transformation matrix.

Definition at line 95 of file RigidTransformation.h.

◆ RigidTransformation() [3/5]

template<class point_list1 , class point_list2 >
pcl::RigidTransformation::RigidTransformation ( const point_list1 &  P1,
const point_list2 &  P2 
)
inline

Constructor from two 2D point lists.

Computes a rigid transformation to generate a list P2 of transformed points from a list P1 of original points. In other words, the computed transformation H works as follows:

P2 = H( P1 )

The transformation matrix is calculated by solving a least-squares problem using the SVD method (see references). Both point lists must contain at least three points.

If one of the specified point lists contains less than three points, or if no transformation can be estimated from the specified point lists (which leads to a singular transformation matrix), this constructor throws an appropriate Error exception.

References

Olga Sorkine-Hornung and Michael Rabinovich, Least-Squares Rigid Motion Using SVD. Department of Computer Science, ETH Zurich. January 16, 2017.

Arun, K.S., Huang, T.S., Blostein, S.D, Least-Squares Fitting of Two 3-D Point Sets, IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume 9 Issue 5, May 1987.

Definition at line 129 of file RigidTransformation.h.

◆ RigidTransformation() [4/5]

pcl::RigidTransformation::RigidTransformation ( const RigidTransformation )
default

Copy constructor.

◆ RigidTransformation() [5/5]

pcl::RigidTransformation::RigidTransformation ( RigidTransformation &&  )
default

Move constructor.

Member Function Documentation

◆ Apply() [1/2]

template<typename T >
GenericPoint<T>& pcl::RigidTransformation::Apply ( GenericPoint< T > &  p) const
inline

Coordinate transformation. Applies the transformation to the specified point p. Returns a reference to p;

The type T must be constructible from and convertible to double.

Definition at line 177 of file RigidTransformation.h.

References pcl::Apply(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ Apply() [2/2]

template<typename T1 , typename T2 >
void pcl::RigidTransformation::Apply ( T1 &  x,
T2 &  y 
) const
inline

Coordinate transformation. Applies the transformation to the specified x and y coordinates.

The types T1 and T2 must be constructible from and convertible to double.

Definition at line 162 of file RigidTransformation.h.

◆ EnsureUnique()

void pcl::RigidTransformation::EnsureUnique ( )
inline

Ensures that this object uniquely references its internal matrix data.

Definition at line 250 of file RigidTransformation.h.

◆ Inverse()

RigidTransformation pcl::RigidTransformation::Inverse ( ) const
inline

Returns the inverse of this transformation.

If this transformation has been computed from two point lists P1 and P2:

P2 = H( P1 )

then this function returns a transformation H1 such that:

P1 = H1( P2 )

Definition at line 218 of file RigidTransformation.h.

◆ IsValid()

bool pcl::RigidTransformation::IsValid ( ) const
inline

Returns true iff this transformation has been initialized and is valid.

Definition at line 242 of file RigidTransformation.h.

◆ operator const Matrix &()

pcl::RigidTransformation::operator const Matrix & ( ) const
inline

Returns the rigid transformation matrix.

Definition at line 234 of file RigidTransformation.h.

◆ operator()() [1/2]

template<typename T >
DPoint pcl::RigidTransformation::operator() ( const GenericPoint< T > &  p) const
inline

Point transformation operator. Applies the transformation to the coordinates of the specified point p. Returns the transformed point as a two-dimensional point with real coordinates.

Definition at line 201 of file RigidTransformation.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator()() [2/2]

DPoint pcl::RigidTransformation::operator() ( double  x,
double  y 
) const
inline

Coordinate transformation operator. Applies the transformation to the specified x and y coordinates. Returns the transformed point as a two-dimensional point with real coordinates.

Definition at line 188 of file RigidTransformation.h.

References pcl::Apply(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator=() [1/2]

RigidTransformation& pcl::RigidTransformation::operator= ( const RigidTransformation )
default

Copy assignment operator.

◆ operator=() [2/2]

RigidTransformation& pcl::RigidTransformation::operator= ( RigidTransformation &&  )
default

Move assignment operator.

◆ TransformationMatrix()

const Matrix& pcl::RigidTransformation::TransformationMatrix ( ) const
inline

Returns the rigid transformation matrix.

Definition at line 226 of file RigidTransformation.h.


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