The image processing mainly involves two kinds of geometric transformations: affine transformation and perspective transformation.
Sec1. Affine transformations
Affine transformations describe the transformation operations under two-dimensional coordinates, including: translation (translation), rotation (Rotation), scaling (scale), flip (flip), Error-cutting (Shear), each of which can be represented as a matrix form. In particular, the image after affine transformation, the original line and parallel lines, affine transformation is still straight lines and parallel lines.
Translation Transformation
[X′y′]=[1001txty][xy] \left[\begin{matrix} x ' \\y ' \end{matrix}\right] = \left[\begin{ Matrix} 1&0&t_x \ 0&1&t_y \ \end{matrix}\right] \left[\begin{matrix} x \\y \end{matrix}\right]
Rotation transform (counterclockwise rotation around Origin Θ\theta)
[X′y′]=[cos (θ) sin (θ) −sin (θ) cos (θ)][xy] \left[\begin{matrix} x ' \ \ y ' \end{ Matrix}\right] = \left[\begin{matrix} cos (\theta) &-sin (\theta) \ sin (\theta) &cos (\theta) \ \end{matrix}\ Right] \left[\begin{matrix} x \\y \end{matrix}\right]
Zoom transform
[X′y′]=[sx00sy][xy] \left[\begin{ Matrix} x ' \\y ' \end{matrix}\right] = \left[\begin{matrix} s_x&0 \ 0&s_y \\\end{matrix}\right] \left[\begin{ Matrix} x \ y \end{matrix}\right]
Flip Transform (take x-axis rollover transformation as an example)