You issue an exposure change on a running camera, the set call returns success, and the next frames look unchanged. Short-burst pipelines feel this worst: a session that captures four frames, stops, and waits has no spare frame periods in which a new value can land, so the change appears to do nothing. It is not failing. The value needs whole frame periods to reach the sensor, and the first frame exposed with it needs more frame periods to travel back through image processing and driver buffers to your code. This troubleshooting guide gives the frame count to budget, the arithmetic behind it, the faults that imitate a dead parameter, and a burst structure in which every keeper frame carries the exposure you set.
The answer: budget five frames
Two delays sit between your set call and the first frame that shows it, and both are counted in frame periods.
The first is apply delay. While your request crosses the framework, the current frame is exposing and the next may already be queued at the sensor; exposure registers latch at a frame start. Capture stacks of this class state a two-frame apply figure for parameter changes, and two is the right planning number: the frame in flight plus one.
The second is transport delay. The first frame exposed with the new value still has to clear image processing, the driver queue and the framework's buffers before your capture callback sees it. On a CSI-2 stack with hardware processing in the path, that costs two to three frame periods.
Two apply frames plus three transport frames is five. Budget five frames from set call to first keeper, and treat every frame before that as stale.
The arithmetic, and what moves it
N_apply is fixed by the sensor: 2 frames, the frame in flight plus one, because registers latch at a frame start. N_transport is what your stack adds: 2 frames on a lean path, 3 on one with hardware image processing, deeper driver queues or a slow host callback. Measure it once with the step test below and stop guessing.
Frame rate converts frames to time, and exposure length sets a floor for the frame period. Lit machine-vision scenes run exposures of roughly 1-33 ms, so at 30 fps, with a 33.33 ms frame period, the exposure fits inside the frame and the frame count rules the delay. Drop to 5 fps and each frame period is 200 ms; five settle frames then cost a full second. Long-exposure streaming adds buffering constraints of its own, covered in streaming raw frames with long exposures on an embedded vision board.
Your request queue matters as much as the pipeline: hand the driver fewer buffers than the in-flight count and the burst starves while the changed frame sits in the queue. The reasoning behind a three-buffer minimum is in camera streaming buffer count: why three frames beat one.
Why six frames showed nothing: causes in order
Arithmetic kills the four-frame burst on its own: 4 frames at 33.33 ms is 133 ms, and the first changed frame cannot arrive before 167 ms. But the case this guide set out from saw no change even after six captures, which points at the value never reaching the sensor at all. Note that the sample applications demonstrating these controls run hundreds of frames per session, so they hide the settle count completely; a four-frame session exposes it.
| Order | Likely cause | Test | Fix |
|---|---|---|---|
| 1 | Auto-exposure still on; it rewrites exposure every frame | Log per-frame exposure metadata; values differ from your write | Manual mode on; set the range low equal to high |
| 2 | Burst ends before the changed frame is delivered | Stream 10 frames past the call; log mean brightness per index | Capture 5 discard frames plus your keepers |
| 3 | Write clamped by the exposure range | Read the value back; it snapped to a bound | Widen or pin the range, then write inside it |
| 4 | Change issued while the session was stopped | Set while stopped, restart, compare the first frames | Stop, set, start — the reliable pattern for short bursts |
| 5 | Judged by eye on an auto-scaled preview | Compare logged numeric means, not the preview | Gate keepers on the logged step |
Exposure on a CSI source element is usually bounded by an exposure-time-range property, written in nanoseconds as two values, low then high; one element's worked example spans 34000 to 358733000 ns, or 34 µs to about 359 ms. Setting low equal to high pins the exposure and is the fastest functional check that manual control works at all. Read what the stack allows before you write — the habit is laid out in query the option range before setting exposure or gain.
If auto-exposure stays enabled, the values you watch change frame by frame belong to the algorithm, not to you, and they settle over many frames rather than two. That behavior is covered in dark frames under auto exposure: wait for convergence.
Worked example: four keeper frames at 30 fps
Inputs, each with its source:
- Session shape: 4 keeper frames, then the stream stops until called again — the short-burst pattern this guide set out from.
- Camera: the LS-CMR-0166, a 12 MP USB3 area scan camera with a rolling shutter, listed at 30 fps.
- Exposure step: 20 ms down to 5 ms. Example application values, inside the 1-33 ms band of lit scenes, chosen because a 4x light cut, 6 dB, is unmistakable in a brightness log.
- N_apply = 2 frames: the stack's stated parameter-apply figure.
- N_transport = 3 frames: assumed for a processing-bearing CSI path; replace with your measured value.
- Sensor format
- 1/1.7"
- Interface
- USB3
- Resolution
- 12 MP
- Shutter
- Rolling
Arithmetic, written out:
- Frame period: 1000 ms ÷ 30 fps = 33.33 ms.
- First changed frame: N_apply + N_transport = 2 + 3 = 5 frames after the call.
- Settle time: 5 × 33.33 ms = 166.7 ms, call it 167 ms.
- Current burst: 4 × 33.33 ms = 133 ms, which is 34 ms — about one frame period — short of delivery.
- Remedied burst: 5 discard frames + 4 keepers = 9 frames = 9 × 33.33 ms = 300 ms.
Decision: at 30 fps, a four-frame burst can never show a mid-session exposure change. Either set the exposure while the session is stopped and pay only the 2-3 frame pipeline fill, or capture nine frames and keep frames 6 through 9.
Frame rate changes the price in time, not in frames. The LS-BCM-0003 is a 3.1 MP USB3 board-level camera with a 1/1.8" global shutter, listed at 120 fps. At 120 fps the frame period is 1000 ÷ 120 = 8.33 ms, the same five settle frames cost 5 × 8.33 = 41.7 ms, and a nine-frame session fits in 75 ms.
- Sensor format
- 1/1.8"
- Lens mount
- C-mount
- Interface
- USB3
- Resolution
- 5 MP
How to structure the burst
- Lock the mode first. Disable auto-exposure, or set the range property's low equal to high, so nothing rewrites your value while frames are in flight.
- For burst sessions, set exposure while the stream is stopped, then start the session. Every frame from the first carries the new value; only the 2-3 frame pipeline fill is stale. The safe initialization order is laid out in set manual exposure before streaming.
- If the value must change mid-stream, keep the stream running: a stop discards in-flight state and restarts the count. Writing settings without stalling the capture is its own discipline — see apply camera settings while streaming without stalling capture.
- Capture 5 discard frames plus your keepers, and queue at least three buffers so the burst cannot starve underneath the pipeline.
- Log, per frame index: timestamp, mean brightness, and the exposure the sensor reports if per-frame metadata (embedded data lines or chunk data) is available. Timestamp the set call too. Live control of gain and white balance follows the same pattern, covered in runtime camera parameter control for exposure and white balance.
- Accept keepers only after the logged brightness steps between two adjacent indices. No step within 10 frames means the value never reached the sensor: return to the causes table.
Measure your own transport count with an LED step
Place a small indicator LED inside the field of view, toggle it at a logged frame index — a GPIO line, or a hand blocking the emitter — and log mean brightness per frame. The distance in frame indices between your toggle record and the brightness step is the one-way transport count. Add the 2-frame apply figure and you have your stack's real N_first. The same end-to-end measurement, from exposure to buffer-done, is described in MIPI CSI capture latency measurement.
A second measurement needs no LED. Change exposure from 20 ms to 5 ms at a logged index, then read the step index; the gap is N_first for your stack and should land at or under 5 frames. When it does, your measured number replaces the budget everywhere in this guide.
When two frames is the honest count
Remove the transport leg and two frames is real. On a hardware-triggered path where your code consumes frames straight off the sensor, with no image processing and no framework buffering, N_transport is close to zero and the sensor's two-frame latch is the whole story. Depth cameras show the same physics from the other side: why a 3D camera needs two captures after a parameter change is that latch counted in captures.
The other honest case for a short count is expensive frames. With long exposures or frame averaging, five discard frames per change can cost seconds, so the stop-set-start pattern wins: stop acquisition, write the exposure, start again. That is the stated practice on stacks whose live writes are unreliable, and it needs a clean restart path — CSI-2 capture session error recovery without a full restart covers what that path should tolerate.
Checks before you blame the stack
- Manual mode locked: auto-exposure off, or range low equal to high.
- Exposure readback after the write equals the value you requested.
- Request queue at least three buffers deep.
- Burst length = keepers + 5, or exposure set between sessions.
- Set-call timestamp recorded; per-frame brightness log running.
- Keeper gate: brightness step observed between adjacent logged indices.
Hardware for short bursts
Short-burst work rewards a camera you can start cold with parameters already in place. Browse area scan cameras for full systems or board-level cameras for embedded CSI builds, filter by frame rate in the camera finder, or start a build at the camera step. A global shutter simplifies judging a brightness step, since every row exposes at the same instant. For a settle count measured on your exact stack, send the pipeline description and we will work the numbers with you.
Questions
How many frames should I discard after changing exposure mid-stream?
Budget five: two frames for the sensor to latch the new value at a frame start, plus three for the first changed frame to cross image processing, the driver queue and your framework buffers. Measure your own stack once with an LED step or an exposure step test; if it lands lower than five, use your measured number everywhere in place of the budget.
Why did six captured frames show no change when the documentation says two?
The two-frame figure is the sensor-side apply only. Your application sees the frame after transport adds two or three more frame periods, so the first visible change sits four to five frames out, and six captures can straddle the step. If nothing changes even after ten frames, auto-exposure is rewriting the value or the write was clamped by the exposure range — the per-frame exposure metadata readback will show which.
Is it better to stop the stream, set exposure, and restart for each burst?
For short bursts, yes. A stop-set-start cycle puts the new value in place before frame one, so you pay only the two to three frame pipeline fill instead of five settle frames inside the burst. The cost is the restart itself: keep a clean session-recovery path, because a failed restart costs far more time than any settle frame you saved.
How do I stop auto-exposure from overriding my manual exposure?
Switch the camera to manual exposure mode, and where the stack exposes a range property, write low equal to high so the value cannot drift — one such element takes the pair in nanoseconds, low then high. Then read the value back and watch the per-frame exposure metadata: if it matches your write on every frame, the lock is holding and any remaining latency is pure pipeline delay.
Does a faster camera shorten the exposure-change delay?
In frames, no; in time, yes. The count stays around five frames — two to apply, two or three to transport — but each frame is shorter. Five frames is 167 ms at 30 fps and 42 ms at 120 fps, so on a 120 fps camera a nine-frame session that includes five discard frames still fits in 75 ms.
How do I measure when the new exposure actually reaches my frames?
Log mean brightness per frame index, change exposure by a clear step such as 20 ms down to 5 ms at a logged index, and count the gap to the brightness step. That gap is your stack's true first-changed-frame count. If per-frame exposure metadata is available, log it as well: it shows the apply instant directly, with no lighting trick needed.

