LightingTroubleshooting

Eliminate edge shadows in machine vision when parts sit off-center

Off-center edge shadows are the lens imaging the part's side wall, not a lighting fault. Eliminate them in machine vision with telecentric optics.

LumaSpec Vision10 min read Share on LinkedIn

On this page 8 sections
  1. 01First, five minutes that separate geometry from light
  2. 02The arithmetic: the band follows the part, not the light
  3. 03Fix 1: a telecentric lens with coaxial or collimated light
  4. 04Fix 2: a larger coaxial light flattens brightness, not geometry
  5. 05Fix 3: collimated backlight for outline-only gauging
  6. 06Telecentric depth: keep the part inside it
  7. 07Checks before ordering, and the decision per case
  8. 08Questions

The report is consistent: with the part under the middle of the lens the edge reads clean, and the same part pushed toward one side of the field grows a dark band along its edge. Raise the exposure and the band fades, but the true edge fades with it. Swap in a bar light, then a ring light, and the band survives both.

That pattern is not a lighting fault. A conventional lens views the part at an angle once it leaves the optical axis, so it images the side wall as a shadow-like band welded to the edge, and no repainting of the light removes it. Below you get the five-minute test that separates geometry from illumination, the arithmetic that predicts the band width from part height and position, and the fixes that hold: a telecentric lens with coaxial or collimated light, a larger coaxial light where the tolerance allows, or a backlight for outline gauging.

First, five minutes that separate geometry from light

Before changing any hardware, pin the cause. Three candidates cover nearly every edge band of this kind, most likely first:

  1. Perspective error of a conventional lens. Chief rays tilt outward from the axis away from the field center, so past mid-field the lens looks onto the part's side wall and prints it as a dark band along the edge. Test: slide the part from center to a known offset with the light untouched. A geometric band grows smoothly with distance from the axis.
  2. Directional illumination shadow. A bar light or a one-sided ring throws light from one direction, and a tall part casts a real shadow onto the background. Test: rotate the light or move it to the opposite side. A light shadow flips with the light; the geometric band does not.
  3. A real feature on the part. A chamfer, radius or burr prints as its own dark or bright line at every position. Test: bring the part back to center. The feature keeps its width and stays; the perspective band collapses to nothing at the center.

If the band width also matches the arithmetic in the next section, the case is closed.

The arithmetic: the band follows the part, not the light

A lens of working distance WD imaging a part offset d from the optical axis views it at an angle θ, and a side wall of height h prints with this width:

θ = arctan(d / WD) band width = h × tan θ

With 3.45 µm camera pixels and 0.5x magnification, one object-side pixel measures 3.45 µm ÷ 0.5 = 6.9 µm, so the 10 mm-offset band spans 270 µm ÷ 6.9 µm ≈ 39 pixels. Whatever threshold you set lands inside the band, and it shifts with every part position; against a ±0.02 mm gauging tolerance the band is more than ten times too large. This is also why the bar light and the ring light failed: neither changes where the chief rays point, so both only repaint the wall's brightness.

Perspective with a standard lens compared with a telecentric lens Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.Standard lensfarnearsensorThe same part looks bigger when nearer:its measured size depends on distanceTelecentric lensOnly rays parallel to the axis enter:the same size at any distance
Perspective with a standard lens compared with a telecentric lens. Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.

Fix 1: a telecentric lens with coaxial or collimated light

A telecentric lens places the entrance pupil at infinity, so it accepts only chief rays parallel to the optical axis: a vertical side wall is seen edge-on at every part position. This is the textbook case for when a telecentric lens pays for itself, with the broader entocentric versus telecentric decision covering when the extra length is not warranted. The residual band comes from the lens's own telecentricity, the chief-ray angle tolerance that measurement-grade designs hold near 0.1° — the 3 mm wall then projects 3 mm × tan 0.1° = 5 µm, under one pixel at the 6.9 µm scale, constant across the whole field. Telecentricity is the number to compare between data sheets.

Telecentric imaging needs illumination traveling down the axis as well. The shortest path is a lens with the light built in; the port route leaves the light choice to you:

Telecentric lenses0.5x, WD 110 mm, 1", C-mount telecentric lens with coaxial light (LS-TCL-2194)LS-TCL-2194
Sensor format
1"
Mount
C-mount
$1,539.00View part
Telecentric lensesObject-side telecentric lens, 1.36x, 73 mm WD, 2/3", coaxial light port (LS-TCL-0811)LS-TCL-0811
Sensor format
2/3"
Mount
C-mount
$789.00View part

The LS-TCL-2194 integrates the coaxial light behind an internal beam splitter. Its printed specifications: 0.5x magnification, 110 mm working distance, 1" sensor format, C-mount, with the lens front group collimating the light by design.

The LS-TCL-0811 carries a coaxial light port for when you want to choose the light. Its printed specifications: 1.36x magnification, 73 mm WD, 2/3" sensor format, C-mount.

Telecentric-type collimated lights sized for fields of this class:

Collimated lightsCollimated (telecentric) illumination, beam dia. 90 mm, length 223.9 mm (LS-CLM-0079)LS-CLM-0079
Size
50-100 mm
Voltage
3 V
$1,059.00View part
Collimated lightsTelecentric collimated light, Ø100 mm (LS-CLM-0063)LS-CLM-0063
Size
100-200 mm
Voltage
5 V
$1,139.00View part

Size the light to the field, not to the part. The emitting area must flood the lens aperture across the part's full travel, with roughly 20-30% margin beyond the field edge in the worst position; beam diameters in the 90-100 mm class cover a 26 × 19 mm field with that margin.

Fix 2: a larger coaxial light flattens brightness, not geometry

The illumination side can still be wrong once. A coaxial light that is small relative to the part's off-center position strikes the wall at a slant and lays a gray gradient across the bright fixture. Be clear about the split: a bigger emitting area flattens that gradient, but the side-wall band is lens geometry and survives every light swap. The two sizes worth knowing:

Coaxial lights70 x 70 mm coaxial light (LS-CXL-0092)LS-CXL-0092
Size
50-100 mm
Voltage
24 V
$309.00View part
Coaxial lights140 x 140 mm Coaxial light, 525 nm (LS-CXL-0192)LS-CXL-0192
Size
100-200 mm
Voltage
24 V
$739.00View part

The LS-CXL-0092 provides a 70 × 70 mm emitting area on 24 V. For wide travel, the LS-CXL-0192 spans 140 × 140 mm at 525 nm, also on 24 V.

As a stand-alone fix, the larger light suits low parts, roughly 1 mm tall or less, against tolerances of 0.5 mm or looser; any real metrology pairs it with Fix 1.

Fix 3: collimated backlight for outline-only gauging

When the inspection reads the silhouette — width, diameter, position against the fixture — put a collimated backlight under the part and keep a telecentric lens above. The edge then forms where the part interrupts a parallel beam: no side wall, no gray band, position-independent, the sharpest edge a vision station can produce. Read the collimated versus diffuse backlight trade-off for the alignment details, and surface versus silhouette lighting when some features still need top light. The costs are real: the silhouette frame carries no surface information, and the part needs free space below, so the fixture becomes glass or a windowed plate. Run both lights sequentially in one cycle when the top face carries features too.

Telecentric depth: keep the part inside it

Parallel chief rays hold magnification constant only inside the lens's depth range. A practical estimate:

depth ≈ 2 × f-number × blur ÷ magnification²

with blur the permissible image-side blur, commonly two pixels. At 0.5x magnification, f/4 and 3.45 µm pixels: depth = 2 × 4 × 6.9 µm ÷ 0.25 = 220 µm, about ±110 µm around the working distance. Stopping down two stops, f/4 to f/8, doubles it to ±220 µm and costs four times the light or exposure. The fixture's height tolerance must fit inside the depth, or the measurement drifts with part height — a drift pattern covered in micron-level measurement accuracy.

Depth of field and diffraction
Units
Depth of field
– mm
About the focus plane
– mm
Diffraction limit
– F/#
Blur limit
– µm
Diffraction spot
– µm
At this F-number
–

DOF ≈ 2 × N × c × (1 + m) / m², c = allowed blur × pixel size. Diffraction spot (Airy disk) ≈ 2.44 × wavelength × N × (1 + m); past the diffraction limit it is larger than the blur you allowed.

Browse lenses by aperture and format Open the full calculator

Checks before ordering, and the decision per case

Run this list against the station before ordering anything:

  • Field covers travel. Sensor width ÷ magnification ≥ part travel + longest part dimension + 10% margin. On the 1 inch example above: 12.8 mm ÷ 0.5 = 25.6 mm ≈ 26 mm across.
  • Band budget. h × tan(telecentricity) ≤ tolerance ÷ 3 as a working rule; aim at the stricter 10:1 accuracy rule for metrology work.
  • Depth covers height. The depth estimate must exceed the part's height tolerance, or stop down and re-check the exposure budget.
  • Light area covers field and travel, with the 20-30% margin; telecentric-type lights behind port lenses, built-in light on the integrated route.
  • Edge gradient survives exposure. After the fix, the edge should fall several tens of gray levels across one to two pixels at working exposure; if it does not, the illumination geometry is the remaining problem — see lighting geometry for contrast.

The decision per case: tolerance at 0.1 mm or tighter with free part position — a telecentric lens with built-in coaxial light, or a port lens with a telecentric collimated light. Tolerance of 0.5 mm or looser on a part under about 1 mm tall — the larger coaxial light first, as the smaller change. Outline-only gauging — a collimated backlight under the telecentric lens. Moving the camera four times farther away shrinks the band to roughly a quarter; it stays a stopgap, never a fix under a 0.1 mm budget. Size the set in the lens finder and light finder, start the configurator at the lens step or the light step, and if the numbers above do not close the case, bring the fixture details to us through the contact page.

Questions

Can I fix it by mechanically centering the part instead?

You can, but you have bought a fixture problem instead of an optical one. The band exists wherever the part sits; centering clamps, hard stops or vision-guided staging remove the symptom at one position and fail with every placement error. A staging fixture also needs accuracy close to the tolerance you were trying to measure, plus cycle time for the extra handling. A telecentric lens is the smaller engineering change and it holds everywhere in the field.

Will a brighter ring light or longer exposure remove the band?

No. The band is geometry, not a shortage of light: the lens is pointed at the side wall, so added intensity raises every gray level together and the dark band keeps its pixels. Longer exposure usually makes things worse, because it flattens the gradient at the true top edge and the threshold then lands wherever the wall's brightness fades. Ring, bar and brighter coaxial settings all fail the same way; only ray direction removes the band.

How large should the light behind a telecentric lens be?

Size the light to the lens aperture and the part's full travel, not to the part. The emitting area should exceed the field of view by roughly 20-30% at the worst part position, so the whole field is lit down the optical axis. Shop collimated lights for this duty run from 26 to 240 mm beam diameter; a 90-100 mm beam covers a 26 × 19 mm field with margin.

What is telecentric depth and how much do I need?

Telecentric depth is the object-space height range over which magnification stays constant. It grows in proportion to the f-number — stop down two stops, double the depth — and falls with the square of magnification, which is why high-magnification telecentric lenses are shallow. Size it against the part's height tolerance: if the fixture sets the part 0.3 mm high one cycle and 0.1 mm low the next, the lens needs about 0.4 mm of constant-magnification depth, or measurements drift with height.

Does moving the camera farther away help without a telecentric lens?

Partly, and rarely enough. The band scales with the tangent of the viewing angle, which falls as working distance rises: four times the distance gives roughly a quarter of the band. On the worked example, moving from 110 mm to 440 mm shrinks 270 µm to about 68 µm — enough for a 0.1 mm tolerance, but the lens must then hold the same field from four times the distance, so it grows long and bulky. A telecentric lens reaches the same result in a shorter package.

Does the band also appear on backlit setups?

Backlighting changes the physics instead of fighting it: the edge forms where the part interrupts a collimated beam, so a side wall contributes nothing to the silhouette. The same station can still show the band on top-light surface features, because those use the front light path. If you need both silhouette and surface readings in one cycle, run the two lights sequentially — a backlit frame for the edge, a coaxial frame for the face — with the telecentric lens serving both.