ClassesClassesClassesClasses | | | | Operators

hom_vector_to_proj_hom_mat2dT_hom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2d (Operator)

Name

hom_vector_to_proj_hom_mat2dT_hom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2d — Compute a homogeneous transformation matrix using given point correspondences.

Signature

hom_vector_to_proj_hom_mat2d( : : Px, Py, Pw, Qx, Qy, Qw, Method : HomMat2D)

Herror T_hom_vector_to_proj_hom_mat2d(const Htuple Px, const Htuple Py, const Htuple Pw, const Htuple Qx, const Htuple Qy, const Htuple Qw, const Htuple Method, Htuple* HomMat2D)

Herror hom_vector_to_proj_hom_mat2d(const HTuple& Px, const HTuple& Py, const HTuple& Pw, const HTuple& Qx, const HTuple& Qy, const HTuple& Qw, const HTuple& Method, HTuple* HomMat2D)

void HomVectorToProjHomMat2d(const HTuple& Px, const HTuple& Py, const HTuple& Pw, const HTuple& Qx, const HTuple& Qy, const HTuple& Qw, const HTuple& Method, HTuple* HomMat2D)

void HHomMat2D::HomVectorToProjHomMat2d(const HTuple& Px, const HTuple& Py, const HTuple& Pw, const HTuple& Qx, const HTuple& Qy, const HTuple& Qw, const HString& Method)

void HHomMat2D::HomVectorToProjHomMat2d(const HTuple& Px, const HTuple& Py, const HTuple& Pw, const HTuple& Qx, const HTuple& Qy, const HTuple& Qw, const char* Method)

void HOperatorSetX.HomVectorToProjHomMat2d(
[in] VARIANT Px, [in] VARIANT Py, [in] VARIANT Pw, [in] VARIANT Qx, [in] VARIANT Qy, [in] VARIANT Qw, [in] VARIANT Method, [out] VARIANT* HomMat2d)

void HHomMat2DX.HomVectorToProjHomMat2d(
[in] VARIANT Px, [in] VARIANT Py, [in] VARIANT Pw, [in] VARIANT Qx, [in] VARIANT Qy, [in] VARIANT Qw, [in] BSTR Method)

static void HOperatorSet.HomVectorToProjHomMat2d(HTuple px, HTuple py, HTuple pw, HTuple qx, HTuple qy, HTuple qw, HTuple method, out HTuple homMat2D)

void HHomMat2D.HomVectorToProjHomMat2d(HTuple px, HTuple py, HTuple pw, HTuple qx, HTuple qy, HTuple qw, string method)

Description

hom_vector_to_proj_hom_mat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2d determines the homogeneous projective transformation matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D 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 HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D 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_mat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2d 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.

In contrast to vector_to_proj_hom_mat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dVectorToProjHomMat2d, hom_vector_to_proj_hom_mat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dhom_vector_to_proj_hom_mat2dHomVectorToProjHomMat2dHomVectorToProjHomMat2d uses homogeneous coordinates for the points, and hence points at infinity (PwPwPwPwPwpw = 0 or QwQwQwQwQwqw = 0) can be used to determine the transformation. If finite points are used, typically PwPwPwPwPwpw and QwQwQwQwQwqw are set to 1. In this case, vector_to_proj_hom_mat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dVectorToProjHomMat2d can also be used. vector_to_proj_hom_mat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dVectorToProjHomMat2d has the advantage that one additional optimization method can be used and that the covariances of the points can be taken into account. If the correspondence between the points has not been determined, proj_match_points_ransacproj_match_points_ransacProjMatchPointsRansacproj_match_points_ransacProjMatchPointsRansacProjMatchPointsRansac should be used to determine the correspondence as well as the transformation.

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.

Parallelization

Parameters

PxPxPxPxPxpx (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Input points 1 (x coordinate).

PyPyPyPyPypy (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Input points 1 (y coordinate).

PwPwPwPwPwpw (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Input points 1 (w coordinate).

QxQxQxQxQxqx (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Input points 2 (x coordinate).

QyQyQyQyQyqy (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Input points 2 (y coordinate).

QwQwQwQwQwqw (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Input points 2 (w coordinate).

MethodMethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Estimation algorithm.

Default value: 'normalized_dlt' "normalized_dlt" "normalized_dlt" "normalized_dlt" "normalized_dlt" "normalized_dlt"

List of values: 'dlt'"dlt""dlt""dlt""dlt""dlt", 'normalized_dlt'"normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt"

HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D (output_control)  hom_mat2d HHomMat2D, HTupleHTupleHTupleHHomMat2DX, VARIANTHtuple (real) (double) (double) (double) (double) (double)

Homogeneous projective transformation matrix.

Possible Predecessors

proj_match_points_ransacproj_match_points_ransacProjMatchPointsRansacproj_match_points_ransacProjMatchPointsRansacProjMatchPointsRansac, proj_match_points_ransac_guidedproj_match_points_ransac_guidedProjMatchPointsRansacGuidedproj_match_points_ransac_guidedProjMatchPointsRansacGuidedProjMatchPointsRansacGuided, points_foerstnerpoints_foerstnerPointsFoerstnerpoints_foerstnerPointsFoerstnerPointsFoerstner, points_harrispoints_harrisPointsHarrispoints_harrisPointsHarrisPointsHarris

Possible Successors

projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage, projective_trans_image_sizeprojective_trans_image_sizeProjectiveTransImageSizeprojective_trans_image_sizeProjectiveTransImageSizeProjectiveTransImageSize, projective_trans_regionprojective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion, projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld, projective_trans_point_2dprojective_trans_point_2dProjectiveTransPoint2dprojective_trans_point_2dProjectiveTransPoint2dProjectiveTransPoint2d, projective_trans_pixelprojective_trans_pixelProjectiveTransPixelprojective_trans_pixelProjectiveTransPixelProjectiveTransPixel

Alternatives

vector_to_proj_hom_mat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dvector_to_proj_hom_mat2dVectorToProjHomMat2dVectorToProjHomMat2d, proj_match_points_ransacproj_match_points_ransacProjMatchPointsRansacproj_match_points_ransacProjMatchPointsRansacProjMatchPointsRansac, proj_match_points_ransac_guidedproj_match_points_ransac_guidedProjMatchPointsRansacGuidedproj_match_points_ransac_guidedProjMatchPointsRansacGuidedProjMatchPointsRansacGuided

References

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.

Module

Calibration


ClassesClassesClassesClasses | | | | Operators