Guides

Lighting and optics for inspection

How the angle, spread, and color of the light decide what a camera can see, and which lens keeps a measurement steady.

Why does the light come first?

A camera records only the light that reaches it. A scratch, a dent, or an embossed code shows up when the light is placed so that the fault sends light toward the lens differently from the good surface around it. Station lights are strobed and shielded, so the picture stays the same whatever the room lights are doing.

What are the four ways to place the light?

Back light: a light panel sits behind the part, facing the camera and lens; the part blocks the light and shows as a sharp dark outline on a bright field

Back light

The light sits behind the product, facing the camera. The product shows as a sharp dark outline. Use it for counts, outlines, gaps, holes, and fill level in clear or translucent bottles.

Bright field: a bar light and the camera sit at equal and opposite angles, so light reflects off the flat surface into the lens; the surface looks bright and print looks dark

Bright field

The light bounces off a flat surface straight into the lens. Smooth areas look bright, and print or a mark that breaks the surface looks dark. Use it for print on flat cartons and codes on labels.

Dark field: a low-angle ring light skims the surface; flat areas reflect the light away and look dark, while a raised mark scatters light up into the lens and glows

Dark field

Low-angle light skims the surface. A flat surface reflects it away from the lens and looks dark, while scratches, chips, and raised or stamped characters catch it and glow. Use it for embossed lot codes and marks on glossy parts.

Diffuse dome: LEDs at the base shine up into a white dome that sends light back down from every direction; the camera looks through a hole at the top and a shiny, curved part shows no glare

Diffuse

A dome or an on-axis light sends light from many directions at once, which removes glare and shadows. Use it on shiny or curved surfaces: foil lids, blister film, metal cans, and wrapped product.

Directed light, a narrow beam from one side, does the opposite of diffuse light. It casts shadows and makes texture stand out. Pick directed light when texture is the fault, and diffuse light when texture hides the fault.

Which light shows which fault?

Fill level in a clear or translucent bottle

Light that usually shows itBack light

Why it worksLiquid and headspace pass different amounts of light.

Missing piece in a tray

Light that usually shows itBack light, or diffuse light from above

Why it worksEach piece shows as its own outline.

Embossed or laser-etched lot code

Light that usually shows itLow-angle dark field

Why it worksRaised and cut edges catch light that skims the surface.

Scratch or dent on a glossy part

Light that usually shows itDark field

Why it worksThe flat surface stays dark and the mark lights up.

Print on foil, film, or a curved can

Light that usually shows itDiffuse dome or on-axis light

Why it worksGlare and hot spots disappear, so the print reads evenly.

Wrong label or flavor color

Light that usually shows itWhite light with a color camera

Why it worksThe check needs the true color.

Faint print on colored packaging

Light that usually shows itColored light chosen to darken the print

Why it worksLight of the opposite color makes the print look dark. Light of the same color makes it fade.

Product seen through printed or tinted film

Light that usually shows itInfrared light

Why it worksSome inks and dyes let infrared pass. Test it on samples first, because infrared is invisible to the eye.

Glue, coating, or residue

Light that usually shows itUltraviolet light

Why it worksMaterials that fluoresce glow against a dark background.

Try the light on real good and bad samples before settling the design. A small change in angle can turn a clear fault into a faint one.

Which lens keeps a measurement steady?

01

Fixed focal length.

Most line checks use it. It focuses from close range out to far away, and its aperture trades light for depth of field. Objects farther away look smaller, so a part that rides higher or lower changes its apparent size.

02

Macro.

For a small view at close range, such as a printed code a few millimeters across or the tip of a needle.

03

Telecentric.

Keeps the part the same size across a range of heights and shows straight sides without perspective, which makes it the usual choice for gauging. The front of the lens has to be at least as wide as the view, so it is larger and costs more than a standard lens.

04

Zoom.

Rare on production lines. The extra ring can move, which shifts the calibration. A fixed lens locked in place keeps measurements repeatable.

To size a lens for a view, use the imaging calculator. For the rest of the system, see How machine vision works.

FAQ

Questions about lighting and optics

QWhich light should we try first?

Start from the fault. Outlines and fill levels usually need a back light, embossed codes need low-angle light, and shiny or curved surfaces need diffuse light.

QWhy does a station need its own light?

Room light changes through the day. A strobed, shielded light makes every picture look the same, which keeps the results steady.

QDoes a better lens fix a bad image?

Rarely on its own. Most poor images come from the light. Fix the light first, then check focus and working distance.

QWhat is a telecentric lens for?

It keeps the size of a part the same in the image even when the part moves a little closer or farther, which matters for measurement.

What catches teams after the station is running?

Some lighting effects only show up in production. A diffuse backlight makes round parts like needles and tubes measure undersize, where a collimated backlight does not. Blue light gives sharper edges than red for gauging. Red and amber LEDs lose output as they warm up, white LEDs have a gap in the blue-green range, and fast on-off dimming can put moving stripes into rolling-shutter images. Our guide to what most lighting setups get wrong explains each one and how to avoid it.

Ask JM Automated Solutions about your line.

Tell us about the system