Please enable JavaScript to view this site.

IDS peak 2.7.0 / uEye+ firmware 3.31

There are two general ways to control image brightness inside the camera:

ExposureTime controls the duration where the photosensitive cells of the sensor are exposed to light.

Gain is an amplification factor applied to all pixel values. There are different types of gains:

oAnalog gain: amplification is applied before digitization of the pixel values.

oDigital gain: amplification is applied on the digital pixel values and therefore can result in histogram artifacts.

oColor gains: amplification is applied only to one specific color channel, see Color gain and white balance.

hint_info

There are also external parameters influencing the image brightness: illumination (e.g. intensity and flash duration) and lens aperture.

Using gain for adjusting the brightness will increase noise. Analog gain has a slightly better behavior and should be preferred to digital gain.

Fig. 95: Example for gain adjusting

Fig. 95: Example for gain adjusting

Fig. 96: Light grey target with 80ms exposure and 1x AnalogAll gain, low noise level

Fig. 96: Light grey target with 80ms exposure and 1x AnalogAll gain, low noise level

Fig. 97: Light grey target with 10ms exposure and 8x AnalogAll gain, higher noise level

Fig. 97: Light grey target with 10ms exposure and 8x AnalogAll gain, higher noise level

hint_info

When you increase ExposureTime, your frame rate might drop.

The default range for ExposureTime is limited, depending on the camera model. If you need very long exposures, switch to the "LongExposure" user set.

Configuration

For manual configuration of ExposureTime and Gain, set the parameters of the camera. Make sure, GainSelector is set correctly.

ExposureTime = 10000.0;
GainSelector = AnalogAll;
Gain = 8.0;

Automatic brightness adjustments

The automatic brightness algorithms can be enabled using ExposureAuto and GainAuto.

ExposureAuto = Continuous;
GainAuto = Continuous;

When choosing "Once" instead of "Continuous", the algorithm automaticallly stops once it converged.

You can also combine ExposureAuto and GainAuto.

hint_info

The ExposureAuto algorithm was designed in a way that will not make your framerate drop in freerun mode. If you have a dark scene, ExposureAuto might not converge in this case. You can either decrease your frame rate to allow for higher exposure times or enable GainAuto additionally.

hint_info

If you use ExposureAuto in triggered mode (software or hardware), you can make sure that you keep your trigger rates by adjusting the search range for ExposureTime. Decrease BrightnessAutoExposureTimeMax to a value, where your intended trigger rate is guaranteed.

hint_info

Some camera models do not support ExposureAuto and GainAuto. You can use a software algorithm instead, see Automatic image control.

The BrightnessAutoControl features allow detailed configuration of the ExposureAuto and GainAuto algorithms:

the search range for ExposureTime (BrightnessAutoExposureTimeMin, BrightnessAutoExposureTimeMax)

the search range for Gain (BrightnessAutoGainMin, BrightnessAutoGainMax) that can optionally be enabled (BrightnessAutoGainLimitMode)

the target brightness (BrightnessAutoTarget)

the precision, in which the target must be reached (BrightnessAutoTargetTolerance)

the percentage of pixels that must be brighter than the target (BrightnessAutoPercentile)

Fig. 98: Example for auto exposure

Fig. 98: Example for auto exposure

Fig. 99: Histogram for auto exposure

Fig. 99: Histogram for auto exposure

BrightnessAutoTarget = 150;
BrightnessAutoTargetTolerance = 3;
BrightnessAutoPercentile = 13.0;

The automatic brightness algorithms usually run on the image ROI. You can also define a sub region for the algorithms, see SubRegions for auto-algorithms.

hint_info

You can include the ExposureTime and Gain settings into your image chunks. This way, you know the exact capture parameters for each image, even if automatic algorithms change them.

Alternatives and variations: Auto exposure and auto gain limits

ExposureTime and Gain can be limited to a certain range. The automatic algorithms will not choose values outside this range, even if the algorithm might not converge.

Enable the limits for ExposureAuto and set the limits.

BrightnessAutoExposureTimeLimitMode = On;
BrightnessAutoExposureTimeMin = 100.0;
BrightnessAutoExposureTimeMax = 50000.0;

Enable the limits for GainAuto and set the limits.

BrightnessAutoGainLimitMode = On;
BrightnessAutoGainMin = 1.0;
BrightnessAutoGainMax = 4.0;

hint_info

If you limit the automatic features to a reasonable range, you can speed up ExposureAuto and GainAuto, so that they converge faster.

Additional information

© 2024 IDS Imaging Development Systems GmbH