ClassesClassesClassesClasses | | | | Operators

caltab_pointsT_caltab_pointsCaltabPointscaltab_pointsCaltabPointsCaltabPoints (Operator)

Name

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

Signature

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

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

Herror caltab_points(const HTuple& CalTabDescrFile, HTuple* X, HTuple* Y, HTuple* Z)

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

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

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

void HOperatorSetX.CaltabPoints(
[in] VARIANT CalTabDescrFile, [out] VARIANT* X, [out] VARIANT* Y, [out] VARIANT* Z)

VARIANT HMiscX.CaltabPoints(
[in] BSTR CalTabDescrFile, [out] VARIANT* Y, [out] VARIANT* Z)

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

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

Description

caltab_pointscaltab_pointsCaltabPointscaltab_pointsCaltabPointsCaltabPoints reads the mark center points from the calibration plate description file CalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFilecalTabDescrFile (see gen_caltabgen_caltabGenCaltabgen_caltabGenCaltabGenCaltab) and returns their coordinates in XXXXXx, YYYYYy and ZZZZZz. 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, its z-axis points into the calibration plate, its x-axis to the right, and it y-axis downwards.

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

Parallelization

Parameters

CalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFilecalTabDescrFile (input_control)  filename.read HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

File name of the calibration plate description.

Default value: 'caltab.descr' "caltab.descr" "caltab.descr" "caltab.descr" "caltab.descr" "caltab.descr"

List of values: 'caltab.descr'"caltab.descr""caltab.descr""caltab.descr""caltab.descr""caltab.descr", '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_30mm.descr'"caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr"

File extension: .descr

XXXXXx (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

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

YYYYYy (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

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

ZZZZZz (output_control)  real-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

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

Example (HDevelop)

* read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [0.008, 0.0, 0.000011, 0.000011, 384, 288, 768, 576]
find_marks_and_pose(Image1,Caltab1,'caltab.descr', StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
*  camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)

Example (HDevelop)

* read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [0.008, 0.0, 0.000011, 0.000011, 384, 288, 768, 576]
find_marks_and_pose(Image1,Caltab1,'caltab.descr', StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
*  camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)

Example (HDevelop)

* read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [0.008, 0.0, 0.000011, 0.000011, 384, 288, 768, 576]
find_marks_and_pose(Image1,Caltab1,'caltab.descr', StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
*  camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)

Example (C++ (HALCON 5.0-10.0))

HTuple StartCamPar, NX, NY, NZ;
HTuple RCoord1, CCoord1, StartPose1;
HTuple StartPose, CameraParam, FinalPose, Errors;
// read calibration image
HImage Image1("calib-01");
// find calibration pattern
HRegion Caltab1 = Image1.FindCaltab("caltab.descr", 3, 112, 5);
// find calibration marks and start pose
StartCamPar[7] = 576;          // ImageHeight
StartCamPar[6] = 768;          // ImageWidth
StartCamPar[5] = 288;          // Cy
StartCamPar[4] = 384;          // Cx
StartCamPar[3] = 0.000011;     // Sy
StartCamPar[2] = 0.000011;     // Sx
StartCamPar[1] = 0.0;          // Kappa
StartCamPar[0] = 0.008;        // Focus
RCoord1 = Image1.FindMarksAndPose(Caltab1, "caltab.descr", StartCamPar,
                                  128, 10, &CCoord1, &StartPose);
// read 3D positions of calibration marks
caltab_points("caltab.descr", &NX, &NY, &NZ);
// camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, StartPose,
                   11, &CameraParam, &FinalPose, &Errors);
// visualize calibration result
disp_image(Image1, WindowHandle);
set_color(WindowHandle, "red");
disp_caltab(WindowHandle, "caltab.descr", CameraParam, FinalPose, 1.0);

Example (HDevelop)

* read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [0.008, 0.0, 0.000011, 0.000011, 384, 288, 768, 576]
find_marks_and_pose(Image1,Caltab1,'caltab.descr', StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
*  camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)

Example (HDevelop)

* read_image(Image1, 'calib-01')
* find calibration pattern
find_caltab(Image1, Caltab1, 'caltab.descr', 3, 112, 5)
* find calibration marks and start poses
StartCamPar := [0.008, 0.0, 0.000011, 0.000011, 384, 288, 768, 576]
find_marks_and_pose(Image1,Caltab1,'caltab.descr', StartCamPar, \
                    128, 10, 18, 0.9, 15.0, 100.0, RCoord1, CCoord1, \
                    StartPose1)
* read 3D positions of calibration marks
caltab_points('caltab.descr', NX, NY, NZ)
*  camera calibration
camera_calibration(NX, NY, NZ, RCoord1, CCoord1, StartCamPar, \
                   StartPose1, 'all', CameraParam, FinalPose, Errors)
*  visualize calibration result
disp_image(Image1, WindowHandle)
set_color(WindowHandle, 'red')
disp_caltab(WindowHandle, 'caltab.descr', CameraParam, FinalPose, 1.0)

Result

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

Possible Successors

camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration

See also

find_caltabfind_caltabFindCaltabfind_caltabFindCaltabFindCaltab, find_marks_and_posefind_marks_and_poseFindMarksAndPosefind_marks_and_poseFindMarksAndPoseFindMarksAndPose, camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration, disp_caltabdisp_caltabDispCaltabdisp_caltabDispCaltabDispCaltab, sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab, project_3d_pointproject_3d_pointProject3dPointproject_3d_pointProject3dPointProject3dPoint, get_line_of_sightget_line_of_sightGetLineOfSightget_line_of_sightGetLineOfSightGetLineOfSight, gen_caltabgen_caltabGenCaltabgen_caltabGenCaltabGenCaltab

Module

Foundation


ClassesClassesClassesClasses | | | | Operators