addaScan an addanode brand home
Guide

Machine vision lighting guide: which light shows which defect

What each lighting geometry reveals, and how to light shiny, clear and curved parts. For engineers planning an inspection.

By addaScan engineering teamTechnical review: Frank GuoPublished 9 min read

Test lighting on your parts
// Short answer

Choose the light by the defect. Backlight shows outlines, holes and fill level as silhouettes. Low-angle dark-field light makes scratches, dents and embossing glow on a dark surface. A dome or diffuse light removes glare on shiny, curved parts so print can be read. Coaxial light suits flat glossy faces. Ring and bar lights suit matte parts; line lights serve line-scan cameras. Shield the station from ambient light and confirm the choice on your own samples.

Key points

  • A defect is visible only if it sends the camera a different amount or colour of light than the surface around it.
  • Geometry matters most: where the light comes from decides whether a surface looks bright or dark.
  • Backlight shows outlines; dark-field shows scratches; domes hide glare; coaxial suits flat glossy faces.
  • Shield the station from daylight and overhead lights; the station light should be the only one that counts.
  • Lighting is chosen on your parts during the sample test, not from a catalogue.

Why lighting decides what a camera can see

A defect can only be found if it sends the camera a different amount or colour of light than the good surface around it. That difference, contrast, is set mostly by the lighting, not by the camera or the software.

A smooth, shiny surface reflects light like a mirror: the light leaves at the same angle it arrived (HyperPhysics, reflection). If the light sits where that reflection enters the lens, the flat surface looks bright; this is bright-field lighting. If the light comes in at a low angle, the reflection misses the lens and the flat surface looks dark, while scratches, edges and dust scatter some light upwards and look bright; this is dark-field lighting (MicroscopyU, darkfield). Matte surfaces scatter light in all directions and depend less on the angle.

We choose lighting on your samples during the sample test, keeping the geometry that shows the defect consistently. The sample preparation guide lists what to send.

[Schematic]Side view · lighting geometries · not to scale

Swipe sideways to see the whole drawing →

Six machine vision lighting geometries, side viewSix side-view panels. One: backlight, the light is behind the part and the camera sees a dark silhouette. Two: dome, light reaches a shiny curved part evenly from all sides. Three: dark-field, low-angle lights skim a flat surface; the reflection misses the camera and only a scratch scatters light up into the lens. Four: coaxial, a beam splitter under the lens sends light down along the camera axis and a flat glossy surface reflects it straight back. Five: bright-field ring light around the lens shines steeply onto a matte part. Six: a line light draws a narrow bright line on a moving web under a line-scan camera, with an encoder on the conveyor.[1] BACKLIGHTSILHOUETTELIGHT BEHIND THE PART[2] DOME / DIFFUSESHINY CURVED PARTEVEN LIGHT FROM ALL SIDES[3] DARK-FIELD (LOW ANGLE)LOW LIGHTSCATTERFLAT SURFACE STAYS DARKSCRATCH SHOWS BRIGHT[4] COAXIALBEAM SPLITTERLIGHTFLAT GLOSSY FACELIGHT ALONG THE CAMERA AXIS[5] BRIGHT-FIELD RING / BARRING LIGHTMATTE PARTSTEEP LIGHT, SURFACE BRIGHT[6] LINE LIGHT + LINE-SCANENCODERWEB MOVES →LINE LIGHTNARROW LINE ON A MOVING WEB
[1] Backlight: silhouettes for outlines, holes and fill level.
[2] Dome: even light that hides glare on shiny, curved parts.
[3] Dark-field: low light; scratches and relief glow on a dark surface.
[4] Coaxial: light along the camera axis for flat glossy faces.
[5] Ring or bar: simple, bright light for matte parts.
[6] Line light: a narrow bright line for line-scan cameras.

Six lighting geometries and what each reveals

Backlight

The light sits behind the part, facing the camera. Opaque parts appear as dark silhouettes, which makes outlines, holes, gaps, flash, short shots, presence and position easy to measure. It shows nothing of the top surface. Clear parts let the light through, so backlight also shows fill level, particles and bubbles in clear containers. You need access behind the part, and dust on the light shows up as a false defect.

Dome and other diffuse light

A dome surrounds the part with even light from nearly every direction, like an overcast sky. Reflections from shiny, curved or crinkled surfaces merge into an even background, so print, codes and marks can be read on cans, foil, blister packs and bottles. The dome must sit close to the part, the camera hole can show as a dark spot on flat mirror-like parts, and because diffuse light hides relief it also hides shallow scratches and dents.

Dark-field or low-angle light

Light arrives close to the surface from a ring or bars around the part. Flat areas stay dark; scratches, dents, embossed or engraved text, dot-peen codes, burrs and edges catch the light and glow. Height and tilt must be consistent, dust glows too, and a single bar shows features running across its light better than along it. See surface defect detection for how this applies to scratches, dents and moulding faults.

Coaxial light

A half-mirror, the beam splitter, sends light down along the camera's own axis. A flat, polished face square to the camera reflects it straight back and looks bright; scratches, pits and stains scatter it and look dark. Curved or tilted areas turn dark, and the beam splitter wastes much of the light.

Bright-field ring or bar light

A ring around the lens or bars above the part shine down steeply. It is the simplest, brightest option and suits matte parts: printed cartons, paper labels, presence and colour. On glossy parts it creates hot spots, reflections of the light itself; moving the light off the camera axis often moves them out of view (NI lighting guide).

Line light for line-scan cameras

A line-scan camera builds the image one line at a time as the product moves, for webs, film, sheet and rotating cylinders. It needs a narrow, bright line of light that is even along its whole length, because each line is exposed only briefly. Light and scan line must stay aligned, and an encoder keeps the image scale correct when speed changes.

Shiny, clear and curved parts

  • Shiny and flat: coaxial light to see marks on the face, dark-field to see scratches and relief.
  • Shiny and curved: a dome or other diffuse light, so the curve does not reflect a bright image of the light.
  • Clear: backlight for fill level and outline; dark-field for cracks and chips. The camera sees through the part, so keep the background plain and still.
  • Dark or black: these parts return little light; low-angle light brings out texture and relief.

Polarising filters help with glare. Light reflected from many surfaces is partly polarised (HyperPhysics, polarisation by reflection), so a polariser on the light and a crossed polariser on the lens can suppress glare while keeping surface detail. They cost light, and changing the geometry often works better (NI lighting guide).

Ambient light and shrouds

Daylight, overhead lights and neighbouring stations add light the recipe was not set up for, and it changes through the day. The NI guide describes three remedies: strobing the station light brightly with short exposures, enclosing the inspection area, and fitting a filter on the lens that passes only the station light (NI lighting guide). A shroud also shields operators from flashing light; design it with cleaning access in mind. The guide to reducing false rejects covers what happens when lighting drifts.

Colour of the light

With a monochrome camera, the colour of the light is a contrast tool. Light of the same colour as a feature makes it look bright; light of the opposite colour on the colour wheel makes it look dark (NI lighting guide). Red light, for example, makes red print fade and darkens blue or green print.

Beyond visible light, infrared passes through some plastics better than shorter wavelengths and can make colour differences in print fade, while blue light suits shallow features such as laser etching on black rubber. Ultraviolet makes fluorescent inks and dyes glow (NI lighting guide). For colour checks, use a colour camera with stable white light. Whether a colour helps is checked on your parts.

Strobing

A strobed light switches on only for the exposure, triggered with the camera. With a short exposure it freezes moving products and can outshine ambient light (NI lighting guide). Light and exposure timing must match, and pulse limits come from the light and controller datasheets.

Decision table

A starting point; the final choice is made on your samples.

Decision table: which lighting for which part or defect
Part or defectLightingWhy it worksWatch out
Outline, holes, gaps, flash, short shots on opaque partsBacklightThe part becomes a sharp silhouette.Needs access behind the part; dust on the light shows up.
Fill level or foreign matter in clear containersBacklightLiquid and particles change the light passing through.Labels block the view; foam, bubbles and condensation confuse it.
Cracks, chips and edges on clear glass or plasticDark-field backlight or low-angle lightCracks and edges bend light towards the camera and glow.Anything behind the part is visible too; use a plain background.
Scratches, dents, burrs on flat or machined surfacesDark-field (low angle)Relief scatters light up; the flat surface stays dark.Sensitive to height and tilt; dust and fibres glow as well.
Embossed, engraved or dot-peen codes and textDark-field or directional barRaised and cut edges catch the light.Light direction relative to the marks matters; test several.
Print and codes on cans, foil, blisters, shiny curved packsDome or other diffuse lightEven light from all sides removes glare and hot spots.Must sit close; hides shallow scratches and dents.
Marks and scratches on flat polished or glossy facesCoaxialThe flat face reflects straight back; marks scatter and look dark.Only for flat faces square to the camera; loses light.
Labels, print and presence on matte cartons and paperBright-field ring or barSimple, bright and even on matte surfaces.Hot spots on glossy areas; shadows beside raised parts.
Colour check on printed packagingDiffuse white light with a colour cameraEven, stable white light keeps colours consistent.Ambient light and ageing lights shift colour.
Continuous web, film, sheet or rotating cylindersLine light with a line-scan cameraA narrow, bright line matches the single scan line.Alignment, evenness along the length, and an encoder for scale.
// FAQ

Questions about lighting

What is the difference between bright-field and dark-field lighting?
In bright-field lighting the reflection from a flat surface enters the lens, so the surface looks bright. In dark-field lighting the light arrives at a low angle, the reflection misses the lens, the surface looks dark and scratches, edges and raised features look bright.
When should I use a coaxial light?
For flat, polished or glossy surfaces square to the camera: polished metal, glass, laminated labels, flat foil. The surface looks bright and scratches and marks look dark. On curved or tilted surfaces it gives uneven, dark areas.
How do you light shiny or reflective parts?
It depends on the defect. To read print or codes on a shiny curved surface, use a dome or other diffuse light that removes glare. To find scratches on a shiny flat surface, use dark-field or coaxial light. Polarising filters can reduce glare on some surfaces. Test on your parts.
What lighting works for clear bottles and transparent parts?
Usually backlight: light passing through the part shows fill level, particles and the outline. Cracks and chips often show better with dark-field light, which makes edges glow. Keep the background plain, because the camera sees through the part.
Does the colour of the light matter?
Yes, with a monochrome camera. Light of the same colour as a feature makes it bright; light of the opposite colour makes it dark. Coloured light with a matching filter on the lens also blocks much of the ambient light.
How do I stop ambient light affecting the inspection?
Use a shroud or enclosure, strobe the station light so it outshines the room during a short exposure, and fit a filter on the lens that passes only the station light. These methods are often combined.

Sources

  1. A Practical Guide to Machine Vision Lighting (NI technical guide, checked 2026-09-24)
  2. HyperPhysics: Reflection concepts (Georgia State University, checked 2026-09-24)
  3. HyperPhysics: Polarization by reflection (Georgia State University, checked 2026-09-24)
  4. Nikon MicroscopyU: Darkfield illumination (Nikon, checked 2026-09-24)
// Next step

Not sure which light shows your defect?

Send good and defective parts, or photos of them, and tell us how they move on the line. The sample test shows which lighting makes the defect visible.

Start an assessment