Skip to content
Technical guide8 min read

How to choose machine vision lighting

A practical guide to choosing machine vision lighting: geometry, wavelength, strobe vs continuous, ambient control and how to maximise feature contrast for reliable inspection.

Why lighting decides the result

In machine vision, the image you capture is only as good as the light that formed it. A camera and lens record contrast; they cannot create it. If the defect, edge or mark you need to inspect does not stand out from its background in the raw image, no amount of camera resolution, exposure tuning or downstream processing will reliably recover it. This is why experienced integrators design the lighting first and select the camera and lens around the image it produces.

The goal of lighting design is straightforward to state and surprisingly hard to achieve: maximise the grey-level difference between the feature of interest and everything else, while keeping that difference stable over time and across parts. Good lighting turns a marginal, parameter-sensitive inspection into a robust threshold operation. Poor lighting forces the software to compensate for shadows, glare and ambient drift, and that compensation is exactly where field failures come from.

Treat lighting as an engineering choice with measurable outcomes, not an afterthought. Before specifying anything else, define what you are trying to see, what it is made of, how it moves, and what the surrounding environment looks like. Those four answers drive geometry, wavelength, timing and shielding respectively.

Geometry: directing the light

Geometry, where the light comes from relative to the part and the camera, is the single most important lighting decision. The same surface can look completely different under front light, back light or grazing light. The trick is to choose a geometry that makes your feature reflect light toward the camera while its background does not (or vice versa).

There is no universally best geometry. Flat, glossy surfaces and dome diffusers go together; pronounced surface texture and dark-field grazing illumination go together. Many real applications combine two techniques, for example a backlight for dimensional gauging plus a low-angle ring to read an engraved code on the same station. Lighting brands such as DCM Sistemes offer the full geometric range (bars, rings, domes, coaxial and backlights) so the geometry can be matched to the task rather than the task forced onto whatever light is on the shelf.

  • Backlight: part sits between light and camera; produces a high-contrast silhouette. Ideal for dimensional measurement, edge/presence detection and transparent-part flaw detection.
  • Ring light: mounted around the lens for bright, even, general-purpose front illumination. Simple and effective, but can cause hotspot glare on shiny surfaces.
  • Bar light: directional illumination from one or more sides; good for grazing/oblique lighting to raise surface texture and emphasise scratches, embossing or engraving.
  • Coaxial (on-axis): light injected along the optical axis via a beamsplitter; makes flat specular surfaces look uniformly bright and tilted/textured defects look dark. Excellent for flat shiny parts, wafers and mirror-like marks.
  • Dome (cloudy-day): diffuse light from all angles to eliminate shadows and glare on curved or uneven shiny surfaces such as foil, blister packs and reflective labels.
  • Dark field: very low-angle light that grazes the surface; specular background goes dark while scratches, edges and embossing scatter light back and appear bright. Strong for surface-defect and engraved-mark detection.

Wavelength and colour contrast

Colour is a tool for creating contrast, not just for pretty pictures. On a monochrome camera you can dramatically change how features appear by choosing the illumination wavelength. A general rule of optics: a surface appears bright under its own colour and dark under the complementary colour. Red light makes red features bright and makes green or blue features appear dark, which is exactly how you separate, for example, a coloured mark from a coloured substrate.

Specific wavelengths solve specific problems. Blue light is shorter and scatters more, sharpening fine surface detail and edges; red and infrared penetrate further and can see through some plastics, inks and label adhesives, which is useful for reading marks under translucent coverings. Ultraviolet excites fluorescence in many adhesives, coatings and glues, letting you verify presence of an otherwise invisible bead. Where the contrast difference is colour-based, a monochrome camera plus a chosen wavelength is often more robust and higher-resolution than a colour camera, because it avoids the colour filter mosaic and gives you full sensor resolution on the contrast you actually care about.

If true colour discrimination is genuinely required (sorting by colour, verifying multi-colour print) then a colour camera with broadband white illumination of stable colour temperature is the right call. In that case keep the light's spectrum and intensity constant, because white-balance and colour judgements drift if the illumination ages or dims.

  • Red / IR: penetrates many plastics and inks; reduces sensitivity to surface texture; common, efficient, low-cost.
  • Blue: shorter wavelength enhances fine edges and small surface features; good contrast on red/skin-tone targets.
  • Green: useful middle ground; high contrast on red targets and a good match for sensor peak response.
  • UV: induces fluorescence to reveal glue, coatings or security marks invisible under white light.
  • White (broadband): required for true colour inspection; keep colour temperature and brightness stable.

Strobe vs continuous and trigger sync

Lights can run continuously or be pulsed (strobed) in sync with the camera exposure. Continuous lighting is simplest and is the right choice for stationary parts and slow-moving lines, but it limits how bright the scene can be because the LEDs run within their steady-state thermal rating. Strobing pulses the LEDs far above their continuous rating for a very short time (overdrive), delivering a burst of light that both freezes fast-moving parts and momentarily overpowers ambient light.

Strobing only works if it is tightly synchronised to the camera. The light pulse must occur during the exposure window, so the standard architecture is: a part sensor or encoder triggers the camera, and the camera (or a strobe controller) fires the light for the duration of the exposure. Getting this timing right requires hardware triggering and an external trigger output from the camera or a dedicated strobe controller; software timing is too jittery for high-speed lines. Plan the wiring and the controller alongside the camera, not after.

Strobing has a second benefit beyond motion: because the on-time is brief and intense, the camera collects most of its signal from the controlled flash rather than from constant ambient light, which is a powerful way to make a system immune to changing factory lighting. For very high frame-rate inspection, coordinate the strobe with the camera's exposure and the throughput of the interface and frame grabber so light, exposure and readout all line up.

Controlling ambient light and stability

Ambient light, from windows, ceiling fixtures, forklifts and adjacent machines, is the most common cause of a vision system that works at commissioning and fails weeks later or on the night shift. The whole point of designing your own illumination is defeated if uncontrolled room light reaches the sensor. Aim to make your controlled light dominate the image and exclude everything else.

There are three complementary defences. First, physically shroud or enclose the inspection station so external light cannot reach the part. Second, fit a bandpass filter on the lens matched to your illumination wavelength (for example a red bandpass with a red light), so the sensor only accepts your light and rejects most ambient. Third, combine strobed overdrive lighting with a short exposure so the controlled flash vastly outweighs any continuous ambient contribution. Used together, these make the image essentially independent of the surrounding environment.

Finally, design for stability over the life of the system. LEDs dim and shift slightly as they age and warm up, so prefer current-controlled drivers, allow warm-up where colour accuracy matters, and consider intensity feedback for long-running colour-critical jobs. Keep lenses and light faces clean, and document the lighting geometry, wavelength, intensity and trigger setup so the configuration can be reproduced exactly during maintenance or when duplicating a line.

A practical selection workflow

Work from the feature outwards. Start by defining precisely what must be detected or measured, then characterise the part's material and surface (matte, glossy, curved, transparent, textured) and its colour relative to the background. That tells you the candidate geometries and the useful wavelength. Next account for motion: if the part moves during capture, you are heading toward strobed, hardware-triggered lighting; if it is static, continuous light may suffice. Then assess the ambient environment and decide on shrouding and filtering.

Whenever possible, validate empirically. Lighting is cheap to prototype relative to the cost of a misdiagnosed inspection, so test the shortlisted geometry and wavelength on real, representative parts, including known-good and known-bad samples and any cosmetic variation you expect in production. Judge the result on raw image contrast before any software, that is the honest measure of whether the lighting works.

If the inspection involves highly variable surfaces, subtle cosmetic defects or natural variation that resists a clean optical contrast, that is the signal to bring in deep-learning inspection (Rosepetal) and, for a fully engineered station, the integration support of AIS Vision. Even then, good lighting still pays off: the cleaner and more repeatable the image, the smaller the training set and the more reliable the model. If you are unsure which geometry or wavelength fits your part, send representative samples and ask for a lighting trial.

Frequently asked questions

Related categories

  • Machine vision lighting
  • Lenses and filters
  • Industrial cameras
  • Telecentric lenses

Related guides

Request a technical quote

If you have a specific application, we help you select the right hardware and validate it.