
29
7.6
Shading correction
Shading correction is used to compensate for inhomongeneities 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 offline generation of shading data and download it to the camera, the camera
allows correction data to be generated automatically in the camera itself.
7.6.1
Automatic generation of correction data
Requirements
Shading correction compensates for inhomongeneities by giving all pixels the same gray
value as the brightest pixel. This means that only the background may be visible and
the brightest pixel has a gray value of less than 255 when automatic generation of
shading data is started.
Algorithm
After the start of automatic generation the camera pulls in the number of frames set in
the GRAB_COUNT register. An arithmetic mean value is calculated from them (to reduce
noise).
After this, a search is made for the brightest pixel in the mean value frame. A multiplier
is calculated for each pixel to be multiplied by, giving it the gray value of the brightest
pixel.
All of these multipliers are saved in a “Shading Reference Image“. The time required for
this process depends on the number of frames to be calculated.
Correction alone can compensate for shading by up to 50% and counts on 8 bit pixel
data (beginning with FW 0.84) to avoid the generation of missing codes.
The calculation of shading data is always carried out at the current resolution set. If
the window in which correction data is being calculated is exited none of the pixels
lying outside are corrected.
For Format_7 it is advisable to generate the shading image in the largest displayable
frame format. This ensures that even any smaller Areas of Interest (AOIs) are
completely shading corrected. The automatic generation of shading data can also be
started when image capture is running. The camera then pauses the running image
capture for the time needed for generation and resumes it after generation is
completed.
Automatic generation of a shading image
As previously mentioned, shading images can also be generated by the camera. Before
using this feature you should make sure that frame size is set to maximum and
brightness is set so that the frame is not overmodulated. It may be necessary to use a
neutral white reference, e.g. a piece of paper, instead of the real image.