RTC
®
5 PC Interface Board
Rev. 1.9 e
8 Advanced Functions for Scan Head and Laser Control
176
innovators for industry
8.6.5 Enhanced 3D Correction
The image size of 3D scan systems – particularly those
without objectives or with non-telecentric F-Theta
objectives – depends on its distance to the scan
head’s objective (i.e. from the Z coordinates). The
image field size typically gets stretched or squeezed
linearly with the Z value. Therefore, SCANLAB 3D
correction files include stretch correction factors to
compensate for this effect (see
).
Assumption: for any chosen non-zero Z plane, (X, Y)
will be the desired position and (X', Y') the measured
position. The corrections
<StretchX>
and
<StretchY>
are then calculated as follows:
<StretchX> = (X–X')/Z
<StretchY> = (Y–Y')/Z
The measurement can be performed as often as
desired in an iterative procedure to obtain optimal
correction value settings. Each newly determined
correction value can simply be added to the prior
values for a total correction.
You can then use the
command
to load the enhanced 3D correction onto the RTC
®
5
from an ASCII text file. This file must contain correc-
tions for a complete rectangular grid. The number of
gridlines and their spacings can be freely defined and
even differ in X and Y. If the absolute values of the
corrections exceed 0.03125, then they will be clipped
to this limit value. The corrections are bilinearly inter-
polated for data points within the specified grid and
linearly extrapolated for data points outside the grid.
After
, enhanced 3D correction is
inactive by default. It becomes active upon loading a
valid table onto the RTC
®
5 board and can subse-
quently be deactivated by calling
using a null pointer instead of the filename.
The following rules apply to the text file:
• The file can contain one or several tables, even
tables of other types.
• The 2D stretch correction table must begin with
the caption [StretchTable<No>], whereby
<No>
corresponds to the number supplied with the
command.
• This is directly followed by a block of data points.
• If several tables with the same number exist, then
only data from the first encountered table will be
read. The others will be ignored.
• Reading of the text data terminates upon end of
file or upon a line containing a caption.
• All characters to the right of a semicolon are
treated as comments and ignored.
• The order of data points is up to you.
• The maximum length of a data line is 255
characters.
• A data line contains two position coordinates (in
bits, signed integers) and two correction values
(dimensionless, signed floating point numbers,
use the period
(.)
or comma as the decimal
separator), each separated by spaces or tabs:
• <Xpos> <Ypos> <StretchX> <StretchY>
• If a data point reoccurs, then the most recently
read value will be used; the others will be
ignored.
• Empty lines or incomplete data lines are invalid
and will be ignored.