•

•

Machine Vision Lighting: How to Choose a Technique

Machine Vision Lighting: How to Choose a Technique

Machine Vision Lighting: How to Choose a Technique

Matt Wilton

Director

MACHINE VISION
MACHINE VISION LIGHTING
LIGHTING WAVELENGTH
DOME LIGHTING
COAXIAL LIGHTING
BACKLIGHTING
AUTOMATED INSPECTION
QUALITY CONTROL
MACHINE VISION
MACHINE VISION LIGHTING
LIGHTING WAVELENGTH
DOME LIGHTING
COAXIAL LIGHTING
BACKLIGHTING
AUTOMATED INSPECTION
QUALITY CONTROL
MACHINE VISION
MACHINE VISION LIGHTING
LIGHTING WAVELENGTH
DOME LIGHTING
COAXIAL LIGHTING
BACKLIGHTING
AUTOMATED INSPECTION
QUALITY CONTROL
AIET Cognex range of machine vision lighting

Table of contents

Share

Machine vision lighting decides what a camera can see. A camera doesn't image the part. It images the light coming back off the part, and if that light carries no contrast at the defect, no software will find it.

Bad lighting shows up as glare on polished metal or shadows across the feature being checked. It also makes results drift whenever a part sits a millimetre off position or the light in the building changes. Good lighting gives strong contrast to the feature under inspection and keeps the background flat. Detection becomes repeatable.

Choosing the lighting follows a fixed order. Start with the surface of the part, then pick the technique, then the wavelength.

What is machine vision lighting?

Machine vision lighting is the control of the angle and wavelength of light so that the feature under inspection has high contrast in the image and the background has almost none.

It is specified with the camera and lens as part of the inspection hardware, and on most applications it has a bigger effect on the result than either of them. The light source is almost always an LED. LEDs switch on in microseconds and can be pulsed well above their continuous rating. They also come in narrow wavelength bands from ultraviolet to short-wave infrared, which is where much of the contrast comes from.

How does the surface of the part decide the lighting?

Start with the part. The way its surface returns light decides the lighting method, and the rest of the choices follow from that.

  • Specular (shiny) surfaces such as machined aluminium, chrome, glass and polished stainless steel reflect light like a mirror. The camera sees either a bright reflection or nothing at all, so the lighting has to control exactly where that reflection lands.

  • Diffuse (matte) surfaces such as castings, moulded plastic, rubber and paper scatter light in every direction. Here the angle of the light does the work.

  • Transparent and translucent parts such as film, glass vials and PET bottles let light pass through. Lighting from behind turns them into a sharp silhouette.

Plenty of parts combine all three. A pharmaceutical blister pack has a foil back, a clear PVC pocket and a printed tablet inside. Decide which feature you're inspecting and light for that feature.

Which lighting technique shows which defect?

Once you know the surface, the choice comes down to a short list. Five techniques cover almost all industrial inspection.


Technique

How the light reaches the part

What it shows

Typical parts

Backlight

From behind, facing the camera

Outlines, holes, gaps, dimensions

Stampings, gaskets, springs, vials

Coaxial

Along the camera axis through a beam splitter

Scratches, dents and marks on flat shiny faces

Machined faces, wafers, laser-marked metal

Dome

Diffuse light from every direction

Print and features on curved or uneven shiny parts

Cans, foil packs, bearings, crimped terminals

Low-angle dark field

At a shallow angle across the surface

Edges, chips, embossing, engraved and dot-peen codes

Engraved metal, rubber seals, glass edges

Bright-field ring or bar

From above, close to the camera axis

Print, labels, presence, colour

Cartons, labels, PCBs, assemblies

Part handling affects the choice as much as the surface does. Dome and diffuse lighting forgive a lot. Light arrives from so many directions that a part tilted a few degrees, or sitting slightly off centre, still images the same way. Coaxial and low-angle lighting are precision tools. On the right defect they give the highest contrast of any technique, and they work best with a fixture that presents the part at the same height and angle every time.

Structured light (a projected laser line or pattern) adds height information and is the basis of most 3D inspection. Use it when the defect is a dimension in Z, such as a bead height or a warped flange.

Which wavelength gives the most contrast?

Most people think of this as the colour of the light. The correct term is wavelength, because the usable range goes well beyond what the eye can see: ultraviolet below 400 nm, visible light from roughly 400 to 700 nm, then near infrared and short-wave infrared out to about 1,700 nm.

With a monochrome camera, wavelength becomes a contrast control. A feature lit at a wavelength close to its own colour reflects strongly and looks bright. Lit at the complementary wavelength, it absorbs the light and goes dark. Red print on a white carton almost disappears under red light at around 630 nm and turns black under blue light at around 470 nm. The same rule lets a system ignore one printed layer and read another printed on top of it.

  • UV (365 to 405 nm) makes fluorescent materials glow. Adhesives, sealants, lubricants and some inks show up bright against a dark part, and hairline cracks appear on surfaces that look clean under white light.

  • Blue (around 470 nm) is the shortest visible wavelength. It picks out fine surface texture and small scratches on metal.

  • Green (around 520 nm) is the standard choice for metrology and gauging, usually through a collimated or telecentric backlight. A single narrow wavelength removes chromatic aberration. Green also sits in the middle of the visible band, where machine vision lenses are best corrected and monochrome sensors are close to their peak sensitivity. The result is sharp, accurate edges for dimensional measurement.

  • Red (625 to 660 nm) passes through thin clear film with less scatter than blue, which makes it the usual choice for reading print under wrapping.

  • Near infrared (850 and 940 nm) passes through many inks and dyes, so colour variation stops affecting the result. With a matching filter it also blocks out room lighting.

  • SWIR (900 to 1,700 nm) needs an InGaAs camera. It shows moisture, sees through some plastics and silicon, and separates materials that look identical in visible light.

Use white light with a colour camera when the job is colour verification. For almost everything else, a monochrome camera with a chosen wavelength gives more contrast and a sharper image.

Machine Vision Lighting Spectrum Wavelengths

How do you remove glare from shiny parts and packaging?

Glare is the light source reflecting straight into the lens. It burns out a patch of the image, and whatever sits under it (a date code, a scratch) is lost.

On metal, fix it with geometry. A dome surrounds the part with even light, so there's no single bright source to reflect. Coaxial light spreads the reflection evenly across a flat face, so defects show as dark marks on a bright field.

On plastic, glass, painted surfaces and printed film, use polarisation. Fit one polarising filter on the light and a second on the lens, crossed at 90 degrees. Together they block the reflected glare and let through the light scattered from the print or defect underneath. This is the standard fix for shrink-wrapped multipacks, PET bottles and laminated pouches, and label and date-code inspection on food and beverage lines depends on it.

How do you keep results stable when conditions change?

A system set up on a Monday morning has to give the same result at 3 pm on a summer afternoon. In between, two things change: the light around the station and the temperature of the equipment.

Ambient light is anything the camera picks up that the vision lighting didn't supply. That might be the hall lighting overhead, or sunlight through a loading-bay door that moves across the line during the day, which in a UAE summer is intense. These methods keep it out of the image:

  • Strobe the light. A pulse of tens of microseconds, driven at several times the LED's continuous rating, makes the vision light far brighter than the room for the length of the exposure. It also freezes moving parts, which is why fast lines use strobes as standard.

  • Filter to the wavelength. A bandpass filter on the lens matched to the LED, for example 850 nm on an 850 nm light, lets the vision light through and blocks most of the ambient light.

  • Shroud the station. A simple enclosure around the inspection point stops the problem at source.

  • Control the drive current. LED output falls as the LED heats up. A constant-current lighting controller and a heatsinked mount keep the output steady from a cold start to full working temperature.

Why is the lighting chosen before the camera?

Lighting sets the contrast, and contrast sets everything after it. Once a lighting trial produces a clean, repeatable image of the defect, the rest of the specification follows. The working distance the light needs sets the lens, and the contrast it delivers sets how many pixels must cover the defect, which is the starting point for choosing camera resolution. The exposure time it allows then sets how fast the line can run.

Buying the camera first and sorting out the lighting afterwards is one of the most common reasons vision projects run late.

How AIET Group helps

AIET Group runs lighting trials in-house on the customer's own parts, both good and defective, before any hardware is specified. Each trial works through surface, technique and wavelength until the defect images cleanly and repeatably. The result becomes the hardware specification for the camera, lens, lighting and controller.

The team covers every part of machine vision, from illumination and optics to inspection software and line integration. AIET Group supplies, integrates and supports vision systems for manufacturers in the UAE, Saudi Arabia and across the GCC, on new lines and as retrofits to existing machines.

Speak to AIET Group

Send AIET Group what you're inspecting and the team will tell you how to light it. The most useful starting pack is:

  • Five to ten good parts and the same number of rejects, with the defects marked

  • Photographs or a short video of the defect at the station

  • The smallest defect you need to catch, in millimetres

  • Line speed in parts per minute

  • Mounting space and working distance available

  • Conditions at the station, including daylight and temperature

Contact the AIET Group sales team to book a lighting trial.

Frequently asked questions

What is the best lighting for machine vision?

The best lighting depends on the surface of the part and the defect you need to see. Backlighting suits outlines and dimensions, coaxial suits flat shiny faces and dome suits curved reflective parts. Low-angle lighting suits engraved or raised features, and ring or bar lights suit print and labels. A lighting trial on real parts confirms the choice.

Should I use dome or coaxial lighting for shiny parts?

Use coaxial lighting for flat shiny surfaces and dome lighting for curved or uneven ones. Coaxial light reflects straight back from a flat face, so scratches and marks appear dark on a bright background. A dome surrounds the part with even light, which removes hot spots from cylinders, crimped terminals and creased foil.

Is white light always the best choice for machine vision?

White light is the best choice only when a colour camera has to tell colours apart. For most inspections, a monochrome camera with a single chosen wavelength gives more contrast. UV, blue, red and infrared each make particular materials, inks or defects stand out, and a narrow wavelength also lets a filter block ambient light.

Can machine vision inspect through clear film or shrink-wrap?

Yes, machine vision routinely reads codes and checks print through clear film and shrink-wrap. Crossed polarisers on the light and the lens remove glare from the film surface, and red or near-infrared wavelengths pass through thin film with less scatter than blue. Dome lighting helps where the wrap is creased or uneven.

Do I need strobed lighting on a fast production line?

Strobed lighting is the standard choice on fast production lines. A short, intense pulse freezes a moving part so it images sharply without motion blur, and the pulse can run well above the LED's continuous rating. Strobing also overpowers ambient light and extends LED life, because the light is off between parts.

Can the lighting be upgraded on an existing vision system?

Yes, upgrading the lighting is often the quickest way to fix an existing vision system that gives false rejects or misses defects. Changing the technique or wavelength, or adding a filter or polariser, usually needs no change to the camera or software. A lighting trial on sample parts proves the improvement before anything is fitted to the line.

How do you inspect black or dark parts?

Black parts are inspected with low-angle dark-field lighting or high-output diffuse lighting. Low-angle light catches edges, chips and raised features and shows them bright against the dark body, so a chip on a black rubber seal stands out clearly. A dome with a longer exposure brings up print and texture on matte black surfaces.

Which industries use machine vision lighting?

Every industry that uses machine vision depends on its lighting, including food and beverage, pharmaceuticals, medical devices, automotive, electronics, aerospace and packaging. Backlights suit stamped metal, polarised light suits packaging, domes suit connectors and coaxial light suits machined faces. The selection order of surface, technique and wavelength stays the same in every sector.

Looking for more? Dive into our other articles, updates, and strategies