简介
简单介绍了一下2D变换的基本概念,以及一些基本的变换矩阵。
文末有一个源于 Computer Vision:
Algorithms and Applications - Richard Szeliski 的表格,总结了2D变换的一些特性。
0. Base
Note: It’s a 2D base shape.
1. Transition
Move the point (x, y) to (x+4, y+2)
Note: For transition, we need to expand the base shape to 3D, and apply a 3D transition matrix.
2. Rotation
Rotate the point (x, y) by 90 degrees counterclockwise
3. Scaling
Scale the point (x, y) by 2 in the x direction and by 3 in the y direction.
4. Shearing
e.g.1: Shear the point (x, y) by 2 in the x direction.
e.g.2: Shear the point (x, y) by 2 in the y direction.
e.g.3: Shear the point (x, y) by 2 in the x and y direction.
Note: This method is a little bit weried, try understand by calculating the matrix multiplication.
e.g. for T_shear_2, [[1,0],[2,1]]∗[4,0]=[4,8]
5. Reflection
Reflect the point (x, y) over the x-axis.
Reflect the point (x, y) over the y-axis.
6. Projection
Project the point (x, y) onto the x-axis.
Project the point (x, y) onto the y-axis.
Conclusion
For 2D transformation:
Transformation |
DOF |
Preserves |
Description |
Transition |
2 |
Orientation |
Move along the x and y axis (2) |
Rigid (Eucledian) |
3 |
Lengths |
Transition (2) + Rotation (1) |
Similarity |
4 |
Angles |
Rigid (3) + Scaling (1) Note: Scaling is uniform, which means the scaling factor is the same in both x and y direction. |
Affine |
6 |
Parallels |
Similarity (4) + Shearing (2) |
Projective (Homography) |
8 |
Ratios |
Affine (6) + Projection (2) |