The key to contrast and detail: Adjusting the black level

There is white in your image but the image looks flat? Though you have darken your camera completely you do not get black? Or is there too much black in the image and details disappear?

Besides gain, gamma and colour saturation also the black level plays a role in image reproduction. A poor black level affects the dynamic range and therefore the image impression. Only if a camera reproduces black and white the full dynamic range is ensured.


Every digital image sensor has light-insensitive cells next to the active image area. These dark pixels are used to measure a reference voltage (black level) which is subtracted from the image signal. This compensates thermally generated voltages on the sensor which would otherwise falsify the signals.

Normally, the sensor adjusts the black level automatically. If the environment is very bright or if exposure times are very long, it may be necessary to adjust the black level manually.
To test if the camera reaches a correct black level, one of the following requirements must be met:
  • No light and thus no contrast during image capture
  • Darken the sensor by a cap
  • Darken the sensor by closing the aperture

uEye Cockpit

Black level and offset
Open the camera in uEye Cockpit and then the camera properties via “uEye > Properties”. Switch to the “Image” tab.
The sensor adjusts the black level of the pixels automatically by default. This is the recommended setting for all IDS cameras. The automatic control is enabled or disabled by the “Auto” option below the slider for the black level offset.

If the environment is very bright, it can be necessary to adjust the black level manually. High gain may offset the black level.
The offset value can be moved using the “Black level (Offset) slider. Only an additive offset is possible for most cameras this means that der black level is increased. The steps 0 to 255 on the slider have a linear characteristic but do not represent a real unit, because the real grayscale increase depends on the respective sensor model.

When you move the slider to the right, the black level offset is increased and the image becomes brighter.
If you disabled the automatic black level correction you can still set a manual offset.
For some camera models with sensors from e2v or CMOSIS, it is possible to move the black level into the negative, for example in this case the “zero point” of the slider is in the middle. By moving the slider to the left, you can darken the image.
Checking the black level in histogram
For other sensors, you can use special lookup tables (LUT) to affect the offset of the black level (“Digital Gain”). Via the control with the LUT, you can reduce the offset to set a high black to zero and thus achieve the full dynamic range in the image.

If you want to test the black level settings, you can use the “Line view (horizontal/vertical” or the “Histogram”. If the sensor is darkened the pixel values should be on the left side of the histogram.

Application areas

Better image quality thanks to black level correction
Depending on the batch, some image sensors, e. g. from CMOSIS, produce different black levels in the camera. IDS Imaging Development Systems GmbH measures each sensor and saves the individual correction data in the camera as these sensors have no automatic black level control. The IDS Software Suite reads this data and adjusts the sensor individually depending on the operation mode. This is particularly advantageous for multi-camera systems.


The black level may shift by using another pixel clock, gain, gamma, or lookup tables (LUT). For colour cameras, colour shifts may occur if the offset of the black level is not accurate. This is caused by the RGB gains.

For e2v sensors, the black level may shift if the shutter mode is changed e. g. from rolling shutter to global shutter. Therefore, when changing the shutter mode the black level is set to a fixed factory-provided value. After changing the shutter mode, you can adjust the black level individually.

With the uEye API function “is_Blacklevel” or the uEye .NET class “BlackLevel” you can query and set the configuration of the automatic black level and offset.
For the models UI-336x/UI-536x, UI-337x/UI-537x, UI-306x, UI-313x, UI-314x, UI-316x, UI-318x, UI-326x/UI-526x, you can display reference columns or rows for the black level with the uEye API function “is_DeviceFeature” or the uEye .NET class “BlackReference”.

For more information on configuring the black level, refer to the uEye manual at
© 2016 IDS Imaging Development Systems GmbH