Project and visualize the 3D model of the calibration plate in the image.
disp_caltab is used to visualize the calibration marks and the connecting lines between the marks of the used calibration plate (CalTabDescrFile) in the window specified by WindowHandle. 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 interior (CamParam) and exterior camera parameters (CaltabPose, 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_par and camera_calibration.
Typically, disp_caltab is used to verify the result of the camera calibration (see camera_calibration) by superimposing it onto the original image. The current line width can be set by set_line_width, the current color can be set by set_color. Additionally, the font type of the labels of the coordinate axes can be set by set_font.
The parameter ScaleFac 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_part).
|
WindowHandle (input_control) |
window -> integer |
| Window in which the calibration plate should be visualized. | |
|
CalTabDescrFile (input_control) |
string -> string |
| File name of the calibration plate description. | |
| Default value: 'caltab.descr' | |
| List of values: 'caltab.descr', 'caltab_10mm.descr', 'caltab_30mm.descr', 'caltab_100mm.descr', 'caltab_200mm.descr' | |
|
CamParam (input_control) |
number-array -> real / integer |
| Interior camera parameters. | |
| Number of elements: (CamParam == 8) || (CamParam == 11) | |
|
CaltabPose (input_control) |
pose-array -> real / integer |
| Exterior camera parameters (3D pose of the calibration plate in camera coordinates). | |
| Number of elements: 7 | |
|
ScaleFac (input_control) |
real -> real |
| 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, CamParam, FinalPose, Errors)
* visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab('caltab.descr', CamParam, FinalPose, 1.0)disp_caltab returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception handling is raised.
disp_caltab is reentrant, local, and processed without parallelization.
camera_calibration, read_cam_par, read_pose
find_marks_and_pose, camera_calibration, sim_caltab, write_cam_par, read_cam_par, create_pose, write_pose, read_pose, project_3d_point, get_line_of_sight
Foundation