Lenses & opticsExplainer

ND filters for exposure control: optical density to aperture

Size an ND filter for exposure control: convert histogram overshoot to optical density, then choose shorter exposure, wider aperture or depth of field.

LumaSpec Vision8 min read Share on LinkedIn

On this page 8 sections
  1. 01What does optical density do to exposure?
  2. 02Why not just shorten the exposure or stop the lens down?
  3. 03How much density fixes a saturated image?
  4. 04Does an ND filter change color, contrast or sharpness?
  5. 05Can you stack ND filters to reach a higher density?
  6. 06Why does the image still bloom or shift color with an ND fitted?
  7. 07When is an ND filter the wrong fix — and when is it unsafe?
  8. 08Questions

A saturated image with no exposure headroom left is a common bench problem: the camera already runs its shortest exposure, the iris is fully stopped, and the highlights still clip. A neutral density (ND) filter is the third knob — a flat gray attenuator that cuts light without touching color, contrast or geometry. This guide gives you the conversions and the decision that follows: optical density to transmission, transmission to stops, and stops to a choice between exposure time, f-number and depth of field. It also covers where ND glass misleads — near-IR leakage on color sensors, stacked reflective filters, and bright sources that stay hazardous behind visible-band attenuation. Work the arithmetic once and you can order the right density the first time.

What does optical density do to exposure?

Optical density is a base-10 logarithm of attenuation: transmission T = 10^(-OD), so OD 0.3 passes 50% of the light and costs one stop, OD 0.6 passes 25% and costs two, and OD 1.0 passes 10% and costs about 3.3 stops. The scale is logarithmic, which is why filters come in small steps and why densities stack additively.

T = 10^(-OD) stops of exposure cut = OD / 0.301
Optical density Transmission Exposure cut Same result without glass
0.3 50% 1 stop 2 ms → 1 ms, or f/8 → f/11
0.6 25% 2 stops 2 ms → 0.5 ms, or f/8 → f/16
0.9 12.5% 3 stops f/8 → f/22
1.2 6.3% 4 stops 2 ms → 125 µs
2.0 1% 6.6 stops furnace-glow territory
3.0 0.1% 10 stops direct sun into the lens

When you size from a required attenuation instead of a histogram, the OD-to-attenuation walkthrough starts from the measured light level; this page starts from the image itself.

Why not just shorten the exposure or stop the lens down?

Because those two knobs are free: cut exposure time first, then close the iris, and add glass only when one of them has run out — you sit at the camera's exposure floor, at the lens's smallest aperture, or the depth of field pins the aperture open. A machine vision iris already carries plenty of range: the model below stops from F2.8 to F22.

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

F2.8 to F22 is six stops on its own (2 × log2(22/2.8) ≈ 5.95), and inside that span plus the exposure range most indoor saturation clears without glass. If the light level wanders rather than saturates steadily, automatic iris, exposure and gain control tracks it without any filter. Reach for ND glass when the light is not yours to turn down: sun, a welding arc, furnace glow, or a fixed lamp at full power. When the aperture span itself drives the lens choice, the lens finder narrows by mount, sensor format and resolution.

How much density fixes a saturated image?

Measure the overshoot and convert in one step: the density you need is OD = log10(R), where R is how many times too bright the image is — a highlight pinned at 255 that should sit near 64 gives R = 4 and OD 0.6. The camera's own histogram is the only instrument this needs.

R = current pixel value / target pixel value OD needed = log10(R)

Worked example — direct sun on a nameplate. The camera below is a 20 MP, 1-inch color sensor on GigE, a common class for outdoor line work. Assume a 13.2 mm sensor width for the 1-inch format and a 3 µm blur budget c (machine vision pixels typically run 2–5 µm). At f/16 with a 20 µs exposure floor, the sunlit highlight reads 255 while the process tolerates 64.

Area scan camerasHikrobot MV-CS200-10GC 20 MP Area Scan Camera, GigE, IMX183, Color, BasicMV-CS200-10GC
Sensor format
1"
Lens mount
C-mount
Interface
GigE
Resolution
16-25 MP
$739.00View partBuild a system with it

R = 255 / 64 = 4.0, so OD = log10(4.0) = 0.60. Fit OD 0.6: T = 10^(-0.6) = 0.25, and 255 × 0.25 = 64 — back on target with the exposure and the aperture untouched.

Now the aperture decision. Magnification m = 13.2 / 60 = 0.22, and the thin-lens estimate gives DOF ≈ 2·N·c·(1+m)/m² = 2 × 16 × 0.003 × 1.22 / 0.0484 = 2.4 mm at f/16 — enough for 2 mm of surface relief, so hold f/16. To isolate the nameplate instead, open two stops to f/8 with the filter in place: the iris contributes ×4, the glass ×0.25, so the 20 µs exposure lands at the same 64 while depth of field halves to 1.2 mm. The histogram set the density; the process set the aperture.

DOF ≈ 2·N·c·(1+m)/m² m = sensor width / field of view
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 same conversion sizes attenuation for stereo depth cameras in direct sunlight, where one log10 covers both the sunlit scene and the IR projector.

Does an ND filter change color, contrast or sharpness?

In its specified band, no: a neutral filter scales every wavelength by the same factor, so hue, white balance and gray-level contrast survive, and plane-parallel glass adds no geometric distortion. The exceptions live at the band edges and outside the band. Absorptive glass soaks up the light it rejects — it warms under intense sources, so give the mount some tolerance — and cheaper compositions carry a transmission slope into the UV or IR. Reflective filters reject a fraction at the surface, hold a flatter response deeper into the near-IR, and use coatings to keep that reflected light from ghosting back; colored glass versus interference coatings sets out that trade. For sharpness, mount on the lens front thread and keep both surfaces clean — a dusty surface costs more contrast than any quality filter does, as camera window cleaning shows.

Can you stack ND filters to reach a higher density?

Yes — densities simply add because transmissions multiply: stack OD 0.6 on OD 1.2 and the pair behaves as OD 1.8, passing 10^(-1.8) ≈ 1.6% of the light (0.25 × 0.063). Two cautions. Never stack two reflective filters: their partially reflecting surfaces bounce light back and forth and print ghost images, so pair one absorptive with one reflective. And stacking compounds whatever band-edge slope the glass carries, so a visible-only absorptive stack leaks proportionally more near-IR — the next question's subject.

Why does the image still bloom or shift color with an ND fitted?

Because most visible-band ND glass passes near-IR almost untouched: silicon sensors respond out to roughly 1000 nm, so sunlight and hot parts push IR straight through the filter, blooming highlights and dragging color toward red or magenta. Confirm the cause before buying — infrared contamination in color cameras walks the diagnosis. The fix is spectral, not more density: pair the ND with an IR-cut filter (the options for color sensors) or choose a reflective ND flat through the near-IR. If the near-IR is the point of the job rather than the problem, a band-pass sets the working band outright: the LS-LXR-0225 passes 850 nm through an M30.5 × 0.5 thread.

Lens accessoriesBand-pass filter, 850 nm (near IR), M30.5 x 0.5 thread (LS-LXR-0225)LS-LXR-0225
Type
Filters & polarizers
$119.00View partBuild a system with it

Whichever glass you pick, match the filter thread to the lens front thread — adapters and rings in the lens accessories range cover the common odd sizes, and the same shelf stocks the IR-cut filters to pair with them.

AccessoriesLens accessories

Adapters, tubes, prisms, targets

376 models · from $23.00

When is an ND filter the wrong fix — and when is it unsafe?

Not for glare: a neutral filter dims the specular highlight and the part behind it by the same factor, so a contrast problem on a shiny surface needs polarization, not attenuation — cross-polarization removes the highlight selectively while ND only moves it down the histogram. Not for a lamp you own either: shorten the pulse or lower the current on the light controller, because glass only throws photons away. ND earns its place for brightness you cannot turn down — sun, arcs, molten glow — or when depth of field pins the aperture.

Decision, every case: shorten exposure if you can; stop down if depth of field allows; when neither knob is free, add one stop of density (OD 0.3) per halving of light you need — OD = log10(R) straight from the histogram; on color cameras pair it with IR-cut; and keep stacks to one absorptive plus one reflective. Shortlist the glass in the lens accessories finder, then run the aperture decision through the extras step of the configurator.

Questions

Does an ND filter shift the focal plane or add distortion?

A plane-parallel filter adds no geometric distortion. Fit it on the lens front thread as designed: behind the lens the cone converges, so glass thickness there shifts focus and hurts the wide-open image. Refocus after fitting a filter for the first time and lock the focus ring so vibration cannot undo the setting.

Is it safe to view a welding arc or the sun through an ND filter?

No. Visible-band ND glass can pass intense infrared and ultraviolet that neither the filter's look nor your eye reveals, and retinal injury gives no warning pain. View bright sources only through eye protection rated for that source; for camera work, use filters specified across the full spectrum and inspect the sensor after any accidental exposure.

Can I pair ND filters with a pulsed LED light I control myself?

You rarely need glass there. Shorten the pulse width or lower the drive current on the light controller first: it costs nothing and adds no surfaces. Save ND filters for light you cannot turn down — sunlight, an arc, furnace glow — or for a fixed lamp that already runs at its minimum.

The filter thread does not match my lens — what fits?

Adapter and step rings close most gaps; the lens accessories category carries rings for the common C-mount and large-format threads. Keep the filter's clear aperture at least as large as the lens front element, or the stack itself vignettes the corners. Check both threads before ordering, and refocus after fitting.