vector_to_essential_matrixT_vector_to_essential_matrixVectorToEssentialMatrixVectorToEssentialMatrix (Operator)

Name

vector_to_essential_matrixT_vector_to_essential_matrixVectorToEssentialMatrixVectorToEssentialMatrix — Bestimmung der Essential-Matrix unter Verwendung vorgegebener Punktkorrespondenzen und bekannter Kameramatrizen sowie Rekonstruktion der 3D Raumpunkte.

Signatur

vector_to_essential_matrix( : : Rows1, Cols1, Rows2, Cols2, CovRR1, CovRC1, CovCC1, CovRR2, CovRC2, CovCC2, CamMat1, CamMat2, Method : EMatrix, CovEMat, Error, X, Y, Z, CovXYZ)

Herror T_vector_to_essential_matrix(const Htuple Rows1, const Htuple Cols1, const Htuple Rows2, const Htuple Cols2, const Htuple CovRR1, const Htuple CovRC1, const Htuple CovCC1, const Htuple CovRR2, const Htuple CovRC2, const Htuple CovCC2, const Htuple CamMat1, const Htuple CamMat2, const Htuple Method, Htuple* EMatrix, Htuple* CovEMat, Htuple* Error, Htuple* X, Htuple* Y, Htuple* Z, Htuple* CovXYZ)

void VectorToEssentialMatrix(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HTuple& CamMat1, const HTuple& CamMat2, const HTuple& Method, HTuple* EMatrix, HTuple* CovEMat, HTuple* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ)

HHomMat2D HHomMat2D::VectorToEssentialMatrix(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HHomMat2D& CamMat2, const HString& Method, HTuple* CovEMat, HTuple* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ) const

HHomMat2D HHomMat2D::VectorToEssentialMatrix(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HHomMat2D& CamMat2, const HString& Method, HTuple* CovEMat, double* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ) const

HHomMat2D HHomMat2D::VectorToEssentialMatrix(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HHomMat2D& CamMat2, const char* Method, HTuple* CovEMat, double* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ) const

HHomMat2D HHomMat2D::VectorToEssentialMatrix(const HTuple& Rows1, const HTuple& Cols1, const HTuple& Rows2, const HTuple& Cols2, const HTuple& CovRR1, const HTuple& CovRC1, const HTuple& CovCC1, const HTuple& CovRR2, const HTuple& CovRC2, const HTuple& CovCC2, const HHomMat2D& CamMat2, const wchar_t* Method, HTuple* CovEMat, double* Error, HTuple* X, HTuple* Y, HTuple* Z, HTuple* CovXYZ) const   (Nur Windows)

static void HOperatorSet.VectorToEssentialMatrix(HTuple rows1, HTuple cols1, HTuple rows2, HTuple cols2, HTuple covRR1, HTuple covRC1, HTuple covCC1, HTuple covRR2, HTuple covRC2, HTuple covCC2, HTuple camMat1, HTuple camMat2, HTuple method, out HTuple EMatrix, out HTuple covEMat, out HTuple error, out HTuple x, out HTuple y, out HTuple z, out HTuple covXYZ)

HHomMat2D HHomMat2D.VectorToEssentialMatrix(HTuple rows1, HTuple cols1, HTuple rows2, HTuple cols2, HTuple covRR1, HTuple covRC1, HTuple covCC1, HTuple covRR2, HTuple covRC2, HTuple covCC2, HHomMat2D camMat2, string method, out HTuple covEMat, out HTuple error, out HTuple x, out HTuple y, out HTuple z, out HTuple covXYZ)

HHomMat2D HHomMat2D.VectorToEssentialMatrix(HTuple rows1, HTuple cols1, HTuple rows2, HTuple cols2, HTuple covRR1, HTuple covRC1, HTuple covCC1, HTuple covRR2, HTuple covRC2, HTuple covCC2, HHomMat2D camMat2, string method, out HTuple covEMat, out double error, out HTuple x, out HTuple y, out HTuple z, out HTuple covXYZ)

Beschreibung

vector_to_essential_matrixvector_to_essential_matrixVectorToEssentialMatrixVectorToEssentialMatrixVectorToEssentialMatrix ermittelt aus im allgemeinen mindestens sechs vorgegebenen Punktkorrespondenzen (Rows1Rows1Rows1Rows1rows1,Cols1Cols1Cols1Cols1cols1), (Rows2Rows2Rows2Rows2rows2,Cols2Cols2Cols2Cols2cols2) diejenige Essential-Matrix EMatrixEMatrixEMatrixEMatrixEMatrix, welche die Epipolargleichung

am besten erfüllt. Der Operator vector_to_essential_matrixvector_to_essential_matrixVectorToEssentialMatrixVectorToEssentialMatrixVectorToEssentialMatrix ist für ein lineares Kameramodell konzipiert. Die internen Kameraparameter werden durch die Argumente CamMat1CamMat1CamMat1CamMat1camMat1, CamMat2CamMat2CamMat2CamMat2camMat2 übergeben, welche 3x3 obere Dreiecksmatrizen sind und eine affine Transformation beschreiben. Die Beziehung zwischen einem 3D Richtungsvektor (X,Y,1) und dessen (projektiven) 2D Bildkoordinaten (col,row,1) ist:

Zu beachten ist hier die Reihenfolge (Spalte/Zeile), welche mit der (x,y) Notation im Kamerakoordinatensystem konform gehen muss. Die Brennweite ist mit f bezeichnet, sind Skalierungsfaktoren, s beschreibt eine Scherung und gibt den Bildhauptpunkt an. Hauptsächlich sind dies die Elemente aus den Kameraparametern, wie sie z.B. in calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCameras verwendet werden. Alternativ kann eine Kameramatrix auch durch andere Elemente beschrieben werden, siehe z.B. stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration. Multipliziert man die (projektiven) Bildkoordinaten mit der invertierten Kameramatrix, so erhält man die 3D Richtungsvektoren für die Epipolargleichung.

Der Parameter MethodMethodMethodMethodmethod gibt an, ob die Kameras sich in einer besonderen relativen Orientierung zueinander befinden, und bestimmt auch das Berechnungsverfahren. Für 'normalized_dlt'"normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt" und 'gold_standard'"gold_standard""gold_standard""gold_standard""gold_standard" kann die relative Lage der Kameras zueinander beliebig sein. Für 'trans_normalized_dlt'"trans_normalized_dlt""trans_normalized_dlt""trans_normalized_dlt""trans_normalized_dlt" und 'trans_gold_standard'"trans_gold_standard""trans_gold_standard""trans_gold_standard""trans_gold_standard" ist die relative Lage eine reine Translation. In diesem speziellen Fall ist die minimale Anzahl an notwendigen Punktkorrespondenzen nicht sechs, sondern nur zwei.

Wird 'normalized_dlt'"normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt" oder 'trans_normalized_dlt'"trans_normalized_dlt""trans_normalized_dlt""trans_normalized_dlt""trans_normalized_dlt" gewählt, so ist das Berechnungsverfahren ein lineares Verfahren. Wird 'gold_standard'"gold_standard""gold_standard""gold_standard""gold_standard" oder 'trans_gold_standard'"trans_gold_standard""trans_gold_standard""trans_gold_standard""trans_gold_standard" gewählt, so ist das Berechnungsverfahren im statistischen Sinne optimal. Beide Verfahren liefern die Koordinaten (XXXXx,YYYYy,ZZZZz) der rekonstruierten Raumpunkte. Die optimalen Verfahren berechnen zusätzlich die 3x3 Kovarianzmatrizen CovXYZCovXYZCovXYZCovXYZcovXYZ der Raumpunkte. Ist n die Anzahl der Korrespondenzen, so werden diese Kovarianzen in einem 9xn Tupel aneinandergehängt. Weiterhin geben die optimalen Verfahren die Kovarianz der Essential-Matrix CovEMatCovEMatCovEMatCovEMatcovEMat an, welche eine 9x9 Matrix ist.

Falls die Bildpunkte mit einem Operator wie points_foerstnerpoints_foerstnerPointsFoerstnerPointsFoerstnerPointsFoerstner, der die Kovarianzmatrix für jeden Punkt zurückliefert, extrahiert wurden, kann dies in der Berechnung berücksichtigt werden, indem die Kovarianzen in CovRR1CovRR1CovRR1CovRR1covRR1, CovRC1CovRC1CovRC1CovRC1covRC1, CovCC1CovCC1CovCC1CovCC1covCC1 für die Punkte des ersten Bildes und in CovRR2CovRR2CovRR2CovRR2covRR2, CovRC2CovRC2CovRC2CovRC2covRC2, CovCC2CovCC2CovCC2CovCC2covCC2 für die Punkte des zweiten Bildes übergeben werden. Die Kovarianzmatrizen sind symmetrische 2x2 Matrizen. CovRR1CovRR1CovRR1CovRR1covRR1/CovRR2CovRR2CovRR2CovRR2covRR2 und CovCC1CovCC1CovCC1CovCC1covCC1/CovCC2CovCC2CovCC2CovCC2covCC2 sind dabei die Diagonalelemente der Matrizen, während CovRC1CovRC1CovRC1CovRC1covRC1/CovRC2CovRC2CovRC2CovRC2covRC2 die beiden nicht diagonalen Elemente angeben. Sind die Kovarianzen unbekannt, so werden zur Berechnung intern Einheits-Kovarianzmatrizen angenommen, und in den Kovarianzparametern können leere Tupel übergeben werden.

Die Größe ErrorErrorErrorErrorerror ist ein Gütemaß für die Berechnung der Essential-Matrix und gibt den mittleren euklidischen Abstand in Pixeln zwischen den Punkten und ihren korrespondierenden Epipolarlinien an.

Bei dem Operator vector_to_essential_matrixvector_to_essential_matrixVectorToEssentialMatrixVectorToEssentialMatrixVectorToEssentialMatrix ist folgender Spezialfall zu beachten: Liegen alle abgebildeten Raumpunkte in einer einzigen Ebene und liegen zusätzlich alle Raumpunkte näher zu einer der beiden Kameras, so gibt es insgesamt zwei Lösungen. Das heißt, dass in diesem Fall das Problem der Berechnung der Essential-Matrix nicht eindeutig lösbar ist. Es werden daher auch beide Lösungen ausgegeben. Das bedeutet, dass alle Ausgabeparameter von doppelter Länge sind, wobei die Werte der zweiten Lösung an die Werte der ersten Lösung hinten angehängt sind.

Sind die Korrespondenzen zwischen den Punkten noch nicht bekannt, so ist match_essential_matrix_ransacmatch_essential_matrix_ransacMatchEssentialMatrixRansacMatchEssentialMatrixRansacMatchEssentialMatrixRansac zur Bestimmung der Korrespondenzen sowie der Stereo-Geometrie zu verwenden.

Ausführungsinformationen

Parameter

Rows1Rows1Rows1Rows1rows1 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Eingabepunkte in Bild 1 (Zeilenkoordinate).

Restriktion: length(Rows1) >= 6 || length(Rows1) >= 2

Cols1Cols1Cols1Cols1cols1 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Eingabepunkte in Bild 1 (Spaltenkoordinate).

Restriktion: length(Cols1) == length(Rows1)

Rows2Rows2Rows2Rows2rows2 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Eingabepunkte in Bild 2 (Zeilenkoordinate).

Restriktion: length(Rows2) == length(Rows1)

Cols2Cols2Cols2Cols2cols2 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Eingabepunkte in Bild 2 (Spaltenkoordinate).

Restriktion: length(Cols2) == length(Rows1)

CovRR1CovRR1CovRR1CovRR1covRR1 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Varianz in Zeilenrichtung der Punkte in Bild 1.

Defaultwert: []

CovRC1CovRC1CovRC1CovRC1covRC1 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kovarianz der Punkte in Bild 1.

Defaultwert: []

CovCC1CovCC1CovCC1CovCC1covCC1 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Varianz in Spaltenrichtung der Punkte in Bild 1.

Defaultwert: []

CovRR2CovRR2CovRR2CovRR2covRR2 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Varianz in Zeilenrichtung der Punkte in Bild 2.

Defaultwert: []

CovRC2CovRC2CovRC2CovRC2covRC2 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kovarianz der Punkte in Bild 2.

Defaultwert: []

CovCC2CovCC2CovCC2CovCC2covCC2 (input_control)  number-array HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Varianz in Spaltenrichtung der Punkte in Bild 2.

Defaultwert: []

CamMat1CamMat1CamMat1CamMat1camMat1 (input_control)  hom_mat2d HHomMat2D, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kameramatrix der 1. Kamera.

CamMat2CamMat2CamMat2CamMat2camMat2 (input_control)  hom_mat2d HHomMat2D, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Kameramatrix der 2. Kamera.

MethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Algorithmus zur Berechnung der Essential-Matrix und zur Auswahl spezieller relativer Orientierungen.

Defaultwert: 'normalized_dlt' "normalized_dlt" "normalized_dlt" "normalized_dlt" "normalized_dlt"

Werteliste: 'gold_standard'"gold_standard""gold_standard""gold_standard""gold_standard", 'normalized_dlt'"normalized_dlt""normalized_dlt""normalized_dlt""normalized_dlt", 'trans_gold_standard'"trans_gold_standard""trans_gold_standard""trans_gold_standard""trans_gold_standard", 'trans_normalized_dlt'"trans_normalized_dlt""trans_normalized_dlt""trans_normalized_dlt""trans_normalized_dlt"

EMatrixEMatrixEMatrixEMatrixEMatrix (output_control)  hom_mat2d HHomMat2D, HTupleHTupleHtuple (real) (double) (double) (double)

Berechnete Essential-Matrix.

CovEMatCovEMatCovEMatCovEMatcovEMat (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

9x9 Kovarianzmatrix der Essential-Matrix.

ErrorErrorErrorErrorerror (output_control)  real(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Mittlerer, quadratischer Epipolar Abstand.

XXXXx (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

X-Koordinaten der rekonstruierten Punkte.

YYYYy (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Y-Koordinaten der rekonstruierten Punkte.

ZZZZz (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Z-Koordinaten der rekonstruierten Punkte.

CovXYZCovXYZCovXYZCovXYZcovXYZ (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Kovarianzmatrizen der rekonstruierten 3D Punkte.

Vorgänger

match_essential_matrix_ransacmatch_essential_matrix_ransacMatchEssentialMatrixRansacMatchEssentialMatrixRansacMatchEssentialMatrixRansac

Nachfolger

essential_to_fundamental_matrixessential_to_fundamental_matrixEssentialToFundamentalMatrixEssentialToFundamentalMatrixEssentialToFundamentalMatrix

Alternativen

vector_to_rel_posevector_to_rel_poseVectorToRelPoseVectorToRelPoseVectorToRelPose, vector_to_fundamental_matrixvector_to_fundamental_matrixVectorToFundamentalMatrixVectorToFundamentalMatrixVectorToFundamentalMatrix

Siehe auch

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration

Literatur

Richard Hartley, Andrew Zisserman: „Multiple View Geometry in Computer Vision“; Cambridge University Press, Cambridge; 2003.
J.Chris McGlone (editor): „Manual of Photogrammetry“; American Society for Photogrammetry and Remote Sensing ; 2004.

Modul

3D Metrology