disp_caltabT_disp_caltabDispCaltabDispCaltabdisp_caltab (算子)
名称
disp_caltabT_disp_caltabDispCaltabDispCaltabdisp_caltab — 在图像中投影和可视化标定板的三维模型。
签名
void DispCaltab(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)
static void HOperatorSet.DispCaltab(HTuple windowHandle, HTuple calPlateDescr, HTuple cameraParam, HTuple calPlatePose, HTuple scaleFac)
void HWindow.DispCaltab(string calPlateDescr, HCamPar cameraParam, HPose calPlatePose, double scaleFac)
void HCamPar.DispCaltab(HWindow windowHandle, string calPlateDescr, HPose calPlatePose, double scaleFac)
描述
disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab is used to visualize the calibration marks and
the connecting lines between the marks of the used calibration plate
(CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr) in the window specified by
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_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 (CameraParamCameraParamCameraParamCameraParamcameraParamcamera_param) and external
camera parameters (CalPlatePoseCalPlatePoseCalPlatePoseCalPlatePosecalPlatePosecal_plate_pose). Thereby the pose is in the form
, where
ccs denotes the camera coordinate system and
wcs the world coordinate system (see
Transformations / Poses
and “Solution Guide III-C - 3D Vision”), thus
the pose of the calibration plate in camera coordinates.
The underlying camera model is described in
标定。
Typically, disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab is used to verify the result of the
camera calibration (see 标定 or
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration) by superimposing it onto the original
image. The current line width can be set by set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width,
the current color can be set by set_colorset_colorSetColorSetColorSetColorset_color。Additionally, the
font type of the labels of the coordinate axes can be set by
set_fontset_fontSetFontSetFontSetFontset_font。
The parameter ScaleFacScaleFacScaleFacScaleFacscaleFacscale_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_partset_partSetPartSetPartSetPartset_part).
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Window in which the calibration plate should be
visualized.
CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr (输入控制) filename.read → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
File name of the calibration plate description.
默认值:
'calplate_320.cpd'
"calplate_320.cpd"
"calplate_320.cpd"
"calplate_320.cpd"
"calplate_320.cpd"
"calplate_320.cpd"
值列表:
'calplate_10mm.cpd'"calplate_10mm.cpd""calplate_10mm.cpd""calplate_10mm.cpd""calplate_10mm.cpd""calplate_10mm.cpd", 'calplate_1200mm.cpd'"calplate_1200mm.cpd""calplate_1200mm.cpd""calplate_1200mm.cpd""calplate_1200mm.cpd""calplate_1200mm.cpd", 'calplate_160mm.cpd'"calplate_160mm.cpd""calplate_160mm.cpd""calplate_160mm.cpd""calplate_160mm.cpd""calplate_160mm.cpd", 'calplate_20mm.cpd'"calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd", 'calplate_20mm_dark_on_light.cpd'"calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd", 'calplate_320mm.cpd'"calplate_320mm.cpd""calplate_320mm.cpd""calplate_320mm.cpd""calplate_320mm.cpd""calplate_320mm.cpd", 'calplate_40mm.cpd'"calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd", 'calplate_40mm_dark_on_light.cpd'"calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd", 'calplate_5mm.cpd'"calplate_5mm.cpd""calplate_5mm.cpd""calplate_5mm.cpd""calplate_5mm.cpd""calplate_5mm.cpd", 'calplate_640mm.cpd'"calplate_640mm.cpd""calplate_640mm.cpd""calplate_640mm.cpd""calplate_640mm.cpd""calplate_640mm.cpd", 'calplate_80mm.cpd'"calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd", 'calplate_80mm_dark_on_light.cpd'"calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd", 'caltab_100mm.descr'"caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr", 'caltab_10mm.descr'"caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr", 'caltab_200mm.descr'"caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr", 'caltab_2500um.descr'"caltab_2500um.descr""caltab_2500um.descr""caltab_2500um.descr""caltab_2500um.descr""caltab_2500um.descr", 'caltab_30mm.descr'"caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr", 'caltab_650um.descr'"caltab_650um.descr""caltab_650um.descr""caltab_650um.descr""caltab_650um.descr""caltab_650um.descr", 'caltab_6mm.descr'"caltab_6mm.descr""caltab_6mm.descr""caltab_6mm.descr""caltab_6mm.descr""caltab_6mm.descr", 'caltab_800mm.descr'"caltab_800mm.descr""caltab_800mm.descr""caltab_800mm.descr""caltab_800mm.descr""caltab_800mm.descr", 'caltab_big.descr'"caltab_big.descr""caltab_big.descr""caltab_big.descr""caltab_big.descr""caltab_big.descr", 'caltab_small.descr'"caltab_small.descr""caltab_small.descr""caltab_small.descr""caltab_small.descr""caltab_small.descr"
File extension:
.cpd, .descr
CameraParamCameraParamCameraParamCameraParamcameraParamcamera_param (输入控制) campar → HCamPar, HTupleSequence[Union[int, float, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Internal camera parameters.
CalPlatePoseCalPlatePoseCalPlatePoseCalPlatePosecalPlatePosecal_plate_pose (输入控制) pose → HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
External camera parameters (3D pose of the calibration
plate in camera coordinates).
元素数量:
7
ScaleFacScaleFacScaleFacScaleFacscaleFacscale_fac (输入控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Scaling factor for the visualization.
默认值:
1.0
建议值:
0.5, 1.0, 2.0, 3.0
建议增量:
0.05
限制:
0.0 < ScaleFac
示例(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)
结果
disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab returns 2 (
H_MSG_TRUE)
if all parameter values are
correct。如有必要,则抛出异常。
可能的前趋
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration,
read_cam_parread_cam_parReadCamParReadCamParReadCamParread_cam_par,
read_poseread_poseReadPoseReadPoseReadPoseread_pose
另见
find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose,
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration,
sim_caltabsim_caltabSimCaltabSimCaltabSimCaltabsim_caltab,
write_cam_parwrite_cam_parWriteCamParWriteCamParWriteCamParwrite_cam_par,
read_cam_parread_cam_parReadCamParReadCamParReadCamParread_cam_par,
create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose,
write_posewrite_poseWritePoseWritePoseWritePosewrite_pose,
read_poseread_poseReadPoseReadPoseReadPoseread_pose,
project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPointproject_3d_point,
get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSightget_line_of_sight
模块
基础