Cameras & sensorsExplainer

Manual exposure darker than auto exposure: why AE beats your gain

Auto exposure leaves your manual image darker than expected because it adds a hidden digital gain stage. Measure the gap, then close it with light.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Why does auto exposure look brighter than your manual settings?
  2. 02What happens to the signal between the sensor and your pixels?
  3. 03How much darker is the manual image, in numbers?
  4. 04Why does exposure time stop before you reach AE brightness?
  5. 05How do you measure the hidden gain and match AE brightness?
  6. 06When should you add light instead of gain?
  7. 07Which settings keep the manual image as bright and stable as AE was?
  8. 08When is more gain actually the right answer?
  9. 09Questions

You pin exposure and gain so the image stops breathing, and the picture drops to near black — while auto exposure on the same scene looked fine a minute earlier. Nothing is broken. Auto exposure commands a gain stage your manual controls never touch: digital gain inside the camera's image processor, applied once the sensor's analog ceiling runs out. This guide gives you the signal chain, the arithmetic that sizes the shortfall exactly, the frame-rate ceiling that pins exposure time, and a five-minute bench measurement that turns auto exposure (AE) brightness into fixed numbers you can dial in and keep on any area scan camera. It ends with the decision rule for when the honest fix is more light rather than more gain.

Why does auto exposure look brighter than your manual settings?

Auto exposure commands three stages, not two: exposure time, analog gain and a digital gain stage in the camera's image processor. Once the requested gain passes the sensor's analog ceiling, the remainder is applied as digital multiplication. Your manual gain control usually spans the analog range only. Even with exposure at the frame-period ceiling and gain at maximum, the chain can stop about 8× short of what AE assembled — in the worked example below, a mean of 15 grey levels against 127.

Sensor makers state the behavior plainly: once required gain passes the maximum analog gain, the surplus is applied digitally. AE also re-aims exposure itself, usually below your maximum so the frame rate holds, and it rebalances every time the scene shifts. The two paths do not share a knob set, which is why matching them by eye fails.

What happens to the signal between the sensor and your pixels?

Analog gain multiplies the sensor signal before the analog-to-digital converter and lifts noise along with it. Digital gain rescales pixel values after conversion, which moves brightness without adding information. The full chain is one multiplication after another:

pixel = k × t_exp × G_analog × G_digital G_dB = 20 × log10(G)

Here k bundles lens aperture, light on the part and sensor responsivity, t_exp is exposure time, and the gains are plain ratios; 20 × log10 of a ratio is its decibel value, so 16× is 24.1 dB and every 6 dB doubles brightness. Analog gain raises the signal before the converter quantizes it, which is real sensitivity. Digital gain stretches stored numbers afterwards: 2× turns a pixel at 100 into 200, and turns a one-level noise dither into a two-level stair. Brightness moves identically; image quality does not.

AE spends analog headroom first and reaches for the digital stage only past the analog ceiling — and a manual image stretched afterwards never quite looks like the AE frame. How the raw readouts map to physical units is its own subject: the gain and exposure units guide walks through it.

How much darker is the manual image, in numbers?

In a worked scene where maximum manual settings — 33 ms and a 16× analog ceiling — produce a mean of 15 grey levels, AE reaches a mean of 127 with a 10 ms exposure, 16× analog gain and roughly 28× of hidden digital gain. Round numbers from one scene; you replace them with your own readings in the same two lines. Manual, at the ceilings — 33 ms, analog 16×, digital 1× — gives a mean of 15, which calibrates the scene constant:

k = 15 ÷ (33 ms × 16) = 0.0284 grey levels per ms per step of gain

Auto exposure settles, read from its frame metadata, at 10 ms and the same 16× analog gain, mean 127. Without a digital stage it would land at 0.0284 × 10 × 16 = 4.5. The remainder is the hidden multiplier:

G_hidden = 127 ÷ 4.5 ≈ 28× (28.9 dB stacked on 24.1 dB of analog)

Manual best case against AE: 15 against 127, a factor of 8.5 in brightness. Your own k moves with light and lens, but the procedure is fixed: one manual reading calibrates k, one AE reading exposes the digital stage, and the shortfall becomes a number, not a feeling.

Why does exposure time stop before you reach AE brightness?

Exposure time cannot exceed the frame period, so a 30 fps stream caps exposure at 33.3 ms, a 60 fps stream at 16.7 ms and a 9 fps stream at 111 ms, before readout overhead takes its share. Push past the cap and the delivered frame rate falls instead — visibly, frame by frame, on GigE links, as the frame rate versus exposure guide measures.

Motion adds a second, harder ceiling: blur length equals part speed times exposure. A part travelling at 100 mm/s smears 3.3 mm across a 33 ms exposure. If the inspection needs 0.2 mm of sharpness, the ceiling is 0.2 mm ÷ 100 mm/s = 2 ms, not 33 ms. With exposure pinned at 2 ms, gain is the only electronic lever left, and the manual-versus-AE gap opens widest exactly there. When one frame cannot carry the exposure, multi-flash and frame averaging extend it, as the maximum exposure time guide sets out.

Interface choice sets the same ceiling: 1/9 s leaves a 111 ms frame period, 1/30 s leaves 33.3 ms, and readout claims part of each. Pick the interface by the exposure your scene needs, not only by bandwidth — the same 12 MP sensor family ships at 9 fps over GigE and at 30 fps over USB3:

Area scan cameras12 MP GigE area scan camera, IMX226, 1/1.7" rolling shutter, 9 fps (LS-CMR-0053)LS-CMR-0053
Sensor format
1/1.7"
Lens mount
C-mount
$560.00View part
Area scan cameras12 MP USB3 area scan camera, IMX226, 1/1.7" rolling shutter, 30 fps, 4000 × 3000 resolution (LS-CMR-0166)LS-CMR-0166
Sensor format
1/1.7"
Interface
USB3
$560.00View part

How do you measure the hidden gain and match AE brightness?

Run auto exposure once, read back the exposure and gain it chose, set both manually, and divide the AE mean grey level by your manual mean — that quotient is the digital gain the image processor was adding. Five minutes at the bench:

  1. Enable AE and let it settle over ten frames or so on the real scene.
  2. Read the exposure and gain AE actually applied from the frame metadata; the control panel rarely mirrors them, as the metadata readout guide shows.
  3. Disable AE and write those exact values into the manual controls before the stream starts, in the order the initialization guide lays out.
  4. Average both images over the same static scene and divide the means.
  5. Apply the quotient in your code as declared post-gain, or spend it as light and exposure instead.
G_hidden = mean_AE ÷ mean_manual at equal exposure and analog gain

On the worked scene: 127 ÷ 4.5 ≈ 28×. A hidden gain of 2× or less is easy to apply in software. At 8× and above the sensor is starved — buy photons instead, because that much stretch amplifies banding along with brightness. Between the two, spend what budget remains: frame-period headroom first, then light. Re-measure after any lighting change, because AE re-aims itself every time ambient light moves and your post-gain factor does not.

When should you add light instead of gain?

Add light whenever the histogram sits far below clipping: gain multiplies signal and noise equally, so stretching a mean of 15 grey levels to 120 keeps the same signal-to-noise ratio, while doubling the light raises it by about 3 dB. That is shot noise at work — a pixel integrating N photons carries a signal-to-noise ratio of about √N, and no gain stage beats that arithmetic. Quantization makes deep underexposure worse still: 15 grey levels stretched eightfold leaves stairs eight levels wide across flat surfaces.

In a short exposure, instantaneous power is what counts. A 10 W continuous light delivers 20 mJ during a 2 ms exposure; a 100 W pulse lasting 2 ms delivers 200 mJ, ten times the photons at the same average heat while duty cycle stays near 10%. A digital controller built for strobing switches up to 200 W across four channels of 24 V output:

Light controllersDigital control box, 4 ch, 200 W, RS232 (LS-CTL-0070)LS-CTL-0070
Output
Constant voltage 24 V
Channels
4 channels
Control
Digital
Feature
Strobe
$549.00View partBuild a system with it

Baffle a 200 W strobe at the workstation: a brief pulse still delivers a peak flash the eye cannot blink away. Once a calibration matches AE brightness it must stay matched, which is a current-control job: a constant-current controller holds LED output flat across four channels and 120 W for 24 V lights:

Light controllersConstant current controller, 4 ch, 120 W, 89 x 147 mm, for 24 V lights (LS-CTL-0180)LS-CTL-0180
Output
Constant current
Channels
4 channels
Control
Digital
Feature
Constant current
$359.00View partBuild a system with it

The light controllers category lists both types alongside strobe and sequencing models, sized by channel count and output power.

Which settings keep the manual image as bright and stable as AE was?

Keep the manual image stable by turning off every automatic mode, writing exposure and gain before the stream starts, and powering the light from a controller that holds its output constant from frame to frame. In the order that works at the bench:

  • Exposure to the budget, not until it looks bright: frame period minus readout, or the blur limit, whichever is shorter.
  • Analog gain to its practical maximum for the scene, then the measured digital factor as declared post-gain.
  • Every auto loop off — exposure, gain, white balance. One loop left running drifts the image back, as the brightness drift guide shows.
  • Manual values written before the stream starts, so frame one already carries them.
  • Gamma at 1.0 and tone shaping off wherever the camera exposes the choice.
  • For strobed motion work, a global shutter: a rolling shutter reads rows in sequence, so a short pulse bands the rows read outside it, while a global shutter integrates every row across the same instant. The MV-CU020-90GC exposes its 2.5 MP sensor globally over GigE:
Area scan camerasHikrobot MV-CU020-90GC 2.5 MP Area Scan Camera, GigE, GMAX4002, ColorMV-CU020-90GC
Sensor format
1/1.7"
Lens mount
C-mount
Interface
GigE
Resolution
Up to 3 MP
$309.00View partBuild a system with it

When is more gain actually the right answer?

Take the digital gain when exposure is pinned by motion blur or frame rate, the histogram still has headroom below 255, and the scene does not move — the stretch costs nothing you were not already losing. Three cases earn it.

A motion-pinned exposure with headroom: apply the post-gain factor and write it into the inspection recipe so the next engineer knows the image was multiplied. A static scene: frame averaging beats any gain stage, because N frames raise SNR by √N — four frames 2×, sixteen frames 4× — at unchanged exposure, as the frame averaging guide works through.

And cameras with a built-in image processor, depth modules among them: the manual color controls may simply not span AE's total range, the missing stages sit inside the module, and no slider will ever appear. There, the measurement above plus post-gain, or more light, is the whole answer.

For measurement quality the priority order stays fixed: photons first, then exposure inside the budget, then analog gain, then digital gain. Each step down that ladder buys brightness at a worse exchange rate for noise. Size the budget first, then pick the parts: the camera finder filters by resolution, shutter and frame rate, and more reading on exposure control sits on the cameras topic page. Start the chain here:

Build the whole station

The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.

Start with the camera

Questions

Does digital gain add noise?

Digital gain creates no new sensor noise; it stretches the noise the sensor already produced, together with the signal. Analog gain instead amplifies before conversion, so the converter records a larger signal with the same relative noise. A mean of 15 grey levels multiplied by eight leaves stairs eight levels wide in 8-bit output; on a 10 or 12 bit camera the same stretch hides longer before banding shows.

What brightness should a manual exposure aim for?

Aim the histogram mean near half of full scale, about 128 in 8-bit, with no clipping at 255 on the brightest surface you must measure. Keep headroom for reflectance changes between parts: if a shinier sample pushes the mean past 200, reduce gain and add light until it returns near 128.

Can I leave auto exposure on for measurement?

Only to find a starting point. AE re-aims exposure and gain every few frames, so a shift in ambient light or part reflectance changes the image even when the part is unchanged, and measurements drift with it. Freeze the values AE chose, run the matching procedure once, and work from fixed settings after that.

How do I find my camera's maximum analog gain?

Read the gain feature's range from the camera's controls: its minimum, maximum and step are published there, usually in decibels. Set your target exposure, raise gain one step at a time and stop when the histogram mean reaches your aim; that setting is the analog ceiling you can rely on for this scene.

Why does my manual image flicker under office lights?

Mains lighting pulses at twice the mains frequency, 100 or 120 Hz. A short manual exposure catches only part of a pulse, so brightness swings frame to frame; AE hides this by averaging across its longer integrations. At a fixed short exposure, dim or switch off the room lights, or strobe your own light on every frame.