cam_mat_to_cam_parT_cam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par (Operator)

Name

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_parCamMatToCamParCamMatToCamParCamMatToCamParcam_mat_to_cam_par computes internal camera parameters from the camera matrix CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix, the radial distortion coefficient KappaKappaKappaKappakappakappa, the image width ImageWidthImageWidthImageWidthImageWidthimageWidthimage_width, and the image height ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height. The camera parameters are returned in CameraParamCameraParamCameraParamCameraParamcameraParamcamera_param. The parameters CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix and KappaKappaKappaKappakappakappa can be determined with stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration. cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParCamMatToCamParcam_mat_to_cam_par converts this representation of the internal camera parameters into the representation used by camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_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_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration, i.e., if the parameter 'skew'"skew""skew""skew""skew""skew" is not being determined.

Execution Information

Parameters

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

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

KappaKappaKappaKappakappakappa (input_control)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Kappa.

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

Width of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix.

Restriction: ImageWidth > 0

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

Height of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix.

Restriction: ImageHeight > 0

CameraParamCameraParamCameraParamCameraParamcameraParamcamera_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_parCamMatToCamParCamMatToCamParCamMatToCamParcam_mat_to_cam_par returns the value TRUE. If necessary an exception is raised.

Possible Predecessors

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration

See also

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMatcam_par_to_cam_mat

Module

Calibration