Individual circles pattern
An individual circle pattern consists of circles, with the option of user-defined position and thus arrangement of the individual circle components. This also enables the use of complex custom 3D patterns for calibration.
Requirements for the pattern
- The pattern should be applied to surfaces that are as flat (planar) as possible
- The circles should be as equal in size as possible.
- A pattern must consist of at least 9 points.
- The distance must be large enough to ensure that the circles do not touch each other and are recognized as separate objects.
- The background color around the pattern must form a 'quiet zone'.
Requirements for the image acquisition
- Exposure
- Homogeneous illumination of the pattern.
- Good contrast between circles and background.
- Figure
- Perspective distortions should be kept to a minimum.
- The standard specifications of the Advanced Calibration Options must be adhered to or adapted. By default, a circle must be represented by an area of at least 25 pixels and a maximum of 15000 pixels. The area should not be too small, otherwise interference from the background will be picked up.
Requirements for the description file
- The pattern must be described in the form of an XML file and stored on the development computer in the following folder: C:\Users\Public\TcVision\CalibrationPattern
- The XML file must be validated against the TcVnCalibrationPattern.xsd schema in the %TwinCAT3DIR%\Components\Vision\TcVision folder.
- The description file must contain at least the DisplayName, the Origin and the 2D or 3D coordinates of the circle points.
Center point As the center point is automatically given by the description of the points, the specification of the origin serves only as further information and is not evaluated in the calculation. |
2D pattern When specifying 2D patterns, a Z-coordinate of 0 is used internally for the calculation. |
Constant offset A constant offset can be implemented as a 3D pattern with constant Z-value. |
Configuration in the Camera Calibration Assistant
If valid XML description files were found in the specified folder, they are displayed with the DisplayName that was read from the file.
- Drop-down menu for individual circle patterns
Selection of an individual circle pattern. - Color inverted
Checkbox for selecting color inversion of the image. By default (no check mark), black objects are expected on a white background. - Extrinsic Origin
This is automatically set to the value stored in the file for the selected pattern and cannot be changed via the user interface. - The optional background image for the schematic representation of the calibration pattern is displayed accordingly, if the image name including file extension was specified in the description file and the image file is located in the same folder.
Sample template of a description file for individual circle patterns
The following code block can be used as a template for creating your own description files and contains samples of completed metadata and 2D point descriptions. The 3D point descriptions, which are also included, are commented out. If 3D is required, the Pattern2D block would have to be completely replaced by the Pattern3D block, i.e. mixing is not allowed.
Assignment of the points It is helpful if the points are sorted by rows or columns and directly match the positions of the points in the calibration image. The points can be assigned more quickly and more reliably as a result. |
<?xml version="1.0" encoding="UTF-8"?>
<TcVnCalibrationPattern xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///C:/TwinCAT/3.1/Components/Vision/TcVision/TcVnCalibrationPattern.xsd">
<MetaData>
<DisplayName>12345</DisplayName>
<Origin>Center</Origin>
<PreviewImage>PreviewImageSample.png</PreviewImage>
<Description>This is a calibration pattern</Description>
<Revision>V1.0</Revision>
<Width>10</Width>
<Height>10</Height>
<Depth>4</Depth>
<NumberOfPoints>9</NumberOfPoints>
<PointDiameter>1</PointDiameter>
</MetaData>
<Pattern2D>
<!-- 1st row -->
<Point2D x="-5" y="-5"/>
<Point2D x="-0" y="-5"/>
<Point2D x="5" y="-5"/>
<!-- 2nd row -->
<Point2D x="-5" y="0"/>
<Point2D x="0" y="0"/>
<Point2D x="5" y="0"/>
<!-- 3rd row -->
<Point2D x="-5" y="5"/>
<Point2D x="0" y="5"/>
<Point2D x="5" y="5"/>
</Pattern2D>
<!-- <Pattern3D> -->
<!-- 1st row -->
<!-- <Point3D x="-5" y="-5" z="-2"/> -->
<!-- <Point3D x="-0" y="-5" z="-2"/> -->
<!-- <Point3D x="5" y="-5" z="-2"/> -->
<!-- 2nd row -->
<!-- <Point3D x="-5" y="0" z="0"/> -->
<!-- <Point3D x="0" y="0" z="0"/> -->
<!-- <Point3D x="5" y="0" z="0"/> -->
<!-- 3rd row -->
<!-- <Point3D x="-5" y="5" z="2"/> -->
<!-- <Point3D x="0" y="5" z="2"/> -->
<!-- <Point3D x="5" y="5" z="2"/> -->
<!-- </Pattern3D> -->
</TcVnCalibrationPattern>