Reference:
http://blog.csdn.net/kinbosong/article/details/64923831
http://blog.sina.com.cn/s/blog_90cf580001013oc4.html
http://blog.csdn.net/u014096352/article/ details/53526747
https://zhidao.baidu.com/question/189639914.html
rigid transformation
Here is a very general transformation, rigid transformation. Rigid transformation: Only the position (translational transformation) and orientation (rotational transformation) of the object change, while the shape does not change, the resulting transformation is called a rigid transformation.
Affine transformation
The difference between affine transformation and projective transformation
The projective transformation forms a group, which is called the projective transformation group, and the n×n invertible real matrix is called the general linear group GL(n). Projective mapping group, denoted as PL(n). In the plane, the projective transformation is PL(3) .
The transformation matrix form of the projective transformation in the plane is as follows, that is, a 3 × 3 matrix.
Among them , the transformation when the last row of the above matrix is (0, 0, 1) is an affine transformation . Under the premise of affine, when the upper left corner of the 2×2 matrix is orthogonal, it is an Euclidean transformation, and the upper left corner matrix determinant When it is 1, it is a directional Euclidean transformation. So projective transformations include affine transformations , and affine transformations include Euclidean transformations.
So far we have obtained the relationship between projective transformation and affine transformation.
Analytical Transformation Matrix
We divide the above matrix into several parts, as follows:
the whole composed of 4 elements in the large rectangle represents linear transformation, such as scaling (scale), shearing (shearing) and ratio (rotation); the ellipse part represents the parameters of translation , one determines the translation in the x direction and one determines the translation in the y direction; the small rectangular part is used to generate the perspective transform. From this, it can be understood that affine is a special form of perspective transformation.
The composition of affine transformation
Affine transformation mainly includes translation transformation, rotation transformation, scaling transformation (also called scale transformation), skew transformation (also called staggered transformation, shear transformation , offset transformation), and flip transformation , with six degrees of freedom .
The form of the transformation matrix of each transformation is shown in detail below:
Features of Affine Transformation
Affine transformations maintain the "straightness" and "parallelism" of 2D graphics, but the angle changes.
"Straightness": After the transformation, the straight line is still a straight line, an arc or an arc.
"Parallelism": Parallel lines or parallel lines, the order of the positions of the points on the line remains unchanged.
It has 6 degrees of freedom, that is, 4 rotations, that is, the 4 elements of the aforementioned large rectangle can be changed at the same time, translation in the x direction and translation in the y direction. It can maintain parallelism, but cannot maintain verticality. The area ratio of each part in the Image before and after transformation remains unchanged, the length ratio of collinear line segments or parallel line segments remains unchanged, and the linear combination of vectors remains unchanged.
Projective transformation
What needs to be clarified here is that Perspective Transformation is also called Projective Transformation and Projective Transformation.
Projective transformation: is the most general linear transformation. There are 8 degrees of freedom.
Projective transformation keeps the coincidence relation and the intersection ratio unchanged. But not parallelism. That is, it will make the affine transformation produce nonlinear effects.
some other transformations
After the introduction of affine transformation, we should be able to accept more transformations, but the main purpose of this article is to identify the relationship between affine transformation and projective transformation, so I put this section at the end.
Isometric transformation
Isometric transformation is equivalent to the combination of translation transformation and rotation transformation. R is used to represent the transformation matrix, that is, the 2×2 matrix in the
upper left corner is the rotation part, and tx and ty are translation factors. It has three degrees of freedom, namely rotation and x-direction translation. , translation in the y direction. The length, area, and angle between line segments remain unchanged before and after the isometric transformation.
Similarity Transformation
Similar transformation is equivalent to a composite of isometric transformation and uniform scaling. S represents the transformation matrix, that is, the
upper left corner 2 × 2 matrix is the rotation part, tx and ty are translation factors, and it has 4 degrees of freedom, namely rotation, x direction translation, y direction translation and scaling factor s. The length ratio, angle, and virtual circle points I and J remain unchanged before and after similarity transformation. Similar transformations are actually similar to similar triangles.