HALCON Reference Manual 10.0.2
Name
disp_caltabT_disp_caltabdisp_caltabDispCaltabDispCaltab — Project and visualize the 3D model of the calibration plate in the image.
disp_caltabdisp_caltabdisp_caltabDispCaltabDispCaltab is used to visualize the calibration marks and the
connecting lines between the marks of the used calibration plate
(CalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFilecalTabDescrFile) in the window specified by WindowHandleWindowHandleWindowHandleWindowHandlewindowHandle.
Additionally, the x- and y-axes of the plate's coordiante system are printed
on the plate's surface.
For this, the 3D model of the calibration plate is projected into the image
plane using the internal (CameraParamCameraParamCameraParamCameraParamcameraParam) and external camera parameters
(CaltabPoseCaltabPoseCaltabPoseCaltabPosecaltabPose, i.e., the pose of the calibration plate in camera
coordinates). The underlying camera model (pinhole, telecentric, or line
scan camera with radial distortion) is described in write_cam_parwrite_cam_parwrite_cam_parWriteCamParWriteCamPar.
Typically, disp_caltabdisp_caltabdisp_caltabDispCaltabDispCaltab is used to verify the result
of the camera calibration (see calibrate_camerascalibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCameras) or
camera_calibrationcamera_calibrationcamera_calibrationCameraCalibrationCameraCalibration) by
superimposing it onto the original image. The current line width
can be set by set_line_widthset_line_widthset_line_widthSetLineWidthSetLineWidth, the current color can be set
by set_colorset_colorset_colorSetColorSetColor. Additionally, the font type of the labels of the
coordinate axes can be set by set_fontset_fontset_fontSetFontSetFont.
The parameter ScaleFacScaleFacScaleFacScaleFacscaleFac influences the number of supporting
points to approximate the elliptic contours of the calibration marks.
You should increase the number of supporting points, if the image part
in the output window is displayed with magnification (see
set_partset_partset_partSetPartSetPart).
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: local (may only be called from the same thread in which the window, model, or tool instance was created).
- Processed without parallelization.
Window in which the calibration plate should be
visualized.
File name of the calibration plate description.
Default value:
'caltab.descr'
"caltab.descr"
"caltab.descr"
"caltab.descr"
"caltab.descr"
List of values: 'caltab.descr'"caltab.descr""caltab.descr""caltab.descr""caltab.descr", 'caltab_10mm.descr'"caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr", 'caltab_30mm.descr'"caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr", 'caltab_100mm.descr'"caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr", 'caltab_200mm.descr'"caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr"
File extension: .descr
Internal camera parameters.
Number of elements: ((CameraParam == 8) || (CameraParam == 11)) || (CameraParam == 12)
External camera parameters (3D pose of the calibration
plate in camera coordinates).
Number of elements: 7
Scaling factor for the visualization.
Default value: 1.0
Suggested values: 0.5, 1.0, 2.0, 3.0
Recommended increment: 0.05
Restriction: 0.0 < ScaleFac
* read calibration image
read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [Focus, Kappa, Sx, Sy, Cx, Cy, ImageWidth, ImageHeight]
find_marks_and_pose(Image1, Caltab1, 'caltab.descr', StartCamPar, \
128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
* camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
StartPose1, 11, CameraParam, FinalPose, Errors)
* visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)
* read calibration image
read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [Focus, Kappa, Sx, Sy, Cx, Cy, ImageWidth, ImageHeight]
find_marks_and_pose(Image1, Caltab1, 'caltab.descr', StartCamPar, \
128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
* camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
StartPose1, 11, CameraParam, FinalPose, Errors)
* visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)
HTuple StartCamPar, NX, NY, NZ;
HTuple RCoord1, CCoord1, StartPose1;
HTuple StartPose, CameraParam, FinalPose, Errors;
// read calibration image
HImage Image1("calib-01");
// find calibration pattern
HRegion Caltab1 = Image1.FindCaltab("caltab.descr", 3, 112, 5);
// find calibration marks and start pose
StartCamPar[7] = 576; // ImageHeight
StartCamPar[6] = 768; // ImageWidth
StartCamPar[5] = 288; // Cy
StartCamPar[4] = 384; // Cx
StartCamPar[3] = 0.000011; // Sy
StartCamPar[2] = 0.000011; // Sx
StartCamPar[1] = 0.0; // Kappa
StartCamPar[0] = 0.008; // Focus
RCoord1 = Image1.FindMarksAndPose(Caltab1, "caltab.descr", StartCamPar,
128, 10, &CCoord1, &StartPose);
// read 3D positions of calibration marks
caltab_points("caltab.descr", &NX, &NY, &NZ);
// camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, StartPose,
11, &CameraParam, &FinalPose, &Errors);
// visualize calibration result
disp_image(Image1, WindowHandle);
set_color(WindowHandle, "red");
disp_caltab(WindowHandle, "caltab.descr", CameraParam, FinalPose, 1.0);
* read calibration image
read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [Focus, Kappa, Sx, Sy, Cx, Cy, ImageWidth, ImageHeight]
find_marks_and_pose(Image1, Caltab1, 'caltab.descr', StartCamPar, \
128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
* camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
StartPose1, 11, CameraParam, FinalPose, Errors)
* visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)
* read calibration image
read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [Focus, Kappa, Sx, Sy, Cx, Cy, ImageWidth, ImageHeight]
find_marks_and_pose(Image1, Caltab1, 'caltab.descr', StartCamPar, \
128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
* camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
StartPose1, 11, CameraParam, FinalPose, Errors)
* visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)
disp_caltabdisp_caltabdisp_caltabDispCaltabDispCaltab returns 2 (H_MSG_TRUE) if all parameter values are
correct. If necessary, an exception is raised.
camera_calibrationcamera_calibrationcamera_calibrationCameraCalibrationCameraCalibration,
read_cam_parread_cam_parread_cam_parReadCamParReadCamPar,
read_poseread_poseread_poseReadPoseReadPose
find_marks_and_posefind_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPose,
camera_calibrationcamera_calibrationcamera_calibrationCameraCalibrationCameraCalibration,
sim_caltabsim_caltabsim_caltabSimCaltabSimCaltab,
write_cam_parwrite_cam_parwrite_cam_parWriteCamParWriteCamPar,
read_cam_parread_cam_parread_cam_parReadCamParReadCamPar,
create_posecreate_posecreate_poseCreatePoseCreatePose,
write_posewrite_posewrite_poseWritePoseWritePose,
read_poseread_poseread_poseReadPoseReadPose,
project_3d_pointproject_3d_pointproject_3d_pointProject3dPointProject3dPoint,
get_line_of_sightget_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSight
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |