Perspective Transformation
Perspective transformation is the most general transformation. Its matrix form is:
{\mathbf{T}_P} = \left[ {\begin{array}{*{20}{c}} \mathbf{A} & \mathbf{t}\\ {{\mathbf{a}^T}} & v \end{array}} \right]. \end{equation}Its upper left corner is the invertible matrix . The upper right corner is the translation , and the lower-left corner is the scale .
Since the homogeneous coordinates are used, when , we can divide the entire matrix by to get a matrix with a bottom right corner of 1; otherwise, we get a matrix with a lower right corner of . Therefore, the 2D perspective transformation has a total of 8 degrees of freedom, and 3D has a total of 15 degrees of freedom. Perspective transformation is the most general transformation that has been said so far.
The transformation from the real world to a camera photo can be seen as a perspective transformation.
The reader can imagine what a square tile would look like in a photo: first, it is no longer square. Second, since the close part is larger than the far-away part, it is not even a parallelogram but an irregular quadrilateral.
In Eigen