Instruction manual

Description of the data path
MARLIN Technical Manua
l
Page 47
8.7 Shading correction
Shading correction is used to compensate for non-homogeneities caused by lighting or optical
characteristics within specified ranges. To correct a frame, a multiplier from 1...2 is calculated for
each pixel in 1/256 steps – this allows for shading to be compensated by up to 50 %.
Besides generating shading data off-line and downloading it to the camera, the camera allows
correction data to be generated automatically in the camera itself.
The following pictures describe the process of automatic generation of correction data. The line
profiles were created using MVTEC’s “ActivVision Tools”.
Figure 30: Shading correction: Source image with non-uniform illumination
On the left you see the source image with non-uniform illumination. The graph on the right
clearly shows the brightness level falling off to the right.
The correction sequence controlled via “Directcontrol” uses the average of 16 frames (10H) to
calculate the correction frame. By unfocussing the lens, high-frequency image data are removed
from the source image, therefore its not included in the shading image.
8.7.1 Automatic generation of correction data
Requirements
Shading correction compensates for non-homogeneities by giving all pixels the same gray value
as the brightest pixel. This means that only the background must be visible and the brightest
pixel has a gray value of less than 255 when automatic generation of shading data is started.
It may be necessary to use a neutral white reference, e.g. a piece of paper, instead of the real
image.
Algorithm
After the start of automatic generation, the camera pulls in the number of frames set in the
GRAB_COUNT register. Recommended values are 4, 8 or 16. An arithmetic mean value is
calculated from them (to reduce noise).