read_cam_parT_read_cam_parReadCamParReadCamParread_cam_par (Operator)

Name

read_cam_parT_read_cam_parReadCamParReadCamParread_cam_par — Read internal camera parameters from a file.

Signature

read_cam_par( : : CamParFile : CameraParam)

Herror T_read_cam_par(const Htuple CamParFile, Htuple* CameraParam)

void ReadCamPar(const HTuple& CamParFile, HTuple* CameraParam)

void HCamPar::ReadCamPar(const HString& CamParFile)

void HCamPar::ReadCamPar(const char* CamParFile)

void HCamPar::ReadCamPar(const wchar_t* CamParFile)   (Windows only)

static void HOperatorSet.ReadCamPar(HTuple camParFile, out HTuple cameraParam)

void HCamPar.ReadCamPar(string camParFile)

def read_cam_par(cam_par_file: str) -> Sequence[Union[int, float, str]]

Description

read_cam_parread_cam_parReadCamParReadCamParReadCamParread_cam_par reads the internal camera parameters CameraParamCameraParamCameraParamCameraParamcameraParamcamera_param from a file with name CamParFileCamParFileCamParFileCamParFilecamParFilecam_par_file. The file must have been written by write_cam_parwrite_cam_parWriteCamParWriteCamParWriteCamParwrite_cam_par.

The default HALCON file extension for the camera parameters is 'dat'.

The number of values in CameraParamCameraParamCameraParamCameraParamcameraParamcamera_param depends on the specified camera type. See the description of set_calib_data_cam_paramset_calib_data_cam_paramSetCalibDataCamParamSetCalibDataCamParamSetCalibDataCamParamset_calib_data_cam_param for a list of values and the chapter Calibration for details on camera types and camera parameters.

Execution Information

Parameters

CamParFileCamParFileCamParFileCamParFilecamParFilecam_par_file (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

File name of internal camera parameters.

Default value: 'campar.dat' "campar.dat" "campar.dat" "campar.dat" "campar.dat" "campar.dat"

List of values: 'campar.dat'"campar.dat""campar.dat""campar.dat""campar.dat""campar.dat", 'campar.final'"campar.final""campar.final""campar.final""campar.final""campar.final", 'campar.initial'"campar.initial""campar.initial""campar.initial""campar.initial""campar.initial"

File extension: .dat

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)

* Create sample camera parameters and write them to file.
gen_cam_par_area_scan_division (0.01, -731, 5.2e-006, 5.2e-006, \
                                654, 519, 1280, 1024, CameraParamTmp)
write_cam_par (CameraParamTmp, 'campar_tmp.dat')
* Read internal camera parameters.
read_cam_par('campar_tmp.dat', CameraParam)

Example (HDevelop)

* Create sample camera parameters and write them to file.
gen_cam_par_area_scan_division (0.01, -731, 5.2e-006, 5.2e-006, \
                                654, 519, 1280, 1024, CameraParamTmp)
write_cam_par (CameraParamTmp, 'campar_tmp.dat')
* Read internal camera parameters.
read_cam_par('campar_tmp.dat', CameraParam)

Example (HDevelop)

* Create sample camera parameters and write them to file.
gen_cam_par_area_scan_division (0.01, -731, 5.2e-006, 5.2e-006, \
                                654, 519, 1280, 1024, CameraParamTmp)
write_cam_par (CameraParamTmp, 'campar_tmp.dat')
* Read internal camera parameters.
read_cam_par('campar_tmp.dat', CameraParam)

Example (HDevelop)

* Create sample camera parameters and write them to file.
gen_cam_par_area_scan_division (0.01, -731, 5.2e-006, 5.2e-006, \
                                654, 519, 1280, 1024, CameraParamTmp)
write_cam_par (CameraParamTmp, 'campar_tmp.dat')
* Read internal camera parameters.
read_cam_par('campar_tmp.dat', CameraParam)

Example (HDevelop)

* Create sample camera parameters and write them to file.
gen_cam_par_area_scan_division (0.01, -731, 5.2e-006, 5.2e-006, \
                                654, 519, 1280, 1024, CameraParamTmp)
write_cam_par (CameraParamTmp, 'campar_tmp.dat')
* Read internal camera parameters.
read_cam_par('campar_tmp.dat', CameraParam)

Result

read_cam_parread_cam_parReadCamParReadCamParReadCamParread_cam_par returns TRUE if all parameter values are correct and the file has been read successfully. If necessary an exception is raised.

Possible Successors

find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose, sim_caltabsim_caltabSimCaltabSimCaltabSimCaltabsim_caltab, gen_caltabgen_caltabGenCaltabGenCaltabGenCaltabgen_caltab, disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration

See also

find_caltabfind_caltabFindCaltabFindCaltabFindCaltabfind_caltab, find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab, sim_caltabsim_caltabSimCaltabSimCaltabSimCaltabsim_caltab, write_cam_parwrite_cam_parWriteCamParWriteCamParWriteCamParwrite_cam_par, write_posewrite_poseWritePoseWritePoseWritePosewrite_pose, read_poseread_poseReadPoseReadPoseReadPoseread_pose, project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPointproject_3d_point, get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSightget_line_of_sight

Module

Foundation