Cameras & sensorsExplainer

Long exposure on a fixed frame rate camera: averaging multiple frames

When the frame rate caps exposure at one frame period, averaging frames becomes your long exposure: the noise and bit-depth math, plus where the trick fails.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01Why does the frame rate cap the exposure time?
  2. 02When is averaging multiple frames the right long exposure?
  3. 03How much do N averaged frames add?
  4. 04What does 1 second of effective exposure look like in numbers?
  5. 05Which cameras let you skip averaging entirely?
  6. 06Does stacking work on depth and ToF cameras too?
  7. 07Where does frame averaging fail?
  8. 08How do you set it up and verify it on the bench?
  9. 09Questions

Some cameras and capture libraries tie exposure to the frame period, so a dark static scene gets at most 1/30 s of light per shot at 30 fps, however long you would like the shutter to stay open. The fix needs no new camera: capture multiple frames at the full allowed exposure and average them. This guide gives the arithmetic that decides it — frame period, frames needed, noise reduction, effective bit depth — then a worked 1-second example, the failure modes to test on the bench, and the cameras that never need the trick because their exposure register is free.

Why does the frame rate cap the exposure time?

One frame period is the whole window the sensor has to collect light before readout starts, so at a fixed 30 fps no frame can hold more than 1/30 s of exposure, and readout overhead trims that a little further.

Exposure and readout share the frame period. When a pipeline fixes the period — a capture library that hands you frames at a set rate, a composite stream, a depth engine tuned for motion — it fixes the exposure ceiling with it. That is why lowering the frame rate sometimes changes nothing: on those devices the exposure value is clamped against the original mode's period, not the one you just typed. One edited number in the middle of the chain does not move the other.

On a standard machine-vision camera the two are decoupled. Exposure time is an ordinary register; set 500 ms and the frame rate falls to fit — the RGB camera frame rate guide shows how pixel format and exposure trade against frame rate. Averaging is the method for everything else: fixed-rate cameras, depth engines, and any driver that rejects exposure values above one frame period. If your camera exposes no exposure control at all, the options are narrower still — that guide to working without software exposure control covers the substitutes.

When is averaging multiple frames the right long exposure?

Average frames when the scene holds still for the whole grab and the camera will not exceed the frame-period cap: N frames at full exposure act as one exposure of N × T_frame at 30 fps, so 30 frames deliver about 1.0 s of light.

Static is the operative word. Keep the part within about one pixel of travel per frame: at 30 fps and an image scale of 0.05 mm/pixel, that is 1.5 mm/s. Fixed fixtures, indexed stop-and-go stations, microscopy stages and night scenes from a locked-off camera all qualify. A continuously moving line does not — there, exposure per frame is what stops blur, not the stack.

Constraint The move
Standard GigE, USB3 or CoaXPress camera with an exposure register Set exposure directly; frame rate falls to 1/T (500 ms → about 2 fps)
Exposure clamped at the frame period, static scene Stack N frames; effective exposure N × T_frame at 30 fps
Part moves more than a pixel per frame No stacking: add light, raise gain or choose a more sensitive sensor
Highlight detail also matters Bracket fixed exposure sets and merge; keep every other setting constant

How much do N averaged frames add?

Random noise falls by √N and effective bit depth grows by log2 N, so 2 stacked 8-bit frames behave like 9-bit, 4 like 10-bit, 16 like 12-bit and 30 like a 12.9-bit image.

T_frame = 1 / fps E_eff = N × T_exp σ_out = σ_in / √N bits_eff = bits + log2(N)

Temporal noise is uncorrelated from frame to frame: variances add while the signal adds linearly, so the signal-to-noise ratio improves by √N. In bit terms, each doubling of the stack buys one extra bit of scene information into the sum — 2 frames carry 9 bits, 4 carry 10, 16 carry 12.

Fixed-pattern noise — pixel-to-pixel gain differences and dark non-uniformity — does not fall with N. Subtract a dark stack instead: N frames with the lens capped, averaged the same way, removed from the light stack pixel by pixel.

Stacking holds one genuine edge over a single long exposure. Thirty frames collect 33 ms of dark charge each, not a full second of it, and the dark stack removes what remains — so a warm sensor behaves better than it would under a true 1 s exposure.

What does 1 second of effective exposure look like in numbers?

Thirty frames at 30 fps: about 999 ms of collected light, a 16-bit sum that peaks at 30 × 255 = 7650, noise down 5.5× and an effective depth of 8 + log2 30 ≈ 12.9 bits.

Worked through as a recipe targeting 1.0 s:

  1. Frame period. T = 1/30 = 0.0333 s = 33.3 ms. Set each frame's exposure just under it (33 ms; use 30 ms on 50 Hz mains — flicker section below).
  2. Frame count. N = 1.0 s ÷ T ≈ 30, so 30 frames. Wall-clock cost: 30 × T ≈ 999 ms.
  3. Accumulator. 8-bit frames sum to at most 30 × 255 = 7650, well inside a 16-bit buffer (65 535).
  4. Noise. σ_out = σ_in/√30 = σ_in/5.48. A flat patch at level 30 with single-frame noise σ = 4 drops to σ = 0.73, lifting SNR from 7.5 to about 41.
  5. Depth. 8 + log2 30 = 8 + 4.91 ≈ 12.9 effective bits in the sum.
  6. Finish. Divide by 30, or keep the scaled sum — extra headroom for thresholds and calibration.

The LS-CMR-0166 captures 30 fps at 4000 × 3000 resolution. At 30 fps every frame is capped just under the frame period, and stacking is the only route to a longer effective exposure — which makes this camera the reference case for the arithmetic above.

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
Resolution
12 MP
Shutter
Rolling
$560.00View partBuild a system with it

Which cameras let you skip averaging entirely?

Any standard GigE, USB3 or CoaXPress area-scan camera with a GenICam exposure register: raise the exposure and the frame rate falls to fit, so a 500 ms exposure runs at about 2 fps with no stacking at all.

Cameras such as the MV-CS200-10UM — a 20 MP mono USB3 camera with a 1" sensor and C-mount — treat exposure time as an ordinary setting with a wide range, so the stack is only needed where the register is locked or the range stops short. Where the part is indexed into position with residual vibration, the MV-CU020-90GC, a 2.5 MP GigE camera, brings a global shutter: rolling-shutter frames of a slightly vibrating part skew edges, and the stack averages the skew in.

Even with a free register, stacking can still win: it keeps the frame rate alive for other processing, keeps per-frame dark charge low, and pushes past a sensor whose maximum exposure tops out below the target.

Specification MV-CS200-10UM MV-CU020-90GC LS-CMR-0166
Sensor type CMOS, rolling shutter CMOS, global shutter –
Sensor model Sony® IMX183 GMAX4002 Sony IMX226
Pixel size 2.4 μm × 2.4 μm 4 μm × 4 μm 1.85 μm
Sensor size 1" 1/1.7" 1/1.7"
Resolution 5472 × 3648 2048 × 1200 4000 × 3000 (12MP)
Max. frame rate 19.2 fps @ 5472 × 3648 Mono 8 49 fps @ 2048 × 1200 Bayer GB 8 30 fps
Dynamic range 65.5 dB 66.9 dB –
SNR 41.5 dB 40.8 dB –
Gain 0 dB to 24 dB 0 dB to 11.1 dB –
Exposure time 44 μs to 0.83 sec 4 μs to 10 sec –
Exposure mode Off/Once/Continuous exposure mode, supports Global Reset and Rolling Off/Once/Continuous exposure mode –
Pixel format Mono 8/10/10Packed/12/12Packed Bayer GB 8/10/10Packed/12/12Packed –
Price $759.00 $309.00 $560.00

Values as printed in each product's data sheet; open a part for its drawing and full specifications.

Does stacking work on depth and ToF cameras too?

Yes — average the depth output rather than the raw image: N depth frames cut depth noise by √N, so 16 frames quiet a noisy point cloud by 4×, the portable fix when the depth engine keeps its integration time to itself.

Depth engines manage exposure internally to protect range and motion performance, and many expose no raw long-exposure mode. Some offer an integration-time or motion-versus-range style setting that lengthens exposure and costs frame rate; if yours has one, start there. If it does not, average the registered depth frames — the merge multiple depth frames workflow covers the alignment and hole-filling side. Two cautions: pixels at depth edges mix foreground and background, and averaging lands them in mid-air, so filter edge pixels; and averaging smooths real depth steps, so keep step detection on the raw frames.

A dedicated ToF sensing camera such as the MV-DT01WMU returns depth directly; to lower its noise, stack its depth frames exactly as above.

3D sensorsHikrobot MV-DT01WMU ToF sensing cameraMV-DT01WMU
Type
Depth / ToF camera
Price on requestView and quote

Where does frame averaging fail?

Anywhere the scene, the lighting or the pipeline changes between frames: a part moving 1.5 mm/s smears about one pixel per frame at 0.05 mm/px and 30 fps, auto exposure re-randomizes brightness frame by frame, and highlights clipped at 255 stay clipped however many frames you add.

  • Motion. The √N gain applies to noise, never to smear; each frame contributes its own blur to the average. For moving parts, cut exposure per frame and add light — capping the maximum auto exposure time to stop motion blur is the tool there.
  • Automatic settings. Auto exposure, auto gain and auto white balance must all be off. If brightness rebalances between frames, the stack averages different gains and lands darker and noisier than any input frame.
  • Clipping. Averaging lifts shadows, never highlights: pixels that saturate at 255 in the individual frames average back to 255. For highlight recovery on a static scene, bracket fixed exposures and merge the sets, keeping every setting but exposure identical — the multi-exposure consistency guide for HDR capture lists what must stay put.
  • Mains flicker. Light from mains-powered lamps pulses at twice the mains frequency: every 10 ms on 50 Hz mains, every 8.33 ms on 60 Hz. An exposure of one frame period spans 3.33 of those half-cycles at 50 Hz — a non-integer — so frame brightness wobbles. Use 30 ms per frame on 50 Hz mains (3 whole half-cycles); at 60 Hz the frame period is exactly 4 half-cycles and cancels on its own.
  • Non-linear processing. Average raw frames, before any gamma curve, LUT or sharpening. Those stages assume one frame's range and would distort a 30-frame sum.

How do you set it up and verify it on the bench?

Lock exposure and gain, grab 30 raw frames, sum them into 16-bit integers, divide by 30, then measure: the flat-region noise of the result should sit 5.5× below a single frame's, and if it does not, the pipeline changed something between frames.

  1. Fix per-frame exposure at the cap and the frame rate at 30 fps. No automatic modes.
  2. Grab the raw mono stream, with gamma, LUTs and sharpening disabled.
  3. Capture N frames with the scene static — 30 frames for the 1.0 s example.
  4. Accumulate in 16 bits. A 16-bit integer holds up to 257 full-scale 8-bit frames (257 × 255 = 65 535), so N = 30 has wide margin.
  5. Divide by N, or keep the scaled sum for measurement code.
  6. Read the per-frame metadata and confirm every frame really exposed at the cap — verifying per-frame exposure and gain shows the check.
  7. Measure the standard deviation over a flat patch, result against single frame: expect the √30 ≈ 5.5× reduction. Capture a dark stack with the lens capped, average it the same way, and subtract it first.

The decision, per case. A camera with a free exposure register needs no stack: set the exposure and accept the frame-rate drop. A camera pinned to its frame period, shooting a still scene, gets its long exposure from the stack — 30 frames at 30 fps ≈ 1.0 s effective, noise down 5.5×, about 12.9 effective bits. A moving part gets no help from stacking: fix the light or the sensor instead.

If the camera in hand cannot reach the target, pick one whose exposure range does. Start in the camera finder, browse the area scan cameras or 3D sensors categories, or write to us through the contact page with the scene and the exposure you need. The cameras topic page collects the other camera-side fixes.

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 frame averaging give me HDR images?

Only in the shadows. Averaging 16 frames lifts the noise floor to roughly 12-bit effective depth from an 8-bit sensor, but any pixel that clipped at 255 in the individual frames stays lost, because averaging clipped values returns the clip level. For true highlight recovery, bracket exposure: shoot sets at several fixed exposure times and merge them, keeping every setting except exposure identical across the set.

How much motion can the part have between frames?

Under about one pixel of travel per frame. At 30 fps and an image scale of 0.05 mm per pixel, that is 0.05 mm per frame = 1.5 mm/s. Anything faster ghosts, because the part sits somewhere else in every frame and the average smears the edges. Index the part, stop the motion, or drop the plan and shorten exposure instead.

Should I sum or average the frames, and in what data type?

Sum in a 16-bit or wider buffer, then divide at the end. Thirty 8-bit frames sum to at most 30 × 255 = 7650, well inside 65 535, and a 16-bit accumulator holds up to 257 full-scale 8-bit frames. Averaging frame by frame in 8-bit rounds away the extra precision the stacking created, so the gain disappears.

How much latency does a 30-frame stack add?

Almost exactly 29 frame periods, about 967 ms at 30 fps: the first frame is ready after one frame period and each further frame lands one period later, so the finished stack arrives about 1.0 s after the first exposure starts. That is fine for a static inspection station and disqualifying for a closed-loop servo or a fast reject gate.

Why is my stacked image noisier than the √N promise?

Because something is not constant across frames: auto exposure or gain rebalancing, a gamma or sharpening stage applied before the average, mains flicker beating against a non-integer half-cycle exposure, or fixed-pattern noise that no stack removes. Lock every automatic setting, average raw data before the ISP, choose a whole number of mains half-cycles for exposure, and subtract a dark stack taken with the lens capped.