A presence check that passed for months starts rejecting good parts the day someone moves a fixture. The cause is rarely the algorithm: a shadow moved, and the gray threshold underneath the check never knew. The classic checker-shadow illusion explains the mechanism exactly — two patches that measure the identical gray value look different to a human because one sits in inferred shadow, and a camera sees only the raw value, with no compensation at all. Here you get the algebra a gray threshold silently assumes, a worked example that shows precisely when a shadow flips a reading, and the machine vision lighting geometries — diffuse domes, shadowless panels, low-angle dark field — that either remove the shadow or make it the signal.
Two squares, one gray value
In the classic figure, a cylinder stands on a checkerboard and casts a shadow across it. Sample the pixels and the two marked squares return exactly the same value: RGB 107, 107, 107. To your eye square A looks dark and square B looks light, because your visual system infers the shadow, estimates how much it dims the surface, and reports the shade it believes sits underneath. The original figure and its explanation are on the checker shadow illusion page on Wikipedia.
A camera does the opposite: it reports the 107 and stops. If square A is a white print sitting inside a flange shadow and square B is a dark gasket in full light, the sensor genuinely cannot separate them by gray level. A threshold on gray values measures luminance — the light leaving the surface — while the property you care about, whether the surface is good or bad, lives in reflectance. That confusion is how a white part in shadow gets rejected as a black part, and it sits underneath every gray-level threshold measurement.
What a gray threshold actually measures
For an 8-bit camera in linear mode, the number you threshold follows one relation:
Gain and offset are fixed at setup, so the threshold is secretly a joint statement about illumination E and surface R, and it stays valid only while E holds its setup value. A cast shadow multiplies E by a factor s between 0 and 1: full light is s = 1, a deep umbra can sit near s = 0.05. Two patches return the same gray whenever the E·R products match, whatever the individual values are.
Two practical consequences follow. First, shoot linear — gamma off — because the proportionality is what makes the worked example's algebra hold. Second, track the ratio between a shadowed patch and a lit one across the day: if it drifts, E is drifting, which is why lighting and exposure decisions come first in a stable 2D inspection build.
Where production shadows come from
An LED tens of millimetres from the part behaves close to a point source, and point sources cast hard shadows. On a real part something always stands in the way: a flange over the feature, a boss, a connector body, the fixture clamp, the wall of a tray pocket. Tolerance adds a second source — a part a few millimetres off-center throws an asymmetric edge shadow that a centered setup never showed, and rounded corners collect their own uneven edges that read as false defect shadows.
The room adds a third source. Daylight and overhead shop lights reach the sensor unless the station is enclosed, and they bring slow shadows that move between the morning and afternoon shift. What breaks the threshold is the umbra, the region where the source is fully blocked and s collapses toward zero; penumbra gradients mostly cost contrast, not verdicts.
Diffuse light removes the shadow
A dome light attacks the geometry itself. LEDs paint the inside of a white dome, so the patch receives light scattered from nearly every direction above it. A flange cannot block every direction at once, the umbra never forms, and what remains of a shadow is a faint penumbra with s close to 1. That is why domes are the standard answer on curved, shiny and wrinkled surfaces, as set out in the guide to dome lights for shiny, curved and wrinkled parts.
Size by emitting area, not by outer diameter. The working rule: emitting area about twice the part's largest dimension, so grazing rays arrive at similar angles all around the curvature. The LS-DOM-0085 provides a Ø116 mm emitting area inside a Ø166 mm outer diameter:
- Size
- 100-200 mm
- Voltage
- 24 V
Half of 116 mm is 58 mm, so it suits parts up to about 55 mm across, with the camera's field of view kept inside the emitting area too. For strongly curved parts — caps, knobs, wrinkled packaging — a spherical diffuser wraps light over more of the hemisphere than a shallow dome. The LS-DOM-0133 is a 134 mm dia. spherical integral light:
- Size
- 100-200 mm
- Voltage
- 24 V
One physics caveat applies to every dome: the camera looks through a hole in it, and on a flat glossy part that hole reads as a dark spot at the center of the field. The fixes for the dark spot from the camera hole are catalogued in that article.
Shadowless panels: the same principle, flat
Headroom is not always available for a dome. Shadowless lights put the same diffuse principle into low, flat, square and arch shapes for flat and mildly curved fields, which also makes them the usual choice for large rectangular fields and for wrinkled material such as leather. The flat dome series (LS-FDL-S02) sits only 19.1 mm high. The LS-FDL-0002-L8 covers a 251.5 x 251.5 mm lit area. The square LS-SDL-0006 measures 120 x 120 x 30 mm:
- Size
- 200-400 mm
- Voltage
- 24 V
- Size
- 100-200 mm
- Voltage
- 24 V
Every dome and shadowless light in the catalog runs on 24 V, so one 24 V supply serves the whole shadow-removal build.
When the shadow is the signal
Removing every shadow is not the goal everywhere. For dents, pits, engraved characters and embossed marks the shadow is the defect feature: you want it strong and black against a bright surround. That is dark field — a directional source at a low angle, so flat areas reflect the light away from the lens and only relief scatters or blocks into it. The law of reflection decides bright versus dark field, the low-angle technique for dents and pits applies it to surface damage, and the engraved-text comparison of grazing light against a dome shows the trade.
Inside the diffuse family, the low-angle shadowless type is the nearest thing to both jobs in one unit. The LS-SDL-0067 is a 113 mm low angle shadowless light:
- Size
- 100-200 mm
- Voltage
- 24 V
Worked example: gray 107 under a half-strength shadow
Inputs: the two marked squares of the classic figure both measure RGB 107, 107, 107 — sample the pixels yourself; square A sits in the shadow, square B in full light. Assume the cylinder's shadow leaves half the illumination on A, so s = 0.5, and shoot linear with the same gain and offset for both squares. Rule in words: gray scales with illuminance times reflectance, and a shadow scales only the illuminance.
Result: the square that looks darker is a surface shade twice as light as the other. Decision: any shade threshold drawn between the two true shades misclassifies one of them, so a gray threshold on this image cannot work until s returns to 1 — until the shadow is removed.
The same algebra sets a production design limit. Suppose a well-exposed white print reads gray 230 (8-bit) in full light at setup and the pass mark is gray 100. The print keeps passing while 230·s ≥ 100, so s ≥ 100/230 = 0.435: the shadow must leave at least 44% of full light. Against a black gasket reading gray 20 in the same light, the white print even measures darker while 230·s < 20, so s < 20/230 = 0.087, about 9% of full light. If anything in your fixture can shadow the feature deeper than about 44% of full light, a 100 threshold starts rejecting good parts; deeper than about 9% and white can read below black. Fix the illumination, not the threshold.
Choosing the geometry
| Geometry | Effect on a cast shadow | Use it for | Watch for |
|---|---|---|---|
| Diffuse dome | Umbra never forms; light from all directions | Curved, shiny, wrinkled parts; shade checks | Camera-hole spot on flat glossy fields; headroom |
| Flat and square shadowless | Same diffuse principle in a low shape | Flat fields, tight height, rectangular parts | Less wrapping than a dome on strong curvature |
| Low angle, dark field | Keeps the shadow and makes it the signal | Dents, pits, embossed and engraved marks | Dust and scratches become signal too |
| Coaxial diffuse | Light travels along the optic axis | Mirror-flat surfaces, cavities, cans | Flat fields only; no wrapping of tall relief |
Per case: a shade check on mixed reflectance — print against gasket — takes a dome on curved parts or a flat shadowless panel on flat ones. A relief check takes low angle. A part hidden inside a metal can takes coaxial diffuse, as worked through in the metal-can lighting article.
Checks before you order
- Measure s instead of guessing it: image the feature at the worst-tolerance part position and divide the shadowed gray level by the full-light gray level of the same surface.
- Shoot linear: gamma off, exposure and gain fixed, and confirm a gray card reads the same across the part's travel.
- Check the dome's camera-hole spot against your real field of view, not against a demo image.
- Confirm the supply delivers 24 V and that the controller channel can carry the strobe current you plan to draw.
- Decide the verdict before the light: shade buys diffuse, relief buys low angle. The most common mis-buy is a dome ordered for dent work.
What diffuse light cannot fix
Open stations. Daylight and shop lighting add a second, moving shadow map on top of yours. Enclose the station and strobe on the camera trigger; the write-up on stabilizing lighting changes with the machine vision trigger covers the trigger side.
Glare is not a shadow. A specular highlight saturates regardless of how diffuse the light is, which is a polarization and geometry problem — handled for pins in shiny metal pins without glare and for copper in copper surface inspection lighting.
Wavelength does not change shadow strength. An infrared dome casts the same shadow geometry as a white one; wavelength changes contrast between materials, as covered in light color and monochrome camera contrast.
Deep bores. No dome reaches into a hole; 360 degree inner-wall and bore imaging is as much a lens decision as a lighting one.
The decision
Commit the verdict first, then buy the light for it. A shade check on parts with anything raised above the feature needs diffuse light — a dome for curved parts, a flat shadowless panel for flat fields. A relief check needs low angle. Filter the catalog by size and wavelength in the lighting finder, browse the lighting topic page for the neighbouring techniques, or go straight to the configurator:
The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.
Questions
Does a 12-bit camera fix shadow errors?
No. Extra bit depth records the same luminance more finely; the shadow still multiplies the illuminance by the same factor, so the ratio between a shadowed patch and a lit one does not change. Fix the illumination first. The extra depth helps afterwards, when you need to resolve the small contrast that remains inside a penumbra.
Can software remove the shadow instead of the lighting?
Partly, and only for fixed shadows. A reference image of a good part subtracts the shadows that fixtures cast, and flat-field correction evens out LED output across the field. A shadow that moves with the part moves with the very feature you are judging, so no reference can subtract it; change the lighting geometry instead.
What size part fits a dome light?
Use the rule of thumb that the emitting area should be about twice the part's largest dimension. On a dome with a Ø116 mm emitting area that means parts up to roughly 58 mm across, and the camera's field of view must also stay inside the emitting area. Larger parts move you to the next dome size up.
When should I keep the shadow instead of removing it?
When the shadow is the feature: dents and pits under low-angle grazing light, engraved or embossed characters, raised fillets. Then keep a directional source low and let relief throw its shadow against a bright surround, so the verdict becomes shadow present or absent rather than a gray threshold on a shaded patch.
Do infrared lights behave differently with shadows?
The geometry does not change: a shadow scales infrared illuminance by the same factor as visible light. Wavelength changes material contrast and ambient rejection instead. Infrared types in the catalog cluster at 850 nm and 940 nm; with a matching filter on the lens, visible room light and the shadows it casts stop reaching the sensor.




