HALCON Reference Manual 10.0.2
Table of Contents / Calibration / Camera Parameters ClassesClassesClasses | | | Operators

cam_par_to_cam_matT_cam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMat (Operator)

Name

cam_par_to_cam_matT_cam_par_to_cam_matcam_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)

Herror cam_par_to_cam_mat(const HTuple& CameraParam, HTuple* CameraMatrix, HTuple* ImageWidth, HTuple* ImageHeight)

void HOperatorSetX.CamParToCamMat(
[in] VARIANT CameraParam, [out] VARIANT* CameraMatrix, [out] VARIANT* ImageWidth, [out] VARIANT* ImageHeight)

Hlong HHomMat2DX.CamParToCamMat(
[in] VARIANT CameraParam, [out] Hlong* ImageHeight)

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

void HHomMat2D.CamParToCamMat(HTuple cameraParam, out int imageWidth, out int imageHeight)

Description

cam_par_to_cam_matcam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMat 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_calibrationcamera_calibrationCameraCalibrationCameraCalibration. cam_par_to_cam_matcam_par_to_cam_matcam_par_to_cam_matCamParToCamMatCamParToCamMat converts this representation of the internal camera parameters into the representation used by stationary_camera_self_calibrationstationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration. The conversion can only be performed if the radial distortion coefficient Kappa is 0. If necessary, change_radial_distortion_cam_parchange_radial_distortion_cam_parchange_radial_distortion_cam_parChangeRadialDistortionCamParChangeRadialDistortionCamPar must be used to achieve this.

Parallelization

Parameters

CameraParamCameraParamCameraParamCameraParamcameraParam (input_control)  number-array HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Internal camera parameters.

Number of elements: (CameraParam == 8) || (CameraParam == 12)

CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix (output_control)  hom_mat2d-array HHomMat2D, HTupleHTupleHHomMat2DX, VARIANTHtuple (real) (double) (double) (double) (double)

3x3 projective camera matrix that corresponds to CameraParamCameraParamCameraParamCameraParamcameraParam.

ImageWidthImageWidthImageWidthImageWidthimageWidth (output_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Width of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix.

Assertion: ImageWidth > 0

ImageHeightImageHeightImageHeightImageHeightimageHeight (output_control)  integer HTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong)

Height of the images that correspond to CameraMatrixCameraMatrixCameraMatrixCameraMatrixcameraMatrix.

Assertion: ImageHeight > 0

Example (HDevelop)

* For the input data to camera_calibration, please refer to the
* example for camera_calibration.
camera_calibration (X, Y, Z, Rows, Cols, StartCamParam, StartPoses, \
                    ['all','~kappa'], CameraParam, FinalPoses, Errors)
cam_par_to_cam_mat (CameraParam, CameraMatrix, ImageWidth, ImageHeight)

* Alternatively, the following calls can be used.
camera_calibration (X, Y, Z, Rows, Cols, StartCamParam, StartPoses, \
                    'all', CameraParam, FinalPoses, Errors)
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_matcam_par_to_cam_matCamParToCamMatCamParToCamMat returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

camera_calibrationcamera_calibrationcamera_calibrationCameraCalibrationCameraCalibration

See also

stationary_camera_self_calibrationstationary_camera_self_calibrationstationary_camera_self_calibrationStationaryCameraSelfCalibrationStationaryCameraSelfCalibration, cam_mat_to_cam_parcam_mat_to_cam_parcam_mat_to_cam_parCamMatToCamParCamMatToCamPar

Module

Calibration


Table of Contents / Calibration / Camera Parameters ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH