ewoksndreg.transformation.homography#

Homography abstraction.

A homography transformation can be represented be the following change-of-frame matrix

$$ F=begin{bmatrix} C_{ntimes n}&T_{ntimes 1}\ P_{1times n}&1 end{bmatrix} $$

Different transformation types can be distinguished based on the properties of the translation vector $T$, change-of-basis matrix $C$ and projection vector $P$

  • translation:
    • $C$ is the identity matrix and $P$ are all zeros

  • proper rigid (euclidian) transformation:
    • $P$ are all zeros

    • $C$ is any orthogonal matrix ($C^T=C^{-1}$) with determinant $det{C}=+1$

    • preserves angles, distances and handedness

    • translation + rotation

  • rigid (euclidian) transformation:
    • $P$ are all zeros

    • $C$ is any orthogonal matrix ($C^T=C^{-1}$)

    • preserves angles and distances

    • proper rigid transformation + reflection

  • similarity transformation:
    • $P$ are all zeros

    • $C=rA$ where A any orthogonal matrix ($A^T=A^{-1}$) and $r>0$

    • preserves angles and ratios between distances

    • rigid transformation + isotropic scaling

  • affine transformation:
    • $P$ are all zeros

    • $C$ is any invertible matrix (i.e. linear transformation)

    • preserves parallelism

    • similarity transformation + non-isotropic scaling and shear

  • projective transformation (homography):
    • $C$ is any invertible matrix (i.e. linear transformation)

    • preserves collinearity

    • affine transformation + projection

Functions

matrix_from_params(params, transformation_type)

params_from_trans(transformation)

reverse_indices(matrix)

type_from_matrix(matrix)

Classes

Homography(passive[, transfo_type])