ClassesClasses | | Operators

cam_par_to_cam_matT_cam_par_to_cam_matCamParToCamMatCamParToCamMat (Operator)

Name

cam_par_to_cam_matT_cam_par_to_cam_matCamParToCamMatCamParToCamMat — Compute a camera matrix from internal camera parameters.

Signature

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)

Description

cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMat computes the camera matrix CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix as well as the image width ImageWidthImageWidthImageWidthImageWidthimageWidth, and the image height ImageHeightImageHeightImageHeightImageHeightimageHeight from the internal camera parameters CameraParamCameraParamCameraParamCameraParamcameraParam. The internal camera parameters CameraParamCameraParamCameraParamCameraParamcameraParam can be determined with camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration. cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMatCamParToCamMat converts this representation of the internal camera parameters into the representation used by stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration. The conversion can only be performed if the camera is an area scan pinhole camera and the distortion coefficients in CameraParamCameraParamCameraParamCameraParamcameraParam are 0. If necessary, change_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamParChangeRadialDistortionCamPar must be used to set the distortion coefficients to 0.

Execution Information

Parameters

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

Internal camera parameters.

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

3x3 projective camera matrix that corresponds to CameraParamCameraParamCameraParamCameraParamcameraParam.

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

Width of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix.

Assertion: ImageWidth > 0

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

Height of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix.

Assertion: ImageHeight > 0

Example (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)

Result

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

Possible Predecessors

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration

See also

stationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration, cam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamParCamMatToCamPar

Module

Calibration


ClassesClasses | | Operators