Geometric transformations are fundamental operations in image processing and computer graphics that alter the spatial arrangement of pixels in an image. They can be represented efficiently using matrix operations.
1. Translation
-
Concept: Shifting an image horizontally and/or vertically.
-
Parameters:
- : Translation distance along the x-axis.
- : Translation distance along the y-axis.
-
Transformation Equations: Let be the original pixel coordinates and be the translated coordinates.
-
Matrix Form (Homogeneous Coordinates): To represent translation in matrix form, we use homogeneous coordinates. A 2D point is represented as a 3D vector .
Where:
- is the translation matrix.
2. Rotation
-
Concept: Rotating an image around a specific point (usually the origin).
-
Parameters:
- : Rotation angle (in radians or degrees). Positive values usually indicate counterclockwise rotation.
-
Transformation Equations: Let be the original pixel coordinates and be the rotated coordinates.
-
Matrix Form (Homogeneous Coordinates):
Where:
- is the rotation matrix.
3. Scaling
-
Concept: Enlarging or shrinking an image along the x and/or y axes.
-
Parameters:
- : Scaling factor along the x-axis.
- : Scaling factor along the y-axis.
-
Transformation Equations: Let be the original pixel coordinates and be the scaled coordinates.
-
Matrix Form (Homogeneous Coordinates):
Where:
- is the scaling matrix.
Combining Transformations
Multiple transformations can be combined by multiplying their corresponding matrices. The order of matrix multiplication matters, as matrix multiplication is not commutative.
For example, to perform a rotation followed by a translation, the combined transformation matrix would be:
Then, to apply this combined transformation to a point:
Note: In general, to apply a sequence of transformations represented by matrices , the combined transformation matrix is:
(multiply from right to left in the order of operations).
Okay, here are concise digital notes on Euclidean, affine, and projective transformations, emphasizing their mathematical representations:
Other Transformation
1. Euclidean Transformation
- Concept: Preserves distances and angles. Includes rotations, translations, and reflections. Also known as a rigid-body transformation or isometry.
- Degrees of Freedom: 3 in 2D (one rotation angle, two translation parameters).
- General Form:
Where:
- , : Original and transformed points (2x1 vectors in 2D).
- : Rotation matrix (2x2 in 2D), orthogonal with determinant 1.
- : Translation vector (2x1 in 2D).
- Matrix Form (Homogeneous Coordinates):
Where:
2. Affine Transformation
- Concept: Preserves parallelism of lines but not necessarily distances and angles. Includes shearing and scaling in addition to Euclidean transformations.
- Degrees of Freedom: 6 in 2D.
- General Form:
Where:
- , : Original and transformed points (2x1 vectors in 2D).
- : Arbitrary 2x2 matrix (not necessarily orthogonal).
- : Translation vector (2x1 in 2D).
- Matrix Form (Homogeneous Coordinates):
3. Projective Transformation
- Concept: Most general linear transformation of homogeneous coordinates. Preserves straight lines but not necessarily parallelism, lengths, or angles. Used to model perspective projections. Also known as a homography.
- Degrees of Freedom: 8 in 2D.
- General Form: Cannot be expressed in the simple form.
- Matrix Form (Homogeneous Coordinates):
Where:
- are inhomogeneous coordinates of the transformed point.
- is a 3x3 homogeneous matrix defined up to a scale factor (only the ratios of the elements matter).
- We can usually set (unless it’s zero).
Summary Table
| Transformation | Degrees of Freedom | Preserves | Matrix Form (2D) |
|---|---|---|---|
| Euclidean | 3 | Distances, angles, parallelism | , is orthogonal, det() = 1 |
| Affine | 6 | Parallelism | , is arbitrary |
| Projective (Homography) | 8 | Straight lines | , defined up to scale |