Using Binary Commands To Work With Shading Correction; Creating A Shading Correction Table - Basler L100k User Manual

Table of Contents

Advertisement

3.6.3 Using Binary Commands to Work With Shading Correction

When using binary commands to create and upload a shading table and to enable the shading
correction feature, follow the instructions given in Sections 3.6.3.1 through 3.6.3.3.

3.6.3.1 Creating a Shading Correction Table

When shading correction is active on the L100
correction factor and the corrected pixel values are transferred out of the camera.
There is an individual correction factor for each of the sensor's pixels, that is, there are 1024
correction factors for cameras with a 1024 pixel sensor or 2048 for cameras with a 2048 pixel
sensor.
The correction factors are multipliers that are applied to the pixels in each captured line to make
them better represent what they would be if no shading was present.
The correction factors are determined by capturing an image of a uniform target and then for each
pixel, calculating the multiplier that would make the pixel value equal to the lightest pixel in the
image.
Correction factors are floating point numbers. Since floating point numbers cannot be written into
the camera, each correction factor must be converted into an integer value that represents the
correction factor. Here is the formula that is used for conversion:
The range of possible correction factors is 1 to 1.996 where 1 converts to an integer value of 0
and 1.996 converts to an integer value of 255.
The individual integer correction values make up the shading correction table that is uploaded into
the camera. Creating a shading correction table is a three step process: 1) capturing and storing
100 lines of image data, 2) calculating shading correction data from the captured data, and 3)
writing the correction data to the camera.
Capturing and Storing Image Data
Follow this procedure to capture and store data:
1. Switch off the shading correction using the Shading Correction binary command described in
Section 4.2.4.8. (Shading Correction must be disabled when you capture the data).
2. Use the Video Data Output Mode binary command described in Section 4.2.4.1 to set your
camera into Single 8 bit or Dual 8 bit output mode. Before selecting Dual 8 bit mode, make
sure that your frame grabber is capable of supporting dual output.
3. Place a uniform gray target in the camera's field of view.
4. Make sure that your optics and lighting are set to their normal operating conditions. Optics
and lighting must be set before you capture any data.
5. Make sure that your grabber is properly configured to accept the output mode that you
selected in step 2.
6. Use the software included with your frame grabber to capture and store 100 lines of data to a
data file. (The software included with most frame grabbers includes a function that will allow
you to capture and store a specific number of lines.)
BASLER L100
k Series
DRAFT
Correction factor
=
Correction value
Correction factor
=
----------------------------------------------------------- -
camera, each pixel value is multiplied by a
k
Lightest pixel
---------------------------------- -
Current pixel
+
256
256
Operation and Features
3-19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents