LIGHTING
  • Ddirect
  • Fdiffuse
  • Ggrazing
  • Bbacklight
  • Sstructured

Illumination as Part of the Design

Generic engineering material, applicable to any module from any supplier.

For the non-technical side of coordinating engineering work, see task switching cost.

Light is half the imaging system and it is specified after the camera on most projects. Which is the wrong order, because a lighting change frequently solves what no sensor upgrade solves, and usually for less money.

What lighting decides

Contrast, which is the thing the processing actually needs. A feature invisible under one geometry is obvious under another, at the same resolution and the same sensor.

Exposure time, and therefore whether motion blurs.

For additional industry context, see SciPy.

Depth of field, indirectly: more light permits a smaller aperture, which deepens the zone in focus.

And repeatability. Controlled light gives the same image every time; ambient light gives a different one each hour.

Five geometries

Direct front lighting. Light from the camera's direction. Simple, and it produces specular reflections from anything shiny — which is the commonest cause of a washed-out region in industrial images.

Diffuse or dome lighting. Light arriving from many directions. Suppresses reflections on curved and shiny surfaces and reduces shadow, at the cost of also suppressing texture.

Grazing or low-angle lighting. Light almost parallel to the surface. Makes scratches, embossing and surface texture strongly visible by casting long shadows from small features — and hides flat printed detail.

Backlighting. Light behind the object. Produces a silhouette with very high contrast, which is the correct answer for dimensional measurement of an outline and useless for surface inspection.

And structured or patterned light, projecting a known pattern to extract shape.

Each makes something visible and something invisible, which is why the choice follows from what must be resolvable rather than from availability.

Controlling the ambient

A system that works only when the room lights are on is a system with an undocumented dependency.

Three approaches.

Exclude it. A shroud or enclosure around the inspection point, which is cheap and effective and frequently rejected on appearance grounds.

Overpower it. Illumination bright enough that ambient variation is a small fraction, usually with a short exposure synchronised to a flash.

Or filter it. Narrowband illumination with a matching filter on the lens, which rejects everything except the illuminatorand which interacts with the infrared filter choice.

Strobing

Short, bright and synchronised.

Freezes motion without needing a fast sensor, since the exposure is effectively the flash duration.

Reduces heating and extends emitter life, because the duty cycle is low.

And overpowers ambient light for the instant of capture.

The requirement is synchronisation — the camera must expose while the flash fires — which for a rolling shutter sensor means the interval when all rows are exposed together, and which is a datasheet question before it is a wiring one.

Wavelength as a variable

Colour of light is a design choice rather than a preference.

Red light on a red feature makes it disappear into a red background; blue light on the same pair separates them.

Which is the principle behind monochrome imaging with chosen illumination: a monochrome sensor with the right wavelength frequently separates features better than a colour sensor under white light, and with more light per pixel.

Near infrared penetrates some plastics and inks that block visible light, which is why the filter choice and the illuminator choice are one decision.

What lighting costs to get wrong

Not money — time.

A system that images adequately under bench conditions and marginally in place produces intermittent failures that get attributed to the camera, to the algorithm and to the parts, in that order.

The lighting is examined last because it looks like the simple part.

Which is an argument for photographing the real scene under the real light early, before the module is chosen rather than after it is designed in.

Ageing and maintenance

Emitters dim over time, and the rate depends on temperature and duty cycle.

A system calibrated at installation drifts as the light falls, which shows up as a slowly rising failure rate that nobody attributes to lighting.

Two responses: design with margin, and measure the light rather than assuming it — a reference target in the field of view, checked periodically, makes the drift visible.

And keep the emitter surfaces clean, which is the same problem as the lens and is forgotten more often because the light is not the thing being looked through.

Eye safety

Bright illuminators, particularly near-infrared ones, need considering rather than assuming.

Infrared light is invisible, which means the blink reflex does not operate — and a source that would be uncomfortable to look at in visible light produces no discomfort at all.

Where an illuminator is powerful and accessible to people, the relevant photobiological safety standards apply and the assessment is a real one.

This site does not attempt that assessment. It notes that the question exists, that it is answered by the illuminator's own documentation and by the applicable standard, and that "it is invisible so nobody will look at it" is the reasoning to avoid.

Testing a geometry before building it

A torch and a piece of card answer most of it.

Hold a light source at each of the five angles described above, against a real part, and look — or better, photograph it with anything to hand.

The geometry that makes the feature obvious to the eye is the geometry to engineer, and finding it takes minutes rather than a procurement cycle.

Then measure, because what looks better and what measures better occasionally differ — and the processing, not the eye, is the customer.

The short version

  • Light is half the system and is usually specified after the camera, which is the wrong order
  • A lighting change frequently solves what a sensor upgrade does not, and costs less
  • Five geometries: direct, diffuse, grazing, backlight and structured — each makes something visible and something invisible
  • Backlighting is correct for outline measurement and useless for surface inspection; grazing is the reverse
  • Control ambient light by excluding it, overpowering it, or filtering to a narrow band matched to the illuminator
  • Strobing freezes motion, reduces heat and overpowers ambient, and requires synchronisation the sensor must support