Skip to content

disp_caltabdisp_caltabDispCaltabDispCaltabdisp_caltabT_disp_caltabπŸ”—

Short descriptionπŸ”—

disp_caltabdisp_caltabDispCaltabDispCaltabdisp_caltabT_disp_caltab β€” Project and visualize the 3D model of the calibration plate in the image.

SignatureπŸ”—

disp_caltab( window WindowHandle, filename.read CalPlateDescr, campar CameraParam, pose CalPlatePose, real ScaleFac )disp_caltab( : : WindowHandle, CalPlateDescr, CameraParam, CalPlatePose, ScaleFac : )void DispCaltab( const HTuple& WindowHandle, const HTuple& CalPlateDescr, const HTuple& CameraParam, const HTuple& CalPlatePose, const HTuple& ScaleFac )static void HOperatorSet.DispCaltab( HTuple windowHandle, HTuple calPlateDescr, HTuple cameraParam, HTuple calPlatePose, HTuple scaleFac )def disp_caltab( window_handle: HHandle, cal_plate_descr: str, camera_param: Sequence[Union[int, float, str]], cal_plate_pose: Sequence[Union[int, float]], scale_fac: float ) -> None

Herror T_disp_caltab( const Htuple WindowHandle, const Htuple CalPlateDescr, const Htuple CameraParam, const Htuple CalPlatePose, const Htuple ScaleFac )

void HWindow::DispCaltab( const HString& CalPlateDescr, const HCamPar& CameraParam, const HPose& CalPlatePose, double ScaleFac ) const

void HWindow::DispCaltab( const char* CalPlateDescr, const HCamPar& CameraParam, const HPose& CalPlatePose, double ScaleFac ) const

void HWindow::DispCaltab( const wchar_t* CalPlateDescr, const HCamPar& CameraParam, const HPose& CalPlatePose, double ScaleFac ) const (Windows only)

void HCamPar::DispCaltab( const HWindow& WindowHandle, const HString& CalPlateDescr, const HPose& CalPlatePose, double ScaleFac ) const

void HCamPar::DispCaltab( const HWindow& WindowHandle, const char* CalPlateDescr, const HPose& CalPlatePose, double ScaleFac ) const

void HCamPar::DispCaltab( const HWindow& WindowHandle, const wchar_t* CalPlateDescr, const HPose& CalPlatePose, double ScaleFac ) const (Windows only)

void HWindow.DispCaltab( string calPlateDescr, HCamPar cameraParam, HPose calPlatePose, double scaleFac )

void HCamPar.DispCaltab( HWindow windowHandle, string calPlateDescr, HPose calPlatePose, double scaleFac )

DescriptionπŸ”—

disp_caltabDispCaltab is used to visualize the calibration marks and the connecting lines between the marks of the used calibration plate (CalPlateDescrcalPlateDescrcal_plate_descr) in the window specified by WindowHandlewindowHandlewindow_handle. 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 (CameraParamcameraParamcamera_param) and external camera parameters (CalPlatePosecalPlatePosecal_plate_pose). Thereby the pose is in the form \(\mvPoseVar{{ccs}}{wcs}\), where ccs denotes the camera coordinate system and wcs the world coordinate system (see [``Solving machine vision tasks > Machine vision basics

Transformations > 3D Transformationsβ€™β€˜](https://docs.mvtec.com/hdevelopevo/26.11/content/mvtasks/machine_vision_basics/transformations/3d/index.html), thus the pose of the calibration plate in camera coordinates. The underlying camera model is described in Calibration.

Typically, disp_caltabDispCaltab is used to verify the result of the camera calibration (see Calibration or camera_calibrationCameraCalibration) by superimposing it onto the original image. The current line width can be set by set_line_widthSetLineWidth, the current color can be set by set_colorSetColor. Additionally, the font type of the labels of the coordinate axes can be set by set_fontSetFont.

The parameter ScaleFacscaleFacscale_fac 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_partSetPart).

Execution informationπŸ”—

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πŸ”—

WindowHandlewindowHandlewindow_handle (input_control) window β†’ (handle)(handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

Window in which the calibration plate should be visualized.

CalPlateDescrcalPlateDescrcal_plate_descr (input_control) filename.read β†’ (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

File name of the calibration plate description.

Default: 'calplate_320.cpd'"calplate_320.cpd"
List of values: 'calplate_10mm.cpd', 'calplate_1200mm.cpd', 'calplate_160mm.cpd', 'calplate_20mm.cpd', 'calplate_20mm_dark_on_light.cpd', 'calplate_320mm.cpd', 'calplate_40mm.cpd', 'calplate_40mm_dark_on_light.cpd', 'calplate_5mm.cpd', 'calplate_640mm.cpd', 'calplate_80mm.cpd', 'calplate_80mm_dark_on_light.cpd', 'caltab_100mm.descr', 'caltab_10mm.descr', 'caltab_200mm.descr', 'caltab_2500um.descr', 'caltab_30mm.descr', 'caltab_650um.descr', 'caltab_6mm.descr', 'caltab_800mm.descr', 'caltab_big.descr', 'caltab_small.descr'"calplate_10mm.cpd", "calplate_1200mm.cpd", "calplate_160mm.cpd", "calplate_20mm.cpd", "calplate_20mm_dark_on_light.cpd", "calplate_320mm.cpd", "calplate_40mm.cpd", "calplate_40mm_dark_on_light.cpd", "calplate_5mm.cpd", "calplate_640mm.cpd", "calplate_80mm.cpd", "calplate_80mm_dark_on_light.cpd", "caltab_100mm.descr", "caltab_10mm.descr", "caltab_200mm.descr", "caltab_2500um.descr", "caltab_30mm.descr", "caltab_650um.descr", "caltab_6mm.descr", "caltab_800mm.descr", "caltab_big.descr", "caltab_small.descr"
File extension: .cpd, .descr

CameraParamcameraParamcamera_param (input_control) campar β†’ (real / integer / string)(real / integer / string)HTuple (double / Hlong / HString)HCamPar, HTuple (double / int / long / string)Sequence[Union[int, float, str]]Htuple (double / Hlong / char*)

Internal camera parameters.

CalPlatePosecalPlatePosecal_plate_pose (input_control) pose β†’ (real / integer)(real / integer)HTuple (double / Hlong)HPose, HTuple (double / int / long)Sequence[Union[int, float]]Htuple (double / Hlong)

External camera parameters (3D pose of the calibration plate in camera coordinates).

Number of elements: 7

ScaleFacscaleFacscale_fac (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Scaling factor for the visualization.

Default: 1.01.0
Suggested values: 0.5, 1.0, 2.0, 3.00.5, 1.0, 2.0, 3.0
Recommended increment: 0.05
Restriction: 0.0 < ScaleFac

ExampleπŸ”—

(HDevelop)


* 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)

ResultπŸ”—

disp_caltabDispCaltab returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

camera_calibrationCameraCalibration, read_cam_parReadCamPar, read_poseReadPose

See also

find_marks_and_poseFindMarksAndPose, camera_calibrationCameraCalibration, sim_caltabSimCaltab, write_cam_parWriteCamPar, read_cam_parReadCamPar, create_poseCreatePose, write_poseWritePose, read_poseReadPose, project_3d_pointProject3dPoint, get_line_of_sightGetLineOfSight

ModuleπŸ”—

Foundation