caltab_pointsT_caltab_pointsCaltabPointsCaltabPointscaltab_points (Operator)

Name

caltab_pointsT_caltab_pointsCaltabPointsCaltabPointscaltab_points — Read the mark center points from the calibration plate description file.

Signature

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]]

Description

caltab_pointscaltab_pointsCaltabPointsCaltabPointscaltab_points reads the mark center points from the calibration plate description file CalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr (see gen_caltabgen_caltabGenCaltabGenCaltabgen_caltab for calibration plates with rectangularly arranged marks and create_caltabcreate_caltabCreateCaltabCreateCaltabcreate_caltab for calibration plates with hexagonally arranged marks) and returns their coordinates in XXXxx, YYYyy and ZZZzz. The mark center points are 3D coordinates in the calibration plate coordinate system and describe the 3D model of the calibration plate. The calibration plate coordinate system is located in the middle of the surface of the calibration plate for calibration plates with rectangularly arranged marks and at the center of the central mark of the first finder pattern for calibration plates with hexagonally arranged marks. Its z-axis points into the calibration plate, its x-axis to the right, and its y-axis downwards.

The mark center points are typically used as input parameters for the operator camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration.

Execution Information

Parameters

CalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr (input_control)  filename.read HTuplestrHTupleHtuple (string) (string) (HString) (char*)

File name of the calibration plate description.

Default: 'calplate_320mm.cpd' "calplate_320mm.cpd" "calplate_320mm.cpd" "calplate_320mm.cpd" "calplate_320mm.cpd"

List of values: '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_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_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_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_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_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", '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_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_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_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_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"

File extension: .cpd, .descr

XXXxx (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

X coordinates of the mark center points in the coordinate system of the calibration plate.

YYYyy (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Y coordinates of the mark center points in the coordinate system of the calibration plate.

ZZZzz (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Z coordinates of the mark center points in the coordinate system of the calibration plate.

Example (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)

Example (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)

Example (C++)

HTuple StartCamPar, NX, NY, NZ;
HTuple RCoord, CCoord, StartPose;
HTuple StartPose, CameraParam, FinalPose, Errors;
// Read calibration image.
HImage Image("calib/calib-3d-coord-03");
// Find calibration pattern.
HRegion CalPlate1 = Image.FindCaltab("caltab_100mm.descr", 3, 112, 5);
// Find calibration marks and start pose.
StartCamPar[8] = 576;                  // ImageHeight
StartCamPar[7] = 768;                  // ImageWidth
StartCamPar[6] = 288;                  // Cy
StartCamPar[5] = 384;                  // Cx
StartCamPar[4] = 0.000011;             // Sy
StartCamPar[3] = 0.000011;             // Sx
StartCamPar[2] = 0.0;                  // Kappa
StartCamPar[1] = 0.008;                // Focus
StartCamPar[0] = "area_scan_division"; // CameraType
RCoord = Image.FindMarksAndPose(CalPlate, "caltab_100mm.descr", StartCamPar,
                                  128, 10, &CCoord, &StartPose);
// Read 3D positions of calibration marks.
caltab_points("caltab_100mm.descr", &NX, &NY, &NZ);
// Calibrate camera.
camera_calibration(NX, NY, NZ, RCoord, CCoord, StartCamPar, StartPose,
                   11, &CameraParam, &FinalPose, &Errors);
// Visualize calibration result.
disp_image(Image, WindowHandle);
disp_caltab(WindowHandle, "caltab_100mm.descr, CameraParam, FinalPose, 1.0);

Example (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)

Result

caltab_pointscaltab_pointsCaltabPointsCaltabPointscaltab_points returns 2 ( H_MSG_TRUE) if all parameter values are correct and the file CalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescrcal_plate_descr has been read successfully. If necessary, an exception is raised.

Possible Successors

camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration

See also

find_caltabfind_caltabFindCaltabFindCaltabfind_caltab, find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPosefind_marks_and_pose, camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationcamera_calibration, disp_caltabdisp_caltabDispCaltabDispCaltabdisp_caltab, sim_caltabsim_caltabSimCaltabSimCaltabsim_caltab, project_3d_pointproject_3d_pointProject3dPointProject3dPointproject_3d_point, get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightget_line_of_sight, gen_caltabgen_caltabGenCaltabGenCaltabgen_caltab

Module

Foundation