LightingTroubleshooting

Why slot angle changes defect detection under coaxial light

Why the defect shadow in a slotted screw head changes with slot angle under coaxial light, and the lighting fixes that make detection hold at any angle.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01Why the shadow depends on slot angle
  2. 02Prove it on your bench in ten minutes
  3. 03Fix 1: make the light angle-blind for a flat head
  4. 04Fix 2: keep the coaxial, sweep four strobed directions
  5. 05Fix 3: measure the slot in 3D when the parts vary
  6. 06Worked example: pixel scale and shadow size for a 3 mm head in a 12 mm field of view
  7. 07A threshold and a capture that hold at every angle
  8. 08Checklist before you change the program
  9. 09Questions

A slotted screw head rides a rotating glass disc under a coaxial light, the slot lands at a random angle, and the verdict wanders with it: the same debris-filled slot casts a large dark blob in one orientation and almost vanishes in another, so bad parts pass as good. The cause is geometric, not algorithmic — a slot is a directional cavity, and a coaxial beam is not a single ray. Here you get the physics, a ten-minute bench test to confirm it on your own parts, and three fixes with the numbers to choose between them.

Why the shadow depends on slot angle

The polished head is a mirror standing perpendicular to the optical axis: coaxial light travels down, returns straight up, and the head reads bright. The slot milled into that mirror is a groove. Light entering it strikes the walls and floor at grazing angles and scatters sideways, so the slot floor reads dark — and the debris in it disturbs that dark field. Your blob area measures that disturbance.

A coaxial unit is not a single axial ray. LEDs feed a beam splitter, and the cone that leaves it carries rays tilted from vertical by tens of degrees at its edge. Three quantities decide what you see: α, a ray's tilt from the slot's vertical; d, the slot depth; h, the height of the debris above the floor.

L = h × tan α (shadow length the debris casts) r = d × tan α (sideways reach of a ray while it falls depth d)

Along the slot, no wall blocks a tilted ray, so light reaches the debris end to end, and its shadow L lies on the floor where the camera sees every pixel of it. Across the slot, a ray reaches the floor only within a horizontal distance r of where it enters; most cross-slot light strikes a wall first. Turn the part 90° and the roles swap: the shadow climbs the opposite wall, out of sight, while the debris itself receives far less light. The dark area you measure is a function of debris times angle, not debris alone.

Two effects push the verdict further. A chip with flat faces can mirror light straight back up when the geometry lines up, so the defect images bright inside a dark slot and a dark-blob test passes it. And a milled slot usually has draft: one wall tilts toward the beam, one away, so rotation swaps the bright and dark wall bands and merges or splits the blob. None of this is a flaw in the coaxial lights — it is the geometry any on-axis source creates around a groove. For the wider lighting choice on metal parts, see lighting for metal surface defect inspection.

Prove it on your bench in ten minutes

Lock the recipe first: fixed exposure, fixed gain, no auto modes. Auto exposure quietly re-brightens each frame and fakes a lighting change — the same mechanism that makes camera image brightness drift over time while auto modes stay on.

Then take one known-bad screw and clamp it at the capture point. Capture 12 images while rotating the part in 30° steps. Measure the dark-blob area in every image at one fixed threshold and write the 12 numbers down. If the same slot produces areas that swing several-fold between orientations, the light is confirmed as the variable — no training run will fix a measurement that changes with rotation.

Finally, repeat the sweep with the room lights off or the station shrouded. A glass disc passes overhead light straight onto a mirror-flat head, and those ambient rays arrive at angles your recipe never set. If the sweep tightens, a simple hood buys more stability than any algorithm change.

Fix 1: make the light angle-blind for a flat head

A flat, polished head is the easiest case there is for diffuse lighting. A dome light, a diffuse cloudy-day ring or a flat shadowless panel sends light to every point from every azimuth and elevation at once. There is no beam direction to align with, so the debris reads as its own dark silhouette and one threshold holds at every slot angle. A working rule for sizing: pick a dome roughly three times the part width — for a 3 mm head, even the smallest domes leave generous margin. At short working distances a diffuse ring behaves the same way; the ring light selection guide covers angle, size and distance, and the light finder narrows the range by size and colour once you know the diameter.

The one weak spot of a dome is the hole the camera looks through, and it sits directly above your centred part. The fix for the dome camera-hole dark spot is a larger dome or a slight offset — check it before ordering. The dome lights guide covers shiny, curved and wrinkled surfaces in depth.

How a dome light works LEDs at the rim light the white inner surface of the dome, which lights the part evenly from almost every direction. The camera looks through a hole at the top; on flat mirror-like areas the hole reflects as a dark spot.Cameradiffuse inner surfacelights the part from every sideLED ringcamera holecurved or wrinkled part; dark spot where the hole reflects
How a dome light works. LEDs at the rim light the white inner surface of the dome, which lights the part evenly from almost every direction. The camera looks through a hole at the top; on flat mirror-like areas the hole reflects as a dark spot.
LightingDome lights

Curved and reflective parts

143 models · from $139.00

Fix 2: keep the coaxial, sweep four strobed directions

When the slot floor must read as well — an engraved grade, a date code — diffuse light washes the very contrast you need, and coaxial remains the right tool for engraved characters in recessed metal parts. The same holds when a recessed interior must be lit through a small opening, as in verifying a part inside a metal can with diffuse coaxial. There, make the verdict angle-invariant instead of the light.

Mount two to four lights at different azimuths around the station. Strobe them in sequence, take one exposure per direction, and judge on the largest dark-blob area across the captures. The elongated shadow appears in at least one direction, and the maximum restores it every cycle. Two directions 90° apart remove the worst-aligned case for a plain slot; four at 45° steps leave no slot angle more than 22.5° from a source. Verify the spacing on the known-bad screw from your bench test: the maximum area must clear the threshold at every 15° step.

Sequencing channels in step with the camera exposure is the same pattern used for photometric stereo sequencing and for sequential multi-view lighting; browse the light controllers category or start the controller configurator. One fit is the LS-CTL-0070, a 4-channel, 200 W digital control box with strobe output and RS-232.

Light controllersDigital control box, 4 ch, 200 W, RS232 (LS-CTL-0070)LS-CTL-0070
Output
Constant voltage 24 V
Channels
4 channels
Control
Digital
Feature
Strobe
$549.00View partBuild a system with it

Set every channel to the same pulse width and drive so the four blob areas compare directly; unequal pulses re-introduce exactly the kind of bias you are removing.

Fix 3: measure the slot in 3D when the parts vary

There is a harder boundary than angle: part-to-part variation. If floor texture, chip colour and slot draft change from batch to batch, grey-level contrast shifts with them, and even a good light leaves the good and bad distributions touching. The bench sweep shows this plainly: if the smallest bad-part area is smaller than the largest good-part area at any angle, no 2D threshold will ever hold.

A laser profile sensor sidesteps reflectance altogether. Scanned across the slot, it returns the cross-section — depth and the level of the remaining floor are stable under rotation, while the measured width follows the cosine of the angle between scan line and slot, so judge on depth. A filled slot shows as reduced depth at every orientation.

See how 3D laser line profiler surface defect detection works in practice, and the 3D topic page for the wider approach set.

Worked example: pixel scale and shadow size for a 3 mm head in a 12 mm field of view

The inputs, and where each comes from:

  • Field of view 12 mm, head diameter 3 mm: your line's set-up.
  • Sensor array 1440 × 1080 pixels: the 4:3 array behind a 1.6 MP mono sensor — substitute your own camera's array.
  • Slot 0.8 mm wide, 0.5 mm deep, chip 0.2 mm tall: illustrative values typical of a small slotted head.
  • Beam cone reaching 30° off vertical at its edge: a modest assumption for an LED-fed coaxial unit.

The rules in words: the pixel scale equals field of view divided by pixels across; the shadow length is L = h × tan α; the sideways reach of a ray is r = d × tan α.

s = FOV / pixels across

The arithmetic:

  • Scale: 12 mm / 1440 px = 8.3 µm per pixel.
  • Head: 3 mm / 8.3 µm per pixel = 360 px across.
  • A 0.3 mm × 0.8 mm patch of debris on the floor: 36 px × 96 px ≈ 3,456 px of dark area.
  • Shadow: L = 0.2 mm × tan 30° = 0.2 × 0.577 = 0.115 mm, about 14 px of extra dark length when the slot aligns with the beam.
  • Reach: r = 0.5 mm × tan 30° = 0.289 mm. On an 0.8 mm slot, cross-slot rays light the floor only through the central 800 − 2 × 289 = 222 µm — 222 / 800 ≈ 28% of the opening — while rays running along the slot all reach the debris.

Result: one orientation starves the debris of light and hides its shadow up the wall; the aligned orientation feeds it and lays a 14 px shadow down the floor. The dark area swings by close to an order of magnitude between the two.

Decision: at 8.3 µm per pixel the 3 mm head spans 360 px, so locating and blob measurement are comfortable — keep the 12 mm field of view and the optics. The variable is the light, so apply Fix 1 to remove the angle term or Fix 2 to sample it, and set the threshold from the sweep below. If you tighten the field later, remember it moves with working distance — see how field of view changes with working distance.

Check any other sensor-and-field pairing in the resolution calculator:

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

A threshold and a capture that hold at every angle

The capture wants three locks. Mono sensor, because colour interpolation smears blob edges. Global shutter, so each strobed pulse lands inside one exposure instead of being sliced by a rolling scan. Fixed exposure and gain in the recipe, with an identical pulse width on every strobed channel. For a shadow-area measurement, a mono global-shutter vision sensor such as the HK-TD032-12-WBN keeps each pulse inside one clean exposure; browse the smart cameras category or the camera finder.

Smart cameras & vision sensorsHikrobot HK-TD032-12-WBN 1.6 MP mono vision sensorHK-TD032-12-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
Sensor format
1/2.9"
Shutter
Global
$1,699.00View part

Then build the threshold from the sweep, not from one lucky orientation. Image 20 good and 20 bad screws, each at 30° steps — 12 orientations, 480 images. Measure the dark-blob area everywhere at one fixed threshold; an adaptive threshold chases the illumination and hides the very variation you are hunting. Take G, the largest area any good part produces at any angle, and B, the smallest area any bad part produces at any angle, and set the reject at their geometric mean:

T = sqrt(G × B)

If G and B overlap, stop: no number separates the populations, and the lighting has to change, not the threshold — that is Fix 3's boundary case.

Checklist before you change the program

  • Confirm the swing: one known-bad part, 12 images at 30° steps, one fixed threshold, the 12 areas tabulated.
  • Kill ambient: room lights off or a shroud fitted; the glass disc transmits whatever sits above it.
  • Lock the recipe: fixed exposure, fixed gain, no auto modes, equal strobe pulse width on every channel.
  • Pick the light by case: flat head, debris only → diffuse dome or ring; slot floor must read → four strobed directions, judge on the maximum; sweep overlap or inconsistent parts → 3D profile scan on depth.
  • Set the threshold from the sweep: T = sqrt(G × B) over 20 good and 20 bad parts; overlap means change the light, not the number.
  • Re-run the bad-part sweep after any change: the maximum blob area must clear T at all 12 orientations.

The light configurator pairs a dome or a four-channel strobe set to your camera and working distance, and you can send the angle sweep to the team through the contact page before you order.

Questions

Why do some debris-filled slots image bright and pass as good parts?

A chip or burr has faces that can mirror light straight back up the slot. When the slot points toward the strongest oblique rays of the coaxial cone, those faces light up, the dark blob shrinks or inverts, and a dark-area test reads a good part. That is the failure mode a single coaxial exposure can never remove; only angle-blind illumination or the maximum over several strobed directions does.

How many strobed directions cover a random slot angle?

Two lights 90° apart remove the worst-aligned case for a plain rectangular slot; four directions at 45° steps leave no orientation more than 22.5° from a source and are the usual choice. Prove the spacing on one known-bad screw: sweep it in 15° steps and confirm the largest dark-blob area over the captures stays above the reject threshold at every step; if it dips, halve the spacing or add a diffuser.

Does the glass turntable contribute to the unstable shadows?

Yes, twice. It transmits room light onto a mirror-flat head, adding rays from angles the recipe never controls, and its top surface adds its own reflections into the coaxial path. Repeat the bench sweep with the room lights off or a shroud fitted: if the images stabilise, build a simple hood; keep strobes short and exposure fixed so ambient cannot accumulate during the exposure.

Which blob measurement should I log during the threshold study?

Log the dark-blob area at one fixed threshold, plus the blob's mean grey level as a cross-check. Never re-threshold per image: an adaptive threshold chases the illumination and hides the angle variation you are trying to measure. The fixed threshold also makes the 480 images of the sweep directly comparable, so the geometric-mean rule applies without rescaling.

Can a variation model replace the lighting change?

Only partly. A variation model tolerates small grey-level deviations around a golden reference, but the shadow area here changes by close to an order of magnitude with slot angle, far outside any useful tolerance, and a brightly lit chip can sit inside the tolerance band at some orientations. Keep the model for locating and gross differences, and take the debris verdict from angle-stable illumination or the multi-direction maximum.