caltab_pointsT_caltab_pointsCaltabPointsCaltabPointscaltab_points标定表点(算子)

名称

caltab_pointsT_caltab_pointsCaltabPointsCaltabPointscaltab_points — 从标定板描述文件中读取标记中心点。

签名

caltab_points( : : CalPlateDescr : X, Y, Z)

Herror T_caltab_points(const Htuple CalPlateDescr, Htuple* X, Htuple* Y, Htuple* Z)

void CaltabPoints(const HTuple& CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z)

static void HMisc::CaltabPoints(const HString& CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z)

static void HMisc::CaltabPoints(const char* CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z)

static void HMisc::CaltabPoints(const wchar_t* CalPlateDescr, HTuple* X, HTuple* Y, HTuple* Z)   ( Windows only)

static void HOperatorSet.CaltabPoints(HTuple calPlateDescr, out HTuple x, out HTuple y, out HTuple z)

static void HMisc.CaltabPoints(string calPlateDescr, out HTuple x, out HTuple y, out HTuple z)

def caltab_points(cal_plate_descr: str) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]

描述

caltab_pointscaltab_pointsCaltabPointsCaltabPointsCaltabPointscaltab_points 从标定板描述文件 CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr 中读取标记中心点(矩形排列标记的标定板请参见 gen_caltabgen_caltabGenCaltabGenCaltabGenCaltabgen_caltab,六边形排列标记的标定板请参见 create_caltabcreate_caltabCreateCaltabCreateCaltabCreateCaltabcreate_caltab ),并返回其 XXXXxxYYYYyyZZZZzz 坐标。标记中心点是标定板坐标系中的三维坐标,用于描述标定板的三维模型。对于矩形排列标记的标定板,其坐标系位于标定板表面中央;对于六边形排列标记的标定板,其坐标系位于首个查找器图案中央标记的中心点。该坐标系的 z 轴指向标定板内部,x 轴指向右侧,y 轴指向下方。

标记中心点通常作为 camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration 算子的输入参数。

执行信息

参数

CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr (输入控制)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

标定板描述的文件名。

默认值: 'calplate_320mm.cpd' "calplate_320mm.cpd" "calplate_320mm.cpd" "calplate_320mm.cpd" "calplate_320mm.cpd" "calplate_320mm.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"

文件扩展名: .cpd, .descr

XXXXxx (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

标定板坐标系中标记中心点的 X 坐标。

YYYYyy (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

标定板坐标系中标记中心点的 Y 坐标。

ZZZZzz (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

标定板坐标系中标记中心点的 Z 坐标。

示例(HDevelop)

* Read calibration image.
read_image(Image, 'calib/calib-3d-coord-03')
CalTabDescr := 'caltab_100mm.descr'
* Find calibration pattern.
find_caltab(Image, CalPlate1, CalTabDescr, 3, 112, 5)
* Find calibration marks and start poses.
StartCamPar := ['area_scan_division', 0.008, 0.0, 0.000011, 0.000011, \
                384, 288, 768, 576]
find_marks_and_pose(Image,CalPlate1,CalTabDescr, StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* Read 3D positions of calibration marks.
caltab_points(CalTabDescr, NX, NY, NZ)
*  Calibrate camera.
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  Visualize calibration result.
dev_display(Image)
disp_caltab(WindowHandle, CalTabDescr, CameraParam, FinalPose, 1.0)

示例(HDevelop)

* Read calibration image.
read_image(Image, 'calib/calib-3d-coord-03')
CalTabDescr := 'caltab_100mm.descr'
* Find calibration pattern.
find_caltab(Image, CalPlate1, CalTabDescr, 3, 112, 5)
* Find calibration marks and start poses.
StartCamPar := ['area_scan_division', 0.008, 0.0, 0.000011, 0.000011, \
                384, 288, 768, 576]
find_marks_and_pose(Image,CalPlate1,CalTabDescr, StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* Read 3D positions of calibration marks.
caltab_points(CalTabDescr, NX, NY, NZ)
*  Calibrate camera.
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  Visualize calibration result.
dev_display(Image)
disp_caltab(WindowHandle, CalTabDescr, CameraParam, FinalPose, 1.0)

示例(HDevelop)

* Read calibration image.
read_image(Image, 'calib/calib-3d-coord-03')
CalTabDescr := 'caltab_100mm.descr'
* Find calibration pattern.
find_caltab(Image, CalPlate1, CalTabDescr, 3, 112, 5)
* Find calibration marks and start poses.
StartCamPar := ['area_scan_division', 0.008, 0.0, 0.000011, 0.000011, \
                384, 288, 768, 576]
find_marks_and_pose(Image,CalPlate1,CalTabDescr, StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* Read 3D positions of calibration marks.
caltab_points(CalTabDescr, NX, NY, NZ)
*  Calibrate camera.
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  Visualize calibration result.
dev_display(Image)
disp_caltab(WindowHandle, CalTabDescr, CameraParam, FinalPose, 1.0)

示例(HDevelop)

* Read calibration image.
read_image(Image, 'calib/calib-3d-coord-03')
CalTabDescr := 'caltab_100mm.descr'
* Find calibration pattern.
find_caltab(Image, CalPlate1, CalTabDescr, 3, 112, 5)
* Find calibration marks and start poses.
StartCamPar := ['area_scan_division', 0.008, 0.0, 0.000011, 0.000011, \
                384, 288, 768, 576]
find_marks_and_pose(Image,CalPlate1,CalTabDescr, StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* Read 3D positions of calibration marks.
caltab_points(CalTabDescr, NX, NY, NZ)
*  Calibrate camera.
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  Visualize calibration result.
dev_display(Image)
disp_caltab(WindowHandle, CalTabDescr, CameraParam, FinalPose, 1.0)

示例(HDevelop)

* Read calibration image.
read_image(Image, 'calib/calib-3d-coord-03')
CalTabDescr := 'caltab_100mm.descr'
* Find calibration pattern.
find_caltab(Image, CalPlate1, CalTabDescr, 3, 112, 5)
* Find calibration marks and start poses.
StartCamPar := ['area_scan_division', 0.008, 0.0, 0.000011, 0.000011, \
                384, 288, 768, 576]
find_marks_and_pose(Image,CalPlate1,CalTabDescr, StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* Read 3D positions of calibration marks.
caltab_points(CalTabDescr, NX, NY, NZ)
*  Calibrate camera.
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  Visualize calibration result.
dev_display(Image)
disp_caltab(WindowHandle, CalTabDescr, CameraParam, FinalPose, 1.0)

结果

caltab_pointscaltab_pointsCaltabPointsCaltabPointsCaltabPointscaltab_points 返回 2 (H_MSG_TRUE) 在所有参数值正确且文件 CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr 已成功读取时。如有必要,则抛出异常。

可能的后继

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration

另见

find_caltabfind_caltabFindCaltabFindCaltabFindCaltabfind_caltab, find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration, disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltabdisp_caltab, sim_caltabsim_caltabSimCaltabSimCaltabSimCaltabsim_caltab, project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPointproject_3d_point, get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSightget_line_of_sight, gen_caltabgen_caltabGenCaltabGenCaltabGenCaltabgen_caltab

模块

基础