A class to hold a line-to-line projective transformation matrix and to perform common operations using it e.g. More...
#include <vgl_algo_fwd.h>
Public Member Functions | |
| vgl_h_matrix_1d ()=default | |
| ~vgl_h_matrix_1d ()=default | |
| vgl_h_matrix_1d (vgl_h_matrix_1d< T > const &M) | |
| Copy constructor. More... | |
| vgl_h_matrix_1d (vnl_matrix_fixed< T, 2, 2 > const &M) | |
| Constructor from a 2x2 matrix, and implicit cast from vnl_matrix_fixed<T,2,2>. More... | |
| vgl_h_matrix_1d (T const *M) | |
| Constructor from 2x2 C-array. More... | |
| vgl_h_matrix_1d (std::istream &s) | |
| Constructor from istream. More... | |
| vgl_h_matrix_1d (char const *filename) | |
| Constructor from file. More... | |
| vgl_h_matrix_1d (std::vector< vgl_homg_point_1d< T > > const &points1, std::vector< vgl_homg_point_1d< T > > const &points2) | |
| Constructor - calculate homography between two sets of 1D points (minimum 3). More... | |
| vgl_homg_point_1d< T > | operator() (vgl_homg_point_1d< T > const &p) const |
| Return the transformed point given by $q = {\tt H} p$. More... | |
| vgl_homg_point_1d< T > | operator * (vgl_homg_point_1d< T > const &p) const |
| Return the transformed point given by $q = {\tt H} p$. More... | |
| vgl_homg_point_1d< T > | correlation (vgl_homg_point_1d< T > const &p) const |
| vgl_homg_point_1d< T > | preimage (vgl_homg_point_1d< T > const &q) const |
| Return the transformed point given by $p = {\tt H}^{-1} q$. More... | |
| bool | operator== (vgl_h_matrix_1d< T > const &M) const |
| vgl_h_matrix_1d< T > | operator * (vgl_h_matrix_1d< T > const &H) const |
| product of two vgl_h_matrix_1ds. More... | |
| vnl_matrix_fixed< T, 2, 2 > const & | get_matrix () const |
| Return the 2x2 homography matrix. More... | |
| void | get (vnl_matrix_fixed< T, 2, 2 > *M) const |
| Fill M with contents of the 2x2 homography matrix. More... | |
| void | get (vnl_matrix< T > *M) const |
| void | get (T *M) const |
| Fill M with contents of the 2x2 homography matrix. More... | |
| T | get (unsigned int row_index, unsigned int col_index) const |
| Return an element from the 2x2 homography matrix. More... | |
| vgl_h_matrix_1d | get_inverse () const |
| Return the inverse homography. More... | |
| bool | is_rotation () const |
| bool | is_euclidean () const |
| bool | is_identity () const |
| bool | projective_basis (std::vector< vgl_homg_point_1d< T > > const &three_points) |
| transformation to projective basis (canonical frame). More... | |
| vgl_h_matrix_1d & | set_identity () |
| initialize the transformation to identity. More... | |
| vgl_h_matrix_1d & | set (T const *M) |
| Set to 2x2 row-stored matrix. More... | |
| vgl_h_matrix_1d & | set (vnl_matrix_fixed< T, 2, 2 > const &M) |
| Set to given 2x2 matrix. More... | |
| vgl_h_matrix_1d & | set (unsigned int row_index, unsigned int col_index, T value) |
| Set an element of the 2x2 homography matrix. More... | |
| vgl_h_matrix_1d & | set_scale (T scale) |
| compose the current transform with a uniform scaling transformation, S. More... | |
| vgl_h_matrix_1d & | set_translation (T tx) |
| set H[0][1] = tx, other elements unaltered. More... | |
| vgl_h_matrix_1d & | set_affine (vnl_matrix_fixed< T, 1, 2 > const &M12) |
| set the transform to a general affine transform matrix. More... | |
| bool | read (char const *filename) |
| Read H from file. More... | |
| bool | read (std::istream &s) |
| Read H from std::istream. More... | |
Protected Attributes | |
| vnl_matrix_fixed< T, 2, 2 > | t12_matrix_ |
A class to hold a line-to-line projective transformation matrix and to perform common operations using it e.g.
transfer point.
Definition at line 10 of file vgl_algo_fwd.h.
|
default |
|
default |
|
inline |
Copy constructor.
Definition at line 51 of file vgl_h_matrix_1d.h.
|
inline |
Constructor from a 2x2 matrix, and implicit cast from vnl_matrix_fixed<T,2,2>.
Definition at line 54 of file vgl_h_matrix_1d.h.
|
inlineexplicit |
Constructor from 2x2 C-array.
Definition at line 57 of file vgl_h_matrix_1d.h.
|
explicit |
Constructor from istream.
Definition at line 22 of file vgl_h_matrix_1d.hxx.
|
explicit |
Constructor from file.
Definition at line 96 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T >::vgl_h_matrix_1d | ( | std::vector< vgl_homg_point_1d< T > > const & | points1, |
| std::vector< vgl_homg_point_1d< T > > const & | points2 | ||
| ) |
Constructor - calculate homography between two sets of 1D points (minimum 3).
Definition at line 28 of file vgl_h_matrix_1d.hxx.
|
inline |
Definition at line 72 of file vgl_h_matrix_1d.h.
| void vgl_h_matrix_1d< T >::get | ( | vnl_matrix_fixed< T, 2, 2 > * | M | ) | const |
Fill M with contents of the 2x2 homography matrix.
Definition at line 131 of file vgl_h_matrix_1d.hxx.
| void vgl_h_matrix_1d< T >::get | ( | vnl_matrix< T > * | M | ) | const |
Definition at line 137 of file vgl_h_matrix_1d.hxx.
| void vgl_h_matrix_1d< T >::get | ( | T * | M | ) | const |
Fill M with contents of the 2x2 homography matrix.
Definition at line 124 of file vgl_h_matrix_1d.hxx.
| T vgl_h_matrix_1d< T >::get | ( | unsigned int | row_index, |
| unsigned int | col_index | ||
| ) | const |
Return an element from the 2x2 homography matrix.
Definition at line 118 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T > vgl_h_matrix_1d< T >::get_inverse | ( | ) | const |
Return the inverse homography.
Definition at line 75 of file vgl_h_matrix_1d.hxx.
|
inline |
Return the 2x2 homography matrix.
Definition at line 86 of file vgl_h_matrix_1d.h.
| bool vgl_h_matrix_1d< T >::is_euclidean | ( | ) | const |
Definition at line 261 of file vgl_h_matrix_1d.hxx.
| bool vgl_h_matrix_1d< T >::is_identity | ( | ) | const |
Definition at line 247 of file vgl_h_matrix_1d.hxx.
| bool vgl_h_matrix_1d< T >::is_rotation | ( | ) | const |
Definition at line 253 of file vgl_h_matrix_1d.hxx.
|
inline |
Return the transformed point given by $q = {\tt H} p$.
Definition at line 71 of file vgl_h_matrix_1d.h.
|
inline |
product of two vgl_h_matrix_1ds.
Definition at line 80 of file vgl_h_matrix_1d.h.
| vgl_homg_point_1d< T > vgl_h_matrix_1d< T >::operator() | ( | vgl_homg_point_1d< T > const & | p | ) | const |
Return the transformed point given by $q = {\tt H} p$.
Definition at line 59 of file vgl_h_matrix_1d.hxx.
|
inline |
Definition at line 77 of file vgl_h_matrix_1d.h.
| vgl_homg_point_1d< T > vgl_h_matrix_1d< T >::preimage | ( | vgl_homg_point_1d< T > const & | q | ) | const |
Return the transformed point given by $p = {\tt H}^{-1} q$.
Definition at line 67 of file vgl_h_matrix_1d.hxx.
| bool vgl_h_matrix_1d< T >::projective_basis | ( | std::vector< vgl_homg_point_1d< T > > const & | three_points | ) |
transformation to projective basis (canonical frame).
Compute the homography that takes the input set of points to the canonical frame. The points act as the projective basis for the canonical coordinate system. In the canonical frame the points have coordinates:
p[0]p[1]p[2]
1 0 1
0 1 1
Definition at line 198 of file vgl_h_matrix_1d.hxx.
| bool vgl_h_matrix_1d< T >::read | ( | char const * | filename | ) |
Read H from file.
Definition at line 106 of file vgl_h_matrix_1d.hxx.
| bool vgl_h_matrix_1d< T >::read | ( | std::istream & | s | ) |
Read H from std::istream.
Definition at line 88 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T > & vgl_h_matrix_1d< T >::set | ( | T const * | M | ) |
Set to 2x2 row-stored matrix.
Definition at line 145 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T > & vgl_h_matrix_1d< T >::set | ( | vnl_matrix_fixed< T, 2, 2 > const & | M | ) |
Set to given 2x2 matrix.
Definition at line 154 of file vgl_h_matrix_1d.hxx.
|
inline |
Set an element of the 2x2 homography matrix.
Definition at line 123 of file vgl_h_matrix_1d.h.
| vgl_h_matrix_1d< T > & vgl_h_matrix_1d< T >::set_affine | ( | vnl_matrix_fixed< T, 1, 2 > const & | M12 | ) |
set the transform to a general affine transform matrix.
$A = \left[ \begin{array}{ccc} a00 & a01 \% 0 & 1 \end{array}\right]$
Definition at line 187 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T > & vgl_h_matrix_1d< T >::set_identity | ( | ) |
initialize the transformation to identity.
Definition at line 162 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T > & vgl_h_matrix_1d< T >::set_scale | ( | T | scale | ) |
compose the current transform with a uniform scaling transformation, S.
$S = \left[ \begin{array}{cc} s & 0 \% 0 & 1 \end{array}\right]$ , Ts = S*T.
Definition at line 170 of file vgl_h_matrix_1d.hxx.
| vgl_h_matrix_1d< T > & vgl_h_matrix_1d< T >::set_translation | ( | T | tx | ) |
set H[0][1] = tx, other elements unaltered.
Definition at line 179 of file vgl_h_matrix_1d.hxx.
|
protected |
Definition at line 41 of file vgl_h_matrix_1d.h.
1.8.15