LightingExplainer

Bright field vs dark field lighting: the law of reflection decides

Bright field vs dark field lighting: one reflection law decides whether the mirror image enters the lens. Angles, offsets and worked camera numbers to apply it.

LumaSpec Vision12 min read Share on LinkedIn

On this page 10 sections
  1. 01The law of reflection decides
  2. 02Bright field: flat surfaces glare, marks go dark
  3. 03Dark field: grazing light, black field, glowing defects
  4. 04Curved parts break the flat-field logic: go diffuse
  5. 05Worked example: sizing the camera for a 20 µm scratch
  6. 06The decision table
  7. 07When the textbook answer is wrong
  8. 08Checks before you order
  9. 09The decision
  10. 10Questions

Flat, polished parts are where machine-vision lighting goes wrong most often. Light them the obvious way — from above, close to the lens — and a mirror surface returns every photon straight back: white glare hides the mark you need. Swing the same light to a grazing angle and the field turns black while a single scratch glows. Both results follow from one rule, the law of reflection, and the rule turns lighting selection into geometry you can calculate. This guide gives you the rule, the angles and mounting offsets that follow from it, a worked camera sizing for a scratch check, and the decision for each surface type.

The law of reflection decides

A ray hitting a flat surface leaves at the same angle on the other side of the surface normal. That one line, α = β, decides bright field versus dark field, because a lens is a tiny window: it only sees rays arriving inside its acceptance cone, and the cone is narrow.

θ = arctan(D / (2 × WD)) D = f / N (aperture diameter)

A 25 mm lens at f/4 has an aperture of D = 25 / 4 = 6.25 mm. At a 200 mm working distance the acceptance half-angle is arctan(6.25 / 400) = 0.9°. A mirror-flat field therefore lights up only where light arrives within about a degree of the lens axis. Arrive vertically and the field is white — bright field. Arrive obliquely and the specular reflection sails past the lens and the field goes dark — dark field. The part, camera and LED did not change; a 20° angle change flipped the image.

A ring light is the everyday example of the middle ground: at a 70 mm radius and 100 mm working distance its rays arrive at arctan(70 / 100) = 35° from vertical — a directed, partly bright field, which is why rings handle matte parts and moderately flat shiny ones but never match a coaxial light on a mirror.

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 same logic scales to every geometry in the illumination types guide; bright field and dark field are simply the two ends of the angle range.

Bright field: flat surfaces glare, marks go dark

Bright field arranges light so the mirror reflection of the flat part lands inside the lens. The flat field reads white. Anything that breaks flatness — an embossed character, a dot-peened code, a laser-etched mark — tilts the local normal and sends its light elsewhere, so marks read dark on white.

The cleanest source is a coaxial light: a diffuse LED panel above a 50/50 beam splitter sitting in the lens axis. Half the light is reflected down onto the part; the return loses half again through the same splitter on the way to the sensor. About a quarter of the emitted light reaches the sensor, which is why coaxial lights run high-power LEDs and strobe well. In return you get shadow-free, even illumination straight down the optical axis — the standard choice for mirror-like flat surfaces and direct part marks.

For marks on metal this is the geometry behind most direct part mark (DPM) reading; the DPM Data Matrix lighting guide carries it into code verification, and the metal surface defect guide shows where bright field stops and low angle starts.

Coaxial lights come in emitting faces from under 50 mm to over 400 mm. The three below are 24 V lights with emitting faces from 60 x 60 mm to 80 x 80 mm, including a narrow-angle variant:

Specification LS-CXL-0027 LS-CXL-0019 LS-CXL-0092
Voltage 24 V 24 V –
Operating temperature 0 to 50 °C 0 to 50 °C –
Operating humidity 20-85% (non-condensing) 20-85% (non-condensing) –
Lifespan 50000 h (to 50% of factory-default luminance) 50000 h (to 50% of factory default luminance) –
Extension cable options PVC extension cable (high flexibility, bending and heat resistant, for use inside equipment) or high-flexibility extension cable (harder and more abrasion resistant than PVC, for drag-chain production lines) PVC extension cable (high flexibility, bending and high-temperature resistant, for use inside equipment); high-flexibility extension cable (harder, more abrasion resistant, for drag-chain production lines) –
Emitting surface (mm) 60 x 60 80 x 80 –
Price $269.00 $369.00 $309.00

Values as printed in each product's data sheet; open a part for its drawing and full specifications.

Dark field: grazing light, black field, glowing defects

Dark field uses the same law the other way round. Aim the light at a shallow grazing angle — 15° to 30° from the surface is the practical band — and the mirror reflection of the flat field passes under or over the lens without entering it. The field reads near black. Every raised edge, burr, particle, pit and scratch interrupts the grazing ray, scatters light back toward the camera and glows. On polished metal this is the highest defect contrast available: bright lines on a black field.

The band has a geometric reason. The horizontal offset of a light head mounted at lens height and aimed at the field centre is:

d = WD / tan(γ) γ = grazing angle from the surface

At a 100 mm working distance: γ = 20° puts the head 100 / tan(20°) = 275 mm off-axis; γ = 30° puts it 173 mm away; γ = 10° needs 567 mm. Below roughly 15° you are buying bench length, not contrast. Mount the heads low instead — near surface height, firing across the field — and the offsets shrink to a few tens of millimetres, at the cost of needing a slim light that clears the field.

Narrow-beam spot lights keep the grazing ray where the geometry puts it:

Spot lightsSpot light, 49.9 x 66.6 mm lit area, 455 nm Blue, 32° lens (LS-SPT-0024)LS-SPT-0024
Size
Under 50 mm
Voltage
24 V
$279.00 · quotedView and quote
Spot lightsSpot light, 99.9 x 141.6 mm lit area, 505 nm Cyan, 21° lens (LS-SPT-0037)LS-SPT-0037
Size
50-100 mm
Voltage
24 V
$589.00 · quotedView and quote

The LS-SPT-0024 throws a 49.9 x 66.6 mm lit area through a 32° lens at 455 nm; the LS-SPT-0037 covers 99.9 x 141.6 mm at 505 nm with a 21° lens.

This is the geometry worked through in the low-angle dent and pit guide and the copper surface guide, both built on the contrast between a scattering defect and a mirror field.

Curved parts break the flat-field logic: go diffuse

On a curved surface no single angle describes the reflection. Every point has its own normal, so one grazing ray always lines up with some of them and burns a bright band into a dark field image, while a coaxial light only returns from the tangent zone. Curved, shiny parts — bottles, caps, handles, rings — need light arriving along every normal at once. That is a dome light: the part sits inside a diffuse emitting hemisphere, every surface point finds an LED along its own normal, and the surface images evenly with no specular bands.

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.

Size the emitting area at about twice the part's largest dimension, and confirm the silhouette clears the camera hole from every angle the surface can present.

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

The LS-DOM-0085 pairs a Ø166 mm outer shell with a Ø116 mm emitting area. Half of 116 mm leaves room for parts around 55 mm across.

The dome lights guide works through dome sizing in detail, and the shiny metal pins guide puts dome, diffuse and polarizer head to head on fasteners. For the widest range start at dome lights.

Worked example: sizing the camera for a 20 µm scratch

Surface: polished stainless plate, mirror-flat, so dark field spots at 20° grazing. Target: detect a 20 µm wide scratch anywhere on a 22 mm face; an alignment margin of 3 mm per side sets the field of view (FOV) at 22 + 2 × 3 = 28 mm. Working distance 200 mm.

The sizing rule: a feature needs at least 3 pixels across to detect reliably and 5 pixels across to measure its width. Below that, threshold noise rather than optics sets the false-call rate.

Camera A — 5 MP class, 2448 px wide. Pixel scale: 28,000 µm / 2448 px = 11.4 µm/px. Scratch width in pixels: 20 / 11.4 = 1.7 px. Under the 3 px floor — detection fails.

Camera B — 12 MP class, 4096 px wide. Pixel scale: 28,000 / 4096 = 6.8 µm/px. Scratch: 20 / 6.8 = 2.9 px. Meets the 3 px floor — detection works across the full field.

To measure the width, 5 px needs a scale of 20 / 5 = 4.0 µm/px, so the field shrinks to 4096 × 4.0 µm = 16.4 mm. Two stations at 16 mm: 16,000 / 4096 = 3.9 µm/px, giving 20 / 3.9 = 5.1 px across — measurement passes. With a 3.45 µm pixel pitch the sensor is 4096 × 3.45 µm = 14.1 mm wide, magnification m = 14.1 / 28 = 0.504, and the focal length for the 28 mm view at 200 mm working distance is f = 200 × 0.504 / 1.504 = 67 mm. Run your own numbers through the lens focal length calculator.

Decision: detect with the 12 MP camera over one 28 mm dark field view; measure width only in a tighter 16 mm station. The camera resolution calculator does the same division for your feature size.

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

The decision table

Surface and target Geometry Reflection logic Hardware
Flat, mirror-like; embossed, dot-peened or laser marks Bright field Mark tilts the normal and deflects the vertical return Coaxial light, emitting area at least the FOV
Flat, polished; scratches, pits, particles, burrs Dark field Flat field reflects away, edges scatter back Spots at 15-30° grazing
Curved, shiny; presence, finish, print Diffuse bright field Every normal finds its own ray Dome, emitting area about 2× the part
Matte or textured; print, colour Directed bright field Surface already scatters, angle matters less Spot or ring at 30-60°
Bore walls and threads Flipped geometry Light and camera share one axis See the bore and pipe guides

Inside bores and pipes the geometry flips — light and camera fight for the same axis — so read the cylindrical bore layout guide and the pipe internal surface guide before borrowing flat-part rules. When several geometries could work, the inkjet OCV setup guide compares dome, dark field and backlight on one real print case, and the selection by task guide sorts tasks into geometries the same way.

When the textbook answer is wrong

Rough or matte surfaces. Dark field needs a field that can go dark. Roughness scatters light back at every angle, so a grazing set-up lifts the background to grey and the contrast you built the rig for disappears. On textured metal and plastic, use directed bright field, or move to photometric stereo, which reconstructs surface shape from several shaded images — the photometric stereo ring guide shows the set-up.

Ambient light. A dark field station under open shop lighting is not dark: 500 lx of bench light leaks into every scatter angle and lifts the black level. Enclose the station, or strobe the light and gate the exposure to the pulse — the timing trade-offs are in the LED strobe rise time guide. For why contrast margin beats a perfect threshold, see robust machine vision lighting.

Coaxial on stepped parts. Vertical walls send the vertical rays sideways, so walls read black. That is a feature when you inspect top-face marks and want the walls gone; it is a problem when the wall is the target. A partial bright field at 30-60° from vertical fills walls and steps instead.

Wavelength is not geometry. Blue scatters more strongly than red from micron-scale texture, but if the mirror reflection lands inside the lens, no wavelength rescues the image. Fix the angle with the law of reflection first, then pick colour with the LED colour contrast guide.

Checks before you order

  • Shine before you buy. Aim any spot at the real part at the planned angle with the camera running. A field that stays bright from that angle means roughness is scattering — switch geometry before the order, not after.
  • Cover the field. Emitting area at least the FOV plus 20% margin per side, so alignment drift and vignetting never clip the corners.
  • Budget the offsets. d = WD / tan(γ): at 100 mm working distance, 20° grazing means a head 275 mm off-axis, or a low-mounted slim spot instead.
  • Pay the splitter tax. Coaxial delivers about a quarter of the LED light to the sensor, so size the driver and strobe duty for 4× the on-part brightness a direct light would need.
  • Set wavelength last. Blue brightens fine texture, infrared erases batch colour variation; geometry first, colour second.
  • Plan for motion. Dark field contrast is strong enough to strobe, and strobing freezes motion — put the light pulse inside the exposure window.

The decision

Bright field for flat and mirror-like: marks dark on white. Dark field for flat and polished: scratches bright on black, spots at 15-30° grazing. Dome for curved and shiny: every normal gets its ray. Match your case in the table, size the camera with the worked example, then filter coaxial, dome and spot lights by emitting size and wavelength, or step through the configurator's lighting stage from camera to light. If the part resists both rules, send its photo and defect list through the contact page and we will sketch the geometry with you.

Questions

Can one light do both bright field and dark field?

The light cannot change, but the geometry can. A spot aimed down the lens axis gives directed bright field on a small part; the same spot swung to 20° from the surface gives dark field. That is why many stations pair a coaxial light for marks with two grazing spots for texture under one controller. The reflection rule never moves: wherever the mirror image of the source lands is your field.

Why is my dark field image never truly dark?

Three usual causes. First, roughness: a matte surface scatters light back at every angle, so the field lifts to grey instead of black. Second, ambient light: a bench lit to 500 lx floods a sensitive exposure, so enclose the station or strobe. Third, contamination: dust on a protective window or swarf on the fixture scatters exactly like your defect. Shroud the beam path, keep glass out of it, and clean the fixture at changeover.

Does dark field need a special lens?

No. The geometry does the work; any machine-vision lens images the scattered light. A long focal length helps twice: its narrow acceptance cone, about 0.9° for a 25 mm lens at f/4 and 200 mm working distance, rejects stray specular light a wide lens would collect, and the longer working distance leaves room for grazing heads. Choose a telecentric lens only when you also need distortion-free scratch-width measurement.

Which wavelength works best for dark field scratch inspection?

Blue and violet scatter most strongly from micron-scale texture, so 455 nm spots give the brightest scratch lines on polished metal; infrared at 850 or 940 nm is the pick when part colour varies between batches or a tinted film sits over the defect, because colour stops mattering and only geometry does. Set wavelength after the geometry is fixed, not before.

Coaxial or dome light for a shiny part — which bright field do I pick?

Flat or gently stepped mirror surfaces take coaxial light: its vertical rays return from the flat top and marks read dark. Curved or wrinkled surfaces take a dome: no single reflection angle exists, so light must arrive along every normal. Parts that mix both get coaxial on the flat face plus grazing spots on the edges — simpler and sharper than asking one geometry to do both jobs.