You turn a proportional-gain or dark-threshold key in the camera's auto exposure menu and the image does not move. Nine times out of ten that is not a fault: the keys act inside a control loop that has already driven the image to its brightness target, and a converged loop multiplies by 1.000 every frame no matter how its gain is set. This explainer shows where these keys sit in the loop, gives the arithmetic that proves the settle point never depends on them, gives the one test that separates a live key from a dead one, and states the settings to run on a production line instead. It is written for anyone integrating an area scan camera or a depth camera who has started tuning vendor auto exposure internals.
The decision, up front
A converged loop applies a correction factor of 1.000 every frame, and 1.000 raised to any loop gain is still 1.000. That one line explains nearly every "no visual effect" report, and it hands you the verdicts:
| Key you changed | What you should see | Verdict |
|---|---|---|
| Exposure proportional gain, scene unchanged | Nothing | Normal; the key sets recovery speed, not the settle point |
| Dark threshold, scene unchanged | Nothing | Normal; it is a gate, not a gain |
| Gain proportional gain | Flicker, if anything | Instability; halve the key or lock the gain stage manual |
| Any loop key, production imaging | Nothing to gain | Stop tuning; run manual exposure, manual gain, strobed light |
Accept one more possibility early: some key families are deprecated. The interface accepts your write and even reads the value back, but nothing in the firmware acts on it. At least one stereo depth camera line shipped a whole auto exposure key family that the maker later confirmed as deprecated and removed in the following generation.
Where these keys sit in the loop
Every auto exposure loop, whatever the brand, does the same four things each frame. It measures a brightness statistic over the auto exposure ROI, usually a mean gray value. It compares that statistic with a target, typically near mid-scale. It computes a correction and applies it to exposure time until exposure reaches its limit, then to gain. It waits a frame and repeats. The tuning keys are the internals of step three: the proportional term Kp for the exposure stage, the matching term for the gain stage, and the dark threshold that shapes the statistic in step one.
The loop touches your image through exactly two numbers: exposure time and gain. Any key that does anything must therefore move one of those two numbers, which is the whole basis of the test later in this piece. If you point the loop's ROI at the part rather than the whole frame, read auto exposure ROI instability from detection feedback first, because a moving ROI can imitate a badly tuned loop.
Worked example: same endpoint, different speed
Take a mono camera with linear response below saturation: mean gray scales with exposure at fixed gain, so doubling exposure doubles the mean. The target is 128. The scene delivers a mean of 96 at an exposure of 4.00 ms. The full correction ratio is 128 / 96 = 1.333, so the loop's destination is 4.00 ms × 1.333 = 5.33 ms — set by the target and the scene, not by any key.
Frame by frame, with the exposure proportional key at two settings:
| Frame | Kp = 0.25 | Kp = 0.50 |
|---|---|---|
| 0 | 4.00 ms | 4.00 ms |
| 1 | 4.30 ms | 4.62 ms |
| 2 | 4.54 ms | 4.96 ms |
| 3 | 4.72 ms | 5.14 ms |
| 4 | 4.87 ms | 5.24 ms |
| 5 | 4.98 ms | 5.29 ms |
| Settles at | 5.33 ms | 5.33 ms |
The arithmetic for frame 1 at Kp = 0.50: correction = (128 / 96)^0.50 = √1.333 = 1.155, so exposure becomes 4.00 ms × 1.155 = 4.62 ms and the mean rises to 96 × 1.155 ≈ 111. Frame 2: (128 / 111)^0.50 = 1.074, giving 4.62 ms × 1.074 = 4.96 ms. Each frame halves the remaining error, so at 30 fps the Kp = 0.50 loop sits within 1% of 5.33 ms after about 0.17 s. The Kp = 0.25 loop needs roughly 12 frames, about 0.4 s.
Both loops end at 5.33 ms. Once the measured mean equals the target, the correction is exactly 1.000 and Kp vanishes from the equation. Turn the key anywhere between 0.25 and 1.00 on that converged image and nothing on screen can move — the key decided how fast you got here, not where you arrived.
The dark threshold is a gate, not a gain
The dark threshold sets the gray level below which pixels count as dark in the loop's statistic. It changes behavior only when a significant block of pixels actually crosses it. Say the darkest shadow detail in your scene sits between 90 and 110 gray: with the threshold at 40 the dark fraction is zero, and with the threshold at 60 it is still zero. Identical statistic, identical loop behavior, no visual difference between the two settings.
Slide a matte black target into the field of view so a third of the pixels fall near 20 gray and the settings finally diverge: threshold 60 counts more pixels as dark than threshold 40, the statistic shifts, and the loop responds differently. That is the honest test for this key, and it is exactly why a static scene tells you nothing about it.
Why only the gain key flickers
The gain proportional key scales each correction applied to the gain stage. Push it high and the loop overshoots: it boosts gain, the image blows past the target, the loop cuts hard, the image drops below the target, and the cycle repeats. You see pulsing every few frames, and because gain amplifies noise with signal, the pulsing is ugly. This is not the key "working" — it is a control loop close to instability.
On the stereo and time-of-flight cameras in the 3D sensors category, the infrared stream this loop exposes also feeds the depth calculation, so a hunting gain loop degrades depth readings as well as the image. For hands-on numbers on manual infrared gain, read depth camera gain and exposure: tune manual IR gain for near range.
- Type
- Depth / ToF camera
The fix for flicker, in order: halve the gain key until the loop settles within a few frames. If it never settles, lock gain manual and leave the loop the exposure stage alone.
The scene-change test: live key or dead stub
One test settles the question in ten minutes, and it is the only evidence that counts, because an interface read-back proves storage, not action.
- Query the readable range of the key and of exposure time and gain before writing anything — query the option range before setting exposure or gain. A key that reports a range can still be inert.
- Log exposure time and gain from the frame metadata. Judge from those numbers, never from the live image.
- Drop a two-stop neutral-density filter over the lens. Light falls to a quarter, so a live loop must pull exposure from 5.33 ms toward 21.3 ms — a fourfold rise you cannot miss. If the climb stops short, the auto exposure limit is clipping the loop; raise the limit instead of blaming the key, as setting the camera auto exposure limit instead of a tuning file explains.
- Repeat with the key at both ends of its range. Different recovery traces mean the key is live. Identical traces mean it drives nothing.
- When you command exposure manually afterwards, poll until the read-back matches your command: exposure takes effect over a frame or two, and the first frame after a change can still carry the old value. First camera frame dark: exposure settling or light timing? shows what that looks like.
When no visible change really is a fault
Three conditions make a genuinely live key look dead, and each has its own fix:
- The loop is not running. With exposure auto Off, or in Once mode after it has finished, there is no controller for the key to tune. Set continuous auto exposure and retest, allowing the settling time that dark frames under auto exposure: wait for convergence describes after startup.
- The loop is saturated. Pinned at the exposure limit or the gain limit, the loop has nothing left to move. Raise the limit or add light.
- An iris upstream is doing the job. On a lens with automatic iris, the iris holds image brightness and the camera's loop idles. Auto exposure vs iris control: which one the camera sets untangles who owns what.
And the fourth, already stated: the key family is deprecated, writes are accepted, nothing reads them. Design for that. The next section is the design.
What to run on a production line
For measurement and defect inspection, auto exposure is the wrong tool, and its tuning keys more so. Set the standard ExposureAuto and GainAuto features Off, fix exposure time and gain, and strobe the light so every frame sees identical illumination. Gray levels then repeat frame to frame, thresholds hold, and no loop gain anywhere decides your image. Ambient light becomes the remaining enemy — ambient light variation in pick and place vision: control it — and shrouding beats tuning.
Two details make the switch stick. First, if the image goes dark the moment you turn auto off, the loop was adding gain you never set; manual exposure darker than auto exposure: why AE beats your gain walks the rework. Second, when parts of very different reflectivity must pass one camera, run the loop yourself in software where you can bound and log it: software auto exposure for a raw camera and auto exposure control from image brightness are the patterns.
Any current area scan camera carries these standard controls; one example:
- Sensor format
- 1"
- Lens mount
- C-mount
- Interface
- USB3
- Resolution
- 16-25 MP
Pair the fixed exposure with a strobed light on a controller channel, so the light is on only while the sensor integrates:
- Output
- Constant voltage 24 V
- Channels
- 4 channels
- Control
- Digital
- Feature
- Strobe
Camera, lens, light and controller can be pulled together in the system configurator; light controllers and the camera finder are the direct routes.
Checks before you build on a tuning key
- Run the scene-change test once per camera family and read the verdict from exposure and gain metadata, never from the screen.
- Prefer the standard features — exposure time, gain, exposure auto mode — over vendor loop internals; the standard names survive firmware and model changes.
- Treat flicker after a gain-key change as instability. Back the key off before looking anywhere else.
- Pin the auto modes Off before saving presets, and re-read the stored values afterwards to confirm what the camera kept.
- Record the firmware version next to your test trace. A key that is live on one firmware can be a stub on the next, and the trace is your baseline.
If you want a hand fixing exposure and strobe timing for a specific camera and light, use the contact page — the answer usually comes back as two numbers and a wiring note.
Questions
Is it normal that auto exposure tuning parameters change nothing in the image?
Yes. Inside a converged loop the correction factor is 1.000, so the proportional term drops out of the arithmetic entirely — the settle point is fixed by the brightness target and the scene, not by loop gain. A write the interface accepts is no proof either: deprecated keys still store your value and read it back. Only a per-frame trace of exposure time and gain through a forced scene change proves a key acts on the image.
Why does raising the gain key make the depth and infrared streams flicker?
Because it multiplies every correction the loop applies to the gain stage. Raise it far enough and the loop overshoots: gain is boosted, the image passes the target, the loop cuts back hard, and the cycle repeats every few frames. On a stereo or time-of-flight camera the infrared stream feeds the depth calculation, so depth degrades with it. Halve the key until the loop settles within a few frames, or lock gain manual and leave the loop the exposure stage alone.
How do I test whether a camera parameter is live or a dead stub?
Log exposure time and gain from the frame metadata, drop a two-stop neutral-density filter over the lens — light falls to a quarter, so a live loop must raise exposure about fourfold — and compare the recovery trace with the key at both ends of its range. Identical traces mean the key is inert whatever the interface reports. Run the test once per camera family rather than per program: the outcome follows the firmware, not your code.
Should a production line use auto exposure at all?
For measurement and defect inspection, no. Set exposure auto and gain auto Off, fix exposure time and gain, and strobe the light so every frame sees identical illumination; gray levels then repeat frame to frame and thresholds hold. Auto exposure earns its place on setup screens and operator views, and on lines where parts of very different reflectivity pass one camera, where a bounded software loop you can log beats firmware internals.
Why does the dark threshold parameter do nothing on my scene?
It is a gate, not a gain. The key sets the gray level below which pixels count as dark in the loop's statistic, and it changes behavior only when a significant block of pixels actually crosses that level. With shadow detail sitting near 100 gray, moving the threshold between 40 and 60 leaves the dark fraction at zero both times. Slide a matte black target into the field of view and the two settings finally diverge.
Can a firmware or camera generation remove these parameters?
Yes. Key families ship with one camera generation and come back deprecated: the interface still accepts writes while nothing in the firmware acts on them, and the next generation drops the keys from the feature list. Build against the standard exposure and gain features, treat vendor loop keys as optional, and make your software fail soft when a key is absent instead of refusing to start.


