Skip to content

cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_parT_cam_mat_to_cam_par🔗

Short description🔗

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

Signature🔗

cam_mat_to_cam_par( hom_mat2d CameraMatrix, number Kappa, extent.x ImageWidth, extent.y ImageHeight, out campar CameraParam )cam_mat_to_cam_par( : : CameraMatrix, Kappa, ImageWidth, ImageHeight : CameraParam )void CamMatToCamPar( const HTuple& CameraMatrix, const HTuple& Kappa, const HTuple& ImageWidth, const HTuple& ImageHeight, HTuple* CameraParam )static void HOperatorSet.CamMatToCamPar( HTuple cameraMatrix, HTuple kappa, HTuple imageWidth, HTuple imageHeight, out HTuple cameraParam )def cam_mat_to_cam_par( camera_matrix: Sequence[float], kappa: float, image_width: int, image_height: int ) -> Sequence[Union[int, float, str]]

Herror T_cam_mat_to_cam_par( 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

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

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

Description🔗

cam_mat_to_cam_parCamMatToCamPar computes internal camera parameters from the camera matrix CameraMatrixcameraMatrixcamera_matrix, the radial distortion coefficient Kappakappakappa, the image width ImageWidthimageWidthimage_width, and the image height ImageHeightimageHeightimage_height. The camera parameters are returned in CameraParamcameraParamcamera_param. The parameters CameraMatrixcameraMatrixcamera_matrix and Kappakappakappa can be determined with stationary_camera_self_calibrationStationaryCameraSelfCalibration. cam_mat_to_cam_parCamMatToCamPar converts this representation of the internal camera parameters into the representation used by camera_calibrationCameraCalibration. The conversion can only be performed if the skew of the image axes is set to 0 in stationary_camera_self_calibrationStationaryCameraSelfCalibration, i.e., if the parameter 'skew'"skew" is not being determined.

Execution information🔗

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🔗

CameraMatrixcameraMatrixcamera_matrix (input_control) hom_mat2d → (real)(real)HTuple (double)HHomMat2D, HTuple (double)Sequence[float]Htuple (double)

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

Kappakappakappa (input_control) number → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Kappa.

ImageWidthimageWidthimage_width (input_control) extent.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the images that correspond to CameraMatrixcameraMatrixcamera_matrix.

Restriction: ImageWidth > 0

ImageHeightimageHeightimage_height (input_control) extent.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the images that correspond to CameraMatrixcameraMatrixcamera_matrix.

Restriction: ImageHeight > 0

CameraParamcameraParamcamera_param (output_control) campar → (real / integer / string)(real / integer / string)HTuple (double / Hlong / HString)HCamPar, HTuple (double / int / long / string)Sequence[Union[int, float, str]]Htuple (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_parCamMatToCamPar returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

stationary_camera_self_calibrationStationaryCameraSelfCalibration

See also

camera_calibrationCameraCalibration, cam_par_to_cam_matCamParToCamMat

Module🔗

Calibration