Hardware & Setup

Lighting Setup for Machine Vision Inspection Lines

10 min read

Machine vision inspection station with ring light and dome light setups over a conveyor line

Illumination is the decision that precedes every other decision in machine vision setup. Camera resolution, lens magnification, model architecture — none of it matters if the imaging doesn't create distinguishable contrast between a defective surface region and a good one. We've seen technically sophisticated inspection deployments fail because the lighting created specular glare that swamped defect signals, or diffuse lighting that washed out the surface topology that makes scoring marks visible. This post is about the four illumination architectures we work with most often and the surface conditions where each one makes sense.

The physics of surface imaging: what you're actually doing

Every lighting choice is an attempt to create a reflectance difference between the defect region and the surrounding material in the captured image. That reflectance difference arises from one of three physical mechanisms:

Geometric change at the defect. A scratch, a crack, or a stamp die mark changes the local surface angle. Light that would reflect toward the camera from the flat baseline surface reflects away from the camera in the defect region — the defect appears dark. This is the mechanism exploited by ring light and directional illumination on metal parts.

Absorption change at the defect. A contamination, a coating skip, or a material inclusion absorbs incident light at a different rate than the surrounding surface. Under diffuse illumination, defects with different absorptance appear as darker or lighter regions. This mechanism drives detection of staining, discoloration, and coating non-uniformity.

Scattering change at the defect. Rough surface regions, micro-cracks, and porosity scatter incident light in more directions than smooth surfaces. Under high-angle or coaxial illumination, a porosity pit or orange peel texture returns less light to the camera than a smooth region. Under low-angle illumination, the scattered return from a rough region can appear brighter than a smooth region, depending on the scattering angle geometry.

Understanding which mechanism your defect type triggers tells you which illumination direction and geometry will maximize contrast. This is the decision that precedes selecting a fixture type.

Ring light: the default starting point for flat surfaces

Ring lights — LED rings mounted coaxially around the lens, illuminating the part at a moderately steep angle (typically 25–45 degrees from the lens axis) — are the default starting point for surface defect inspection on flat and lightly curved parts. They work by exploiting the geometric change mechanism: flat, specular metal surfaces return the ring illumination strongly to the camera, while geometric anomalies (scratches, cracks, die marks) scatter light away from the camera axis and appear dark against the bright background.

Ring lights are practical, relatively inexpensive, and produce consistent illumination across a circular FOV. They're the right choice for:

  • Flat stamped metal parts where the primary defect types are surface scoring, edge cracks, and die pickup
  • Machined flat faces where you want to detect scratches or tool marks
  • Any surface where "bright field" imaging (defects appear dark, background appears bright) is the target contrast mode

Ring lights have two well-known failure modes. First, on parts with significant surface curvature (radii less than about 50mm), the illumination angle changes significantly across the part face, creating uneven background brightness that the model must learn to ignore. This increases false positive rate on curved parts inspected with ring illumination optimized for flat surfaces. Second, ring lights create a bright central glare spot on highly specular (mirror-finish) surfaces — the reflection of the LED ring itself becomes a dominant image feature that obscures the part surface underneath.

Dome light: for curved and complex surface geometries

Dome lights (also called cloudy day lights) are hemispherical diffusers with LED arrays distributed around the inside of the dome, creating a highly diffuse illumination field from nearly all directions above the part. The effect is extremely even illumination with minimal specular reflection — the surface receives incident light from so many angles simultaneously that no single specular reflection direction dominates.

Dome lights are the correct choice when:

  • The part has significant 3D geometry (castings, complex stampings, formed profiles) that would create severe illumination unevenness under directional light
  • The defect type is colorimetric — stains, discoloration, coating non-uniformity — where absorptance differences rather than geometric differences drive contrast
  • The surface is highly polished or mirror-finish where ring light glare is a problem

The tradeoff with dome lights is that they reduce contrast for geometrically-defined defects. A scoring mark that appears as a sharp dark line under ring illumination may be nearly invisible under dome illumination, because the diffuse light fills in the geometric shadow that creates the scratch's contrast. For stamped metal lines where scoring and edge cracks are the primary defect types, dome illumination is typically the wrong choice.

Coaxial illumination: for specular surfaces and coating inspection

Coaxial illumination uses a beam splitter to route the illumination along the same optical axis as the camera lens. Light travels from the camera toward the part, and the reflected light returns through the same beam splitter to the sensor. The effect is that only surfaces perpendicular to the camera axis return light to the sensor — any angular deviation produces a dark image region.

This creates a "dark field" effect on surface geometry: flat, perpendicular surfaces appear bright; any tilted surface feature (whether a scratch, a die mark, or a geometric edge) appears dark due to the angular deviation of the reflected ray. The contrast mechanism is extremely sensitive to surface normal deviation, making coaxial illumination powerful for detecting very shallow scratches and micro-defects on polished surfaces.

Coaxial illumination also works well for coating skip detection: a coated surface has a different specular reflectance than a bare substrate, and coaxial imaging emphasizes specular vs. non-specular differences. We use coaxial setups regularly for:

  • Wafer-flat surfaces (stamped sheet metal with flat faces, silicon substrates, polished bearing surfaces)
  • Coating uniformity inspection where the coating is partially reflective
  • Any application where shallow surface scratches need detection at sub-0.1mm widths

The limitation of coaxial illumination is working distance sensitivity. The beam splitter setup typically produces optimal contrast over a narrow depth-of-field range — parts that vary significantly in height (whether from stack variation or 3D geometry) will have portions in and out of the optimal imaging zone. Coaxial setups work best when part height is tightly controlled and the inspection surface is flat.

Structured light: for 3D surface topography inspection

Structured light projectors — typically a line laser or pattern projector that illuminates the surface with a known pattern — encode surface height information into the 2D image by looking at how the projected pattern deforms over the surface topology. The deformation of a projected stripe tells you the local surface height; a pore, a dent, or a raised nodule deforms the stripe more than the flat surrounding surface.

Structured light is the right choice when:

  • The defect is defined by height deviation rather than reflectance deviation — pits, voids, raised nodules, weld spatter, dimples
  • You need dimensional measurement alongside defect detection — structured light can simultaneously provide height maps for SPC
  • The surface is too complex or variable for 2D illumination approaches to produce consistent contrast

The practical constraints on structured light in production environments are significant. The projector must be mechanically stable — even small vibrations of the projector unit from conveyor motion cause pattern position instability that corrupts the height map. The triangulation geometry (angle between projector and camera) must be maintained precisely. These constraints make structured light more demanding to integrate on a moving conveyor than the 2D illumination approaches above, and it typically requires more careful mechanical design of the inspection station.

Practical selection guide

Our decision flow when setting up illumination for a new Procunit deployment:

First, identify the primary defect type's contrast mechanism: geometric (scratch, crack, die mark) → ring or coaxial; colorimetric (stain, coating) → dome or coaxial; topographic (pit, nodule, void) → structured light or low-angle ring.

Second, evaluate the surface geometry: flat and consistent → ring or coaxial; curved or complex → dome or structured light.

Third, run a quick capture test with the candidate configuration before committing to mounting hardware: take 20 good parts and 5 defective parts, image them under the candidate illumination, and check whether the defect region has distinguishable contrast from the background. If you can't see the defect clearly in the raw image, no model will be able to learn it reliably.

We're not saying you can't train around poor illumination — sometimes you can, with enough training data and a deep enough model. What we are saying is that every dB of contrast improvement from better illumination reduces the training sample requirement and improves the robustness of the deployed model under production variation. Good lighting is not a hardware cost to minimize; it's the foundation of detection performance.

The illumination setup also determines how stable the model will be over time. A model trained on well-illuminated, high-contrast images generalizes better to the natural variation in part-to-part reflectance, minor conveyor vibration, and ambient light changes than a model trained on borderline images. The investment in getting the lighting right at setup pays dividends in reduced model maintenance over the deployment lifetime.

Run a pilot on your line

Camera mounted, model trained, PLC signal live — within a week of the pilot kit arriving. No GPU, no cloud upload, no vision engineer required.