ClassesClassesClassesClasses | | | | Operators

create_caltabcreate_caltabCreateCaltabcreate_caltabCreateCaltabCreateCaltab (Operator)

Name

create_caltabcreate_caltabCreateCaltabcreate_caltabCreateCaltabCreateCaltab — Generate a calibration plate description file and a corresponding PostScript file for a calibration plate with hexagonally arranged marks.

Signature

create_caltab( : : NumRows, MarksPerRow, Diameter, FinderRow, FinderColumn, Polarity, CalPlateDescr, CalPlatePSFile : )

Herror create_caltab(const Hlong NumRows, const Hlong MarksPerRow, double Diameter, const Hlong FinderRow, const Hlong FinderColumn, const char* Polarity, const char* CalPlateDescr, const char* CalPlatePSFile)

Herror T_create_caltab(const Htuple NumRows, const Htuple MarksPerRow, const Htuple Diameter, const Htuple FinderRow, const Htuple FinderColumn, const Htuple Polarity, const Htuple CalPlateDescr, const Htuple CalPlatePSFile)

Herror create_caltab(const HTuple& NumRows, const HTuple& MarksPerRow, const HTuple& Diameter, const HTuple& FinderRow, const HTuple& FinderColumn, const HTuple& Polarity, const HTuple& CalPlateDescr, const HTuple& CalPlatePSFile)

void CreateCaltab(const HTuple& NumRows, const HTuple& MarksPerRow, const HTuple& Diameter, const HTuple& FinderRow, const HTuple& FinderColumn, const HTuple& Polarity, const HTuple& CalPlateDescr, const HTuple& CalPlatePSFile)

static void HMisc::CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, const HTuple& FinderRow, const HTuple& FinderColumn, const HString& Polarity, const HString& CalPlateDescr, const HString& CalPlatePSFile)

static void HMisc::CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, Hlong FinderRow, Hlong FinderColumn, const HString& Polarity, const HString& CalPlateDescr, const HString& CalPlatePSFile)

static void HMisc::CreateCaltab(Hlong NumRows, Hlong MarksPerRow, double Diameter, Hlong FinderRow, Hlong FinderColumn, const char* Polarity, const char* CalPlateDescr, const char* CalPlatePSFile)

void HOperatorSetX.CreateCaltab(
[in] VARIANT NumRows, [in] VARIANT MarksPerRow, [in] VARIANT Diameter, [in] VARIANT FinderRow, [in] VARIANT FinderColumn, [in] VARIANT Polarity, [in] VARIANT CalPlateDescr, [in] VARIANT CalPlatePSFile)

void HMiscX.CreateCaltab(
[in] Hlong NumRows, [in] Hlong MarksPerRow, [in] double Diameter, [in] VARIANT FinderRow, [in] VARIANT FinderColumn, [in] BSTR Polarity, [in] BSTR CalPlateDescr, [in] BSTR CalPlatePSFile)

static void HOperatorSet.CreateCaltab(HTuple numRows, HTuple marksPerRow, HTuple diameter, HTuple finderRow, HTuple finderColumn, HTuple polarity, HTuple calPlateDescr, HTuple calPlatePSFile)

static void HMisc.CreateCaltab(int numRows, int marksPerRow, double diameter, HTuple finderRow, HTuple finderColumn, string polarity, string calPlateDescr, string calPlatePSFile)

static void HMisc.CreateCaltab(int numRows, int marksPerRow, double diameter, int finderRow, int finderColumn, string polarity, string calPlateDescr, string calPlatePSFile)

Description

create_caltabcreate_caltabCreateCaltabcreate_caltabCreateCaltabCreateCaltab creates the description file of a standard HALCON calibration plate with hexagonally arranged marks. This calibration plate contains MarksPerRowMarksPerRowMarksPerRowMarksPerRowMarksPerRowmarksPerRow times NumRowsNumRowsNumRowsNumRowsNumRowsnumRows circular marks. These marks are arranged in a hexagonal lattice such that each mark (except the ones at the border) has six equidistant neighbors.

image/svg+xml
A standard HALCON calibration plate with hexagonally arranged marks and its coordinate system

The diameter of the marks is given by the parameter DiameterDiameterDiameterDiameterDiameterdiameter in meters. The distance between the centers of horizontally neighboring calibration marks is given by . The distance between neighboring rows of calibration marks is given by .

The calibration plate contains one to five finder patterns. A finder pattern is a special mark hexagon (i.e. a mark and its six neighbors) where either four or six marks contain a hole. Each of these up to five finder patterns is unique such that it can be used to determine the orientation of the calibration plate and the position of the finder pattern on the calibration plate. As a consequence, the calibration plate can only be found by find_calib_objectfind_calib_objectFindCalibObjectfind_calib_objectFindCalibObjectFindCalibObject if at least one of these finder patterns is completely visible. The position of the central mark of each finder pattern is given in FinderRowFinderRowFinderRowFinderRowFinderRowfinderRow and FinderColumnFinderColumnFinderColumnFinderColumnFinderColumnfinderColumn. Thus, the length of the tuples given in FinderRowFinderRowFinderRowFinderRowFinderRowfinderRow and FinderColumnFinderColumnFinderColumnFinderColumnFinderColumnfinderColumn, respectively determine the number of finder patterns on the calibration plate. Be aware that two finder patterns must not overlap.

The coordinate system of the calibration plate is located at the center of the central mark of the first finder pattern.

Depending on PolarityPolarityPolarityPolarityPolaritypolarity the marks are either light on dark background (for 'light_on_dark'"light_on_dark""light_on_dark""light_on_dark""light_on_dark""light_on_dark", which is the default) or dark on light background (for 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light""dark_on_light").

The file CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescr contains the calibration plate description, and must be passed to all HALCON operations using the generated calibration plate (e.g. set_calib_data_calib_objectset_calib_data_calib_objectSetCalibDataCalibObjectset_calib_data_calib_objectSetCalibDataCalibObjectSetCalibDataCalibObject or sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab). The default HALCON file extension for the description of a calibration plate with hexagonally arranged marks is 'cpd'.

A calibration plate description file contains information about:

A file generated by create_caltabcreate_caltabCreateCaltabcreate_caltabCreateCaltabCreateCaltab looks like the following (comments are marked by a '#' at the beginning of a line):

# Plate Description Version 3
# HALCON Version 12.0 --  Tue Aug 12 15:40:14 2014
# Description of the standard calibration plate
# used for the camera calibration in HALCON
# (generated by create_caltab)
#
#

# 27 rows x 31 columns
# Width, height of calibration plate [meter]: 0.167742, 0.125846
# Distance between mark centers [meter]: 0.0051613

# Number of marks in y-dimension (rows)
r 27

# Number of marks in x-dimension (columns)
c 31

# offset of coordinate system in z-dimension [meter] (optional):
z 0

# rim of the calibration plate (min x, max y, max x, min y) [meter]:
o -0.083871125 0.0645592449151841 0.086451775 -0.0645592449151841

# polarity of the marks (light or dark):
p light

# number of finder pattern marks:
f 5

# position of the finder patterns (central mark):  x y [index]
15 13
6 6
24 6
6 20
24 20

# calibration marks:  x y radius [meter]

# calibration marks at y = -0.0581076 m
-0.07483885 -0.0581076199151841 0.001290325
-0.06967755 -0.0581076199151841 0.001290325
-0.06451625 -0.0581076199151841 0.001290325
-0.05935495 -0.0581076199151841 0.001290325
-0.05419365 -0.0581076199151841 0.001290325
-0.04903235 -0.0581076199151841 0.001290325
-0.04387105 -0.0581076199151841 0.001290325
-0.03870975 -0.0581076199151841 0.001290325
-0.03354845 -0.0581076199151841 0.001290325
-0.02838715 -0.0581076199151841 0.001290325
-0.02322585 -0.0581076199151841 0.001290325
-0.01806455 -0.0581076199151841 0.001290325
-0.01290325 -0.0581076199151841 0.001290325
-0.00774195 -0.0581076199151841 0.001290325
-0.00258065 -0.0581076199151841 0.001290325
0.00258065 -0.0581076199151841 0.001290325
0.00774195 -0.0581076199151841 0.001290325
0.01290325 -0.0581076199151841 0.001290325
0.01806455 -0.0581076199151841 0.001290325
0.02322585 -0.0581076199151841 0.001290325
0.02838715 -0.0581076199151841 0.001290325
0.03354845 -0.0581076199151841 0.001290325
0.03870975 -0.0581076199151841 0.001290325
0.04387105 -0.0581076199151841 0.001290325
0.04903235 -0.0581076199151841 0.001290325
0.05419365 -0.0581076199151841 0.001290325
0.05935495 -0.0581076199151841 0.001290325
0.06451625 -0.0581076199151841 0.001290325
0.06967755 -0.0581076199151841 0.001290325
0.07483885 -0.0581076199151841 0.001290325
0.08000015 -0.0581076199151841 0.001290325

# calibration marks at y = -0.0536378 m
-0.0774195 -0.0536378029986315 0.001290325
-0.0722582 -0.0536378029986315 0.001290325
-0.0670969 -0.0536378029986315 0.001290325
-0.0619356 -0.0536378029986315 0.001290325
-0.0567743 -0.0536378029986315 0.001290325
-0.051613 -0.0536378029986315 0.001290325
-0.0464517 -0.0536378029986315 0.001290325
-0.0412904 -0.0536378029986315 0.001290325
-0.0361291 -0.0536378029986315 0.001290325
-0.0309678 -0.0536378029986315 0.001290325
-0.0258065 -0.0536378029986315 0.001290325
-0.0206452 -0.0536378029986315 0.001290325
-0.0154839 -0.0536378029986315 0.001290325
-0.0103226 -0.0536378029986315 0.001290325
-0.0051613 -0.0536378029986315 0.001290325
0 -0.0536378029986315 0.001290325
0.0051613 -0.0536378029986315 0.001290325
0.0103226 -0.0536378029986315 0.001290325
0.0154839 -0.0536378029986315 0.001290325
0.0206452 -0.0536378029986315 0.001290325
0.0258065 -0.0536378029986315 0.001290325
0.0309678 -0.0536378029986315 0.001290325
0.0361291 -0.0536378029986315 0.001290325
0.0412904 -0.0536378029986315 0.001290325
0.0464517 -0.0536378029986315 0.001290325
0.051613 -0.0536378029986315 0.001290325
0.0567743 -0.0536378029986315 0.001290325
0.0619356 -0.0536378029986315 0.001290325
0.0670969 -0.0536378029986315 0.001290325
0.0722582 -0.0536378029986315 0.001290325
0.0774195 -0.0536378029986315 0.001290325

# calibration marks at y = -0.049168 m
...

# calibration marks at y = -0.0446982 m
...

# calibration marks at y = -0.0402284 m
...

# calibration marks at y = -0.0357585 m
...

# calibration marks at y = -0.0312887 m
... 

# calibration marks at y = -0.0268189 m
... 

# calibration marks at y = -0.0223491 m
... 

# calibration marks at y = -0.0178793 m
... 

# calibration marks at y = -0.0134095 m
...

# calibration marks at y = -0.00893963 m
...  

# calibration marks at y = -0.00446982 m
...  

# calibration marks at y = 0 m
...  

# calibration marks at y = 0.00446982 m
...  

# calibration marks at y = 0.00893963 m
...  

# calibration marks at y = 0.0134095 m
...  

# calibration marks at y = 0.0178793 m
...  

# calibration marks at y = 0.0223491 m
...  

# calibration marks at y = 0.0268189 m
...  

# calibration marks at y = 0.0312887 m
... 

# calibration marks at y = 0.0357585 m
...  

# calibration marks at y = 0.0402284 m
... 

# calibration marks at y = 0.0446982 m
...

# calibration marks at y = 0.049168 m
... 

# calibration marks at y = 0.0536378 m
...

# calibration marks at y = 0.0581076 m
...  

Note that only the coordinates and radius of the marks in the first two rows are listed completely. The corresponding coordinates and radius of the marks in the other rows are omitted for a better overview.

The file CalPlatePSFileCalPlatePSFileCalPlatePSFileCalPlatePSFileCalPlatePSFilecalPlatePSFile contains the corresponding PostScript description of the calibration plate, which can be used to print the calibration plate.

Attention

Depending on the accuracy of the used output device (e.g., laser printer), a printed calibration plate may not match the values in the calibration plate description file CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescr exactly. Thus, the coordinates of the calibration marks in the calibration plate description file may have to be corrected!

Parallelization

Parameters

NumRowsNumRowsNumRowsNumRowsNumRowsnumRows (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of rows.

Default value: 27

Recommended increment: 1

Restriction: NumRows > 2

MarksPerRowMarksPerRowMarksPerRowMarksPerRowMarksPerRowmarksPerRow (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of marks per row.

Default value: 31

Recommended increment: 1

Restriction: MarksPerRow > 2

DiameterDiameterDiameterDiameterDiameterdiameter (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Diameter of the marks.

Default value: 0.00258065

Suggested values: 0.00258065, 0.1, 0.0125, 0.00375, 0.00125

FinderRowFinderRowFinderRowFinderRowFinderRowfinderRow (input_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row indices of the finder patterns.

Default value: [13,6,6,20,20]

FinderColumnFinderColumnFinderColumnFinderColumnFinderColumnfinderColumn (input_control)  integer(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column indices of the finder patterns.

Default value: [15,6,24,6,24]

PolarityPolarityPolarityPolarityPolaritypolarity (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Polarity of the marks

Default value: 'light_on_dark' "light_on_dark" "light_on_dark" "light_on_dark" "light_on_dark" "light_on_dark"

Suggested values: 'light_on_dark'"light_on_dark""light_on_dark""light_on_dark""light_on_dark""light_on_dark", 'dark_on_light'"dark_on_light""dark_on_light""dark_on_light""dark_on_light""dark_on_light"

CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescr (input_control)  filename.write HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

File name of the calibration plate description.

Default value: 'calplate.cpd' "calplate.cpd" "calplate.cpd" "calplate.cpd" "calplate.cpd" "calplate.cpd"

List of values: 'calplate.cpd'"calplate.cpd""calplate.cpd""calplate.cpd""calplate.cpd""calplate.cpd"

File extension: .cpd

CalPlatePSFileCalPlatePSFileCalPlatePSFileCalPlatePSFileCalPlatePSFilecalPlatePSFile (input_control)  filename.write HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

File name of the PostScript file.

Default value: 'calplate.ps' "calplate.ps" "calplate.ps" "calplate.ps" "calplate.ps" "calplate.ps"

File extension: .ps

Example (HDevelop)

* Parameters to create the descriptor for the 160mm wide calibration plate
create_caltab (27, 31, 0.00258065, [13, 6, 6, 20, 20], [15, 6, 24, 6, 24], \
              'light_on_dark', 'calplate.cpd', 'caltab.ps')

Result

create_caltabcreate_caltabCreateCaltabcreate_caltabCreateCaltabCreateCaltab returns 2 (H_MSG_TRUE) if all parameter values are correct and both files have been written successfully. If necessary, an exception is raised.

Possible Successors

read_cam_parread_cam_parReadCamParread_cam_parReadCamParReadCamPar, caltab_pointscaltab_pointsCaltabPointscaltab_pointsCaltabPointsCaltabPoints

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

Module

Foundation


ClassesClassesClassesClasses | | | | Operators