| cv.estimateRigidTransform - MATLAB File Help |
Computes an optimal affine transformation between two 2D point sets
M = cv.estimateRigidTransform(src, dst)
M = cv.estimateRigidTransform(src, dst, 'OptionName', optionValue, ...)
{[x,y], ...}, or first image (8-bit numeric array, 1- or
3-channels).src, or second image (8-bit numeric array, 1- or 3-channels).[A|b] matrix (see below).The function finds an optimal affine transform [A|b] (a 2x3 floating-point
matrix) that approximates best the affine transformation between:
src image and finds the corresponding features in dst image. After
that, the problem is reduced to the first case.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.