cam_par_to_cam_matT_cam_par_to_cam_matCamParToCamMatCamParToCamMat (Operator)

Name

cam_par_to_cam_matT_cam_par_to_cam_matCamParToCamMatCamParToCamMat — Berechnen einer Kameramatrix aus internen Kameraparametern.

Signatur

cam_par_to_cam_mat( : : CameraParam : CameraMatrix, ImageWidth, ImageHeight)

Herror T_cam_par_to_cam_mat(const Htuple CameraParam, Htuple* CameraMatrix, Htuple* ImageWidth, Htuple* ImageHeight)

void CamParToCamMat(const HTuple& CameraParam, HTuple* CameraMatrix, HTuple* ImageWidth, HTuple* ImageHeight)

HHomMat2D HCamPar::CamParToCamMat(Hlong* ImageWidth, Hlong* ImageHeight) const

void HHomMat2D::CamParToCamMat(const HCamPar& CameraParam, Hlong* ImageWidth, Hlong* ImageHeight)

static void HOperatorSet.CamParToCamMat(HTuple cameraParam, out HTuple cameraMatrix, out HTuple imageWidth, out HTuple imageHeight)

HHomMat2D HCamPar.CamParToCamMat(out int imageWidth, out int imageHeight)

void HHomMat2D.CamParToCamMat(HCamPar cameraParam, out int imageWidth, out int imageHeight)

Beschreibung

cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMat berechnet die Kameramatrix CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix sowie die Bildbreite ImageWidthImageWidthImageWidthImageWidthimageWidth und die Bildhöhe ImageHeightImageHeightImageHeightImageHeightimageHeight aus internen Kameraparametern CameraParamCameraParamCameraParamCameraParamcameraParam. Die internen Kameraparameter CameraParamCameraParamCameraParamCameraParamcameraParam können mit camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration bestimmt werden. cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMat konvertiert diese Darstellung der internen Kameraparameter dann in die Darstellung, die von stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration verwendet wird. Dabei kann die Konversion nur erfolgen, falls die Kamera eine Lochkamera mit Flächensensor ist und die Verzeichnungskoeffizienten in CameraParamCameraParamCameraParamCameraParamcameraParam 0 sind. Falls nötig muss change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamParChangeRadialDistortionCamPar verwendet werden, um die Verzeichnungskoeffizienten auf 0 zu setzen.

Ausführungsinformationen

Parameter

CameraParamCameraParamCameraParamCameraParamcameraParam (input_control)  campar HCamPar, HTupleHTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Interne Kameraparameter.

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

3x3 projektive Kameramatrix, die CameraParamCameraParamCameraParamCameraParamcameraParam entspricht.

ImageWidthImageWidthImageWidthImageWidthimageWidth (output_control)  extent.x HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Breite zu CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix gehörigen Bilder.

Zusicherung: ImageWidth > 0

ImageHeightImageHeightImageHeightImageHeightimageHeight (output_control)  extent.y HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Höhe zu CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix gehörigen Bilder.

Zusicherung: ImageHeight > 0

Beispiel (HDevelop)

* For the input data to calibrate_cameras, please refer to the
* example for calibrate_cameras.
calibrate_cameras (CalibDataID, Error)
get_calib_data (CalibDataID, 'camera', 0, 'params', CameraParam)
cam_par_to_cam_mat (CameraParam, CameraMatrix, ImageWidth, ImageHeight)

* Alternatively, the following calls can be used.
change_radial_distortion_cam_par ('adaptive', CameraParam, 0, CamParamOut)
cam_par_to_cam_mat (CamParamOut, CameraMatrix, ImageWidth, ImageHeight)

Ergebnis

Sind die Parameterwerte korrekt, dann liefert cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMat den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration

Siehe auch

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration, cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParCamMatToCamPar

Modul

Calibration