hom_vector_to_proj_hom_mat2dT_hom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2d — Compute a homogeneous transformation matrix using given point
correspondences.
hom_vector_to_proj_hom_mat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2d determines the homogeneous
projective transformation matrix HomMat2DHomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d that optimally
fulfills the following equations given by at least 4 point
correspondences
If fewer than 4 pairs of points
(PxPxPxPxpxpx,PyPyPyPypypy,PwPwPwPwpwpw),
(QxQxQxQxqxqx,QyQyQyQyqyqy,QwQwQwQwqwqw) are given, there exists no
unique solution, if exactly 4 pairs are supplied the matrix
HomMat2DHomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d transforms them in exactly the desired way, and if
there are more than 4 point pairs given,
hom_vector_to_proj_hom_mat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2d seeks to minimize the
transformation error. To achieve such a minimization, two different
algorithms are available. The algorithm to use can be chosen using
the parameter MethodMethodMethodMethodmethodmethod. For conventional geometric problems
MethodMethodMethodMethodmethodmethod='normalized_dlt'"normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt" usually yields better
results. However, if one of the coordinates QwQwQwQwqwqw or
PwPwPwPwpwpw equals 0, MethodMethodMethodMethodmethodmethod='dlt'"dlt""dlt""dlt""dlt""dlt" must
be chosen.
If the points to transform are specified in standard image
coordinates, their row coordinates must be passed in
PxPxPxPxpxpx and their column coordinates in PyPyPyPypypy. This
is necessary to obtain a right-handed coordinate system for the
image. In particular, this assures that rotations are performed in
the correct direction. Note that the (x,y) order of the
matrices quite naturally corresponds to the usual (row,column) order
for coordinates in the image.
Attention
It should be noted that homogeneous transformation matrices refer to
a general right-handed mathematical coordinate system. If a
homogeneous transformation matrix is used to transform images,
regions, XLD contours, or any other data that has been extracted
from images, the row coordinates of the transformation must be
passed in the x coordinates, while the column coordinates must be
passed in the y coordinates. Consequently, the order of passing row
and column coordinates follows the usual order
(RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn). This convention is essential to
obtain a right-handed coordinate system for the transformation of
iconic data, and consequently to ensure in particular that rotations
are performed in the correct mathematical direction.
Furthermore, it should be noted that if a homogeneous transformation
matrix is used to transform images, regions, XLD contours, or any
other data that has been extracted from images, it is assumed that
the origin of the coordinate system of the homogeneous
transformation matrix lies in the upper left corner of a pixel. The
image processing operators that return point coordinates, however,
assume a coordinate system in which the origin lies in the center of
a pixel. Therefore, to obtain a consistent homogeneous
transformation matrix, 0.5 must be added to the point coordinates
before computing the transformation.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Richard Hartley, Andrew Zisserman: “Multiple View Geometry in
Computer Vision”; Cambridge University Press, Cambridge; 2000.
Olivier Faugeras, Quang-Tuan Luong: “The Geometry of Multiple
Images: The Laws That Govern the Formation of Multiple Images of a
Scene and Some of Their Applications”; MIT Press, Cambridge, MA;
2001.