Knowledge base · Optics & lighting

Selecting optics and lighting for machine vision

Insufficient detail or changing contrast causes unstable inspection, extra rejects and manual checks. Use this decision guide to determine field of view, working distance, lens and lighting geometry together before selecting components.

Industrial machine vision lens and lighting

Knowledge

Lens and lighting belong together

The camera sensor only sees what the lighting creates and the lens delivers. More megapixels will not recover contrast that never reached the sensor. A sharp lens will not fix a field of view that does not fit the machine.

Lighting creates the signal

For inspection, measurement and code reading, contrast between feature and background is the signal. Light geometry (backlight, bright-field, dark-field, dome) matters more than LED wattage.

The lens maps the scene onto the sensor

Focal length, working distance and sensor format set FOV, magnification and how much light reaches each pixel. Stop down for depth of field and you need more light to compensate.

Same FOV, same coverage

If the lens sees 200 mm but the light only covers 150 mm evenly, the edges fail even when the centre looks fine in the lab.

Selection

Complete a joint optical decision sheet

Copy this table into the project record. Enter measured values and identify unknowns before choosing a focal length or light. Test the shortlisted lens and lighting together and retain the settings and sample images.

ParameterInputs to recordDecision or test
FOVRequired width and height in mm, position margin and allowed rotation: …Check both sensor axes and confirm that illumination covers the complete inspection area.
Working distanceAvailable distance, lens reference plane, product-height range and clearance: …Verify focus at height extremes and leave space for light, filters, connectors and cleaning.
Smallest featureSmallest defect or code element in mm, provisional pixel requirement and active sensor size: …Calculate mm/pixel, then confirm contrast and sharpness at the centre and corners.
SurfaceMaterial, finish, colour, curvature, oil or film variation and known defects: …Compare light angles and wavelength on the same identified samples; check glare and valid-product variation.
Motion and triggerMaximum speed, allowed blur, trigger interval and shutter mode: …Exposure limit = allowed displacement ÷ speed. Test signal within that time using continuous or supported pulsed light.

There is no universal working-distance-to-field-of-view ratio. Determine the field of view and available installation space, then check the lens calculation for the actual sensor size. Allow space for lighting, connectors, focus adjustment and cleaning. Use the lens manufacturer’s defined distance reference. More detail:resolution, FOV and working distance.

Practical example · Machine builders

Surface check on brushed aluminium in a packaging cell

Consider an illustrative inspection of a brushed aluminium housing with local glossy streaks. The task is to detect a shallow scratch and read a laser-marked batch code within a short exposure. These two features may need different light directions. The example describes a test approach, not measured installation results.

What the station needs

  • A FOV slightly larger than the housing face, with a fixed working distance from the machine frame.
  • Enough pixels across the etch and the scratch width. The lens must deliver that resolution, not only the camera.
  • Lighting that keeps glossy streaks from washing out the etch, while still showing the scratch as an edge or intensity change.
  • An exposure within the motion limit, with sufficient continuous light or a compatible synchronized pulse.

How Sedeco typically approaches it

We start from samples and the allowed working distance and FOV in the frame. For scratches on metal we often try dark-field or low-angle bar lighting. If the etch needs flatter illumination, we add a second geometry or a dome. Only when the image works on the real part do we lock focal length and product family.

Keep reading:inspection lighting·code reading & DPM.

Field reality

What often goes wrong in practice

Set separate acceptance limits for missed defects, false rejects and timing. Validate samples not used to adjust the light, including position and height extremes. Record which conditions fail and whether the cause is focus, contrast, motion or presentation. Recheck after restoring the configuration.

Camera and mount first, optics last

The bracket is welded, working distance is fixed at 80 mm, and only then someone asks for a lens that covers a 120 mm FOV on a large sensor. The short lens that hits the FOV may vignette or distort; the longer sharp lens does not fit. Redesigning the frame then costs more than selecting the lens with the mechanical space from the start.

Bright-field ring light on glossy metal

A white ring light is ordered with the camera because it is the default accessory. On glossy or machined metal it creates hotspots that saturate the sensor. Defects and DPM codes disappear into the reflection. Dark-field, dome or carefully angled bars belong in the first trial, not a software threshold on a burned image.

Stop down for depth of field, forget the light budget

Closing the aperture can increase depth of field but reduces light at the sensor and may introduce diffraction. A longer exposure can then produce motion blur. Compare illumination intensity, pulsed operation, presentation control and optical alternatives against the required image detail. Validate the chosen combination at the expected speed and height range.

Definition pages

Go deeper on the fundamentals

Use these pages for the definitions. Come back here when you want to select hardware or understand what fails in practice.

Vincent van Montfoort

Unsure about lens or lighting?

Send samples and the completed decision sheet. Budget lens, light, controller, filters and mounting together with trial and validation hours × rate. Include cleaning access and replacement settings in maintenance. Compare the result with measured inspection and intervention costs rather than assuming that more expensive optics automatically reduce rejects.