cv.estimateRigidTransform - MATLAB File Help
cv.estimateRigidTransform

Computes an optimal affine transformation between two 2D point sets

M = cv.estimateRigidTransform(src, dst)
M = cv.estimateRigidTransform(src, dst, 'OptionName', optionValue, ...)

Input

Output

Options

The function finds an optimal affine transform [A|b] (a 2x3 floating-point matrix) that approximates best the affine transformation between:

In case of point sets, the problem is formulated as follows: you need to find a 2x2 matrix A and 2x1 vector b so that:

[A*|b*] = argmin_{[A|b]} sum_{i}(|| dst{i} - A*src{i}' - b ||^2)

where src{i} and dst{i} are the i-th points in src and dst, respectively. [A|b] can be either arbitrary (when FullAffine=true) or have a form of:

[ a11, a12, b1;
 -a12, a11, b2 ]

when FullAffine=false.

See also