Cameras & sensorsExplainer

Auto exposure vs iris control: which one the camera sets

Auto exposure vs iris control: auto exposure trims only exposure time and gain; the aperture is a ring you set by hand. Stop math and a cloud-camera example.

LumaSpec Vision11 min قراءة مشاركة على LinkedIn

في هذه الصفحة 10 أقسام
  1. 01The decision, first
  2. 02Three levers, measured in stops
  3. 03Gain is the last dial you spend
  4. 04Which f-number to lock
  5. 05The blur ceiling on your shutter
  6. 06Worked example: one setting from noon to dusk
  7. 07When the iris must move from software
  8. 08When the usual answer is wrong
  9. 09Checklist before you order
  10. 10Questions

Point a camera at the sky and the histogram swings from blown-out white to near-black every time a cloud crosses the sun. The question that follows is a common one: does auto exposure mean the camera can place the aperture anywhere between f/2 and f/16, or does it only set exposure time? On machine-vision and small-board cameras the answer is firm: auto exposure adjusts two dials only, exposure time and gain. The aperture is a mechanical iris inside the lens, set by hand. What follows is what that means in stops, which f-number to lock for changing sky light, and what hardware it takes when the iris truly must move from software.

The decision, first

Auto exposure is a brightness feedback loop. It meters the frame, compares the reading with a target, and turns the two actuators every industrial and embedded camera owns: integration time lengthens or shortens, gain rises or falls, until the average brightness lands on the target. How that loop is tuned, from target level to response speed and limits, is covered in automatic iris, exposure and gain control in machine vision.

What the loop can never do is reach the aperture. The iris is a ring of blades inside the lens; unless it carries a motor, and the camera carries a driver for that motor, no algorithm will move it. So the decision for a scene whose brightness keeps changing, like a sky, is this: buy a manual-iris lens, set the ring two stops down from full open, lock the screw, and let auto exposure trim time and gain around the fixed aperture. As the arithmetic below shows, one setting holds from noon sunlit cloud to dusk overcast.

Buy a motorized iris only when the aperture must move with no hands on the lens: a mast-mounted rig nobody can reach, or a station that must re-range between day and night faster than shutter and gain can follow. Then order lens and driver together, because an iris motor with nothing driving it stays wherever it was last left.

Three levers, measured in stops

Every exposure control trades light in factors of two, which makes stops the only currency worth counting:

stops(time) = log2(t2 / t1) stops(gain) = dB / 6.02 stops(iris) = 2 × log2(N2 / N1)

The iris term carries the square because collected light falls with the square of the f-number. Set typical machine-vision ranges side by side:

Lever Typical range Stops Moved by Side effect
Exposure time 20 µs to 1 s 15.6 auto exposure motion blur at long times
Gain 0 to 24 dB 4.0 auto exposure noise rises with the signal
Aperture f/1.4 to f/16 7.0 you, or a motor with its driver depth of field and diffraction shift

Shutter plus gain span about 19.6 stops, close to three times the whole iris. The aperture was never the brightness workhorse; it is the image-quality dial, trading light against depth of field and diffraction. That trade is treated at length in aperture, f-number and depth of field in machine vision cameras.

Gain is the last dial you spend

A well-behaved loop lengthens exposure first and raises gain last. Gain amplifies signal and noise together: every 6 dB doubles brightness and doubles the noise riding on it, and on small pixels it lifts fixed-pattern structure into view. Cap auto-gain at 12 dB while shutter headroom remains; allow the full 24 dB only when the blur ceiling blocks a longer exposure.

If the camera is driven from code, query the exposure-time and gain ranges the device actually reports before writing limits into it: query the option range before setting exposure or gain shows the call pattern. Set the loop's brightness target deliberately too; for cloud work, aim it at the deck, not the blue gaps, the way set an auto exposure brightness target for inspection describes.

Which f-number to lock

Two stops from full open is the default answer, and it survives contact with the physics.

Lens aberrations are worst wide open. By two stops down the corners have sharpened and the centre has given up almost nothing. Stop down further and diffraction collects the bill: the Airy disc diameter is 2.44 × λ × N, which at 550 nm gives 5.4 µm at f/4, 10.7 µm at f/8 and 14.8 µm at f/11. On 2.4 µm pixels that is 2.2, 4.5 and 6.2 pixels of blur. Stay at or below f/8 on pixels that size; f/11 spends resolution buying depth of field you already have. The full diffraction arithmetic is in Airy disk size and the diffraction limit: match pixel to feature.

Depth of field at sky distances is not the constraint it is on a conveyor. Focus a 16 mm lens at its hyperfocal distance, H = f² / (N × c), and with a two-pixel circle of confusion (4.8 µm) at f/5.6 that distance is 16² / (5.6 × 0.0048) ≈ 9.5 m. Focused there, everything from about 4.8 m to the horizon is sharp. Run your own focal length and aperture through the calculator:

Depth of field and diffraction
Units
Depth of field
– mm
About the focus plane
– mm
Diffraction limit
– F/#
Blur limit
– µm
Diffraction spot
– µm
At this F-number
–

DOF ≈ 2 × N × c × (1 + m) / m², c = allowed blur × pixel size. Diffraction spot (Airy disk) ≈ 2.44 × wavelength × N × (1 + m); past the diffraction limit it is larger than the blur you allowed.

Browse lenses by aperture and format Open the full calculator

The blur ceiling on your shutter

Clouds move, so the shutter has a ceiling set by sharpness, not by the sensor. Image-side motion speed is angular rate times focal length:

v = ω × f t_max = b / v

Take a fair-weather cumulus deck 500 m away in a 15 m/s wind: ω = 15 / 500 = 0.03 rad/s. With a 16 mm lens, v = 0.03 × 16 mm = 0.48 mm/s, or 480 µm/s across the sensor. Allowing two pixels of 2.4 µm, 4.8 µm of blur, t_max = 4.8 µm / 480 µm/s = 10 ms. That is the design number: 10 ms for a 16 mm lens on near cumulus. High cirrus at 8 km drifting 30 m/s gives ω = 0.00375 rad/s, v = 60 µm/s and an 80 ms ceiling, never the binding constraint. The nearer and faster the deck, the tighter the ceiling; halve the distance and the ceiling halves with it.

Worked example: one setting from noon to dusk

The rig is a 1", 20 MP-class camera with a 16 mm manual-iris lens. The MV-CS200-10UM is a 20 MP USB3 camera with a 1" sensor, a C-mount thread and a rolling-shutter IMX183 sensor in mono. Pair it with the LS-FFL-0567, a 16 mm 1.1" C-mount lens rated for 20 MP, its iris closing from F2.8–22 with distortion under 0.3%. Set the ring two stops down from full open, to f/5.6, and tighten the lock screw. Call the pixels 2.4 µm and the sensor width 13.1 mm; both are example inputs for the arithmetic, not data-sheet lines.

Area scan camerasHikrobot MV-CS200-10UM 20 MP Area Scan Camera, USB3.0, IMX183, 2nd Gen., MonoMV-CS200-10UM
Sensor format
1"
Lens mount
C-mount
Interface
USB3
Resolution
16-25 MP
$759.00View partBuild a system with it
Machine vision lenses16 mm, 1.1", 20 MP, C-mount machine vision lens, F2.8-22, <0.3% distortion (LS-FFL-0567)LS-FFL-0567
Type
Machine vision fixed
Sensor format
1.1"
Mount
C-mount
Resolution
16-25 MP
$679.00View partBuild a system with it

Framing: 2 × atan(13.1 / (2 × 16)) = 44.5°, so the frame holds about 45° of sky, roughly 410 m of cloud deck across at 500 m (2 × 500 × tan(22.25°) = 409 m).

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

The exposure budget, in stops:

  1. Noon, sunlit cumulus: sunny-day exposure arithmetic, the f/16 rule, puts a bright deck near 1/4000 s at f/5.6 and base gain: 0.25 ms.
  2. Design dim point, heavy overcast half an hour after sunset: eight stops down, so the required time at 0 dB is 0.25 ms × 2^8 = 64 ms.
  3. The blur ceiling is 10 ms, so the shutter alone falls 6.4× short.
  4. Spend gain: 24 dB ≈ 4 stops ≈ ×16, which brings 64 ms down to 4.0 ms, inside the ceiling with 1.3 stops to spare.
  5. Quieter variant: cap gain at 12 dB (2 stops, ×4) and the need is 16 ms, over the ceiling; open the ring one stop to f/4 and it halves to 8 ms, which fits.

Decision: lock f/5.6, a 24 dB gain allowance and a 10 ms shutter limit, and the rig holds exposure from noon to dark overcast. If the frames will be cropped hard and noise matters, lock f/4 with a 12 dB cap instead: the same day span, cleaner dusk frames.

Two other bodies suit this work:

Area scan camerasHikrobot MV-CS200-10GC 20 MP Area Scan Camera, GigE, IMX183, Color, BasicMV-CS200-10GC
Sensor format
1"
Lens mount
C-mount
$739.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

When the iris must move from software

Lenses come with four kinds of iris. A fixed iris has no ring at all; the aperture was set where the optics were finished. A manual iris is the knurled ring with a lock screw that most machine vision lenses carry, and the setting lives in metal, not in software. A DC auto-iris, the type that dominates CCTV lenses, drives the blades with a coil: it needs a driver amplifier fed by a control signal, and the connection is a separate plug, never the mount thread. A P-iris replaces the coil with a stepper and position feedback over a serial line, so software can command an exact stop.

Software aperture control is therefore two purchases, not one: the motorized lens and the electronics that drive it, whether a camera body with a DC-iris output, a standalone iris controller, or a serial channel for P-iris. Most machine-vision and small-board cameras expose none of these; their control interfaces list exposure time, gain and a brightness target, and no iris node. On those platforms the honest answer is the one above: fix the ring and let the loop work around it.

For remote framing rather than remote exposure there is motorized zoom: the LS-CTV-0066 is a 1" C/F-mount motorized zoom lens. Wiring a motor in the barrel, from drive voltage to polarity and position feedback, has its own failure modes, mapped in motorized zoom lens control: voltage, polarity and position feedback.

CCTV lenses1", C/F-mount motorized zoom lens, WD 85 +/- 2 mm (LS-CTV-0066)LS-CTV-0066
Type
Motorized zoom
Sensor format
1"
Mount
C-mount
Image circle
11-16 mm
$349.00View partBuild a system with it

When the usual answer is wrong

Fix-the-ring fails in four specific ways.

The sun in frame. A focused solar image can bloom the sensor in one frame and damage it in a few more.

Night skies. Past the end of twilight the sky background, not motion, limits the image. Open the iris wide, let the shutter run to seconds, and hold gain low: amplifying a background-limited frame only amplifies sky glow.

Series you will compare. Auto exposure re-solves every frame, so two frames of one cloud differ in settings and any brightness trend inherits those jumps. Lock time, gain and iris; the drift you get when you do not is the subject of camera image brightness drifts over time: turn every auto mode off.

Broken-cloud flicker. When the sun strobes through fast cloud, the loop hunts and lags behind. Meter the sunlit state, fix exposure there and accept dark frames in shadow, or write your own loop with 0.3–0.5 s of smoothing; the trade-offs are laid out in build a software auto exposure algorithm: the control law.

Checklist before you order

Run this against the lens and camera pages before either goes in the basket:

  • Iris type and lock. A manual ring with a lock screw; an unlocked ring walks with vibration and temperature swings.
  • Printed iris range. F2.8–22 is about six stops, (22/2.8)² ≈ 62; any span past five stops is plenty for a fixed setting.
  • Coverage. The image circle must meet or exceed the sensor diagonal, with the mount matching: a 1.1" lens is comfortable over a 1" sensor.
  • Controlled limits. Set the shutter ceiling at the blur limit and the gain ceiling at the noise budget, after querying the ranges the camera reports.
  • Filter plan. If the sun can enter the frame, the neutral-density or solar filter belongs on the same order.
  • Motor path. If the aperture must move remotely, order lens and driver in one pass and confirm the control appears in the camera's interface.

When the parts are chosen, the system configurator walks camera, lens and mounting through the same steps.

أسئلة

Can auto exposure set the aperture between f/2 and f/16 for me?

No. On machine-vision and small-board cameras, auto exposure adjusts only exposure time and gain. The aperture moves only if the lens has a motorized iris and something drives it: a DC-iris output on the camera or a separate controller. Set a manual-iris ring yourself, about two stops from full open, and let the loop trim the other two dials around it.

How much brightness range do shutter and gain cover without touching the iris?

More than the iris covers. A 20 µs to 1 s shutter spans about 15.6 stops and 24 dB of gain adds 4 more, roughly 19.6 stops together. An f/1.4 to f/16 iris spans about 7 stops. Only a scene swinging wider than that, direct sun to starlight, forces the aperture to move for brightness alone.

What iris setting should I lock for photographing cloud decks?

f/5.6 on an f/2.8 lens. Two stops from wide open sits near the lens's sharpness sweet spot, keeps a noon sunlit deck near 1/4000 s, and leaves dusk inside a 10 ms motion-blur ceiling once gain covers the last four stops. Tighten the lock screw so vibration and temperature swings cannot walk the ring.

Will a DC auto-iris CCTV lens give software aperture control on any C-mount camera?

No. A DC iris is a coil-driven blade ring that needs a driver amplifier and a control signal; a plain C- or CS-mount thread carries neither, and the connection is a separate plug. You need a body with a DC-iris output or a standalone iris controller, and your code drives that. P-iris additionally needs a serial channel for position feedback.

Should I use auto exposure for a sky image series I want to compare?

No. Lock exposure time, gain and the iris ring, set for the median scene. Auto exposure re-solves brightness on every frame, so two frames of the same cloud carry different settings and any measured trend inherits those jumps. For radiometric work, one locked triplet beats any feedback loop.