Back to Blog
Technical

Your Lighting Setup Defines the Limits of Your Inspection Model

Industrial LED ring lighting illuminating a metal part for inspection

A common pattern in machine vision projects that fail to reach production: the team spends 80% of the budget and schedule on the AI model and 20% on the optics and illumination setup. When the model underperforms, the response is more training data, more augmentation, more model complexity. The actual problem - that the lighting design is physically incapable of rendering the target defects with sufficient contrast - never gets addressed because no one wants to admit the framing was wrong from the start.

Lighting is not a commodity input you specify last. It is the physics layer that determines what information is available to your model. If the illumination doesn't create contrast at the defect location, no amount of model sophistication recovers that lost information. Understanding what different lighting configurations actually do to different surface types is foundational to any inspection system design.

Diffuse illumination: the baseline and its limits

Diffuse illumination (large-area dome lights, cloudy-day-style softboxes) is the starting point for most machine vision setups because it minimizes specular highlights and provides even surface brightness across complex geometry. For relatively flat-textured surfaces - labels, printed markings, assembly presence/absence checks - diffuse light works well and produces consistent, low-contrast-artifact images that are easy for models to learn from.

Diffuse illumination's limitation is surface defect detection on specular materials. Polished steel, aluminum castings, and chrome-plated surfaces under diffuse illumination show low contrast between the flat surface and a shallow scratch or crack. The defect may be invisible, or it may appear as a subtle tone shift that requires extremely high image resolution and a very well-trained model to detect reliably. If your defect class is surface cracks, voids, or scratches on specular metal, diffuse illumination is the wrong choice.

Coaxial illumination: the specular surface specialist

Coaxial illumination uses a beamsplitter to deliver light along the same optical axis as the camera - the illumination source and the camera lens are effectively co-located. On a flat, polished surface, coaxial light produces an extremely bright return from the flat regions (specular reflection directly back to camera) and a very dark return from any surface discontinuity (scratches, cracks, pits) that scatters light away from the optical axis.

The result is extreme contrast between flat background and any surface interruption. This is the most effective setup for detecting hairline cracks, fine scratches, and surface porosity on polished or semi-polished metal. The limitation is that it works well only on surfaces that are genuinely flat at the inspection scale - curved or textured surfaces show strong brightness gradients under coaxial illumination, which can create false positive features at geometry transitions.

Coaxial illumination requires a working distance-to-field-of-view ratio that's closer than ring or dome lights, and the beamsplitter setup costs more than a ring light. Budget accordingly. For lines where hairline crack detection is the primary requirement, it's not optional equipment.

Dark-field illumination: making the invisible visible

Dark-field illumination uses a highly angled light source (20-45 degrees from the surface plane) aimed across the surface, with the camera positioned perpendicular (normal) to the surface. Under a dark-field setup, a smooth flat surface appears dark in the camera image because the specular reflection is directed away from the camera. Any surface interruption - a scratch, crack, die pickup mark, or particle - scatters light upward toward the camera and appears as a bright feature against a dark background.

Dark-field is excellent for detecting fine raised or recessed features that would be invisible under axial or diffuse lighting. Surface contamination particles, small die pickup marks, and fine burrs all appear with high contrast under dark-field. The catch is that surface topography variation (any part geometry that's not perfectly flat) also scatters dark-field light, creating false features at edges, radii, and embossed regions. Dark-field works best on locally flat inspection regions with tight ROI masking of known geometry features.

Structured light: adding a third dimension

Structured light projection (projecting a known pattern of stripes or dots onto the surface and analyzing the deformation of the pattern in the camera image) provides height map information, not just 2D intensity. This is the appropriate technique for dimensional deviation, step-height features, warp and bow, and any defect class where the distinguishing characteristic is a surface height difference rather than an intensity difference.

Structured light inspection is slower (requires pattern projection and phase-unwrapping computation) and more sensitive to part motion during capture than 2D imaging. At line speeds above 2 parts per second, a single 2D flash capture is more practical than structured light. At slower production rates, or for end-of-line offline inspection, 3D structured light adds detection capability that no 2D approach can match.

Ring lights: useful defaults with known tradeoffs

Ring lights are widely used because they're cheap, easy to mount coaxially around a lens, and produce reasonably consistent illumination across a moderate field of view. For presence/absence checks, assembly verification, and broad feature inspection on non-specular surfaces, a ring light is a reasonable default.

Ring lights perform poorly on specular metal surfaces because the ring geometry creates a bright annular highlight artifact in the image that follows the specular reflection geometry of the surface. This ring artifact competes with defect features in the image and complicates model training. On curved surfaces like cylindrical parts, the ring highlight creates a bright stripe that the model must learn to ignore.

If your part is a flat plastic part with a label and you're checking label presence: ring light, done. If your part is a polished steel stamping and you're checking for hairline cracks: coaxial, not ring light. The choice is not a preference; it's a physics constraint.

Designing your illumination before designing your model

The practical workflow: take your target defect classes and ask, for each one, what illumination mode creates maximum contrast between the defective and non-defective state on this surface type? That question has a physics answer that doesn't require any AI. Run a single defective part under each candidate illumination configuration and photograph it before you configure any model. The best illumination choice is usually obvious from the images.

Once you've chosen the illumination mode, your model design choices follow: architecture, training data requirements, and expected performance bounds. Starting with the model and treating illumination as a later detail inverts the correct dependency and accounts for more failed inspection projects than any model design mistake.

Inspect every part. Not every other.

Talk to the Gaugegrove engineering team about deploying AI visual inspection on your line.

Request Demo