LightingGuide

Lighting a glossy panel for scratch defect inspection

Angles and sizes for glossy panel scratch inspection lighting: dark-field bars 20-30° off axis, a diffuse pass for blotches and a worked 330 x 220 mm example.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Two defect classes, two geometries
  2. 02The dark-field angle that clears the specular lobe
  3. 03Worked example: a 330 x 220 mm panel at 0.042 mm per pixel
  4. 04The diffuse pass for blotches and colour marks
  5. 05Layouts that cover the whole panel
  6. 06Checks before you order
  7. 07When the usual answer is wrong
  8. 08What to order
  9. 09Questions

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.

Bright-field and dark-field lighting geometry High-angle light reflects off the flat surface straight into the lens, so the surface looks bright. Low-angle light reflects away from the lens, so the surface looks dark and only edges or scratches scatter light upward.flat part with a scratchCamerabright field(high angle)dark field (low angle)flat areas reflect away;only the scratch sends light up
Bright-field and dark-field lighting geometry. High-angle light reflects off the flat surface straight into the lens, so the surface looks bright. Low-angle light reflects away from the lens, so the surface looks dark and only edges or scratches scatter light upward.

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:

β = arctan(D / (2 × WD)) θ_min = β + arctan(w / (2 × H))

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.

m = sensor line length / FOV WD = f × (1 + m) / m pixel size = FOV / pixels line rate = belt speed / pixel size

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.

Line scan lights484 mm High uniformity line scan light, fan cooled (LS-LSC-0074)LS-LSC-0074
Size
400 mm +
Voltage
24 V
$1,539.00View partBuild a system with it

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.

Line-scan camera line rate
Units
Pixel on the part
– mm
Line rate needed
– kHz
Longest exposure
– µs
Data rate
– MB/s
Lines per metre
–
Encoder setting
–

Square pixels: line rate = speed / pixel on the part; the exposure must end within one line period. Encoder: lines per pulse = (π × roller diameter / pulses per revolution) / pixel on the part.

Find line scan cameras Open the full calculator

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.
Bar lightsBar light, 372 x 28 mm, White (LS-BAR-1276)LS-BAR-1276
Size
200-400 mm
Type
Diffused
Voltage
24 V
$439.00View partBuild a system with it
  • 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.
Dome lightsØ166 mm dome light, Ø116 mm emitting area (LS-DOM-0085)LS-DOM-0085
Size
100-200 mm
Voltage
24 V
from $409.00View partBuild a system with it
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.

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.

Bar lights312 x 16 mm High uniformity bar light (LS-BAR-0484)LS-BAR-0484
Size
200-400 mm
Type
Standard
Voltage
24 V
$459.00View partBuild a system with it

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.