PCL
|
Homography geometric transformation. More...
#include <Homography.h>
Public Member Functions | |
Homography () | |
Homography (const Homography &)=default | |
Homography (const Matrix &H) | |
template<class point_list1 , class point_list2 > | |
Homography (const point_list1 &P1, const point_list2 &P2) | |
Homography (Homography &&)=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 () |
Homography | Inverse () const |
bool | IsAffine () 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 |
Homography & | operator= (const Homography &)=default |
Homography & | operator= (Homography &&)=default |
const Matrix & | TransformationMatrix () const |
A two-dimensional projective transformation, or homography, is a line-preserving geometric transformation between two sets of points in the plane. More formally, if P represents the set of points in the plane, a homography is an invertible map H of P^2 to itself such that three points p1, p2, p3 are collinear if and only if H(p1), H(p2), H(p3) are collinear.
Homographies have important practical applications in the field of computer vision. On the PixInsight platform, this class is an essential component of image registration and astrometry processes.
Definition at line 84 of file Homography.h.
|
inline |
Default constructor. Constructs a no-op transformation with a unit transformation matrix.
Definition at line 92 of file Homography.h.
|
inline |
Constructor from a given homography matrix.
Definition at line 100 of file Homography.h.
|
inline |
Constructor from two 2D point lists.
Computes a homography to generate a list P2 of transformed points from a list P1 of original points. In other words, the computed homography H works as follows:
P2 = H( P1 )
The transformation matrix is calculated by the Direct Linear Transformation (DLT) method. Both point lists must contain at least four points.
If one of the specified point lists contains less than four points, or if no homography can be estimated from the specified point lists (which leads to a singular transformation matrix), this constructor throws an appropriate Error exception.
References
R. Hartley, In defense of the eight-point algorithm. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 19, pp. 580–593, June 1997.
Definition at line 130 of file Homography.h.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Coordinate transformation. Applies the homography to the specified point p. Returns a reference to p;
The type T must be constructible from and convertible to double
.
Definition at line 180 of file Homography.h.
References pcl::Apply(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.
|
inline |
Coordinate transformation. Applies the homography to the specified x and y coordinates.
The types T1 and T2 must be constructible from and convertible to double
.
Definition at line 163 of file Homography.h.
|
inline |
Ensures that this object uniquely references its internal matrix data.
Definition at line 270 of file Homography.h.
|
inline |
Returns the inverse of this homography.
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 221 of file Homography.h.
|
inline |
Returns true iff this is an affine homography transformation.
An affine homography is a special type of a general homography where the last row of the 3x3 transformation matrix is equal to (0, 0, 1). This function verifies that this property holds for the current transformation matrix (if it is valid) up to the machine epsilon for the double
numeric type.
Definition at line 259 of file Homography.h.
References pcl::Abs().
|
inline |
Returns true iff this transformation has been initialized and is valid.
Definition at line 245 of file Homography.h.
|
inline |
Returns the homography transformation matrix.
Definition at line 237 of file Homography.h.
|
inline |
Point transformation operator. Applies the homography to the coordinates of the specified point p. Returns the transformed point as a two-dimensional point with real coordinates.
Definition at line 204 of file Homography.h.
References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.
|
inline |
Coordinate transformation operator. Applies the homography to the specified x and y coordinates. Returns the transformed point as a two-dimensional point with real coordinates.
Definition at line 191 of file Homography.h.
References pcl::Apply(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.
|
default |
Copy assignment operator.
|
default |
Move assignment operator.
|
inline |
Returns the homography transformation matrix.
Definition at line 229 of file Homography.h.