HALCON Reference Manual 10.0.2
Table of Contents / Calibration / Calibration Object ClassesClassesClasses | | | Operators

caltab_pointsT_caltab_pointscaltab_pointsCaltabPointsCaltabPoints (Operator)

Name

caltab_pointsT_caltab_pointscaltab_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 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_pointscaltab_pointsCaltabPointsCaltabPoints reads the mark center points from the calibration plate description file CalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFilecalTabDescrFile (see gen_caltabgen_caltabgen_caltabGenCaltabGenCaltab) 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, 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_calibrationcamera_calibrationCameraCalibrationCameraCalibration.

Parallelization

Parameters

CalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFilecalTabDescrFile (input_control)  filename.read HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

File name of the calibration plate description.

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

List of values: 'caltab.descr'"caltab.descr""caltab.descr""caltab.descr""caltab.descr", 'caltab_10mm.descr'"caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr", 'caltab_30mm.descr'"caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr", 'caltab_100mm.descr'"caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr", 'caltab_200mm.descr'"caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr"

File extension: .descr

XXXXx (output_control)  real-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

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

YYYYy (output_control)  real-array HTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double)

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

ZZZZz (output_control)  real-array HTupleHTupleVARIANTHtuple (real) (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 (C++)

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_pointscaltab_pointsCaltabPointsCaltabPoints returns 2 (H_MSG_TRUE) if all parameter values are correct and the file CalTabDescrFileCalTabDescrFileCalTabDescrFileCalTabDescrFilecalTabDescrFile has been read successfully. If necessary, an exception is raised.

Possible Successors

camera_calibrationcamera_calibrationcamera_calibrationCameraCalibrationCameraCalibration

See also

find_caltabfind_caltabfind_caltabFindCaltabFindCaltab, find_marks_and_posefind_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPose, camera_calibrationcamera_calibrationcamera_calibrationCameraCalibrationCameraCalibration, disp_caltabdisp_caltabdisp_caltabDispCaltabDispCaltab, sim_caltabsim_caltabsim_caltabSimCaltabSimCaltab, project_3d_pointproject_3d_pointproject_3d_pointProject3dPointProject3dPoint, get_line_of_sightget_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSight, gen_caltabgen_caltabgen_caltabGenCaltabGenCaltab

Module

Foundation


Table of Contents / Calibration / Calibration Object ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH