PCL
|
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 |
RigidTransformation & | operator= (const RigidTransformation &)=default |
RigidTransformation & | operator= (RigidTransformation &&)=default |
const Matrix & | TransformationMatrix () const |
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.
|
inline |
Default constructor. Constructs a no-op transformation with a unit transformation matrix.
Definition at line 87 of file RigidTransformation.h.
|
inline |
Constructor from a given transformation matrix.
Definition at line 95 of file RigidTransformation.h.
|
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.
|
default |
Copy constructor.
|
default |
Move constructor.
|
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.
|
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.
|
inline |
Ensures that this object uniquely references its internal matrix data.
Definition at line 250 of file RigidTransformation.h.
|
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.
|
inline |
Returns true iff this transformation has been initialized and is valid.
Definition at line 242 of file RigidTransformation.h.
|
inline |
Returns the rigid transformation matrix.
Definition at line 234 of file RigidTransformation.h.
|
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.
|
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.
|
default |
Copy assignment operator.
|
default |
Move assignment operator.
|
inline |
Returns the rigid transformation matrix.
Definition at line 226 of file RigidTransformation.h.