Foundations of Image Processing Transformations

Nov 2, 2024

Digital Image Processing: Mathematical Transformations

Welcome to the lecture series on digital image processing. Today's focus is on basic mathematical transformations including translation, rotation, and scaling in both 2D and 3D, alongside their inverse transformations.

Key Topics

  • 2D Transformations
    • Translation
    • Rotation
    • Scaling
    • Concatenation of Transformations
  • 3D Transformations
    • Translation
    • Rotation
    • Scaling
  • Coordinate Systems
    • Cartesian vs. Homogeneous Coordinate System
  • Perspective Transformation
  • Inverse Transformations

2D Transformations

Translation

  • Moving a point P(x, y) by a vector results in a new point P'(x', y').

  • Matrix representation:

    [ \begin{bmatrix} x' \ y' \end{bmatrix} = \begin{bmatrix} 1 & 0 & x_0 \ 0 & 1 & y_0 \end{bmatrix} \begin{bmatrix} x \ y \ 1 \end{bmatrix} ]

  • Unified matrix expression ensures symmetry and simplified computation.

Rotation

  • Rotating a point P(x, y) around the origin by angle θ.

  • Expression:

    [ \begin{bmatrix} x' \ y' \end{bmatrix} = \begin{bmatrix} \cos \theta & \sin \theta \ -\sin \theta & \cos \theta \end{bmatrix} \begin{bmatrix} x \ y \end{bmatrix} ]

Scaling

  • Scaling factors Sx and Sy in x and y directions.

  • Matrix representation:

    [ \begin{bmatrix} x' \ y' \end{bmatrix} = \begin{bmatrix} S_x & 0 \ 0 & S_y \end{bmatrix} \begin{bmatrix} x \ y \end{bmatrix} ]

Concatenation of Transformations

  • Rotating around an arbitrary point by translating it to the origin, performing the rotation, and translating back.

3D Transformations

Translation

  • Point P(x, y, z) translated to P'(x', y', z') using vector (x0, y0, z0).

  • Unified matrix equation:

    [ \begin{bmatrix} x' \ y' \ z' \ 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & x_0 \ 0 & 1 & 0 & y_0 \ 0 & 0 & 1 & z_0 \ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \ y \ z \ 1 \end{bmatrix} ]

Scaling

  • Scaling factors in 3D are applied similarly as in 2D.

Rotation

  • Rotations can occur around x, y, or z axes, with distinct matrices for each.

    • Z-axis rotation matrix:

      [ \begin{bmatrix} \cos \theta & \sin \theta & 0 & 0 \ -\sin \theta & \cos \theta & 0 & 0 \ 0 & 0 & 1 & 0 \ 0 & 0 & 0 & 1 \end{bmatrix} ]

  • Similar matrices for x and y axis rotations.

Concatenation

  • Order of applying transformations is crucial as matrix operations are non-commutative.

Coordinate Systems

  • Homogeneous Coordinate System: Introduces an additional component, making matrix operations more uniform.

Perspective Transformation

  • Discussing image formation and inverse perspective transformations.

Inverse Transformations

  • Translation: Negate translation vector.
  • Rotation: Replace θ with -θ.
  • Scaling: Use reciprocal of scale factors.

These transformations are foundational in image processing, especially when handling geometric corrections and modifications in both 2D and 3D spaces.