binocular_calibration T_binocular_calibration BinocularCalibration BinocularCalibration binocular_calibration (Operator)
Name
binocular_calibration T_binocular_calibration BinocularCalibration BinocularCalibration binocular_calibration — Bestimmung aller Kameraparameter eines binokularen Stereoaufbaus.
Signatur
binocular_calibration ( : : NX , NY , NZ , NRow1 , NCol1 , NRow2 , NCol2 , StartCamParam1 , StartCamParam2 , NStartPose1 , NStartPose2 , EstimateParams : CamParam1 , CamParam2 , NFinalPose1 , NFinalPose2 , RelPose , Errors )
Herror T_binocular_calibration (const Htuple NX , const Htuple NY , const Htuple NZ , const Htuple NRow1 , const Htuple NCol1 , const Htuple NRow2 , const Htuple NCol2 , const Htuple StartCamParam1 , const Htuple StartCamParam2 , const Htuple NStartPose1 , const Htuple NStartPose2 , const Htuple EstimateParams , Htuple* CamParam1 , Htuple* CamParam2 , Htuple* NFinalPose1 , Htuple* NFinalPose2 , Htuple* RelPose , Htuple* Errors )
void BinocularCalibration (const HTuple& NX , const HTuple& NY , const HTuple& NZ , const HTuple& NRow1 , const HTuple& NCol1 , const HTuple& NRow2 , const HTuple& NCol2 , const HTuple& StartCamParam1 , const HTuple& StartCamParam2 , const HTuple& NStartPose1 , const HTuple& NStartPose2 , const HTuple& EstimateParams , HTuple* CamParam1 , HTuple* CamParam2 , HTuple* NFinalPose1 , HTuple* NFinalPose2 , HTuple* RelPose , HTuple* Errors )
HCamPar HCamPar ::BinocularCalibration (const HTuple& NX , const HTuple& NY , const HTuple& NZ , const HTuple& NRow1 , const HTuple& NCol1 , const HTuple& NRow2 , const HTuple& NCol2 , const HCamPar& StartCamParam2 , const HPoseArray& NStartPose1 , const HPoseArray& NStartPose2 , const HTuple& EstimateParams , HCamPar* CamParam2 , HPoseArray* NFinalPose1 , HPoseArray* NFinalPose2 , HPose* RelPose , HTuple* Errors ) const
HCamPar HCamPar ::BinocularCalibration (const HTuple& NX , const HTuple& NY , const HTuple& NZ , const HTuple& NRow1 , const HTuple& NCol1 , const HTuple& NRow2 , const HTuple& NCol2 , const HCamPar& StartCamParam2 , const HPose& NStartPose1 , const HPose& NStartPose2 , const HTuple& EstimateParams , HCamPar* CamParam2 , HPose* NFinalPose1 , HPose* NFinalPose2 , HPose* RelPose , double* Errors ) const
static HCamPar HPose ::BinocularCalibration (const HTuple& NX , const HTuple& NY , const HTuple& NZ , const HTuple& NRow1 , const HTuple& NCol1 , const HTuple& NRow2 , const HTuple& NCol2 , const HCamPar& StartCamParam1 , const HCamPar& StartCamParam2 , const HPoseArray& NStartPose1 , const HPoseArray& NStartPose2 , const HTuple& EstimateParams , HCamPar* CamParam2 , HPoseArray* NFinalPose1 , HPoseArray* NFinalPose2 , HPose* RelPose , HTuple* Errors )
HCamPar HPose ::BinocularCalibration (const HTuple& NX , const HTuple& NY , const HTuple& NZ , const HTuple& NRow1 , const HTuple& NCol1 , const HTuple& NRow2 , const HTuple& NCol2 , const HCamPar& StartCamParam1 , const HCamPar& StartCamParam2 , const HPose& NStartPose2 , const HTuple& EstimateParams , HCamPar* CamParam2 , HPose* NFinalPose1 , HPose* NFinalPose2 , HPose* RelPose , double* Errors ) const
static void HOperatorSet .BinocularCalibration (HTuple NX , HTuple NY , HTuple NZ , HTuple NRow1 , HTuple NCol1 , HTuple NRow2 , HTuple NCol2 , HTuple startCamParam1 , HTuple startCamParam2 , HTuple NStartPose1 , HTuple NStartPose2 , HTuple estimateParams , out HTuple camParam1 , out HTuple camParam2 , out HTuple NFinalPose1 , out HTuple NFinalPose2 , out HTuple relPose , out HTuple errors )
HCamPar HCamPar .BinocularCalibration (HTuple NX , HTuple NY , HTuple NZ , HTuple NRow1 , HTuple NCol1 , HTuple NRow2 , HTuple NCol2 , HCamPar startCamParam2 , HPose[] NStartPose1 , HPose[] NStartPose2 , HTuple estimateParams , out HCamPar camParam2 , out HPose[] NFinalPose1 , out HPose[] NFinalPose2 , out HPose relPose , out HTuple errors )
HCamPar HCamPar .BinocularCalibration (HTuple NX , HTuple NY , HTuple NZ , HTuple NRow1 , HTuple NCol1 , HTuple NRow2 , HTuple NCol2 , HCamPar startCamParam2 , HPose NStartPose1 , HPose NStartPose2 , HTuple estimateParams , out HCamPar camParam2 , out HPose NFinalPose1 , out HPose NFinalPose2 , out HPose relPose , out double errors )
static HCamPar HPose .BinocularCalibration (HTuple NX , HTuple NY , HTuple NZ , HTuple NRow1 , HTuple NCol1 , HTuple NRow2 , HTuple NCol2 , HCamPar startCamParam1 , HCamPar startCamParam2 , HPose[] NStartPose1 , HPose[] NStartPose2 , HTuple estimateParams , out HCamPar camParam2 , out HPose[] NFinalPose1 , out HPose[] NFinalPose2 , out HPose relPose , out HTuple errors )
HCamPar HPose .BinocularCalibration (HTuple NX , HTuple NY , HTuple NZ , HTuple NRow1 , HTuple NCol1 , HTuple NRow2 , HTuple NCol2 , HCamPar startCamParam1 , HCamPar startCamParam2 , HPose NStartPose2 , HTuple estimateParams , out HCamPar camParam2 , out HPose NFinalPose1 , out HPose NFinalPose2 , out HPose relPose , out double errors )
def binocular_calibration (nx : Sequence[Union[float, int]], ny : Sequence[Union[float, int]], nz : Sequence[Union[float, int]], nrow_1 : Sequence[Union[float, int]], ncol_1 : Sequence[Union[float, int]], nrow_2 : Sequence[Union[float, int]], ncol_2 : Sequence[Union[float, int]], start_cam_param_1 : Sequence[Union[float, int, str]], start_cam_param_2 : Sequence[Union[float, int, str]], nstart_pose_1 : Sequence[Union[float, int]], nstart_pose_2 : Sequence[Union[float, int]], estimate_params : Sequence[str]) -> Tuple[Sequence[Union[float, int, str]], Sequence[Union[float, int, str]], Sequence[Union[float, int]], Sequence[Union[float, int]], Sequence[Union[float, int]], Sequence[float]]
def binocular_calibration_s (nx : Sequence[Union[float, int]], ny : Sequence[Union[float, int]], nz : Sequence[Union[float, int]], nrow_1 : Sequence[Union[float, int]], ncol_1 : Sequence[Union[float, int]], nrow_2 : Sequence[Union[float, int]], ncol_2 : Sequence[Union[float, int]], start_cam_param_1 : Sequence[Union[float, int, str]], start_cam_param_2 : Sequence[Union[float, int, str]], nstart_pose_1 : Sequence[Union[float, int]], nstart_pose_2 : Sequence[Union[float, int]], estimate_params : Sequence[str]) -> Tuple[Sequence[Union[float, int, str]], Sequence[Union[float, int, str]], Sequence[Union[float, int]], Sequence[Union[float, int]], Sequence[Union[float, int]], float]
Beschreibung
Im Allgemeinen bedeutet binokulare Kalibrierung die exakte
Bestimmung der Parameter, welche die 3D Rekonstruktion eines 3D
Punktes von den korrespondierenden Abbildungen dieses Punktes in
einem binokularen Stereo System modellieren. Diese Rekonstruktion
wird durch die internen Parameter CamParam1 CamParam1 CamParam1 CamParam1 camParam1 cam_param_1 von Kamera 1
und CamParam2 CamParam2 CamParam2 CamParam2 camParam2 cam_param_2 von Kamera 2 bestimmt, welche das zugrunde
liegende Kameramodell beschreiben, und von den externen
Parametern RelPose RelPose RelPose RelPose relPose rel_pose , welche die relative Lage des
Kamerasystems 2 im Kamerasystem 1 beschreiben.
Die bekannten 3D Modellpunkte (mit den Koordinaten NX NX NX NX NX nx ,
NY NY NY NY NY ny , NZ NZ NZ NZ NZ nz ) werden in die Bildebene der beiden Kameras
(Kamera 1 und Kamera 2) projiziert. Die Summe der quadrierten
Abstände zwischen diesen Projektionen und den korrespondierenden
Bildpunkten (mit den Koordinaten NRow1 NRow1 NRow1 NRow1 NRow1 nrow_1 , NCol1 NCol1 NCol1 NCol1 NCol1 ncol_1 für
Kamera 1 und NRow2 NRow2 NRow2 NRow2 NRow2 nrow_2 , NCol2 NCol2 NCol2 NCol2 NCol2 ncol_2 für Kamera 2) wird
daraufhin minimiert. Es muss darauf geachtet werden, dass alle
Modellpunkte in beiden Bildern sichtbar sein müssen. Das zugrunde
liegende Kameramodell wird im Kapitel Kalibrierung
erläutert. Das Kameramodell für perspektivische und telezentrische
Flächenkameras sowie für telezentrische Zeilenkameras wird durch 9
bis 16 Parameter (für jede Kamera separat) beschrieben (siehe
Kalibrierung ). Die initialen Werte dieser internen
Parameter werden in StartCamParam1 StartCamParam1 StartCamParam1 StartCamParam1 startCamParam1 start_cam_param_1 für Kamera 1 und
StartCamParam2 StartCamParam2 StartCamParam2 StartCamParam2 startCamParam2 start_cam_param_2 für Kamera 2 übergeben. Als Näherungswert
kann man diese den Datenblättern der Kameras entnehmen. Zusätzlich
werden die initialen Näherungswerte NStartPose1 NStartPose1 NStartPose1 NStartPose1 NStartPose1 nstart_pose_1 und
NStartPose2 NStartPose2 NStartPose2 NStartPose2 NStartPose2 nstart_pose_2 für die einzelnen 3D-Lagen des 3D
Kalibriermodells bezüglich des jeweiligen Kamerakoordinatensystems
(ccs ) von Kamera 1 und Kamera 2 benötigt. Diese 3D-Lagen
werden in der Form
erwartet. Dabei steht wcs für das Weltkoordinatensystem,
siehe auch Transformationen / Posen und „Solution
Guide III-C - 3D Vision“. Die 3D-Lagen kann man durch den Operator
find_marks_and_pose find_marks_and_pose FindMarksAndPose FindMarksAndPose FindMarksAndPose find_marks_and_pose erhalten. Da der Kalibrieralgorithmus
gleichzeitig Korrespondenzen zwischen gemessenen Bild- und bekannten
Modellpunkten aus mehreren Bildpaaren behandeln kann, müssen die
3D-Lagen (NStartPose1 NStartPose1 NStartPose1 NStartPose1 NStartPose1 nstart_pose_1 , NStartPose2 NStartPose2 NStartPose2 NStartPose2 NStartPose2 nstart_pose_2 ) und die
gemessenen Punkte (NRow1 NRow1 NRow1 NRow1 NRow1 nrow_1 , NCol1 NCol1 NCol1 NCol1 NCol1 ncol_1 , NRow2 NRow2 NRow2 NRow2 NRow2 nrow_2 ,
NCol2 NCol2 NCol2 NCol2 NCol2 ncol_2 ) in einer zu den Bildern korrespondierenden
Reihenfolge übergeben werden.
Der Eingabeparameter EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params legt die zu
berechnenden Kameraparameter fest. Üblicherweise wird dieser
Parameter auf 'all' "all" "all" "all" "all" "all" gesetzt, d.h. alle externen
(Translationen und Rotationen) und alle internen Kameraparameter
werden bestimmt.
Falls z.B. die internen Parameter schon bestimmt worden
sind (z.B. durch einen früheren Aufrufen von
binocular_calibration binocular_calibration BinocularCalibration BinocularCalibration BinocularCalibration binocular_calibration ), ist es oftmals interessant,
lediglich die 3D-Lage der Kamerasysteme zueinander zu bestimmen
(RelPose RelPose RelPose RelPose relPose rel_pose ). In diesem Fall kann in EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params
der Wert 'pose_rel' "pose_rel" "pose_rel" "pose_rel" "pose_rel" "pose_rel" übergeben werden.
Auch die internen Kameraparameter lassen sich mit den Werten
'cam_param1' "cam_param1" "cam_param1" "cam_param1" "cam_param1" "cam_param1" bzw. 'cam_param2' "cam_param2" "cam_param2" "cam_param2" "cam_param2" "cam_param2" zusammenfassen.
Andernfalls enthält EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params ein Tupel von
Stringwerten, welche die zu schätzenden Kameraparameter festlegen.
Wenn das Polynommodell für die Modellierung der Verzeichnungen
verwendet wird, ist zu beachten, dass nur die Werte 'k1_i' "k1_i" "k1_i" "k1_i" "k1_i" "k1_i" ,
'k2_i' "k2_i" "k2_i" "k2_i" "k2_i" "k2_i" und 'k3_i' "k3_i" "k3_i" "k3_i" "k3_i" "k3_i" einzeln
in EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params gesetzt werden können.
'p1' "p1" "p1" "p1" "p1" "p1" und 'p2' "p2" "p2" "p2" "p2" "p2" kann nur in der Gruppe 'poly_tan_2_i' "poly_tan_2_i" "poly_tan_2_i" "poly_tan_2_i" "poly_tan_2_i" "poly_tan_2_i"
gesetzt werden (wobei 'i' "i" "i" "i" "i" "i" für den Index der Kamera steht).
'poly_i' "poly_i" "poly_i" "poly_i" "poly_i" "poly_i" bezeichnet die Gruppe 'k1_i' "k1_i" "k1_i" "k1_i" "k1_i" "k1_i" ,
'k2_i' "k2_i" "k2_i" "k2_i" "k2_i" "k2_i" , 'k3_i' "k3_i" "k3_i" "k3_i" "k3_i" "k3_i" und 'poly_tan_2_i' "poly_tan_2_i" "poly_tan_2_i" "poly_tan_2_i" "poly_tan_2_i" "poly_tan_2_i" .
In der folgenden Liste sind alle möglichen Parameter für
EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params zu finden:
Mögliche Parameter für EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params
Ermittelte Parameter
'all' "all" "all" "all" "all" "all" (Default)
Alle internen Kameraparameter,
sowie die relative Pose der Kameras und die Posen der Kalibrierobjekte.
'pose' "pose" "pose" "pose" "pose" "pose"
Relative Pose zwischen beiden Kameras, sowie die Posen
der Kalibrierobjekte.
'pose_rel' "pose_rel" "pose_rel" "pose_rel" "pose_rel" "pose_rel"
Relative Pose zwischen beiden Kameras.
'alpha_rel' "alpha_rel" "alpha_rel" "alpha_rel" "alpha_rel" "alpha_rel" , 'beta_rel' "beta_rel" "beta_rel" "beta_rel" "beta_rel" "beta_rel" , 'gamma_rel' "gamma_rel" "gamma_rel" "gamma_rel" "gamma_rel" "gamma_rel" , 'transx_rel' "transx_rel" "transx_rel" "transx_rel" "transx_rel" "transx_rel" , 'transy_rel' "transy_rel" "transy_rel" "transy_rel" "transy_rel" "transy_rel" ,
'transz_rel' "transz_rel" "transz_rel" "transz_rel" "transz_rel" "transz_rel"
Rotationswinkel und Translation der relativen Pose zwischen beiden
Kameras..
'pose_caltabs' "pose_caltabs" "pose_caltabs" "pose_caltabs" "pose_caltabs" "pose_caltabs"
Posen der Kalibrierobjekte.
'alpha_caltabs' "alpha_caltabs" "alpha_caltabs" "alpha_caltabs" "alpha_caltabs" "alpha_caltabs" , 'beta_caltabs' "beta_caltabs" "beta_caltabs" "beta_caltabs" "beta_caltabs" "beta_caltabs" , 'gamma_caltabs' "gamma_caltabs" "gamma_caltabs" "gamma_caltabs" "gamma_caltabs" "gamma_caltabs" , 'transx_caltabs' "transx_caltabs" "transx_caltabs" "transx_caltabs" "transx_caltabs" "transx_caltabs" ,
'transy_caltabs' "transy_caltabs" "transy_caltabs" "transy_caltabs" "transy_caltabs" "transy_caltabs" , 'transz_caltabs' "transz_caltabs" "transz_caltabs" "transz_caltabs" "transz_caltabs" "transz_caltabs"
Rotationswinkel und Translation der Posen
der Kalibrierobjekte.
'cam_param1' "cam_param1" "cam_param1" "cam_param1" "cam_param1" "cam_param1" , 'cam_param2' "cam_param2" "cam_param2" "cam_param2" "cam_param2" "cam_param2"
Alle internen Kameraparameter von Kamera 1
bzw. Kamera 2.
'focus1' "focus1" "focus1" "focus1" "focus1" "focus1" , 'magnification1' "magnification1" "magnification1" "magnification1" "magnification1" "magnification1" , 'kappa1' "kappa1" "kappa1" "kappa1" "kappa1" "kappa1" , 'poly_1' "poly_1" "poly_1" "poly_1" "poly_1" "poly_1" , 'k1_1' "k1_1" "k1_1" "k1_1" "k1_1" "k1_1" , 'k2_1' "k2_1" "k2_1" "k2_1" "k2_1" "k2_1" , 'k3_1' "k3_1" "k3_1" "k3_1" "k3_1" "k3_1" ,
'poly_tan_2_1' "poly_tan_2_1" "poly_tan_2_1" "poly_tan_2_1" "poly_tan_2_1" "poly_tan_2_1" , 'image_plane_dist1' "image_plane_dist1" "image_plane_dist1" "image_plane_dist1" "image_plane_dist1" "image_plane_dist1" , 'tilt1' "tilt1" "tilt1" "tilt1" "tilt1" "tilt1" , 'cx1' "cx1" "cx1" "cx1" "cx1" "cx1" , 'cy1' "cy1" "cy1" "cy1" "cy1" "cy1" , 'sx1' "sx1" "sx1" "sx1" "sx1" "sx1" ,
'sy1' "sy1" "sy1" "sy1" "sy1" "sy1" ,
'focus2' "focus2" "focus2" "focus2" "focus2" "focus2" , 'magnification2' "magnification2" "magnification2" "magnification2" "magnification2" "magnification2" , 'kappa2' "kappa2" "kappa2" "kappa2" "kappa2" "kappa2" , 'poly_2' "poly_2" "poly_2" "poly_2" "poly_2" "poly_2" , 'k1_2' "k1_2" "k1_2" "k1_2" "k1_2" "k1_2" , 'k2_2' "k2_2" "k2_2" "k2_2" "k2_2" "k2_2" , 'k3_2' "k3_2" "k3_2" "k3_2" "k3_2" "k3_2" ,
'poly_tan_2_2' "poly_tan_2_2" "poly_tan_2_2" "poly_tan_2_2" "poly_tan_2_2" "poly_tan_2_2" , 'image_plane_dist2' "image_plane_dist2" "image_plane_dist2" "image_plane_dist2" "image_plane_dist2" "image_plane_dist2" , 'tilt2' "tilt2" "tilt2" "tilt2" "tilt2" "tilt2" , 'cx2' "cx2" "cx2" "cx2" "cx2" "cx2" , 'cy2' "cy2" "cy2" "cy2" "cy2" "cy2" , 'sx2' "sx2" "sx2" "sx2" "sx2" "sx2" ,
'sy2' "sy2" "sy2" "sy2" "sy2" "sy2"
Einzelne interne Kameraparameter von Kamera 1
bzw. Kamera 2.
'common_motion_vector' "common_motion_vector" "common_motion_vector" "common_motion_vector" "common_motion_vector" "common_motion_vector"
Legt fest, ob zwei Zeilenkameras einen
gemeinsamen Bewegungsvektor besitzen. Dies ist der Fall, wenn
die beiden Kameras starr montiert sind und das Objekt linear vor
den Kameras bewegt wird oder falls die zwei starr montierten
Kameras mit demselben Linearmechanismus bewegt werden. Dies
wird als Voreinstellung angenommen. Deshalb ist es nur
notwendig, '~common_motion_vector' zu setzen,
falls sich die Kameras unabhängig voneinander in
unterschiedliche Richtungen bewegen.
Es ist auch möglich, Parameter, die nicht geschätzt werden sollen,
über ein vorgesetztes '~' Zeichen im String
auszuschließen. Die Werte
['pose_rel', '~transx_rel'] ["pose_rel", "~transx_rel"] ["pose_rel", "~transx_rel"] ["pose_rel", "~transx_rel"] ["pose_rel", "~transx_rel"] ["pose_rel", "~transx_rel"]
beispielsweise haben denselben Effekt wie
['alpha_rel','beta_rel','gamma_rel','transy_rel','transz_rel'] ["alpha_rel","beta_rel","gamma_rel","transy_rel","transz_rel"] ["alpha_rel","beta_rel","gamma_rel","transy_rel","transz_rel"] ["alpha_rel","beta_rel","gamma_rel","transy_rel","transz_rel"] ["alpha_rel","beta_rel","gamma_rel","transy_rel","transz_rel"] ["alpha_rel","beta_rel","gamma_rel","transy_rel","transz_rel"] .
['all','~focus1'] ["all","~focus1"] ["all","~focus1"] ["all","~focus1"] ["all","~focus1"] ["all","~focus1"]
dagegen schätzt alle internen und externen Parameter bis auf die
Brennweite von Kamera1. Das '~' Präfix kann mit
Ausnahme von 'all' "all" "all" "all" "all" "all" jedem Parameterwert vorangestellt werden.
Die geschätzten Kameraparameter werden in CamParam1 CamParam1 CamParam1 CamParam1 camParam1 cam_param_1 für
Kamera 1 und CamParam2 CamParam2 CamParam2 CamParam2 camParam2 cam_param_2 für Kamera 2 zurückgegeben.
Die externen Parameter werden analog zu camera_calibration camera_calibration CameraCalibration CameraCalibration CameraCalibration camera_calibration zurück
gegeben, die Posen der 3D Transformation des Kalibriermodells zum jeweiligen
Kamerakoordinatensystems ccs in NFinalPose1 NFinalPose1 NFinalPose1 NFinalPose1 NFinalPose1 nfinal_pose_1 und
NFinalPose2 NFinalPose2 NFinalPose2 NFinalPose2 NFinalPose2 nfinal_pose_2 zurückgegeben.
Das heißt, die Posen sind in der Form
mit wcs als Weltkoordinatensystem des 3D Kalibriermodells,
siehe auch Transformationen / Posen und
„Solution Guide III-C - 3D Vision“.
Die relative Pose
,
RelPose RelPose RelPose RelPose relPose rel_pose , legt die Transformation von Punkten von ccs2
nach ccs1 fest. Damit hängen die finalen Transformationen
gemäß der folgenden Gleichung zusammen (unter Vernachlässigung der Effekte
durch die Ausgleichsrechnung der Mehrbild-Kalibrierung):
HomMat3D_NFinalPose2 = INV(HomMat3D_RelPose) * HomMat3D_NFinalPose1 ,
wobei HomMat3D_* die homogene Transformationsmatrix der
entsprechenden Lage beschreibt und INV() eine homogene Matrix
invertiert.
Die errechneten mittleren Fehler für jede Kamera, welche in
Errors Errors Errors Errors errors errors zurückgegeben werden, vermitteln einen Eindruck von
der Genauigkeit der Kalibrierung. Er beschreibt einen mittleren
euklidischen Abstand der mit den ermittelten Parametern ins Bild
projezierten Mittelpunkte der Modellmarken von ihren Abbildungen.
Bei der Verwendung von Kameras mit telezentrischen Objektiven müssen
zusätzliche Voraussetzungen für den Kalibrieraufbau gelten. Diese
können im Kapitel Kalibrierung nachgelesen werden.
Achtung
Stereosysteme, die sowohl Kameras mit hyperzentrischen Objektiven
als auch Kameras ohne hyperzentrische Objektive enthalten, werden
nicht unterstützt. Weiterhin werden Stereosysteme, die sowohl
Flächenkameras als auch Zeilenkameras enthalten, nicht unterstützt.
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Wird ohne Parallelisierung verarbeitet.
Parameter
NX NX NX NX NX nx (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen X-Koordinaten
der Kalibriermarken (in Meter).
NY NY NY NY NY ny (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Y-Koordinaten
der Kalibriermarken (in Meter).
Parameteranzahl: NY == NX
NZ NZ NZ NZ NZ nz (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Z-Koordinaten
der Kalibriermarken (in Meter).
Parameteranzahl: NZ == NX
NRow1 NRow1 NRow1 NRow1 NRow1 nrow_1 (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Zeilen-Koordinaten
der extrahierten Kalibriermarken von Kamera 1
(in Pixel).
NCol1 NCol1 NCol1 NCol1 NCol1 ncol_1 (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Spalten-Koordinaten
der extrahierten Kalibriermarken von Kamera 1
(in Pixel).
Parameteranzahl: NCol1 == NRow1
NRow2 NRow2 NRow2 NRow2 NRow2 nrow_2 (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Zeilen-Koordinaten
der extrahierten Kalibriermarken von Kamera 2
(in Pixel).
Parameteranzahl: NRow2 == NRow1
NCol2 NCol2 NCol2 NCol2 NCol2 ncol_2 (input_control) number-array → HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Spalten-Koordinaten
der extrahierten Kalibriermarken von Kamera 2
(in Pixel).
Parameteranzahl: NCol2 == NRow1
StartCamParam1 StartCamParam1 StartCamParam1 StartCamParam1 startCamParam1 start_cam_param_1 (input_control) campar → HCamPar , HTuple Sequence[Union[float, int, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Startwerte für die internen Parameter der Kamera 1.
StartCamParam2 StartCamParam2 StartCamParam2 StartCamParam2 startCamParam2 start_cam_param_2 (input_control) campar → HCamPar , HTuple Sequence[Union[float, int, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Startwerte für die internen Parameter der Kamera 2.
NStartPose1 NStartPose1 NStartPose1 NStartPose1 NStartPose1 nstart_pose_1 (input_control) pose(-array) → HPose , HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Startwerten der
externen Parameter von Kamera 1.
Parameteranzahl: NStartPose1 == 7 * NRow1 / NX
NStartPose2 NStartPose2 NStartPose2 NStartPose2 NStartPose2 nstart_pose_2 (input_control) pose(-array) → HPose , HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen Startwerten der
externen Parameter von Kamera 2.
Parameteranzahl: NStartPose2 == 7 * NRow1 / NX
EstimateParams EstimateParams EstimateParams EstimateParams estimateParams estimate_params (input_control) string-array → HTuple Sequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Zu schätzenden Kameraparameter.
Defaultwert:
'all'
"all"
"all"
"all"
"all"
"all"
Werteliste: 'all' "all" "all" "all" "all" "all" , 'alpha_caltabs' "alpha_caltabs" "alpha_caltabs" "alpha_caltabs" "alpha_caltabs" "alpha_caltabs" , 'alpha_rel' "alpha_rel" "alpha_rel" "alpha_rel" "alpha_rel" "alpha_rel" , 'beta_caltabs' "beta_caltabs" "beta_caltabs" "beta_caltabs" "beta_caltabs" "beta_caltabs" , 'beta_rel' "beta_rel" "beta_rel" "beta_rel" "beta_rel" "beta_rel" , 'cam_param1' "cam_param1" "cam_param1" "cam_param1" "cam_param1" "cam_param1" , 'cam_param2' "cam_param2" "cam_param2" "cam_param2" "cam_param2" "cam_param2" , 'common_motion_vector' "common_motion_vector" "common_motion_vector" "common_motion_vector" "common_motion_vector" "common_motion_vector" , 'cx1' "cx1" "cx1" "cx1" "cx1" "cx1" , 'cx2' "cx2" "cx2" "cx2" "cx2" "cx2" , 'cy1' "cy1" "cy1" "cy1" "cy1" "cy1" , 'cy2' "cy2" "cy2" "cy2" "cy2" "cy2" , 'focus1' "focus1" "focus1" "focus1" "focus1" "focus1" , 'focus2' "focus2" "focus2" "focus2" "focus2" "focus2" , 'gamma_caltabs' "gamma_caltabs" "gamma_caltabs" "gamma_caltabs" "gamma_caltabs" "gamma_caltabs" , 'gamma_rel' "gamma_rel" "gamma_rel" "gamma_rel" "gamma_rel" "gamma_rel" , 'image_plane_dist1' "image_plane_dist1" "image_plane_dist1" "image_plane_dist1" "image_plane_dist1" "image_plane_dist1" , 'image_plane_dist2' "image_plane_dist2" "image_plane_dist2" "image_plane_dist2" "image_plane_dist2" "image_plane_dist2" , 'k1_1' "k1_1" "k1_1" "k1_1" "k1_1" "k1_1" , 'k1_2' "k1_2" "k1_2" "k1_2" "k1_2" "k1_2" , 'k2_1' "k2_1" "k2_1" "k2_1" "k2_1" "k2_1" , 'k2_2' "k2_2" "k2_2" "k2_2" "k2_2" "k2_2" , 'k3_1' "k3_1" "k3_1" "k3_1" "k3_1" "k3_1" , 'k3_2' "k3_2" "k3_2" "k3_2" "k3_2" "k3_2" , 'kappa1' "kappa1" "kappa1" "kappa1" "kappa1" "kappa1" , 'kappa2' "kappa2" "kappa2" "kappa2" "kappa2" "kappa2" , 'magnification1' "magnification1" "magnification1" "magnification1" "magnification1" "magnification1" , 'magnification2' "magnification2" "magnification2" "magnification2" "magnification2" "magnification2" , 'poly_1' "poly_1" "poly_1" "poly_1" "poly_1" "poly_1" , 'poly_2' "poly_2" "poly_2" "poly_2" "poly_2" "poly_2" , 'poly_tan_2_1' "poly_tan_2_1" "poly_tan_2_1" "poly_tan_2_1" "poly_tan_2_1" "poly_tan_2_1" , 'poly_tan_2_2' "poly_tan_2_2" "poly_tan_2_2" "poly_tan_2_2" "poly_tan_2_2" "poly_tan_2_2" , 'pose' "pose" "pose" "pose" "pose" "pose" , 'pose_caltabs' "pose_caltabs" "pose_caltabs" "pose_caltabs" "pose_caltabs" "pose_caltabs" , 'pose_rel' "pose_rel" "pose_rel" "pose_rel" "pose_rel" "pose_rel" , 'sx1' "sx1" "sx1" "sx1" "sx1" "sx1" , 'sx2' "sx2" "sx2" "sx2" "sx2" "sx2" , 'sy1' "sy1" "sy1" "sy1" "sy1" "sy1" , 'sy2' "sy2" "sy2" "sy2" "sy2" "sy2" , 'tilt1' "tilt1" "tilt1" "tilt1" "tilt1" "tilt1" , 'tilt2' "tilt2" "tilt2" "tilt2" "tilt2" "tilt2" , 'transx_caltabs' "transx_caltabs" "transx_caltabs" "transx_caltabs" "transx_caltabs" "transx_caltabs" , 'transx_rel' "transx_rel" "transx_rel" "transx_rel" "transx_rel" "transx_rel" , 'transy_caltabs' "transy_caltabs" "transy_caltabs" "transy_caltabs" "transy_caltabs" "transy_caltabs" , 'transy_rel' "transy_rel" "transy_rel" "transy_rel" "transy_rel" "transy_rel" , 'transz_caltabs' "transz_caltabs" "transz_caltabs" "transz_caltabs" "transz_caltabs" "transz_caltabs" , 'transz_rel' "transz_rel" "transz_rel" "transz_rel" "transz_rel" "transz_rel"
CamParam1 CamParam1 CamParam1 CamParam1 camParam1 cam_param_1 (output_control) campar → HCamPar , HTuple Sequence[Union[float, int, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Interne Parameter der Kamera 1.
CamParam2 CamParam2 CamParam2 CamParam2 camParam2 cam_param_2 (output_control) campar → HCamPar , HTuple Sequence[Union[float, int, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Interne Parameter der Kamera 2.
NFinalPose1 NFinalPose1 NFinalPose1 NFinalPose1 NFinalPose1 nfinal_pose_1 (output_control) pose(-array) → HPose , HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen externen Parametern
von Kamera 1.
Parameteranzahl: NFinalPose1 == 7 * NRow1 / NX
NFinalPose2 NFinalPose2 NFinalPose2 NFinalPose2 NFinalPose2 nfinal_pose_2 (output_control) pose(-array) → HPose , HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Geordnetes Tupel mit allen externen Parametern
von Kamera 2.
Parameteranzahl: NFinalPose2 == 7 * NRow1 / NX
RelPose RelPose RelPose RelPose relPose rel_pose (output_control) pose → HPose , HTuple Sequence[Union[float, int]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Lage von Kamera 2 bezüglich Kamera 1.
Errors Errors Errors Errors errors errors (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Durchschnittlicher Fehler in Pixel.
Beispiel (HDevelop)
* Open image source.
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_l.seq', 'default', 0, -1, AcqHandle1)
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_r.seq', 'default', 1, -1, AcqHandle2)
* Initialize the start parameters.
caltab_points ('caltab_30mm.descr', X, Y, Z)
StartCamParam1 := ['area_scan_division', 0.0125, 0, 7.4e-6, 7.4e-6, \
Width/2.0, Height/2.0, Width, Height]
StartCamParam2 := StartCamParam1
Rows1 := []
Cols1 := []
StartPoses1 := []
Rows2 := []
Cols2 := []
StartPoses2 := []
* Find calibration marks and startposes.
for i := 0 to 11 by 1
grab_image_async (Image1, AcqHandle1, -1)
grab_image_async (Image2, AcqHandle2, -1)
find_caltab (Image1, CalPlate1, 'caltab_30mm.descr', 3, 120, 5)
find_caltab (Image2, CalPlate2, 'caltab_30mm.descr', 3, 120, 5)
find_marks_and_pose (Image1, CalPlate1, 'caltab_30mm.descr', \
StartCamParam1, 128, 10, 20, 0.7, 5, 100, \
RCoord1, CCoord1, StartPose1)
Rows1 := [Rows1,RCoord1]
Cols1 := [Cols1,CCoord1]
StartPoses1 := [StartPoses1,StartPose1]
find_marks_and_pose (Image2, CalPlate2, 'caltab_30mm.descr', \
StartCamParam2, 128, 10, 20, 0.7, 5, 100, \
RCoord2, CCoord2, StartPose2)
Rows2 := [Rows2,RCoord2]
Cols2 := [Cols2,CCoord2]
StartPoses2 := [StartPoses2,StartPose2]
endfor
* Calibrate the stereo rig.
binocular_calibration (X, Y, Z, Rows1, Cols1, Rows2, Cols2, StartCamParam1, \
StartCamParam2, StartPoses1, StartPoses2, 'all', \
CamParam1, CamParam2, NFinalPose1, NFinalPose2, \
RelPose, Errors)
* Archive the results.
write_cam_par (CamParam1, 'cam_left-125.dat')
write_cam_par (CamParam2, 'cam_right-125.dat')
write_pose (RelPose, 'rel_pose.dat')
* Rectify the stereo images.
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'viewing_direction', 'bilinear', \
CamParamRect1, CamParamRect2, \
CamPoseRect1, CamPoseRect2, \
RelPoseRect)
map_image (Image1, Map1, ImageMapped1)
map_image (Image2, Map2, ImageMapped2)
Beispiel (HDevelop)
* Open image source.
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_l.seq', 'default', 0, -1, AcqHandle1)
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_r.seq', 'default', 1, -1, AcqHandle2)
* Initialize the start parameters.
caltab_points ('caltab_30mm.descr', X, Y, Z)
StartCamParam1 := ['area_scan_division', 0.0125, 0, 7.4e-6, 7.4e-6, \
Width/2.0, Height/2.0, Width, Height]
StartCamParam2 := StartCamParam1
Rows1 := []
Cols1 := []
StartPoses1 := []
Rows2 := []
Cols2 := []
StartPoses2 := []
* Find calibration marks and startposes.
for i := 0 to 11 by 1
grab_image_async (Image1, AcqHandle1, -1)
grab_image_async (Image2, AcqHandle2, -1)
find_caltab (Image1, CalPlate1, 'caltab_30mm.descr', 3, 120, 5)
find_caltab (Image2, CalPlate2, 'caltab_30mm.descr', 3, 120, 5)
find_marks_and_pose (Image1, CalPlate1, 'caltab_30mm.descr', \
StartCamParam1, 128, 10, 20, 0.7, 5, 100, \
RCoord1, CCoord1, StartPose1)
Rows1 := [Rows1,RCoord1]
Cols1 := [Cols1,CCoord1]
StartPoses1 := [StartPoses1,StartPose1]
find_marks_and_pose (Image2, CalPlate2, 'caltab_30mm.descr', \
StartCamParam2, 128, 10, 20, 0.7, 5, 100, \
RCoord2, CCoord2, StartPose2)
Rows2 := [Rows2,RCoord2]
Cols2 := [Cols2,CCoord2]
StartPoses2 := [StartPoses2,StartPose2]
endfor
* Calibrate the stereo rig.
binocular_calibration (X, Y, Z, Rows1, Cols1, Rows2, Cols2, StartCamParam1, \
StartCamParam2, StartPoses1, StartPoses2, 'all', \
CamParam1, CamParam2, NFinalPose1, NFinalPose2, \
RelPose, Errors)
* Archive the results.
write_cam_par (CamParam1, 'cam_left-125.dat')
write_cam_par (CamParam2, 'cam_right-125.dat')
write_pose (RelPose, 'rel_pose.dat')
* Rectify the stereo images.
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'viewing_direction', 'bilinear', \
CamParamRect1, CamParamRect2, \
CamPoseRect1, CamPoseRect2, \
RelPoseRect)
map_image (Image1, Map1, ImageMapped1)
map_image (Image2, Map2, ImageMapped2)
Beispiel (C++)
HTuple AcqHandle1, AcqHandle2;
HTuple X, Y, Z, StartCamParam1, StartCamParam2;
HTuple Rows1, Cols1, StartPoses1, Rows2, Cols2, StartPoses2;
HTuple i, RCoord1, CCoord1, StartPose1, RCoord2, CCoord2;
HTuple StartPose2, CamParam1, CamParam2, NFinalPose1, NFinalPose2;
HTuple c1Pc2, Errors, CamParamRect1, CamParamRect2, CamPoseRect1;
HTuple CamPoseRect2, RelPoseRect;
Hobject Image1, Image2, CalPlate1, CalPlate2, Map1, Map2, ImageMapped1;
Hobject ImageMapped2;
// Open image source.
open_framegrabber("File",1,1,0,0,0,0,"default",-1,"default",-1,"default",
"images_l.seq","default",0,-1,&AcqHandle1);
open_framegrabber("File",1,1,0,0,0,0,"default",-1,"default",-1,"default",
"images_r.seq","default",0,-1,&AcqHandle2);
// Initialize the start parameters.
caltab_points("caltab_30mm.descr",&X,&Y,&Z);
StartCamParam1[8] = 640; // ImageHeight
StartCamParam1[7] = 480; // ImageWidth
StartCamParam1[6] = 320; // Cy
StartCamParam1[5] = 240; // Cx
StartCamParam1[4] = 7.4e-6; // Sy
StartCamParam1[3] = 7.4e-6; // Sx
StartCamParam1[2] = 0.0; // Kappa
StartCamParam1[1] = 0.0125; // Focus
StartCamParam1[0] = "area_scan_division"; // CameraType
StartCamParam2 = StartCamParam1; // identic camera
Rows1 = HTuple();
Cols1 = HTuple();
StartPoses1 = HTuple();
Rows2 = HTuple();
Cols2 = HTuple();
StartPoses2 = HTuple();
// Find calibration marks and startposes.
for (i=0; i<=11; i+=1)
{
grab_image_async(&Image1,AcqHandle1,-1);
grab_image_async(&Image2,AcqHandle2,-1);
find_caltab(Image1,&CalPlate1,"caltab_30mm.descr",3,120,5);
find_caltab(Image2,&CalPlate2,"caltab_30mm.descr",3,120,5);
find_marks_and_pose(Image1,CalPlate1,"caltab_30mm.descr",StartCamParam1,
128,10,20,0.7,5,100,&RCoord1,&CCoord1,&StartPose1);
Rows1.Append(RCoord1);
Cols1.Append(CCoord1);
StartPoses1.Append(StartPose1);
find_marks_and_pose(Image2,CalPlate2,"caltab_30mm.descr",StartCamParam2,
128,10,18,0.7,2,100,&RCoord2,&CCoord2,&StartPose2);
Rows2.Append(RCoord2);
Cols2.Append(CCoord2);
StartPoses2.Append(StartPose2);
}
// Find calibration marks and start poses.
binocular_calibration(X,Y,Z,Rows1,Cols1,Rows2,Cols2,StartCamParam1,
StartCamParam2,StartPoses1,StartPoses2,"all",
&CamParam1,&CamParam2,&NFinalPose1,&NFinalPose2,
&RelPose,&Errors);
// Archive the results.
write_cam_par(CamParam1,"cam_left-125.dat");
write_cam_par(CamParam2,"cam_right-125.dat");
write_pose(RelPose,"rel_pose.dat");
// Rectify the stereo images.
gen_binocular_rectification_map(&Map1,&Map2,CamParam1,CamParam2,RelPose,1,
"viewing_direction","bilinear",&CamParamRect1,
&CamParamRect2,&CamPoseRect1,
&CamPoseRect2,&RelPoseRect);
map_image(Image1,Map1,&ImageMapped1);
map_image(Image2,Map2,&ImageMapped2);
Beispiel (HDevelop)
* Open image source.
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_l.seq', 'default', 0, -1, AcqHandle1)
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_r.seq', 'default', 1, -1, AcqHandle2)
* Initialize the start parameters.
caltab_points ('caltab_30mm.descr', X, Y, Z)
StartCamParam1 := ['area_scan_division', 0.0125, 0, 7.4e-6, 7.4e-6, \
Width/2.0, Height/2.0, Width, Height]
StartCamParam2 := StartCamParam1
Rows1 := []
Cols1 := []
StartPoses1 := []
Rows2 := []
Cols2 := []
StartPoses2 := []
* Find calibration marks and startposes.
for i := 0 to 11 by 1
grab_image_async (Image1, AcqHandle1, -1)
grab_image_async (Image2, AcqHandle2, -1)
find_caltab (Image1, CalPlate1, 'caltab_30mm.descr', 3, 120, 5)
find_caltab (Image2, CalPlate2, 'caltab_30mm.descr', 3, 120, 5)
find_marks_and_pose (Image1, CalPlate1, 'caltab_30mm.descr', \
StartCamParam1, 128, 10, 20, 0.7, 5, 100, \
RCoord1, CCoord1, StartPose1)
Rows1 := [Rows1,RCoord1]
Cols1 := [Cols1,CCoord1]
StartPoses1 := [StartPoses1,StartPose1]
find_marks_and_pose (Image2, CalPlate2, 'caltab_30mm.descr', \
StartCamParam2, 128, 10, 20, 0.7, 5, 100, \
RCoord2, CCoord2, StartPose2)
Rows2 := [Rows2,RCoord2]
Cols2 := [Cols2,CCoord2]
StartPoses2 := [StartPoses2,StartPose2]
endfor
* Calibrate the stereo rig.
binocular_calibration (X, Y, Z, Rows1, Cols1, Rows2, Cols2, StartCamParam1, \
StartCamParam2, StartPoses1, StartPoses2, 'all', \
CamParam1, CamParam2, NFinalPose1, NFinalPose2, \
RelPose, Errors)
* Archive the results.
write_cam_par (CamParam1, 'cam_left-125.dat')
write_cam_par (CamParam2, 'cam_right-125.dat')
write_pose (RelPose, 'rel_pose.dat')
* Rectify the stereo images.
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'viewing_direction', 'bilinear', \
CamParamRect1, CamParamRect2, \
CamPoseRect1, CamPoseRect2, \
RelPoseRect)
map_image (Image1, Map1, ImageMapped1)
map_image (Image2, Map2, ImageMapped2)
Beispiel (HDevelop)
* Open image source.
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_l.seq', 'default', 0, -1, AcqHandle1)
open_framegrabber ('File', 1, 1, 0, 0, 0, 0, 'default', -1, 'default', -1, \
'default', 'images_r.seq', 'default', 1, -1, AcqHandle2)
* Initialize the start parameters.
caltab_points ('caltab_30mm.descr', X, Y, Z)
StartCamParam1 := ['area_scan_division', 0.0125, 0, 7.4e-6, 7.4e-6, \
Width/2.0, Height/2.0, Width, Height]
StartCamParam2 := StartCamParam1
Rows1 := []
Cols1 := []
StartPoses1 := []
Rows2 := []
Cols2 := []
StartPoses2 := []
* Find calibration marks and startposes.
for i := 0 to 11 by 1
grab_image_async (Image1, AcqHandle1, -1)
grab_image_async (Image2, AcqHandle2, -1)
find_caltab (Image1, CalPlate1, 'caltab_30mm.descr', 3, 120, 5)
find_caltab (Image2, CalPlate2, 'caltab_30mm.descr', 3, 120, 5)
find_marks_and_pose (Image1, CalPlate1, 'caltab_30mm.descr', \
StartCamParam1, 128, 10, 20, 0.7, 5, 100, \
RCoord1, CCoord1, StartPose1)
Rows1 := [Rows1,RCoord1]
Cols1 := [Cols1,CCoord1]
StartPoses1 := [StartPoses1,StartPose1]
find_marks_and_pose (Image2, CalPlate2, 'caltab_30mm.descr', \
StartCamParam2, 128, 10, 20, 0.7, 5, 100, \
RCoord2, CCoord2, StartPose2)
Rows2 := [Rows2,RCoord2]
Cols2 := [Cols2,CCoord2]
StartPoses2 := [StartPoses2,StartPose2]
endfor
* Calibrate the stereo rig.
binocular_calibration (X, Y, Z, Rows1, Cols1, Rows2, Cols2, StartCamParam1, \
StartCamParam2, StartPoses1, StartPoses2, 'all', \
CamParam1, CamParam2, NFinalPose1, NFinalPose2, \
RelPose, Errors)
* Archive the results.
write_cam_par (CamParam1, 'cam_left-125.dat')
write_cam_par (CamParam2, 'cam_right-125.dat')
write_pose (RelPose, 'rel_pose.dat')
* Rectify the stereo images.
gen_binocular_rectification_map (Map1, Map2, CamParam1, CamParam2, \
RelPose, 1, 'viewing_direction', 'bilinear', \
CamParamRect1, CamParamRect2, \
CamPoseRect1, CamPoseRect2, \
RelPoseRect)
map_image (Image1, Map1, ImageMapped1)
map_image (Image2, Map2, ImageMapped2)
Ergebnis
Sind die Parameterwerte korrekt und konnten die gesuchten Parameter
durch das Bündelausgleichsverfahren bestimmt werden, dann liefert
binocular_calibration binocular_calibration BinocularCalibration BinocularCalibration BinocularCalibration binocular_calibration den Wert 2 (H_MSG_TRUE ). Gegebenenfalls wird
eine Fehlerbehandlung durchgeführt.
Vorgänger
find_marks_and_pose find_marks_and_pose FindMarksAndPose FindMarksAndPose FindMarksAndPose find_marks_and_pose ,
caltab_points caltab_points CaltabPoints CaltabPoints CaltabPoints caltab_points ,
read_cam_par read_cam_par ReadCamPar ReadCamPar ReadCamPar read_cam_par
Nachfolger
write_pose write_pose WritePose WritePose WritePose write_pose ,
write_cam_par write_cam_par WriteCamPar WriteCamPar WriteCamPar write_cam_par ,
pose_to_hom_mat3d pose_to_hom_mat3d PoseToHomMat3d PoseToHomMat3d PoseToHomMat3d pose_to_hom_mat3d ,
disp_caltab disp_caltab DispCaltab DispCaltab DispCaltab disp_caltab ,
gen_binocular_rectification_map gen_binocular_rectification_map GenBinocularRectificationMap GenBinocularRectificationMap GenBinocularRectificationMap gen_binocular_rectification_map
Siehe auch
find_caltab find_caltab FindCaltab FindCaltab FindCaltab find_caltab ,
sim_caltab sim_caltab SimCaltab SimCaltab SimCaltab sim_caltab ,
read_cam_par read_cam_par ReadCamPar ReadCamPar ReadCamPar read_cam_par ,
create_pose create_pose CreatePose CreatePose CreatePose create_pose ,
convert_pose_type convert_pose_type ConvertPoseType ConvertPoseType ConvertPoseType convert_pose_type ,
read_pose read_pose ReadPose ReadPose ReadPose read_pose ,
hom_mat3d_to_pose hom_mat3d_to_pose HomMat3dToPose HomMat3dToPose HomMat3dToPose hom_mat3d_to_pose ,
create_caltab create_caltab CreateCaltab CreateCaltab CreateCaltab create_caltab ,
binocular_disparity binocular_disparity BinocularDisparity BinocularDisparity BinocularDisparity binocular_disparity ,
binocular_distance binocular_distance BinocularDistance BinocularDistance BinocularDistance binocular_distance
Modul
3D Metrology