Estimate Geometric Transformation
Estimate geometric transformation from matching point pairs
Libraries:
Computer Vision Toolbox /
Geometric Transformations
Description
Use the Estimate Geometric Transformation block to find the transformation matrix which maps the greatest number of point pairs between two images. A point pair refers to a point in the input image and its related point on the image created using the transformation matrix. You can select to use the RANdom SAmple Consensus (RANSAC) or the Least Median Squares algorithm to exclude outliers and to calculate the transformation matrix. You can also use all input points to calculate the transformation matrix.
Examples
Extended Examples
Ports
Input
Output
Parameters
Block Characteristics
Tips
The success of estimating the correct geometric transformation depends heavily on the
quality of the input point pairs. If you chose the RANSAC or LMS algorithm, the block will
randomly select point pairs to compute the transformation matrix and will use the
transformation that best fits the input points. There is a chance that all of the randomly
selected point pairs may contain outliers despite repeated samplings. In this case, the output
transformation matrix, TForm
, is invalid, indicated by a
matrix of zeros.
To improve your results, try the following:
Increase the percentage of inliers in the input points. |
Increase the number for random samplings. |
For the RANSAC method, increase the desired confidence. |
For the LMS method, make sure the input points have 50% or more inliers. |
Use features appropriate for the image contents |
Be aware that repeated patterns, for example, windows in office building, will cause false matches when you match the features. This increases the number of outliers. |
Do not use this function if the images have significant parallax. You can use the
estimateFundamentalMatrix function
instead. |
Choose the minimum transformation for your problem. |
If a projective transformation produces the error message, “A portion of the input image was transformed to the location at infinity. Only transformation matrices that do not transform any part of the image to infinity are supported.”, it is usually caused by a transformation matrix and an image that would result in an output distortion that does not fit physical reality. If the matrix was an output of the Estimate Geometric Transformation block, then most likely it could not find enough inliers. |
Algorithms
References
[1] R. Hartley and A. Ziserman, “Multiple View Geometry in Computer Vision,” Second edition, Cambridge University Press, 2003
Extended Capabilities
Version History
Introduced in R2008a