12 Pixel Data Processing
12.3
Gain and Offset
There are three different gain settings on the camera:
PreGain
Digital fine gain applied immediately after correction. The sensor saturates at
approximately 2700 DN @12 bit, the PreGain feature is used so the saturation output is at
4095 DN @12 bit instead.
Gain (Digital Fine Gain)
Digital fine gain accepts fractional values from 0.01 up to 15.99. It is
implemented as a multiplication operation.
Digital Gain
Digital Gain is a coarse gain with the settings x1, x2, x4 and x8. It is implemented
as a binary shift of the image data where ’0’ is shifted to the LSB’s of the gray values. E.g.
for gain x2, the output value is shifted by 1 and bit 0 is set to ’0’.
The resulting gain is the product of the three gain values, which means that the image data is
multiplied in the camera by this factor.
Digital Fine Gain and Digital Gain may result in missing codes in the output im-
age data.
The PreGain value has been set at Photonfocus production based on the default setting of the
camera. If the used settings differ greatly from the factory settings then a recalibration of
PreGain might be required. This process is as follows:
1.
Apply a high illumination to the image sensor, preferably without lens. The goal is to set
PreGain
to the minimum value that all pixels, except cold pixels, are saturated.
2.
Begin with a small
PreGain
value, so that not all pixels are saturated.
3.
Observe the histogram of the image. If not all pixels (except cold pixels) are saturated
then increase
PreGain
by a small amount, e.g. by 0.01. Repeat this step until all pixels
(except cold pixels) are saturated. Add a small margin (e.g. 0.02) as a reserve. This is the
correctly calibrated
PreGain
value.
4.
To store this value permanently, execute the
UserSetSave
command. Note that this
command stores the complete current settings, not just
PreGain
.
There are two independent
PreGain
values that are activated by the setting
of
Sensor_PixelFormat
(
Mono10
/
Mono12
). Example: if
Sensor_PixelFormat
is set
to
Mono10
, then setting
PreGain
does not alter the setting of
PreGain
for
Sen-
sor_PixelFormat
=
Mono12
.
A user-defined value can be subtracted from the gray value in the digital offset block. If digital
gain is applied and if the brightness of the image is too big then the interesting part of the
output image might be saturated. By subtracting an offset from the input of the gain block it
is possible to avoid the saturation.
12.4
Grey Level Transformation (LUT)
Grey level transformation is remapping of the grey level values of an input image to new
values. The look-up table (LUT) is used to convert the greyscale value of each pixel in an image
into another grey value. It is typically used to implement a transfer curve for contrast
expansion. The camera performs a 12-to-8-bit mapping, so that 4096 input grey levels can be
74 of 143
MAN093 08/2021 V1.1
Summary of Contents for MV4 Series
Page 8: ...CONTENTS 8 of 143 MAN093 08 2021 V1 1 ...
Page 12: ...1 Preface 12 of 143 MAN093 08 2021 V1 1 ...
Page 40: ...4 Image Acquisition 40 of 143 MAN093 08 2021 V1 1 ...
Page 42: ...5 Exposure Control 42 of 143 MAN093 08 2021 V1 1 ...
Page 52: ...6 Counter Timer 52 of 143 MAN093 08 2021 V1 1 ...
Page 64: ...10 Image Format Control 64 of 143 MAN093 08 2021 V1 1 ...
Page 66: ...11 Frame Rate 66 of 143 MAN093 08 2021 V1 1 ...
Page 82: ...12 Pixel Data Processing 82 of 143 MAN093 08 2021 V1 1 ...
Page 92: ...12 Pixel Data Processing 92 of 143 MAN093 08 2021 V1 1 ...
Page 96: ...13 Precautions 96 of 143 MAN093 08 2021 V1 1 ...
Page 120: ...16 Troubleshooting 120 of 143 MAN093 08 2021 V1 1 ...
Page 126: ...19 Support and Repair 126 of 143 MAN093 08 2021 V1 1 ...
Page 128: ...20 References 128 of 143 MAN093 08 2021 V1 1 ...