Mat estimateRigidTransform(const Mat& srcpt, const Mat& dstpt, bool fullAffine)¶ Computes optimal affine transformation between two 2D point sets Parameters: * srcpt – The first input 2D point set * dst – The second input 2D point set of the same size and the same type as A * fullAffine – If true, the function finds the optimal affine transformation with no any additional resrictions (i.e. there are 6 degrees of freedom); otherwise, the class of transformations to choose from is limited to combinations of translation, rotation and uniform scaling (i.e. there are 5 degrees of freedom) The function finds the optimal affine transform [A|b] (a 2 \times 3 floating-point matrix) that approximates best the transformation from \texttt{srcpt}_i to \texttt{dstpt}_i : [A^*|b^*] = arg \min _{[A|b]} \sum _i \| \texttt{dstpt} _i - A { \texttt{srcpt} _i}^T - b \| ^2 where [A|b] can be either arbitrary (when fullAffine=true ) or have form
A. Berg, and J. Malik. Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings
of the 2001 IEEE Computer Society Conf. on, 1, page I----607----I----614 vol.1. (2001)