LightingExplainer

Lighting geometry for image contrast: camera, light and part positions

How lighting geometry sets image contrast: the reflection rule, glare and tilt margins, ring light angles, mounting heights, coaxial versus off-axis placement.

LumaSpec Vision12 min read Share on LinkedIn

On this page 9 sections
  1. 01The law of reflection sorts every placement
  2. 02On-axis and off-axis: the two system geometries
  3. 03The acceptance cone puts a number on glare rejection
  4. 04Aiming an angled ring light: the crossing height
  5. 05Match the geometry to the surface and the task
  6. 06Checks before you lock the bracket
  7. 07When geometry is not the lever
  8. 08Where to start
  9. 09Questions

Image contrast is decided before the camera exposes a frame: by where the camera sits, where the light sits and where the part sits. Wavelength and filters get the attention, but geometry is the lever you set earliest and keep the most control over, and it is the one that decides whether a specular reflection lands in the lens or misses it. Here you get the rule and the numbers: the law of reflection that sorts bright field from dark field, the acceptance-cone arithmetic that tells you how much part tilt a placement tolerates, the crossing height that aims an angled ring light, and the choice between coaxial and off-axis for each surface type. The worked examples use a 40 mm field at 100 mm working distance; the same three steps run on your own numbers.

The law of reflection sorts every placement

Every geometry decision follows one rule: light leaves a surface at the same angle at which it arrived, both measured from the surface normal, the line perpendicular to the surface at the contact point. A mirror-like part that receives light 45° from its normal returns it at 45° on the far side.

Bright field is any arrangement that catches that mirrored light in the lens: the flat surface renders bright, and anything that breaks the mirror — engraved characters, a chamfer, a dent, a part edge — renders dark against it. Dark field is the opposite: aim the light so the mirrored path misses the lens entirely. Flat regions receive light but return none of it, so they render dark, while scratches and edges scatter enough light into the lens to glow.

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.

Partial bright field sits between the two: the mirrored light is steered partly away, so the background stays a usable grey while features keep their directional shading. On curved parts the normal rolls along the surface, so a single placement lights a band rather than the whole field — plan on several positions or a diffuse source there. The part-level walkthrough of this rule is in bright field vs dark field lighting, and the angle families are mapped in machine vision lighting angles.

On-axis and off-axis: the two system geometries

System geometry is the triangle of camera, light head and part. On-axis (coaxial) geometry puts light on the optical axis: a coaxial light folds LED light down the axis through a beam splitter, a concentric ring light shines around the lens, and a dome surrounds the part with diffuse light entering through the hole the lens looks through. Off-axis geometry puts the light to the side at a controlled angle and leaves the camera alone.

Each family buys a different image. On-axis light strikes a flat, mirror-like surface straight down its normal and returns straight into the lens, so the whole surface becomes a uniform bright background and every slope — a mark, an edge, a recess — turns dark. That is also the geometry for gauging, because nothing in it skews perspective. Off-axis light approaches away from the normal, so the flat return is steered past the lens and the image is built from scatter, texture and slopes, with the specular hotspot gone.

Domes are coaxial geometry with diffuse rays: light arrives from every direction at once, the way an overcast sky lights a wet road, so a curved shiny part shows no single hotspot. Where domes fit and where they fail is covered in dome lights for shiny, curved and wrinkled parts; the full family tree of geometries is in machine vision illumination types.

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 a coaxial light by its folded area, because the splitter only folds light that crosses its own active square. A 40 mm field sits inside a 60 x 60 mm unit with margin on every side; scale the unit up with the field.

The LS-CXL-0027 is a 60 x 60 mm coaxial light, 4.4 W red / 7.2 W white, 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 acceptance cone puts a number on glare rejection

Why does a perpendicular camera with a 45° light stay clean on a flat, shiny part? The lens accepts only rays arriving within a narrow cone of its axis. At magnification m (sensor width divided by field of view) and f-number N, the object-side half-angle of that cone is about arcsin(m / (2N)). The hotspot travels 45° off-axis. At the magnifications typical of machine vision, 0.1× to 0.3×, with f-numbers of f/2.8 to f/4, that cone is only 1° to 3° wide, so the gap between the hotspot direction and the cone is your glare margin.

m = sensor_width / FOV f = WD × m / (1 + m) θ_acc ≈ arcsin(m / (2N)) tilt_tolerance = (incidence - θ_acc) / 2

Worked example: a 2/3-inch sensor 8.8 mm wide, a 40 mm field, 100 mm working distance, f/4.

m = 8.8 mm / 40 mm = 0.22 f = 100 mm × 0.22 / 1.22 = 18.0 mm, so an 18 mm lens θ_acc = arcsin(0.22 / 8) = 1.6°

The 45° placement leaves a glare margin of 45 - 1.6 = 43.4°. A flat part stays free of the hotspot until it tilts 43.4 / 2 ≈ 21.7° toward the light, because a tilt of δ swings the mirrored ray by 2δ. Tilting away from the light never brings the hotspot back; it only dims the illumination. At the field edges the cone axis leans by arctan(20 mm / 100 mm) = 11.3°, which costs about half of that in tolerance, so keep a few degrees of margin beyond the numbers below.

The iris is a fine trim at this magnification:

Lens f-number θ_acc at m = 0.22 Tilt tolerance at 45° incidence
f/2 3.2° 20.9°
f/2.8 2.3° 21.4°
f/4 1.6° 21.7°
f/8 0.8° 22.1°

Stopping down from f/2.8 to f/8 buys 0.7° of tolerance and costs (8 / 2.8)² ≈ 8× the light. The iris starts to matter at macro magnification, where the cone widens: at m = 1, f/2.8 gives θ_acc = arcsin(0.5 / 2.8) = 10.3° and the 45° tolerance falls to 17.4°, while f/5.6 narrows the cone to 5.1° and recovers 20.0°. Choose the geometry for glare; reach for the iris only when the cone is wide enough to matter.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Aiming an angled ring light: the crossing height

An angled ring is aimed by height. Its LEDs fire inward and downward at the rated angle α, measured from the part plane: 90° means straight down, 0° to 15° means grazing along the surface. Rays from a ring of radius R cross the optical axis at a height of R / tan α. Put the part plane at that height and the bright annulus converges onto your field.

h = R / tan(α) (R = ring radius, α = rated angle from the part plane)

The table combines the two halves of this article for a 120 mm ring (R = 60 mm) and the f/4 example cone of 1.6°:

Rated angle α Incidence from normal Crossing height, R = 60 mm Glare-free tilt toward the light
90° 0° on-axis: bright field by design the hotspot is the image
70° 20° 22 mm 9.2°
60° 30° 35 mm 14.2°
45° 45° 60 mm 21.7°
30° 60° 104 mm 29.2°
15° 75° 224 mm 36.7°

All tilt values are field-centre, first-order figures for a flat, mirror-like surface in the plane of incidence. Read the table twice. Glare rejection improves as the rated angle falls, but the mount grows with it: a 15° ring of that diameter crosses the axis 224 mm up, which is why true dark-field rings are either small in radius or placed to graze from outside the field. Height error spreads the annulus rather than tilting it — mount 10 mm low, at 25 mm instead of 35 mm, and the bright ring lands at a radius of 60 - 25 / tan 60° ≈ 46 mm, off the field centre by nearly half the field.

Three fixed-angle 120 mm rings cover the middle of that table, each mounting at its own crossing height:

Ring lights120 mm dia. ring light, 60°, 620 nm, 24 V (LS-RNG-0100)LS-RNG-0100
Size
100-200 mm
Type
Standard
$179.00View part
Ring lights120 mm dia. ring light, 70° (LS-RNG-0810)LS-RNG-0810
Type
Standard
Angle
70°
$319.00View part
Ring lights120 x 80 mm ring light, 30° (LS-RNG-0189)LS-RNG-0189
Size
100-200 mm
Type
Standard
$319.00View part

The 60° ring crosses at 35 mm and the 70° ring at 22 mm on the arithmetic above; the 30° rectangular ring lights from two sides with steeper 60° incidence and takes the tallest mount of the three. When the surface finish is unknown, sweep the angle before cutting brackets. The LS-RNG-0730 is a 103 mm dia. ring light, 48 mm inner dia., with selectable angles of 0-15°, 50°, 65°, 70°, 75°, 80° and 85°.

Ring lights103 mm dia. ring light, 48 mm inner dia. (LS-RNG-0730)LS-RNG-0730
Size
100-200 mm
Type
Standard
Angle
Low angle (0-15°), 50°, 65°, 70°, 75°, 80°, 85°
Voltage
24 V
$279.00View partBuild a system with it

At a 51.5 mm radius, the crossing height runs from 51.5 / tan 85° ≈ 4.5 mm at the steepest setting to 51.5 / tan 15° ≈ 192 mm at the shallowest — one bracket spanning nearly the whole table above, at the price of a tall stand for the dark-field settings.

Match the geometry to the surface and the task

Surface and task Geometry Rated angle Why it works
Flat polished metal, glass, wafers; engraving, embossing, gauging Coaxial, camera perpendicular 90° class the flat return becomes a uniform background; slopes turn dark
Flat or gently curved part; print, marks, texture, glare present Off-axis partial bright field, camera perpendicular 30° to 70° the mirrored return is steered past the lens
Scratches, dents, burred edges, part edges on a flat background Dark field 0° to 15° only scattered light enters the lens
Curved shiny part with features anywhere on it Dome, diffuse coaxial — light arrives along every local normal
Colour sorting, translucent walls, liquid levels Change lever — geometry cannot change which wavelengths the material returns

On plastic, the defect type picks the angle as much as the surface does; plastic part inspection lighting maps angle and wavelength to each defect family. On bare metal the specular fight is the whole application — copper surface inspection lighting works one real surface through it.

Checks before you lock the bracket

  • Rock the part toward the light in 5° steps, up to the table value and past it: the frame must stay hotspot-free with margin to spare, because production lots tilt more than the first article did.
  • Aim with the annulus, not the ruler: set a white target at the part plane and raise the light until the bright ring collapses onto the field centre.
  • Budget the light. Angled and dark-field placements collect only the scattered fraction, often 5-10× less signal than an on-axis return from the same LEDs, so leave exposure or strobe-current headroom.
  • Re-check the angle after the bracket is bolted and again after the first shift: a light that drifts 2° loses tolerance one-for-one.
  • Chase the residue. Glare that survives correct geometry is usually stray light inside the lens barrel; the machine vision stray light guide walks that diagnosis.

A placement that passes those checks is repeatable, not just bright — adequate contrast on a good day is not an acceptance criterion, which is the argument in robust machine vision lighting. In a robot-guided cell the same three positions live in the vision tool's snapshot pose: square the camera to the part there before tuning any light parameter; configuring camera locate snapshot positions covers that step on a collaborative robot.

When geometry is not the lever

Geometry directs rays; it cannot change which wavelengths a material returns or absorbs. Sorting by colour, seeing through a translucent wall or lifting a dye mark off a background are wavelength jobs — start at which LED colour gives the best contrast in machine vision. And when a specular sheen survives every angle you try, add the filter lever instead: crossed polarizers block the mirror return that geometry can only steer, as set out in cross polarization machine vision.

Where to start

Pick the geometry from the table, then the hardware to match. Both families live in the ring lights and coaxial lights categories, the light finder filters by rated angle and wavelength, and the lighting configurator pairs the light with camera and lens. More lighting guides sit on the lighting topic page. Send us the part, the field of view and the defect list, and we will return a placement with its numbers — or reach us through the contact page.

Questions

What angle should machine vision lighting be mounted at?

For a flat, shiny part with the camera square to the surface, 45° from the part plane is the default: the mirrored ray leaves at 45° on the far side of the normal, far outside a lens cone that is only 1-3° wide at typical magnifications. Use on-axis light at the 90° class when the flat surface itself should render bright, and drop to 0-15° when the surface should render dark so scratches and edges glow.

How do I calculate the mounting height for an angled ring light?

Divide the ring radius by the tangent of its rated angle: h = R / tan α. A 60 mm radius ring rated 60° crosses the optical axis at 35 mm; the same ring at 70° crosses at 22 mm, and at 15° it needs 224 mm of height. The formula assumes the LEDs aim at the optical axis, so confirm on the bench: raise the light until the bright annulus collapses onto a white target at the part plane.

Why does a shiny part show a bright hotspot under my ring light?

The ring is firing down or nearly down the optical axis, so the flat surface mirrors the light straight back into the lens. Fix it with geometry first: move to a ring rated 30° to 60° so the mirrored path leaves the lens cone, or keep the light on-axis but diffuse it (a dome or a diffused ring) so no single direction dominates. A crossed polarizer is the filter-level fallback when the bracket cannot move.

Does the camera always have to look straight down at the part?

For measurement, yes: keep the optical axis perpendicular to the surface so magnification is constant across the field and the placement numbers hold. Tilt the camera only when the task is presence or absence, code reading or finding a feature that catches light from any angle. If a tilted view is unavoidable, expect every glare margin to shrink by roughly the tilt angle and repeat the part-tilt test on real parts before trusting the set-up.

When should I choose a coaxial light instead of an angled ring?

Choose coaxial when the flat surface is the background you want: polished metal, glass and wafers, engraved or embossed marks whose slopes must turn dark on a uniform field, and gauging, where perspective must stay honest. Choose an angled ring when the surface would mirror the on-axis light straight back and the features you need are scatterers — print on brushed metal, texture, edges. A five-minute tilt test on the real part settles the choice.