LightingHow-to

Detecting dents and pits in metal surfaces with low-angle lighting

Detecting dents and pits in metal surfaces: set the grazing angle, budget pixels across each pit, and choose between opposed bars, coaxial and dome light.

LumaSpec Vision11 min read Share on LinkedIn

On this page 8 sections
  1. 01Why flat light loses dents and pits
  2. 02The two numbers that decide the set-up
  3. 03Worked example: 0.5 mm pits on a 300 mm brushed aluminum panel
  4. 04Build the lighting station
  5. 05Bars, coaxial or dome
  6. 06When the usual answer is wrong
  7. 07Checks before you commit
  8. 08Questions

A dent or a pit is a geometry defect: the metal is all there, just lower than the surface around it. Treat one like a print defect and the inspection never settles — pits slip through on one shift, grain speckle becomes a false call on the next. The fix is lighting geometry, not more software. This guide is for anyone setting up camera inspection on flat or gently curved metal: stamped panels, machined faces, extrusions, rolled strip. You will set the light angle, budget pixels against the smallest pit, build an opposed pair of bar lights, and verify the image with numbers. The recipe up front: light the surface at 15-30 degrees from horizontal, with at least 3-4 pixels across the smallest pit.

Why flat light loses dents and pits

Under even, on-axis light, a flat metal face returns nearly the same gray everywhere. A crater 0.05 mm deep changes that return by a handful of gray levels — inside the noise of texture, mill finish and illumination drift. That drift is the instability the inspection has been fighting.

Tilt the same light to a grazing angle and the crater becomes the brightest thing in the frame. The wall facing the light reflects the beam up into the lens; the opposite wall blocks it and throws a shadow. One pit now reads as a bright crescent against a dark wedge, a signature no grain streak produces.

wall slope ≈ arctan(2 × depth / pit diameter)

A pit 0.5 mm across and 0.05 mm deep has walls tilted about arctan(0.2) ≈ 11 degrees. At grazing incidence that slope redirects the light completely; under on-axis light it shifts brightness by a few percent. That bright-versus-dark behavior is dark-field lighting in the illumination geometry families.

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.

Lighting for metal surface defect inspection runs the same reasoning across scratches, stains and dents; this guide stays on the dent case and works the numbers.

The two numbers that decide the set-up

Elevation: 15-30 degrees measured from the part surface. Start at 20. Below about 15 degrees the bars swing far out from the field — the offset grows as the angle flattens — and every burr throws a long shadow across real features. Above about 30 degrees the sensitivity fades: the gap in illumination angle between the flat field and an 11 degree pit wall narrows, so shallow pits sink back toward the background.

Pixels: at least 3 across the smallest pit, 4-5 to grade depth. A blob detector needs roughly two pixels to see anything and several more to tell shape from noise. Shallow pits are low-contrast targets, so they need the margin. Work the floor backwards:

smallest catchable pit ≈ 3 × field of view / pixels across the field

A 2448 px camera over a 330 mm field resolves 0.135 mm per pixel, so the floor sits near 3 × 0.135 ≈ 0.40 mm. The calculator below runs it for your camera and field:

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

Worked example: 0.5 mm pits on a 300 mm brushed aluminum panel

The inputs are a typical stamped-panel case; substitute your part's numbers and follow the same steps.

  • Part: 300 mm × 200 mm brushed aluminum stamping, inspected in one shot.
  • Smallest defect in the spec: pits Ø0.5 mm and up, about 0.05 mm deep.
  • Camera: 2448 × 2048 px (5 MP class), 8-bit gray, viewing straight down.
  • Lighting: opposed bar pair, 24 V, target elevation 20 degrees, bars 50 mm above the surface.
  • Working rules: field of view = part size + 10%; pixel floor 3 px, grading target 4 px; lit length at least 1.2 × field of view.

Field of view: 300 × 1.10 = 330 mm on the long side; 200 × 1.10 = 220 mm on the short side.

Pixel scale on the long side: 330 mm / 2448 px = 0.135 mm/px. The 0.5 mm pit spans 0.5 / 0.135 = 3.7 px.

Pixel scale on the short side: 220 mm / 2048 px = 0.107 mm/px. The pit spans 0.5 / 0.107 = 4.7 px.

The worst axis governs: this camera sees every 0.5 mm pit at 3.7 px — past the 3 px detection floor with about 24% margin, short of the 4 px grading target.

Decision: keep the 5 MP camera for go/no-go detection. If pits must be graded, or the spec tightens below 0.40 mm, split the field into two 165 mm shots — 165 / 2448 = 0.067 mm/px, so 7.4 px per pit — or step up to a 12 MP sensor, where 330 / 4096 = 0.081 mm/px gives 6.2 px.

Bar offset: height / tan(elevation) = 50 / tan 20° = 50 / 0.364 ≈ 137 mm from field center on each side. Bar lit length: 1.2 × 330 = 396 mm.

That lit length lands the bar in the 400 mm + size bracket.

Bar lightsBar light, 423 x 40 mm, Red (LS-BAR-1168)LS-BAR-1168
Size
400 mm +
Type
Diffused
Voltage
24 V
$569.00View partBuild a system with it

The diffused face is deliberate at this angle: a bare LED row would stripe its own reflection across brushed grain, and the diffuser spreads it into an even line. Mount with a gauge, not by eye — the offset and elevation above are the numbers that make or break the signature.

Build the lighting station

You need the camera and lens fixed for the chosen field, two bar lights, a controller with an independent channel per bar, brackets that hold a measured angle, a shroud, known-good parts and parts with a seeded defect — a pressed dent or an EDM notch.

  1. Fix the camera square over the part and set the field to part size + 10%. Compute pixels per millimeter and confirm at least 3 px across the smallest pit before touching the lighting.
  2. Mount the bars at 20 degrees elevation, offset ≈ height / tan 20° per side, with the light travelling along the grain on brushed parts.
  3. Wire each bar to its own controller channel so the two can be strobed independently.
  4. Size the strobe pulse to freeze motion: blur = line speed × pulse time, kept under a third of the smallest pit. Sizing the strobe pulse for high speed barcode verification works the same arithmetic line by line.
  5. Balance with one bar at a time: the flat field should read below 10% of full scale, with any seeded-pit crescent standing well clear of it.
  6. Detect both halves of the signature: threshold the bright crescent and the dark wedge separately, or run scratch defect detection with lighting and dynamic thresholding so the threshold follows the local floor.
  7. Verify: 30 known-good parts with zero calls, then every seeded part caught with each bar on its own, repeated across a full shift.
  8. Kill ambient light: overhead shop lighting raises the dark floor and eats contrast, so shroud the cell or fit a bandpass filter matched to the bar wavelength.

Between 100 and 400 mm of field the bar lights range is wide. The LS-BAR-1047 is a 290 × 30 mm standard LED bar light on 24 V.

Bar lights290 x 30 mm LED bar light (LS-BAR-1047)LS-BAR-1047
Size
200-400 mm
Type
Standard
Voltage
24 V
$449.00View partBuild a system with it

Polished, hard parts scatter little light back — that is when the LS-BAR-0668, a 312 × 36 × 26 mm high-luminance bar light on 24 V, earns its place.

Bar lightsHigh luminance bar light, 312 x 36 x 26 mm (LS-BAR-0668)LS-BAR-0668
Size
200-400 mm
Type
Standard
Voltage
24 V
$399.00View partBuild a system with it

Grazing geometry throws away most of the beam, so the higher drive in the same footprint buys back exposure margin.

Bars, coaxial or dome

Geometry What the pit looks like Pick it when
Opposed grazing bars, 15-30° Bright crescent plus dark wedge — strongest signature Flat or gently curved opaque metal, shallow pits in the spec
Coaxial light (bright field) Soft dark dot where the walls return less light Polished flat parts that must also show engraved or laser marks
Dome light (diffuse wrap) Even, low-contrast shading Curved shiny parts a bar angle cannot follow

Coaxial is bright field by construction: the light travels down the camera axis, so only tilted walls change the return, and shallow craters change it little. Its home ground is the shared station, one shot that reads an engraved or laser mark and catches the deeper dents. For that combined job, the LS-CXL-0027 is a 60 × 60 mm coaxial light rated 4.4 W in red and 7.2 W in white on 24 V.

Coaxial lights60 x 60 mm Coaxial light, 4.4 W red / 7.2 W white (LS-CXL-0027)LS-CXL-0027
Size
50-100 mm
Voltage
24 V
$269.00View partBuild a system with it

The coaxial lights line runs from under 50 mm up past 400 mm, and machine vision lighting selection by inspection task sorts these geometries by what the camera must decide.

Shiny curved parts — caps, can ends, bottle shoulders — break a bar's grazing angle, because the angle is only right along one line of the curve. A dome light wraps the whole part in diffuse light from every direction, so the crater still reads, at lower contrast than dark field. Size the dome so the emitting area clears the part width with room to spare. The LS-DOM-0085 is a Ø166 mm dome light with a Ø116 mm emitting area on 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

Keep the part inside about three-quarters of the emitting area: for this dome, roughly 87 mm across. Dome lights for shiny, curved and wrinkled parts covers dome sizing and failure modes in detail.

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.

When the usual answer is wrong

Brushed and textured surfaces. Grain is a field of elongated streaks, and light crossing the grain turns every streak into a tiny crescent — the main source of false calls. Run the bars so light travels along the grain. Pits are craters, so they catch light from any heading and stay visible.

Oiled, wet or mirror-finish parts. Oil films smear the crescent edges, and a near-perfect mirror returns almost nothing to scatter. Wiping stages and wavelength swaps will not fix that physics; move to depth sensing, where surface defect detection with a 3D laser line profiler measures the dent itself. On shiny metal, improving the 3D point cloud is the hard part.

Glinting flat fields. Cross polarization — polarizer on the bar, analyzer on the lens — kills flat-field sheen; copper surface inspection lighting works through that fight. The trade is that polarization dims the crescents too, so budget drive or exposure for it.

Depth questions. If the question is how deep rather than whether, stop thresholding 2D shading: shading moves with every tilt of the part, a height map does not.

Checks before you commit

  • Flat field below 10% of full scale with one bar on — the floor must stay dark for the threshold to have headroom.
  • Seeded-pit crescent at least 25-30% of the gray range above local background — contrast that survives drift, and why adequate contrast alone is not enough.
  • At least 3 px across the smallest pit on the worst axis — computed from your own field and pixel count.
  • Every seeded pit caught with each bar on its own — proof the opposed pair covers both slope directions.
  • Dark floor moving less than 5 gray levels with shop lights on and off — proof the shroud or filter holds.
  • 30 known-good parts across three shifts with zero false calls — stability is a rate over time, not one good hour.
  • Elevation and offset taken from a gauge — eyeballed angles slide toward 45 degrees, which is bright field again.

List the part size, the smallest pit and the line speed, and the rest is arithmetic: the light finder filters the bar, coaxial and dome ranges by size and wavelength, the lighting configurator pairs lights with controller channels, and the lighting topic guides cover the neighboring geometries. For a part that resists all of the above, bring a photo and the spec to contact the team.

Questions

How far out should a grazing bar light sit?

Offset follows the elevation: offset = height / tan(angle). At 30 mm above the surface and 15 degrees elevation, the bar sits 30 / 0.268 ≈ 112 mm out from field center; at 30 degrees it sits 30 / 0.577 ≈ 52 mm out. Steeper mounts are compact but soften pit contrast; shallower mounts sharpen it at the cost of machine envelope and longer burr shadows.

Can a coaxial light catch dents at all?

Yes, but only the cooperative ones. Coaxial is bright field: a pit shows as a soft dark dot where its walls return less light straight back to the camera. Deeper, sharper dents read reliably; shallow, wide craters a few tenths of a millimeter across sink into texture. Use coaxial when the same camera must also read an engraved or laser mark, and add a grazing bar pair when shallow pits are in the spec.

Do dents on dark metal need infrared light?

No. Dents are geometry, so any wavelength modulates the same way at grazing incidence — red, green, white or infrared all work. Choose 850 nm or 940 nm infrared only to pair with a matching bandpass filter when the cell cannot be shrouded from shop lights. Sensor sensitivity falls toward 940 nm, so expect longer exposure or more drive current there.

How small a pit can a given camera find?

Work backwards from the pixel budget: smallest pit ≈ 3 × field of view / pixels across the field. At the 330 mm field used in the worked example below, a 2448 px camera bottoms out near 0.40 mm. Halving the field of view halves that floor, which is usually cheaper than buying more pixels.

Why do pits vanish when the line speeds up?

Motion blur. Blur in millimeters equals line speed times exposure: at 300 mm/s with a 2 ms exposure, the image smears over 0.6 mm — wider than the pit itself. Keep blur under a third of the smallest pit, so 0.5 mm pits at 300 mm/s need about 0.55 ms exposure or shorter. A brief strobe pulse freezes motion without pushing camera gain.