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
def read_cam_par(cam_par_file: str) -> Sequence[Union[int, float, str]]
Description
read_cam_parread_cam_parReadCamParReadCamParread_cam_par
reads the internal camera parameters
CameraParamCameraParamCameraParamcameraParamcamera_param
from a file with name CamParFileCamParFileCamParFilecamParFilecam_par_file
. The
file must have been written by write_cam_parwrite_cam_parWriteCamParWriteCamParwrite_cam_par
.
The default HALCON file extension for the camera parameters is
'dat'.
The number of values in CameraParamCameraParamCameraParamcameraParamcamera_param
depends on the
specified camera type. See the description of
set_calib_data_cam_paramset_calib_data_cam_paramSetCalibDataCamParamSetCalibDataCamParamset_calib_data_cam_param
for a list of values and the chapter
Calibration for details on camera types and camera
parameters.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
CamParFileCamParFileCamParFilecamParFilecam_par_file
(input_control) filename.read →
HTuplestrHTupleHtuple (string) (string) (HString) (char*)
File name of internal camera parameters.
Default:
'campar.dat'
"campar.dat"
"campar.dat"
"campar.dat"
"campar.dat"
List of values:
'campar.dat'"campar.dat""campar.dat""campar.dat""campar.dat", 'campar.final'"campar.final""campar.final""campar.final""campar.final", 'campar.initial'"campar.initial""campar.initial""campar.initial""campar.initial"
File extension:
.dat
CameraParamCameraParamCameraParamcameraParamcamera_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 (C++)
HTuple CameraParamTmp, CameraParam;
// 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_parReadCamParReadCamParread_cam_par
returns 2 (
H_MSG_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_poseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose
,
sim_caltabsim_caltabSimCaltabSimCaltabsim_caltab
,
gen_caltabgen_caltabGenCaltabGenCaltabgen_caltab
,
disp_caltabdisp_caltabDispCaltabDispCaltabdisp_caltab
,
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration
See also
find_caltabfind_caltabFindCaltabFindCaltabfind_caltab
,
find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose
,
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration
,
disp_caltabdisp_caltabDispCaltabDispCaltabdisp_caltab
,
sim_caltabsim_caltabSimCaltabSimCaltabsim_caltab
,
write_cam_parwrite_cam_parWriteCamParWriteCamParwrite_cam_par
,
write_posewrite_poseWritePoseWritePosewrite_pose
,
read_poseread_poseReadPoseReadPoseread_pose
,
project_3d_pointproject_3d_pointProject3dPointProject3dPointproject_3d_point
,
get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightget_line_of_sight
Module
Foundation