KlassenKlassenKlassenKlassen | | | | Operatoren

hom_mat3d_projectT_hom_mat3d_projectHomMat3dProjecthom_mat3d_projectHomMat3dProjectHomMat3dProject (Operator)

Name

hom_mat3d_projectT_hom_mat3d_projectHomMat3dProjecthom_mat3d_projectHomMat3dProjectHomMat3dProject — Projiziert eine Matrix zur affinen 3D-Transformation in eine 2D projektive Transformationsmatrix.

Signatur

hom_mat3d_project( : : HomMat3D, PrincipalPointRow, PrincipalPointCol, Focus : HomMat2D)

Herror T_hom_mat3d_project(const Htuple HomMat3D, const Htuple PrincipalPointRow, const Htuple PrincipalPointCol, const Htuple Focus, Htuple* HomMat2D)

Herror hom_mat3d_project(const HTuple& HomMat3D, const HTuple& PrincipalPointRow, const HTuple& PrincipalPointCol, const HTuple& Focus, HTuple* HomMat2D)

void HomMat3dProject(const HTuple& HomMat3D, const HTuple& PrincipalPointRow, const HTuple& PrincipalPointCol, const HTuple& Focus, HTuple* HomMat2D)

HHomMat2D HHomMat3D::HomMat3dProject(const HTuple& PrincipalPointRow, const HTuple& PrincipalPointCol, const HTuple& Focus) const

HHomMat2D HHomMat3D::HomMat3dProject(double PrincipalPointRow, double PrincipalPointCol, double Focus) const

void HOperatorSetX.HomMat3dProject(
[in] VARIANT HomMat3d, [in] VARIANT PrincipalPointRow, [in] VARIANT PrincipalPointCol, [in] VARIANT Focus, [out] VARIANT* HomMat2d)

IHHomMat2DX* HHomMat3DX.HomMat3dProject(
[in] VARIANT PrincipalPointRow, [in] VARIANT PrincipalPointCol, [in] VARIANT Focus)

static void HOperatorSet.HomMat3dProject(HTuple homMat3D, HTuple principalPointRow, HTuple principalPointCol, HTuple focus, out HTuple homMat2D)

HHomMat2D HHomMat3D.HomMat3dProject(HTuple principalPointRow, HTuple principalPointCol, HTuple focus)

HHomMat2D HHomMat3D.HomMat3dProject(double principalPointRow, double principalPointCol, double focus)

Beschreibung

hom_mat3d_projecthom_mat3d_projectHomMat3dProjecthom_mat3d_projectHomMat3dProjectHomMat3dProject berechnet aus der homogenen 3x4 Transformationsmatrix HomMat3DHomMat3DHomMat3DHomMat3DHomMat3DhomMat3D, die eine affine Transformation im 3D beschreibt, eine homogene projektive Transformationsmatrix, die dazu verwendet werden kann, eine Ebene, insbesondere eine Ebene, die ein Bild enthält, zu projizieren. Die projektive Transformationsmatrix beschreibt eine projektive Transformation zwischen zwei (zweidimensionalen) Ebenen.

Dies kann zur Erzeugung von perspektivischen Verzerrungen genutzt werden, welche durch die Projektion einer Ebene entstehen, die um eine andere Achse als die z-Achse gedreht ist. Im Normalfall werden projektive Transformationen aber aus Punktkorrespondenzen ermittelt (siehe 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 und proj_match_points_ransacproj_match_points_ransacProjMatchPointsRansacproj_match_points_ransacProjMatchPointsRansacProjMatchPointsRansac).

Matrizen zur Drehung, Skalierung oder Verschiebung können mit Hilfe der Operatoren hom_mat3d_identityhom_mat3d_identityHomMat3dIdentityhom_mat3d_identityHomMat3dIdentityHomMat3dIdentity, hom_mat3d_scalehom_mat3d_scaleHomMat3dScalehom_mat3d_scaleHomMat3dScaleHomMat3dScale, hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotate, hom_mat3d_translatehom_mat3d_translateHomMat3dTranslatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslate und pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3d konstruiert werden.

Dabei ist zu beachten, dass bei den 3D-Transformationen die x-Achse der Spaltenachse und die y-Achse der Zeilenachse entspricht (siehe auch calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras), während bei projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage in HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D die erste Zeile der Zeilenachse und die zweite Zeile der Transformation der Spaltenachse des Bildes entspricht.

Der Punkt (PrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowprincipalPointRow, PrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColprincipalPointCol) ist dabei das optische Zentrum der Projektion und der Punkt (PrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowprincipalPointRow, PrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColprincipalPointCol, 0) im Dreidimensionalen somit der virtuelle Standpunkt der Kamera. Die Blickrichtung entspricht der positiven z-Achse.

In diesem virtuellen Raum befindet sich die Ebene des Eingabebildes, ebenso wie die Bildebene der Projektion, an der Stelle z=FocusFocusFocusFocusFocusfocus, also FocusFocusFocusFocusFocusfocus Pixel von der Kamera entfernt. Dies führt dazu, dass die Verwendung der identischen Abbildung als Eingabematrix HomMat3DHomMat3DHomMat3DHomMat3DHomMat3DhomMat3D eine Matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D ergibt, die ebenfalls die identsche Abbildung im Zweidimensionalen darstellt.

Der Parameter FocusFocusFocusFocusFocusfocus ist also die „Brennweite“ der verwendeten virtuellen Kamera und in der Einheit Pixel angegeben. Durch ihn kann der Grad der perspektivischen Verzerrungen verändert werden. Dieselbe Eingabematrix HomMat3DHomMat3DHomMat3DHomMat3DHomMat3DhomMat3D führt bei großer Brennweite zu schwächeren Verzerrungen als bei kleiner Brennweite.

Sei H die affine 3D-Matrix mit Elementen , (r,c)=(PrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowprincipalPointRow,PrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColprincipalPointCol) und f=FocusFocusFocusFocusFocusfocus.

Dann wird die projektive Transformationsmatrix wie folgt berechnet: Zunächst wird eine 3x4 Projektionsmatrix berechnet als:

Da das Bild einer Ebene, in der die Punkte die Form (x, y, f, 1)^T haben, berechnet werden soll, werden die letzten zwei Spalten von Q zusammengefasst:

Zuletzt werden die Spalten und Zeilen von R so vertauscht, dass die erste Zeile von P der Transformation der Zeilenkoordinaten und die zweite Zeile von P der Transformation der Spaltenkoordinaten entspricht, so dass P direkt in projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage verwendet werden kann:

Insgesamt ergibt sich also:

Parallelisierung

Parameter

HomMat3DHomMat3DHomMat3DHomMat3DHomMat3DhomMat3D (input_control)  hom_mat3d HHomMat3D, HTupleHTupleHTupleHHomMat3DX, VARIANTHtuple (real) (double) (double) (double) (double) (double)

3×4 3D-Transformationsmatrix.

PrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowPrincipalPointRowprincipalPointRow (input_control)  point.y HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Zeilenkoordinate des Hauptpunktes.

Defaultwert: 256

Wertevorschläge: 16, 32, 64, 128, 240, 256, 512

PrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColPrincipalPointColprincipalPointCol (input_control)  point.x HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Spaltenkoordinate des Hauptpunktes.

Defaultwert: 256

Wertevorschläge: 16, 32, 64, 128, 256, 320, 512

FocusFocusFocusFocusFocusfocus (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Brennweite in Pixeln.

Defaultwert: 256

Wertevorschläge: 1, 2, 5, 256, 32768

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

Homogene projektive Transformationsmatrix.

Vorgänger

hom_mat3d_identityhom_mat3d_identityHomMat3dIdentityhom_mat3d_identityHomMat3dIdentityHomMat3dIdentity, hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotate, hom_mat3d_translatehom_mat3d_translateHomMat3dTranslatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslate, hom_mat3d_scalehom_mat3d_scaleHomMat3dScalehom_mat3d_scaleHomMat3dScaleHomMat3dScale

Nachfolger

projective_trans_imageprojective_trans_imageProjectiveTransImageprojective_trans_imageProjectiveTransImageProjectiveTransImage, projective_trans_point_2dprojective_trans_point_2dProjectiveTransPoint2dprojective_trans_point_2dProjectiveTransPoint2dProjectiveTransPoint2d, projective_trans_regionprojective_trans_regionProjectiveTransRegionprojective_trans_regionProjectiveTransRegionProjectiveTransRegion, projective_trans_contour_xldprojective_trans_contour_xldProjectiveTransContourXldprojective_trans_contour_xldProjectiveTransContourXldProjectiveTransContourXld, hom_mat2d_inverthom_mat2d_invertHomMat2dInverthom_mat2d_invertHomMat2dInvertHomMat2dInvert

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren