cv.estimateAffine2D - MATLAB File Help
cv.estimateAffine2D

Computes an optimal affine transformation between two 2D point sets

H = cv.estimateAffine2D(from, to)
[H, inliers] = cv.estimateAffine2D(...)
[...] = cv.estimateAffine2D(..., 'OptionName', optionValue, ...)

Input

Output

Options

It computes:

[x; y] = [a11 a12; a21 a22] * [X; Y] + [b1; b2]

The function estimates an optimal 2D affine transformation between two 2D point sets using the selected robust algorithm.

The computed transformation is then refined further (using only inliers) with the Levenberg-Marquardt method to reduce the re-projection error even more.

Note: The RANSAC method can handle practically any ratio of outliers but needs a threshold to distinguish inliers from outliers. The method LMedS does not need any threshold but it works correctly only when there are more than 50% of inliers.

See also