cam_mat_to_cam_parT_cam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par (算子)

名称

cam_mat_to_cam_parT_cam_mat_to_cam_parCamMatToCamParCamMatToCamParcam_mat_to_cam_par — 根据相机矩阵计算内部相机参数。

签名

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]]

描述

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_calibrationcam_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.

执行信息

参数

CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix (输入控制)  hom_mat2d HHomMat2D, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

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

KappaKappaKappaKappakappakappa (输入控制)  number HTuplefloatHTupleHtuple (real) (double) (double) (double)

Kappa.

ImageWidthImageWidthImageWidthImageWidthimageWidthimage_width (输入控制)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix

限制: ImageWidth > 0

ImageHeightImageHeightImageHeightImageHeightimageHeightimage_height (输入控制)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrixcamera_matrix

限制: ImageHeight > 0

CameraParamCameraParamCameraParamCameraParamcameraParamcamera_param (输出控制)  campar HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Internal camera parameters.

示例(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)

结果

如果参数有效,算子 cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParCamMatToCamParcam_mat_to_cam_par 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的前趋

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationstationary_camera_self_calibration

另见

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMatcam_par_to_cam_mat

模块

标定