The concept of transformation in OpenCV

I am new to opencv. and now I'm moving on to the concept of Image Transformation in OpenCV. So my question is:

1) Why does the affine transformation use a 2 * 3 matrix and does the perspective transformation use a 3 * 3 matrix?

2) When to use the Affine Transformation and the Perspective Transformation on top of each other?

Any suggestions?

+4
source share
2 answers

1) This is not an OpenCV question, but rather a math. Applying the affine transform to the point (x, y) means the following:

x_new = a*x + b*y + c;
y_new = d*x + e*y + f;

6 : a, b, c, d, e, f. 2x3: a, b, c d, e, f . .

(x, y) :

z = g*x + h*y + 1;
x_new = (a*x + b*y + c)/z;
y_new = (d*x + e*y + f)/z;

, 8 , 3x3. - g, h, 1.

. , .

2) " ": - , (.. ), . .

+8

- , . : 1. - . , , , . 2. - , , (, ); 3. - - - . ( ); . 4. - , ( , ). . , ? , . , . , , , .

, (coz of devision). : 1. ; 2. 3D-, , ; 3. . , , , . enter image description here

+1

Source: https://habr.com/ru/post/1528892/


All Articles