Operators |
disp_caltab — Project and visualize the 3D model of the calibration plate in the image.
disp_caltab( : : WindowHandle, CalPlateDescr, CameraParam, CalPlatePose, ScaleFac : )
disp_caltab is used to visualize the calibration marks and the connecting lines between the marks of the used calibration plate (CalPlateDescr) in the window specified by WindowHandle. Additionally, the x- and y-axes of the plate's coordinate 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 (CameraParam) and external camera parameters (CalPlatePose, i.e., the pose of the calibration plate in camera coordinates). The underlying camera model is described in calibrate_cameras.
Typically, disp_caltab is used to verify the result of the camera calibration (see calibrate_cameras or 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).
Window in which the calibration plate should be visualized.
File name of the calibration plate description.
Default value: 'calplate.cpd'
List of values: 'calplate.cpd' , 'calplate_20mm.cpd' , 'calplate_40mm.cpd' , 'calplate_80mm.cpd' , 'caltab.descr' , 'caltab_160mm.cpd'
File extension: .cpd, .descr
Internal camera parameters.
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 image of calibration plate. read_image (Image, 'calib/calib_single_camera_01') get_image_size (Image, Width, Height) * Create and setup the calibration model. create_calib_data ('calibration_object', 1, 1, CalibDataID) CalPlateDescr := 'calplate_80mm.cpd' set_calib_data_calib_object (CalibDataID, 0, CalPlateDescr) CamParam := ['area_scan_division', 0.008, -1500, 3.7e-6, 3.7e-6, \ 640, 470, 1292, 964] set_calib_data_cam_param (CalibDataID, 0, [], CamParam) * Localize calibration plate in the image. find_calib_object (Image, CalibDataID, 0, 0, 0, [], []) get_calib_data_observ_pose (CalibDataID, 0, 0, 0, StartPose) * Display calibration plate. disp_caltab (WindowHandle, CalPlateDescr, CamParam, StartPose, 1)
disp_caltab returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.
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
Operators |