Opto Engineering® - 20 years
主页 资源 基本用途
Flat Field Correction

Flat field correction, abbreviated FFC, is a typical industrial camera operation that can remove non-uniformities in an image caused by:

  1. Nonuniformity between the responsivity curves of different sensor pixels
  2. Non-uniform illumination
  3. Type of optics used

Nonuniformity between the responsivity curves of different sensor pixels

Sensor pixels, often considered all "the same," may actually differ from each other in terms of their response to incident light - as shown in Fig.1, although incident radiation is uniform over the entire active area of the sensor, each pixel will store an amount of charge proportional to its spectral sensitivity curve. The resulting image, therefore, will not be uniform even though the illumination is.

Non-uniform illumination

The uniformity of an image depends not only on the uniformity of pixels, but also on the illumination to which the sensor itself is subjected. As can be seen from Fig.2, more "illuminated" pixels will be characterized by a higher grayscale value; conversely, less "illuminated" pixels will be characterized by a lower grayscale value.

Type of optics

Many optics, especially fixed focal and macro lenses with very high viewing angles, exhibit a decay of light intensity between the center and edges.

Flat field correction is thus an operation that can mask the non-idealities presented earlier, as a kind of "calibration" of the imaging system.

It is important to note that flat field correction is only able to resolve "systematic errors," while it has no effect on, for example, electronic noise introduced by the sensor.

Considering the points listed above, it is possible to express the output value of a pixel at the quantitative level as follows:

`P_i = R_i * I_i + D_i`

where:

  • Pi is the final value (output) of the i-th pixel;
  • Ri is the spectral responsivity value of the i-th pixel;
  • Ii is the light intensity incident on the i-th pixel;
  • Di is the "dark" value of the i-th pixel, that is the offset value present even when Ii = 0.

Considering the formula, how is it possible to calibrate the system, resulting in a uniform image output even in the presence of a less-than-ideal viewing system?

The procedure itself is not unique; each camera manufacturer may implement its own version of flat field correction. In any case, some guidelines and steps to follow have become well-established.

Specifically, to perform flat field correction, it is necessary to:

  • Preliminarily verify that the setup with which the FFC is run is the same as the final application - any changes made to the system (subsequent to the FFC) will invalidate the initial calibration and make a new FFC necessary;
  • Acquire an initial image with the sensor darkened - this will allow the sensor itself to calibrate the "dark level" and figure out which pixels will be brighter even in the absence of illumination. In this step all the Di terms in the previous equation are defined;
  • Acquire a second image (or, in some cameras, multiple images) in which the target is a uniform background - the more uniform the target (grayscale), the more effective the calibration procedure will be.
    Usually, for this series of images, a saturation level between 40% and 70% is recommended (if multiple pixels were to saturate, the FFC would not work as it should).
    In this step we are considering all the products Ri * Ii - since the terms Di have already been considered in the previous step, it becomes possible to adjust the expression Ri* Ii + Di with a correction factor, so that a constant Pi value is obtained for each sensor pixel;
  • Once a calibration "matrix" is obtained, it is possible to enable the image correction option - in this way, the FFC algorithm will be applied to every image acquired by the camera.

The figure below compares two images: the first (left) has a clearly visible nonuniformity, while the second (right) is the resulting image following the FFC procedure.

But when does it make sense to do a flat field correction?

Not all applications require an FFC. In fact, in many cases, with a judicious choice of lens and sensor, with proper lighting, and with a good-quality camera, it is indeed possible to obtain satisfactory images and, in most cases, suitable for the application without FFC.

The FFC, on the other hand, becomes advantageous, though not mandatory, in the event that one (or more) of the points discussed above fall into place. It should be emphasized again how the setup must remain unchanged following FFC - any change in the vision system will result in a new calibration procedure.