Six Common Issues with Machine Vision Lighting (Part 1)
Source:Shenzhen Kai Mo Rui Electronic Technology Co. LTD2026-09-18
In industrial visual inspection, 80% of image‑quality issues are attributable to lighting—despite flawless cameras and algorithms, uneven illumination or severe reflections can render defects “invisible” or lead to inaccurate defect detection. Even more frustrating is that many operators, when confronted with lighting challenges, resort to ad hoc adjustments: either they exhaust a range of equipment without success, or the problem reappears shortly after a temporary fix.
This article addresses the six most common challenges in machine‑vision lighting—such as uneven illumination, glare, and failures in inspecting transparent parts—providing step‑by‑step solutions based on typical causes. Drawing on real‑world examples from the electronics, automotive, and food industries, it guides you through precise troubleshooting and definitive resolution. Finally, it includes stability‑testing methods to ensure long‑term, reliable operation.
1. Problem 1: Uneven image brightness (some areas bright, some dark) — even the defect locations cannot be accurately identified.
In PCB pad inspection and food‑packaging printing inspection, when an image exhibits a “half‑bright, half‑dark” pattern, defects in the bright areas are obscured and details in the dark areas are lost, rendering the algorithm incapable of accurately locating defects.
1. 3 A common cause (listed in order of troubleshooting priority)
Core Cause 1: The light source was installed at an angle and not aligned with the inspection center.
Many people, when installing a light source, rely on visual estimation—“it’s probably aligned”—but in reality, the light source’s center is offset by more than 5 mm from the camera’s field of view, resulting in uneven illumination across the image. For example, when inspecting a smartphone housing, if the ring light is tilted to one side, one half of the housing is bathed in bright light while the other remains in shadow.
Core Reason 2: Low-cost light sources have poor uniformity.
To cut costs, some opt for LED light sources priced in the tens of yuan. However, these sources often feature sparsely arranged LED chips or inconsistent luminous intensity, resulting in “light spots” (localized over‑brightness) or “dark areas” (insufficient local brightness) when illuminated. Their uniformity typically falls below 70%—whereas industrial‑grade light sources are required to meet or exceed 85%.
Core Reason 3: Local Ambient Light Interference
The inspection station is located near a window, with direct sunlight shining onto the surface of the object being inspected; alternatively, nearby strong lighting or robotic arm indicator lights can cause localized light sources to overlap, resulting in an imbalance of brightness and darkness in the image. For example, on a food‑processing production line situated close to a window, midday sunlight reflecting off packaging bags can create bright glare spots.
2. Step-by-step solution (practically implementable)
Step 1: Calibrate the light source position.
Use a “cross‑hair target” for alignment—affix the target at the measurement location on the object, focus the camera on the target’s center, then adjust the light source (ring light, bar light, etc.) to ensure that the center of the light spot coincides precisely with the target’s center, keeping the deviation within 2 mm. After calibration, mark the light‑source bracket with a marker to prevent it from shifting later.
Step 2: Replace the high-uniformity light source.
If unevenness persists after calibration, check the light source’s uniformity (e.g., capture a pure white card with a camera and use software to analyze grayscale variations): if the difference between the maximum and minimum grayscale values exceeds 50 (for 8-bit images), replace the industrial‑grade light source (such as those from Kangshida or Dazhong Laser, with uniformity ≥ 90%). For example, when inspecting PCBs, substitute a bar‑type composite light for a single bar light, and use multiple LED arrays to provide supplementary illumination and eliminate dark spots.
Step 3: Isolate from ambient light
Install a light shield at the inspection station—made from black acrylic with cutouts for the camera lens and light source—or reposition the station away from windows and strong light sources. If relocation is not feasible, apply UV‑blocking heat‑insulating film to the window to minimize direct sunlight exposure.
II. Issue 2: The specular material exhibits severe glare (metal/glass surfaces appear completely white).
When inspecting stainless steel parts, glass cover plates, and aluminum alloy smartphone frames, the most common issue is “excessive reflection”—large areas of the image appear white, completely masking defects such as scratches and dents, and causing the algorithm’s false‑positive rate to surge above 30%.
1. 3 A common reason
Core Reason 1: Polarization feature not enabled
The specular reflection from glossy materials produces “strong glare,” which ordinary light sources cannot filter. Polarizing filters, however, allow light waves vibrating in a specific direction to pass through, thereby canceling out specular reflections.
Core reason 2: The light source angle is too steep (directly perpendicular).
When the light source illuminates a highly reflective surface perpendicularly (at 90°), the reflected light enters the camera lens directly, creating a “specular highlight.” If the light source is positioned at too shallow an angle—close to the surface of the object being measured—it produces “diffuse reflection,” reducing glare.
Core Reason 3: The light source is too bright.
Blindly increasing the light source’s brightness in an attempt to “illuminate defects” actually exacerbates glare—high‑gloss materials can have a reflectance of 80% or more; the brighter the light, the stronger the reflected light, and the more severe the image overexposure.
2. Step-by-step solution
Step 1: Attach a polarizer and adjust its angle.
Attach a polarizing filter in front of both the camera lens and the light source (be sure to select models that match your lens’s diameter), then slowly rotate the filter mounted on the lens, turning it in 15° increments while observing the image. Stop rotating and lock the filter in place when the gray‑level value of reflective areas drops below 150 (for 8‑bit images) and defects become clearly visible. For example, when inspecting stainless‑steel bearings, rotating the polarizing filter transforms the originally uniformly white bearing surface into one with uniform illumination, making even 0.1‑mm scratches distinctly apparent.
Step 2: Adjust the light source angle to 15°–30°.
Adjust the light source angle from perpendicular to 15°–30° (measured relative to the surface of the object being inspected), and employ “dark-field illumination”—where light does not enter the lens directly, and only defect areas scatter and reflect light, creating a contrast effect of a dark background with bright defects. For example, when inspecting glass cover plates, annular lighting at a 30° angle eliminates surface reflections, causing internal bubbles to stand out as bright spots.
Step 3: Reduce brightness and optimize exposure.
Reduce the light source brightness to below 50%, and simultaneously increase the exposure time in the camera software (by increments of 1 ms, up to a maximum of 10 ms, to avoid blurring of moving objects). For example, when inspecting aluminum alloy parts, lower the brightness from 100% to 40% and increase the exposure time from 2 ms to 5 ms, thereby eliminating image reflections while maintaining adequate sharpness.
III. Issue 3: Transparent objects fail to detect bubbles or impurities (defects “invisible” within glass or plastic)
When inspecting transparent materials—such as glass substrates, plastic bottles, and silicone seals—the biggest challenge is that “internal bubbles and impurities are invisible”: light passes straight through the object, and the contrast between defects and the background gray level is extremely low, making them undetectable by conventional algorithms.
1. 3 A common reason
Core reason 1: Using the wrong type of light source (a front-facing light was used)
Light from a front‑side light source is reflected off the surface of a transparent object and cannot penetrate its interior, so bubbles and impurities do not produce scattering contrasts. In contrast, a back‑side light source allows light to pass through the object from behind; defects block the light, creating a “dark defect, bright background” effect.
Core Reason 2: Insufficient backlight brightness
The selected backlight has insufficient power (e.g., 5 W), resulting in weak light penetration. This is particularly problematic for transparent objects thicker than 3 mm, where light attenuation is severe and the contrast between defect areas and the background becomes indistinct.
Core Reason 3: The camera’s focal length is not aligned internally.
The camera’s focal length is focused on the surface of the transparent object rather than on internal defects, resulting in blurred imaging of internal bubbles and impurities, with no significant change in grayscale values.
2. Step-by-step solution
Step 1: Replace with a high-brightness backlight.
Eliminate direct illumination and opt for an industrial‑grade backlight with a power rating of ≥10 W, such as a surface light source or a backlight module. For larger objects—e.g., glass panels exceeding 1 meter in size—multiple backlight units can be combined. For instance, when inspecting a 5 mm‑thick glass substrate, a 20 W surface light source used as the backlight allows light to pass completely through the glass, making internal air bubbles as small as 0.05 mm clearly visible.
Step 2: Optimize the backlight module mounting position.
Place the backlight directly behind the object (at a distance of ≤5 mm) to minimize light attenuation during propagation; simultaneously set the backlight brightness to at least 80% to ensure sufficient penetration. For example, when inspecting transparent plastic bottles, position the backlight flush against the bottle body and adjust the brightness to 90%; this will cause even 0.1-mm‑sized impurities inside the bottle to appear as distinct dark spots.
Step 3: Adjust the camera’s focal length to the internal setting.
Place a test strip with tiny black dots inside the transparent object (to simulate defects), then slowly adjust the camera’s focus until the black dots on the strip are imaged most sharply; at that point, the focus is aligned with the interior. If no test strip is available, use software to zoom in on the image and observe the grayscale variations in the internal region until the details are clearest.
Related News
Six Common Issues with Machine Vision Lighting (Part 1)
2026-09-18Camera Parameters – Resolution [Sony ILX-LR1]
2026-09-18- 2026-09-17
Camera Parameters — Minimum Illumination 【Sony FCB-EW9500H】
2026-09-17- 2026-09-17
From a microscopic perspective of the sensor circuit
2026-09-16






+8613798538021