Machine Vision Image Quality

Stray Light in Machine Vision: Veiling Glare, Ghost Images, and Practical Tests

A bright source can wash out a dark part of the image even when it sits outside the frame. Start by finding the light path that causes the loss of contrast.

By Commonlands engineering team · Updated September 2026 · 5 min read

Camera with a lens hood near a bright light source

Stray light reaches the sensor through unintended optical paths. Reflections and scatter can produce ghost images or a broad veil that lowers image contrast. Flare and glare terminology overlaps across optics references; a specular highlight on a part can also become the source of flare inside the camera. Test the assembled optical path before choosing a coating, hood, or filter.

Why Contrast Disappears Near a Bright Source

A dark marking may disappear when a lamp enters the scene even though the lens stays in focus. Reflections and scatter can send light into the marking's image, making it harder to distinguish from its surroundings.

The source can be inside or outside the field of view. Filters, windows, barrel surfaces, the sensor, and contamination can all contribute. Check for saturated pixels and processing artifacts before attributing every bright patch to optical flare.

Close view of a lens front surface
A photograph of a coated surface does not establish its reflectance. Ask for spectral and angular coating data.

Veiling Glare and Ghost Images

Flare often describes visible stray-light effects broadly. Veiling glare is unwanted illumination that lowers contrast over an image area; it need not be uniform. Ghost images have structure, such as a disk, ring, or duplicate of a bright source.

These terms overlap. The IEEE P2020 white paper groups them together, while Optikos explains differences in measurement terminology.

A specular highlight is a reflection from the scene, such as a lamp reflected by a shiny part. It can hide a feature, saturate pixels, and feed internal flare at the same time. Describe the observed artifact and its light path when choosing a fix.

Measure the Camera Under Real Lighting

A high dynamic range (HDR) sensor does not guarantee that a dark object remains visible beside a bright source. Flare, noise, and processing all affect that result.

ISO 9358's veiling glare index measures a defined lens test, using a small dark area in a bright field. It is not a fixed percentage of every scene. A 1% result therefore does not establish a universal 100:1 camera dynamic-range limit; Koren's study explains the dependence on test geometry.

Test a representative dark feature as the bright source moves through and beyond the field of view. Record feature contrast and detection success in the intended HDR mode. For standardized automotive camera measurements, consult IEEE Std 2020-2024; the earlier P2020 white paper explains the working group's approach.

What Anti-Reflection Coatings Do

A broadband anti-reflection (BBAR) coating reduces surface reflection over a specified wavelength range. This improves transmission and leaves less light available to some ghost paths. Kingslake and Johnson discuss both effects in Lens Design Fundamentals, §1.1.3.

“BBAR” does not specify a universal reflectance. Ask for spectral and angular data and which surfaces are coated. A coating made for visible light may reflect more near-infrared light. Surface reflectance alone cannot predict a ghost's brightness at a pixel; its path and spread also matter.

A hydrophobic coating repels water. That does not automatically mean it repels oil or reduces optical reflections. Evaluate the completed coating stack.

Control the Unwanted Light Paths

A hood can block an off-axis source before it reaches the lens. Baffles and absorbing finishes can intercept light inside the camera. Check that these parts leave useful rays unobstructed across the full field.

A matte black surface may still reflect at grazing angles or near-infrared wavelengths. Test the finish in the operating band. Include protective windows in the test, since they add reflection paths and may be required for cleaning or enclosure sealing.

Gain amplifies flare along with the wanted signal. A fixed shading correction does not generally remove scene-dependent flare. A calibrated model can reduce some artifacts, but subtraction cannot undo clipping or remove the photon noise added by unwanted light.

Board camera with a recessed lens opening
Check hood clearance and corner illumination on the assembled camera.

Reduce Reflections From the Part

For a shiny part, change the lighting direction or source size and watch the feature you need to inspect. A diffuse source can soften a reflection, but may spread it over a larger area.

Cross-polarization uses a polarizer over the light and another over the lens, with their transmission axes crossed. It can suppress reflections that retain the illumination's polarization. The benefit and light loss depend on the material, angles, and filters, so test the actual part.

A bandpass filter blocks ambient light outside its passband. It still passes unwanted light within that band. A neutral-density filter can prevent clipping, but reduces useful light too.

A Repeatable Bench Test

  1. Fix focus, aperture, exposure, gain, and processing. Save raw frames where available.
  2. Compare frames with the unwanted source blocked and admitted, keeping useful illumination unchanged.
  3. Move the source through the field and beyond its edge. Record its angle and output.
  4. Change one hood, filter, or window at a time.
  5. Repeat the worst cases in the final enclosure and measure detection or inspection success.

Specify the Test With the Lens

Ask for stray-light results with the source spectrum, angle, and camera configuration documented. Include the window and filter stack. A “low ghost” label alone does not establish performance in your scene.

Frequently Asked Questions

Is glare different from stray light?

The terms overlap. Veiling glare describes unwanted image-plane illumination that reduces contrast, while flare often describes visible stray-light artifacts more broadly. A specular scene reflection can create a bright highlight and also feed internal flare. Describe the observed artifact and light path when specifying a test.

Does veiling glare have to be uniform?

No. It can vary across the frame and with the position of a bright source. A single measured percentage describes a particular setup; it does not predict every pixel in an arbitrary scene.

Does a BBAR coating guarantee low flare?

No. Its reflectance depends on wavelength, angle, and the coated surface. Ghost paths can include other lens surfaces, filters, windows, and the sensor. Verify the complete camera under the intended illumination.

Can an HDR sensor recover detail lost to flare?

HDR capture can preserve signals that a single exposure would clip, but it does not remove unwanted optical illumination. Remaining feature visibility depends on local contrast, noise, and processing. Test it with the lens and enclosure assembled.

References

  1. IEEE P2020 Automotive Imaging White Paper (2018). Working-group source: §2.3 on the imaging chain and Table 1 on flare, ghosts, and veiling glare. Hosted by working-group participant Imatest.
  2. IEEE Std 2020-2024. Official scope and publication record for the automotive image-quality standard.
  3. Optikos, Stray Light Measurement (2020). §2 gives ISO 9358 definitions; §3 distinguishes lens and camera measurements.
  4. Norman Koren, Measuring the Impact of Flare Light on Dynamic Range (2018). Electronic Imaging, paper IQSP-169. Examines glare measurements, chart geometry, and visibility of dark detail.
  5. Rudolf Kingslake and R. Barry Johnson, Lens Design Fundamentals, 2nd ed. (2010). Academic Press, §1.1.3. Publisher-hosted excerpt on anti-reflection coatings.
  6. Edmund Optics, Machine Vision Filter Technology. Manufacturer application note illustrating source and lens polarizers for specular-reflection control.

Talk With Commonlands Engineering

Send a reference frame and a frame with the troublesome source present, along with your lens, sensor, and window details. Those comparisons help us identify the path to investigate.