Skip to main content

Command Palette

Search for a command to run...

Machine Vision Lighting for Reflective and Shiny Parts

Updated
10 min readView as Markdown

A geometry-led method for suppressing glare and making scratches, dents, print, and edges visible on shiny industrial surfaces.

A polished metal part can look different every time it rotates by a few degrees. A ring light produces a white hotspot, a dome removes the hotspot but also hides the scratch, and a polarizer improves one region while starving the camera of light elsewhere. The algorithm is blamed, but the image never contained stable defect contrast.

For reflective objects, lighting is not mainly about brightness. It is about controlling which rays enter the lens.

What you will learn

  • Predict how brightfield, darkfield, diffuse, coaxial, and backlighting affect specular parts.
  • Use polarization and wavelength deliberately.
  • Compare lighting candidates with measurable contrast and uniformity.
  • Avoid common arrangements that work only at one part angle.
  • Validate the lighting against surface, position, and ambient variation.

Technical foundation

Specular and diffuse reflection

A specular surface reflects much of the incident light in a preferred direction: the angle of reflection mirrors the angle of incidence. A diffuse surface scatters light over a broader range of directions.

Real industrial parts combine both behaviours. Machining marks, coatings, oil films, curvature, and defects redirect light differently. The job of the illuminator is to make the relevant difference reach the camera while nuisance variation does not.

Brightfield and darkfield

In reflected brightfield geometry, the main reflection from a smooth surface returns to the lens. Flat regions appear bright; features that redirect light can appear dark. Coaxial or on-axis lighting is a controlled brightfield arrangement for relatively flat surfaces.

In reflected darkfield geometry, the illumination arrives at a low angle and the main reflection misses the lens. Smooth background stays dark, while scratches, raised edges, pits, and contamination scatter light into the lens and appear bright.

Diffuse dome illumination

A dome surrounds the part with light from many directions, reducing localized hotspots on curved or uneven reflective surfaces. It is valuable for reading print or inspecting overall appearance, but it may reduce contrast for shallow defects whose signal depends on directional scattering.

Cross-polarization

Place a polarizer on the light and an analyser on the lens, then rotate their axes toward 90° separation. This can suppress glare from many dielectric or partially specular surfaces. The method also reduces useful light, may be less effective on some metallic reflections, and must be tested with the actual material and coating.

Wavelength and filters

Narrow-band illumination paired with a matching optical filter can reject much of the ambient spectrum. Colour selection can also increase contrast between materials or inks. The sensor’s spectral response, lens transmission, part colour, and safety requirements must all be considered.

[Suggested visual: the same glossy part under ring, dome, darkfield, and coaxial lighting]

Purpose: Show that illumination geometry changes defect contrast more than simple intensity changes.

Required elements: Four consistent monochrome image panels, identical part pose, marked hotspot, scratch, and printed feature.

Suggested caption: “Different lighting geometries reveal different physical properties of the same surface.”

Accessible alt text: “Four images of a shiny part compare ring, dome, darkfield, and coaxial lighting, with glare and scratch visibility changing in each.”

Engineering workflow

1. Define the optical task

Separate the questions the system must answer: silhouette, surface defect, print, colour, contamination, fill level, or dimensional edge. One lighting setup may not optimize all of them.

Why it matters: backlighting is excellent for an external edge but removes most surface information. A dome may stabilize print while hiding fine topography.

Common failure: requesting “uniform lighting” without defining the feature that needs contrast.

2. Characterize the surface and defect

Record material, finish, colour, curvature, texture direction, coating, oil or moisture, transparency, and defect topography. Observe samples while moving a handheld light: note the angles at which the defect brightens or disappears.

3. Choose candidate geometries

Use physics to create a short test matrix:

  • Backlight for silhouette and through-hole measurements.
  • Coaxial or on-axis brightfield for flat reflective surfaces and print.
  • Low-angle darkfield for scratches, embossed edges, pits, and particles.
  • Dome or large diffuse source for curved glossy parts and broad appearance checks.
  • Directional bar lights for shape-from-shading or directional defects.
  • Cross-polarization where glare suppression is plausible.

4. Control viewing geometry

Fix camera angle, working distance, aperture, and part presentation before comparing lights. For a specular part, a small angular change can dominate the result.

Trade-off: a larger diffuse source is more tolerant of part angle but consumes space and can reduce defect contrast.

5. Compare images quantitatively

Keep exposure and gain controlled where possible. Measure:

  • Defect-to-background contrast
  • Background uniformity
  • Saturated-pixel fraction
  • Signal-to-noise ratio in relevant regions
  • Sensitivity to pose, height, and lot variation

A simple normalized contrast is:

C = |mean(defect) - mean(background)|
    / (mean(defect) + mean(background))

Use the same regions and samples for every lighting candidate. High average contrast is not sufficient if it collapses at a position extreme.

6. Check exposure and thermal headroom

Polarizers, diffusers, filters, and large working distances reduce irradiance. Confirm that the final image meets motion-blur limits without excessive gain. For strobed operation, verify controller timing and thermal limits.

7. Design out ambient light

Use an enclosure, optical baffles, narrow-band light and filter, or synchronized strobe where appropriate. Test with nearby machine lights, sunlight cycles, opened guarding, and maintenance lamps.

Worked example: a shallow scratch on an anodized cap

Hypothetical application: detect a 0.10 mm-wide scratch on a 45 mm anodized aluminium cap. Cap tilt varies by ±3°. The surface carries occasional oil film. The camera and lens are fixed while four lighting arrangements are compared.

For 30 good caps and 20 scratched caps, acquire five poses per cap. For each image, measure the scratch-region mean and a neighbouring background mean. Suppose the median normalized contrast and worst-pose contrast are:

Lighting Median contrast Worst-pose contrast Main issue
Direct ring 0.22 0.03 Hotspot moves with tilt
Diffuse dome 0.09 0.06 Stable but scratch is weak
Low-angle darkfield 0.41 0.24 Strong directional response
Cross-polarized dome 0.16 0.11 Stable; longer exposure needed

These values are hypothetical. They illustrate the decision logic: the direct ring has reasonable typical contrast but fails at a pose extreme. Darkfield is the strongest candidate, but the team should rotate or segment the light if scratch orientation varies. A polarized dome may be a useful second image for print or general appearance, not necessarily the best single image for the scratch.

[Suggested visual: lighting-selection decision tree for reflective parts]

Purpose: Help engineers choose the first geometry to test from the inspection feature.

Required elements: Branches for silhouette, flat print, shallow scratch, curved glossy surface, transparent part, and ambient-light problem.

Suggested caption: “Choose the first lighting trial from the feature’s optical behaviour, then verify it experimentally.”

Accessible alt text: “Decision tree routes different inspection goals to backlight, coaxial, darkfield, dome, or filtered illumination.”

Lighting comparison table

Geometry Best starting use Main advantage Main limitation
Backlight Silhouette, gap, outer dimension High edge contrast Little surface information
Coaxial brightfield Flat reflective surface, print Controlled on-axis reflection Sensitive to tilt and curvature
Low-angle darkfield Scratch, pit, raised feature High topographic contrast Directional; uneven on complex shapes
Dome diffuse Curved glossy surface Suppresses local hotspots May flatten shallow defects
Directional bar Shape and oriented texture Tunable shading direction Pose-sensitive
Cross-polarized light Glare suppression Can reveal obscured detail Significant light loss; material-dependent
Narrow-band light + filter Ambient rejection Stable spectral contrast Must match sensor and material response

Common mistakes

  1. Buying a brighter ring light as the first fix. More intensity can produce a brighter hotspot without improving useful contrast.
  2. Testing only one part orientation. Specular behaviour changes sharply with tilt and rotation.
  3. Assuming a dome reveals every defect. Diffusion improves uniformity but can remove directional defect cues.
  4. Adding a polarizer only to the lens. Effective cross-polarization often requires control at both the source and lens.
  5. Ignoring light loss through filters. The resulting longer exposure may reintroduce motion blur.
  6. Mixing colour and geometry changes in one trial. Change one controlled factor at a time.
  7. Tuning the algorithm around saturated pixels. Saturation destroys intensity information and makes threshold behaviour brittle.
  8. Skipping contamination tests. Oil, dust, moisture, and fingerprints can change both reflection and polarization.

Validate under production conditions

Build a sample matrix across acceptable and rejectable defects, supplier lots, finishes, colours, oil states, positions, rotations, heights, and line speeds. Include ambient-light extremes and light warm-up.

Repeat captures to quantify contrast distributions, saturation, and spatial uniformity. Validate the final algorithm with locked exposure, gain, aperture, light current, geometry, and filter. Define acceptable contrast margin and false-accept/false-reject limits before the final threshold is chosen.

For long-term monitoring, track a stable reference region or check target. Alarm on meaningful brightness, uniformity, focus, or contrast drift rather than waiting for inspection errors to rise.

Key takeaways

  • Reflective-part lighting is a ray-geometry problem, not a brightness contest.
  • Brightfield, darkfield, dome, and backlight expose different physical features.
  • Polarization and spectral filtering are useful tools with light-loss and material limitations.
  • Compare lighting candidates across pose and material variation using quantitative contrast.
  • Freeze the mechanical and optical configuration, then monitor it for drift.

Follow this Hashnode blog for more practical machine-vision guidance, and connect with Kivanc Ekici on LinkedIn. For related engineering information, visit the ITAGE Türkiye website.

Frequently asked questions

What is the best lighting for shiny metal parts?

There is no universal choice. Low-angle darkfield often helps with scratches, coaxial light with flat reflective features, and dome light with curved glossy surfaces. Test the actual finish and defect.

Does cross-polarization remove all glare?

No. Its effectiveness depends on material, reflection type, angle, and coating. It also reduces transmitted light.

Why does a scratch disappear when the part rotates?

The scratch redirects light directionally. If the scattered rays no longer enter the lens, its contrast collapses. Multi-directional lighting or multiple images may be required.

Should I use white or monochromatic LED lighting?

Use the wavelength that maximizes feature contrast and sensor response while meeting material and safety constraints. Narrow-band light and a matching filter can improve ambient rejection.

How should lighting be compared objectively?

Measure defect contrast, background uniformity, saturation, noise, and worst-case performance over representative parts and poses with controlled camera settings.

Sources

More from this blog

I

Industrial Machine Vision and Robotics

297 posts