Operator Reference

cam_mat_to_cam_parT_cam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par (Operator)

cam_mat_to_cam_parT_cam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par — Compute the internal camera parameters from a camera matrix.

Signature

cam_mat_to_cam_par( : : CameraMatrix, Kappa, ImageWidth, ImageHeight : CameraParam)

Herror T_cam_mat_to_cam_par(const Htuple CameraMatrix, const Htuple Kappa, const Htuple ImageWidth, const Htuple ImageHeight, Htuple* CameraParam)

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

void HCamPar::CamMatToCamPar(const HHomMat2D& CameraMatrix, double Kappa, Hlong ImageWidth, Hlong ImageHeight)

HCamPar HHomMat2D::CamMatToCamPar(double Kappa, Hlong ImageWidth, Hlong ImageHeight) const

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

void HCamPar.CamMatToCamPar(HHomMat2D cameraMatrix, double kappa, int imageWidth, int imageHeight)

HCamPar HHomMat2D.CamMatToCamPar(double kappa, int imageWidth, int imageHeight)

def cam_mat_to_cam_par(camera_matrix: Sequence[float], kappa: float, image_width: int, image_height: int) -> Sequence[Union[int, float, str]]

Description

cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par computes internal camera parameters from the camera matrix CameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix, the radial distortion coefficient KappaKappaKappakappakappa, the image width ImageWidthImageWidthImageWidthimageWidthimage_width, and the image height ImageHeightImageHeightImageHeightimageHeightimage_height. The camera parameters are returned in CameraParamCameraParamCameraParamcameraParamcamera_param. The parameters CameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix and KappaKappaKappakappakappa can be determined with stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration. cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par converts this representation of the internal camera parameters into the representation used by camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration. The conversion can only be performed if the skew of the image axes is set to 0 in stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration, i.e., if the parameter 'skew'"skew""skew""skew""skew" is not being determined.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

CameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix (input_control)  hom_mat2d HHomMat2D, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

3x3 projective camera matrix that determines the internal camera parameters.

KappaKappaKappakappakappa (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Kappa.

ImageWidthImageWidthImageWidthimageWidthimage_width (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the images that correspond to CameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix.

Restriction: ImageWidth > 0

ImageHeightImageHeightImageHeightimageHeightimage_height (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the images that correspond to CameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix.

Restriction: ImageHeight > 0

CameraParamCameraParamCameraParamcameraParamcamera_param (output_control)  campar HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Internal camera parameters.

Example (HDevelop)

* For the input data to stationary_camera_self_calibration, please
* refer to the example for stationary_camera_self_calibration.
stationary_camera_self_calibration (4, 640, 480, 1, From, To, \
                                    HomMatrices2D, Rows1, Cols1, \
                                    Rows2, Cols2, NumMatches, \
                                    'gold_standard', \
                                    ['focus','principal_point','kappa'], \
                                    'true', CameraMatrix, Kappa, \
                                    RotationMatrices, X, Y, Z, Error)
cam_mat_to_cam_par (CameraMatrix, Kappa, 640, 480, CameraParam)

Result

If the parameters are valid, the operator cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par returns the value 2 ( H_MSG_TRUE) . If necessary an exception is raised.

Possible Predecessors

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration

See also

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration, cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatcam_par_to_cam_mat

Module

Calibration