A glossy laptop cover shows you the lighting fixture, not the part: the camera sees the lamp reflected in the finish while the scratches under it stay invisible. The fix is two lighting geometries on one station. A low-angle dark-field pass turns scratches into bright marks on a near-black background, and a diffuse pass reads colour blotches, print and haze. This guide gives the angles, the coverage rules and a worked example for a 330 x 220 mm panel, so you can size both lights before you order anything.
Two defect classes, two geometries
Sort the defect list first, because lighting decides what a machine vision inspection can see, and each defect class needs its own reflection geometry.
- Scratches and gouges are ridges on a mirror-flat surface. They scatter light away from the specular direction, so they read bright when everything around them is dark. That is dark field: light in at a low angle, mirror reflection out on the far side, and the lens sees only the scatter.
- Colour blotches, bright patches and print change how much light the surface reflects diffusely. They need even, near-normal illumination, and they disappear in a dark-field image where the whole background sits at black.
One light cannot serve both classes. Run the two lights on separate controller channels, grab one frame per light, and merge results by panel region. The extra frame costs milliseconds; a missed defect class costs a field return. The geometry families are laid out in machine vision illumination types: choosing the right geometry, and the measurement half of the job is covered in scratch defect detection with lighting and dynamic thresholding.
The dark-field angle that clears the specular lobe
Put the camera close to the panel normal and tilt the low-angle lights in from the sides. Two small angles decide whether the mirror reflection misses the lens:
D is the lens entrance pupil diameter, WD the working distance, w the light's emitting width and H its height above the panel. With a 50 mm lens at f/2.8, D = 50 / 2.8 = 17.9 mm, so at WD = 350 mm the acceptance half-angle is β = arctan(8.93 / 350) ≈ 1.5°. A 30 mm wide light centred 150 mm above the panel spreads its own rays by arctan(15 / 150) ≈ 6°. Aim the beam centre 20-30° off the camera axis and the worst ray in the fan still arrives about 14° off axis, reflects at the same angle on the far side, and passes the lens by roughly 12° or more. Flat areas stay black; scratch ridges scatter light back into the aperture.
So the working setting is 60-70° from the panel surface: low enough to graze the finish, high enough that the reflected lobe clears the aperture with margin. Light from at least two opposite directions, because a scratch running parallel to one light's plane scatters nothing toward that light alone.
Worked example: a 330 x 220 mm panel at 0.042 mm per pixel
Take a typical laptop lid as the case: 330 mm long, 220 mm wide. Measure your own panel and carry the same arithmetic through with its numbers.
Inputs. Camera: a line scan model with 8192 pixels at 7 µm pitch, so the sensor line is 8192 × 0.007 mm = 57.3 mm long. Run the sensor line across the panel's 330 mm dimension and let the belt carry the panel along its 220 mm dimension. Allow 10 mm of total field margin for placement tolerance, so the target field of view is 340 mm.
Lens and resolution. m = 57.3 / 340 = 0.169. At a 300 mm working distance the thin-lens relation gives f = 0.169 × 300 / 1.169 ≈ 43 mm, which is not a stock focal length, so take the standard 50 mm and solve for distance: WD = 50 × 1.169 / 0.169 ≈ 346 mm. Set 350 mm. Then m = 50 / (350 − 50) = 0.167, the field covers 57.3 / 0.167 ≈ 343 mm, and each pixel projects 343 / 8192 = 0.042 mm on the panel. A 0.2 mm wide scratch therefore spans 0.2 / 0.042 ≈ 4.8 pixels, enough for a blob or edge tool. The same calculation sits in the lens focal length calculator.
Line rate and exposure. At a 100 mm/s belt the camera needs 100 / 0.042 ≈ 2381 lines per second, so set 2500 lines/s. The panel then advances 100 / 2500 = 0.04 mm per line, and scanning its 220 mm width takes 220 / 0.04 = 5500 lines, about 2.2 s. Each line is exposed for 1 / 2500 s = 0.4 ms, so the light runs continuously through the pass rather than flashing once per panel; the brightness budget behind that is worked through in line scan light: how much power a fast line really needs, and the line scan rate calculator re-runs it for your speed.
Light decision. The emitting length must span the 343 mm field, so the 400 mm-and-up size class is the target. The LS-LSC-0074 is a 484 mm high-uniformity line scan light with fan cooling, 24 V.
- Size
- 400 mm +
- Voltage
- 24 V
That leaves about 140 mm of margin over the field, enough to absorb a panel a size up. The field-of-view side of line scan sizing is set out further in line scan camera field of view: how to calculate it.
The diffuse pass for blotches and colour marks
The second image needs even, near-normal light so a blotch or haze patch changes grey level without a geometry artefact. Two options cover a full panel:
- Diffused bar pair. Two diffused white bars, one per long side, mounted steeply at about 30-45° off the panel normal so their washes overlap in the middle. A 372 mm diffused bar covers a 330 mm edge with room to spare. The LS-BAR-1276 is a 372 x 28 mm diffused bar light in white, 24 V.
- Size
- 200-400 mm
- Type
- Diffused
- Voltage
- 24 V
- Dome. The most even option, because the part sits inside the light: the finish mirrors the dark interior rather than the room. The trade is field size, which the emitting area sets. A Ø116 mm emitting area inspects a 116 mm window, so a full 330 mm panel needs sectioned shots or a large dome from the 400 mm-and-up class. The LS-DOM-0085 is a Ø166 mm dome light with a Ø116 mm emitting area, 24 V.
- Size
- 100-200 mm
- Voltage
- 24 V
Use white LEDs for this pass so colour differences survive; the colour-choice logic is in which LED colour gives the best contrast in machine vision, and the dome geometry is treated further in dome lights for shiny, curved and wrinkled parts.
Layouts that cover the whole panel
For a stopped panel on an area scan camera, build the dark-field pass from low-angle bar lights, one per free edge, each tilted inward so every scratch meets light from two directions. A 312 mm lit length covers a 220 mm edge with margin, and the long-edge bars pick up the corners. The LS-BAR-0484 is a 312 x 16 mm high-uniformity bar light, 24 V.
- Size
- 200-400 mm
- Type
- Standard
- Voltage
- 24 V
For continuous conveyance, one line scan light spanning the full field does the same job along the entire scan, and double-angle models emit obliquely from both sides of the line at once, so scratch orientation matters less. Emitted lengths run from about 300 mm to over 1000 mm; match the length to the field as in the worked example. The four-angle extension of the idea is line scan photometric stereo: four-angle line lights for moving webs, and the brightness-versus-coverage trade for big fields is in large field of view lighting: balance coverage and brightness.
Checks before you order
- Dark background. Image a scratch-free panel with only the low-angle lights on. Aim for a mean grey level below about 10 % of full scale, which leaves an order of magnitude of headroom for the scratch signal; a higher mean means the specular lobe is leaking and shallow scratches are already lost.
- Even wash. Capture a flat field under the diffuse lights and keep residual shading after flat-field correction within a few percent, or blotch thresholds will fire on the panel's own shading.
- Pixel budget. Smallest scratch to catch, divided by 4 pixels, gives the required pixel size: a 0.2 mm defect sets 0.05 mm/px or finer. The camera resolution calculator converts that into sensor pixels for your field.
- Channel separation. Fire the two lights on separate strobe channels with no overlap into each other's frames; lighting controllers for line scan cameras: what they fix covers the multi-channel sequencing.
- Repeatable geometry. Locating pins must set the working distance and tilt, so a changeover cannot quietly re-aim the lights — the same controlled-lighting discipline production lines are held to for plywood flatness inspection.
When the usual answer is wrong
- Curved lid edges. Near the rounded perimeter the specular lobe swings toward the camera and the dark-field image glows at the borders. Mask the outer few millimetres in the scratch tool and let the diffuse pass own that zone.
- Brushed or wavy finish. Scatter rises everywhere, lifting the dark background. Stop the lens down from f/2.8 to f/5.6, which halves the acceptance half-angle to about 0.7° at 350 mm, then win the lost light back through exposure or brightness.
- Protective film. A peel-off film adds a second reflecting surface, so features appear doubled and ghosted. Cross-polarized lighting suppresses the film's specular layer; the set-up is in cross polarization machine vision: reduce surface glare.
- Deep gouges. They read in both passes. That is expected: merge results by region and count each defect once.
What to order
One line scan camera with a 50 mm lens, one 400 mm-and-up line light, low-angle bar lights for the edges, and a diffused pass — bars or a dome sized to the field. Filter by lit length and colour in the light finder, or start the system configurator at the lighting step and pair the lights to your camera directly. If your line never stops, sort the camera side first with how to set the line rate of a line scan camera. For a layout review of your own panel, send the drawing and defect list through the contact page.
Questions
What angle should dark-field lights sit at on a glossy flat panel?
Set the beam centre 20-30° off the camera axis, which is 60-70° measured from the panel surface. At that tilt the mirror reflection passes the lens by a dozen degrees or more, so flat areas stay black while scratch ridges scatter light back into the aperture. Above roughly 45° off axis the image drifts toward bright field; below about 15° stray scatter lifts the background and washes shallow scratches out.
Can one light find scratches and colour blotches at the same time?
No, because the two defect classes are opposite in what they do to light. A scratch needs low-angle dark field with a near-black background; a blotch or print mark needs even, near-normal diffuse light and vanishes in a dark-field frame. Fire the lights on separate channels, expose one frame each and fuse the two result maps at the region level.
How long must the light be to cover a whole panel?
Size the emitting length to the field of view, not the bare part: keep about 10 mm of total margin so placement tolerance never crops an edge. A 330 mm panel with that margin needs a 343 mm field, which puts you in the 400 mm-and-up light class; a 484 mm model leaves roughly 140 mm to spare for a larger panel later.
Do I need a line scan camera, or will area scan do?
Either works at this panel size. Choose area scan with strobed low-angle bars when panels stop at a station; it is the simpler build and needs no encoder. Choose line scan when panels move continuously, because it gives even illumination along the whole scan with no seam between frames and one light instead of four. Material flow decides, not image quality.
Why do scratches fade when I open the lens aperture?
A wider aperture widens the acceptance cone, so more of the specular lobe leaks in and the background rises toward the scratch level. At f/2.8 and 350 mm working distance the half-angle is about 1.5°; at f/5.6 it is about 0.7°. Stopping down drops the background and restores contrast, and the light you lose goes back in through exposure or brightness.



