Why lighting matters more than the camera
In a vision project, attention usually goes to the camera first. Yet the lighting decides whether a defect becomes visible at all. Here is how to choose the right machine vision lighting.


In a new vision project, attention usually goes to the camera first: how many megapixels, which brand, which lens. In practice, though, it is more often the lighting that decides whether an inspection works. A defect that is not visible in the image cannot be found by any software, however smart.
What lighting does in a vision system
The aim of machine vision lighting is not as much light as possible, but contrast: the feature you are looking for must stand out clearly from the rest of the image. A scratch on shiny metal is almost invisible under diffuse light, yet lights up brightly under grazing light.
Good lighting makes the software simpler and more stable. A clear, high-contrast image needs fewer filters and exceptions, and causes fewer false rejects.
The main lighting techniques
- Bright-field (direct light): light falls on the product from the direction of the camera. Suitable for matte surfaces, print and labels.
- Dark-field and grazing light: light skims the surface at a shallow angle. Scratches, dents and relief light up against a dark background.
- Backlight: light comes from behind the product. This gives a sharp outline for dimensional and presence checks, including on transparent products.
- Diffuse dome light: soft light from all sides prevents reflections on shiny and curved surfaces such as cans and film.
- Polarisation: a polarising filter on the light and the lens removes specular reflections.
You can see which technique suits which material in our lighting technique reference.
Wavelength: the colour of the light
The colour of the light can strengthen contrast or make it disappear. Red light makes red print vanish; blue light makes the same print stand out dark. Infrared sees through some dyes and is less sensitive to changing ambient light. UV light makes fluorescent glue or markings light up.
Testing with different wavelengths is therefore a standard step in a feasibility test, before the camera is chosen.
Moving products and ambient light
On a running line, the exposure time must be short to avoid motion blur. That calls for a lot of light in a short time: pulsed (strobe) lighting that fires exactly when the image is taken. A strong strobe also overpowers ambient light, such as sunlight through a roof light or the hall lighting, which otherwise changes over the day.
You can calculate how short the exposure must be at your product speed with our optics calculator.
Standard or custom
Standard lighting is enough for many applications: a ring light, bar light or backlight. But with an unusual product shape, little installation space or a very specific light angle, custom lighting is the better choice. On a project on a stroopwafel line, for example, we had new lights made so the existing Keyence inspection could detect defects more reliably.
Start with the light
Start a vision project with real product samples and a lighting test, and only then choose the camera and lens. That avoids costly changes later. Read more about how optics, lighting and placement fit together under technology and integration, or get in touch for a test with your own products.