Functions | |
Mat | estimateRigidTransform (InputArray src, InputArray dst, OutputArray inliers_mask, bool fullAffine) |
Computes an optimal affine transformation between two 2D point sets. | |
static void | getRTMatrix (const Point2f *a, const Point2f *b, int count, Mat &M, bool fullAffine) |
Mat cv::estimateRigidTransform | ( | InputArray | src, |
InputArray | dst, | ||
OutputArray | inliers_mask, | ||
bool | fullAffine | ||
) |
Computes an optimal affine transformation between two 2D point sets.
src | First input 2D point set stored in std::vector or Mat |
dst | Second input 2D point set of the same size and the same type as A |
fullAffine | If true, the function finds an optimal affine transformation with no additional restrictions (6 degrees of freedom). Otherwise, the class of transformations to choose from is limited to combinations of translation, rotation, and uniform scaling (5 degrees of freedom). |
This fuction is similar to cv::estimateRigidTransform. Key difference are:
does not support images as input output inliners in similar manner to cv::findHomography
The function finds an optimal affine transform *[A|b]* (a 2 x 3 floating-point matrix) that approximates best the affine transformation between:
Two point sets
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:
where src[i] and dst[i] are the i-th points in src and dst, respectively can be either arbitrary (when fullAffine=true ) or have a form of
when fullAffine=false.
Definition at line 136 of file estimate_rigid_transform.cpp.
static void cv::getRTMatrix | ( | const Point2f * | a, |
const Point2f * | b, | ||
int | count, | ||
Mat & | M, | ||
bool | fullAffine | ||
) | [static] |
Definition at line 58 of file estimate_rigid_transform.cpp.