Skip to main content
Designer and manufacturer of advanced imaging equipment
Friday, 9 October 2026

Article

Black Level and Separate Red, Green and Blue Adjustment in ALTRON

rahni

We follow a simple rule when setting up any industrial camera: black first, then color. When the blacks in the image look slightly gray and the contrast looks flat, it is tempting to raise the contrast or gamma. But the root of the problem is usually the black level, and until it is fixed, every later color adjustment sits on a skewed base.

Separate red, green and blue sliders in the ALTRON line scan camera panel
Separate red, green and blue sliders in the ALTRON line scan camera panel

What is black level, and why does it drift?

A sensor does not output zero even in total darkness. It has an electronic offset that shifts with exposure, gain and temperature. If this offset is not corrected, blacks turn gray, contrast drops, and every later measurement is biased.

There is one more point that matters for calibration: the camera applies the offset before the gain stage. So every time you change the gain, the black level shifts with it.

Three pairs of sliders in the line scan camera panel

In the line scan cameras panel, each color channel has two separate sliders:

  • Brightness (R / G / B): Its range is 0 to 511. This slider raises or lowers the dark level of each channel inside the camera. BLC calibration adjusts these sliders.
  • Contrast (R / G / B): Its range is 0 to 1023, and it sets the gain of each channel in the camera. If you raise the value for one channel, that color is amplified and the white balance changes. White balance calibration adjusts these sliders.

Both groups are saved with the camera settings and sent to the camera again on every Start. When automatic calibration runs, these same sliders move, so you can always see what the calibration did. Keep manual changes for fine-tuning.

BLC plug-in: measurement and correction in one place

You will find the Black Level Correction, or BLC, plug-in in the graph after the camera. Its settings:

  • Black Level (R / G / B): The black level of each channel. In a monochrome stream, only R is used.
  • Pedestal: The value the black sits on; the default is 2. If you set it to zero, the lower half of the dark noise is crushed into a single peak at zero. With 2 to 3 units, the whole distribution stays measurable.
  • Rescale to full: After the black level is subtracted, this stretches the remaining range to full scale so that white does not turn darker.
  • Auto on start (re-measure each run): Measures the black level once each time the chain starts. Because the black level changes with exposure, gain and lamp condition, the value from the previous run is usually no longer valid.

The Activate/DeActive switch runs the calibration. First the program asks you to put the lens cap on. Then it adjusts the Brightness of each channel until the dark level sits on the Pedestal. If the switch is green, a black level has been applied. If it is red, no level has been applied.

Four-step color calibration

The same BLC panel has an Auto White Balance section. If you check Set Analog Gain First, the full calibration runs in four steps, and before each step a window tells you what to do:

  1. Put the lens cap on. The black level is measured with the gains at zero.
  2. Take the cap off. The gains are raised until the brightest color reaches 90 percent of full scale, and the other colors are matched to it. Put the scene in front of the camera under the same lighting it has in real operation. You do not need a white sheet; the balance is done on the gray and white areas of the scene itself.
  3. Cap on again: the black level is measured again at the new gain.
  4. Cap off: the balance is set once more, and you are done.

Take step three seriously. If you skip it, the dark end of the image is still set for the old gain.

What about area scan cameras?

In the area scan camera panel you have an overall Brightness and Contrast, plus the Black Level group. With Auto checked, the camera calibrates the black level itself. If you leave it unchecked, you set the offset yourself with a slider from 0 to 1023. If the blacks are clipped to absolute black, raise the slider. If they look gray, lower it.

Common mistakes

  • Running black calibration while light leaks in around the lens cap.
  • Changing the gain after calibration without measuring the black level again.
  • Setting the Pedestal to zero to make the image look blacker.

Do not forget the correct order either: first set the exposure so that nothing saturates, then move on to these settings.

A short general reference on image sensors: Wikipedia (English).

If you still see a color cast or gray blacks after calibration, get in touch with us through contact form.

Where our equipment is used

Organizations, universities, industries and companies that have used our products

  • Hedayat Hooshmand Nozhan Sepehr