LightingTroubleshooting

Uneven back lighting on line scan cylinder edges: causes and fixes

Why line scan back lighting on a cylinder leaves a stable centre and uneven edge bands that flip bright or dark, and the collimated or dome light that ends it.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01The symptom: a steady centre, edges that flip
  2. 02Why the edges misbehave: the normal turns under you
  3. 03Rule the panel out first: four bench tests
  4. 04Gauging edges: order a collimated backlight
  5. 05Inspecting the surface: order a dome or arc light
  6. 06Worked example: a Ø30 mm shaft at 100 mm/s
  7. 07Checks before you order
  8. 08Where the usual fixes fail
  9. 09The decision
  10. 10Questions

A 2K line scan camera, a ground cylinder and a large panel backlight should deliver a crisp silhouette and an evenly lit surface. Instead, the centre of each image sits steady while the edges wander between bright rims and dark bands, sometimes within one shift. This page is for anyone imaging cylindrical parts — shafts, rollers, pins, tubes — past a line scan camera. It gives the geometric reason the edges misbehave, four bench tests that separate a weak panel from curved-mirror geometry, and the two optical fixes: a collimated backlight when you measure edges, a diffuse dome light when you inspect the surface. A worked example sizes the whole station for a 30 mm shaft.

The symptom: a steady centre, edges that flip

Plot the grey value across one scan line and the shape repeats: a flat, stable plateau over the middle of the part, then a step at each side that will not hold its level. On one pass the steps read bright — the curved surface is returning the panel's own image into the lens. On the next they read dark, because the reflected band has walked a few millimetres off the aperture. Inverting the image, black for white, makes the bands easy for an algorithm to see, but it cannot make them stay put.

The centre behaves for a simple reason. Near the top of a cylinder the surface normal turns slowly. Near the rim it turns violently, as the next section shows, and that is where every unstable pixel lives.

Why the edges misbehave: the normal turns under you

Treat the cylinder as a curved mirror. A point at distance x from the top of a cylinder of radius R carries a surface normal tilted by θ from the camera axis, and the light it reflects leaves at twice that tilt.

θ(x) = arcsin(x / R) # normal tilt at distance x from the top ray tilt = 2θ # the reflected ray swings twice as far dθ/dx = 1 / √(R² − x²) # how fast the normal turns per mm of shift

Take a Ø30 mm shaft, so R = 15 mm. A point 7.5 mm off centre already has θ = arcsin(0.25) = 14.5°, so its reflection leaves at 29°. The centre of the part turns its normal at 1 / 15 = 0.0667 rad per mm, which is 3.8° per mm; 0.1 mm inside the rim the rate is 1 / √(15² − 14.9²) = 1 / 1.73 = 0.578 rad/mm, or 33° per mm. Your lens accepts a narrow cone only: with a 35 mm lens at f/4 and a 123 mm working distance, the aperture half-angle is atan(4.375 / 123) = 2.0°.

A large diffuse panel feeds light from many directions, so whether a tangent zone returns any ray into that ±2° cone is decided by millimetres of alignment and part placement. Nudge either and the bright band slides in or out of the aperture, which is exactly the sometimes-bright, sometimes-dark behaviour. The centre never notices because its geometry is slow. This is the same law of reflection that separates bright field from dark field lighting, applied one curved surface at a time; the broader picture of part, light and camera positions is in lighting geometry for image contrast.

Rule the panel out first: four bench tests

Work down the list; the first test costs a sheet of paper.

  1. Wrap the cylinder in matte white paper and image it with the same exposure. The paper replaces the specular curve with a diffuse one. An even paper image clears the panel and its mounting and convicts the cylinder's own reflection geometry — the common case on a ground, shiny part. Bands on the paper mean the panel or its alignment is at fault.
  2. Tilt the panel 2-3°, about 5 mm of lift at the end of a 100 mm panel. If the bright band swaps sides or flips to dark, reflection geometry drives the pattern. A uniformity fault inside the panel does not flip when you tilt it.
  3. Average 200 scan lines into one profile while the part sits still, record the peak-to-valley in grey levels and the band position, then repeat ten minutes later. A band that has moved means mounting drift; a fixed band means fixed geometry. The row-summing method in sum image rows to build a stable intensity profile makes the profile steady enough to measure.
  4. Check for a beat with the line rate. A profile that brightens and dims with nothing mechanical moving points at mains or low-frequency PWM drive; move to a 24 V DC constant-on drive and the pattern freezes. The full diagnosis lives in fixing frame-to-frame brightness changes from mains flicker.

Gauging edges: order a collimated backlight

If the task reads the silhouette — diameter, width, chamfer presence, position — every ray arriving at the part should travel in the same direction. A collimated backlight puts the whole field inside a narrow cone, so each tangent edge steps from lit to dark within a pixel or two and stays there while brackets drift.

The stakes, at this example's scale of R = 15 mm and 17.6 μm per pixel:

Δ_edge = R × sin(φ) # apparent edge shift when rays stray by φ from the axis
Stray angle φ Edge shift on a Ø30 mm part Pixels at 17.6 μm
5° 15 × 0.0872 = 1.3 mm 74
1° 15 × 0.0175 = 0.26 mm 15
0.1° 15 × 0.00175 = 0.026 mm 1.5

A diffuse panel routinely lights the tangent zones from several degrees off axis, which is the 15-74 pixel wobble you are chasing. Collimation removes it at the source and buys roughly two orders of magnitude. The cost is photons: collimated formats concentrate their light into a narrow cone, and fast lines sometimes need the strobe or high-power formats covered in line scan light: how much power a fast line really needs.

The full choice between the two families is in the collimated and diffuse backlight guide for edge gauging. For diameter work at a few micrometres, pair the panel with a near-telecentric lens chosen per line scan lens selection for 4K, 8K and 16K cameras.

Collimated panels come as area formats: the LS-BKL-0830 is a 120 × 120 mm collimated backlight on 24 V.

Backlights120 x 120 mm Collimated back light (LS-BKL-0830)LS-BKL-0830
Size
100-200 mm
Type
Collimated
Voltage
24 V
$309.00View partBuild a system with it

A 120 mm lit square covers a 36 mm field with (120 − 36) ÷ 2 = 42 mm of margin per side. For a narrower line, the LS-BKL-0227 is a standard backlight with a 545.1 × 25.4 mm lit area, analog voltage control, PNP trigger and a 24 V supply.

BacklightsBacklight, 545.1 x 25.4 mm lit area, analog voltage, PNP trigger (LS-BKL-0227)LS-BKL-0227
Size
400 mm +
Type
Standard
Voltage
24 V
$1,269.00 · quotedView and quoteBuild a system with it

Its long axis runs along the motion, so the scan line stays lit through part gaps and conveyor surge.

Inspecting the surface: order a dome or arc light

If the target is the curved surface itself — defects, finish, engraving — you want the opposite of collimation: light arriving from every direction at once. A dome wraps the part in diffuse illumination, so every facet catches a similar share whatever its normal does, and the bright and dark bands collapse into one flat profile. That flat profile is what lets a scratch, a pore or a faint mark set the contrast.

Start with an inner diameter at least twice the part diameter, so a Ø30 mm shaft gets 60 mm or more of clearance, and put the camera aperture on the scan line. The sizing and mounting details live in dome lights for shiny, curved and wrinkled parts; the dome lights range from shallow arcs to full domes, so headroom decides the model.

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 line cannot spare that headroom, the fallback is a diffuse high-luminance panel close above the part, taking some residual shading as the price of a compact frame. The LS-BKL-0750 is a high-luminance 180 × 100 mm backlight that runs on 24 V.

Backlights180 x 100 mm High luminance back light (LS-BKL-0750)LS-BKL-0750
Size
100-200 mm
Type
Standard
Voltage
24 V
$369.00View partBuild a system with it

Mounted with the 100 mm dimension across the line, it spans a 36 mm field with (100 − 36) ÷ 2 = 32 mm of slack per side, enough that bracket tolerance and part wander stay inside the lit area.

Worked example: a Ø30 mm shaft at 100 mm/s

The part: ground steel, Ø30 mm, moving at 100 mm/s, inspected over a 36 mm field (the part plus 3 mm each side). The camera is the LS-LCM-0016, a 2K GigE line scan camera with 7 μm pixels, a 58 kHz line rate and an M42 mount; the line scan cameras category holds the longer-line and faster-interface versions.

Line scan cameras2K GigE line scan camera, 7 μm, 58 kHz, TDI, M42 (LS-LCM-0016)LS-LCM-0016
Lens mount
M42
Interface
GigE
Line length
2K
Pixel size
7 μm
$950.00View partBuild a system with it

The arithmetic, step by step:

  • Sensor width: 2,048 px × 7 μm = 14.34 mm.
  • Magnification: m = 14.34 / 36 = 0.398.
  • With a 35 mm lens: WD = f × (1 + m) / m = 35 × 1.398 / 0.398 = 123 mm.
  • Pixel scale: 36 mm / 2,048 px = 17.6 μm; the part spans 30 / 0.0176 = 1,707 px.
  • Line rate: 2,048 / 36 = 56.9 px per mm, so 100 mm/s needs 5,690 Hz ≈ 5.7 kHz; 0.8 × the 176 μs line period gives a 140 μs exposure.
  • Speed ceiling: 58,000 / 56.9 = 1,019 mm/s, so this field tops out near 1 m/s.

The trigger source, encoder scaling and exposure handling behind those numbers are set out in how to set the line rate of a line scan camera. Check your own field and working distance with the calculator:

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

Light sizing: lit width ≥ 36 + 10 = 46 mm, so a ±5 mm mounting offset stays inside the lit area. Both panels above clear that with room to spare. Past 1 m/s the exposure drops below 20 μs — a 17.2 μs line period at the 58 kHz ceiling leaves about 14 μs — and the light, not the camera, becomes the limit.

Checks before you order

  • Lit width = field + at least 10 mm, so a ±5 mm offset stays lit.
  • Orientation: wide axis across the scan line, long axis along the motion.
  • Type by task: collimated for silhouette gauging, dome or diffuse for surface work. More brightness never fixes geometry.
  • Gap: 5-10 mm under a collimated panel; at least a panel width under a diffuse one.
  • Aim: shim the panel parallel to the part axis to about 0.5°, then confirm with the profile test — the two edge steps should sit at mirrored positions and depths.
  • Drive: 24 V DC constant-on for tests and production; strobe only through a controller built to gate LEDs cleanly, per lighting controllers for line scan cameras: what they fix.

Where the usual fixes fail

  • Image inversion, black for white, makes a band easy to threshold but does not hold it still. The band moves with diameter, temperature and bracket drift, so a threshold tuned today walks tomorrow.
  • Per-edge gains and shading tables assume a fixed optical stack. Fix the light first, then let shading mop up the last few per cent.
  • A bigger, brighter panel adds photons without changing directions. The bands saturate white instead of clipping to black.
  • A longer exposure dims nothing relevant; the bands scale up with everything else.

When the backlight is the wrong tool altogether — a bright, mirror-like surface you must view from above, or deep relief that needs grazing light — machine vision illumination types sorts the geometries by surface and feature.

The decision

  • Edges to measure on a round, ground part: collimated backlight sized to the field, near-telecentric lens, 5-10 mm gap. The edge wobble drops from tens of pixels to one or two.
  • Surface to inspect on the same part: dome with the aperture on the scan line and inner diameter at least twice the part. The profile flattens and the defects set the contrast.
  • Surface work with no headroom: high-luminance diffuse panel close above, profile-checked on the bench before the line runs.
  • Bands that flicker with no mechanical cause: a 24 V DC constant-on drive before any other change.

If you are speccing the station now, the light configurator steps through camera, lens and light in one pass, the shop light finder filters panels by type, size and wavelength, and the lighting guides cover the remaining geometry. Send the part, the speed and the defect list through the contact page and we will narrow it to a model with you.

Questions

Why do the edges flip between bright and dark on different passes?

The tangent zones behave like curved mirrors, and whether the panel's reflection reaches the lens is decided by angles: a millimetre of part placement or a degree of light tilt swings the reflected band in or out of the aperture. The same part therefore alternates between a bright rim and a dark rim across a shift or a batch. Collimating the source, or diffusing it with a dome, removes that sensitivity.

Can I fix the uneven brightness in software instead?

Shading or flat-field correction can hide a profile that never moves. This one moves: it shifts with part diameter, mounting drift and temperature, so the correction drifts too. Software also cannot recover contrast where an edge zone saturates white or clips to black; those pixels carry no information. Fix the illumination first, then keep a shading correction for the residual few per cent that remains.

How far should the part sit above the backlight?

With a collimated panel the gap sets only your mechanics, so 5-10 mm of clearance for part run-out and brackets is enough. With a plain diffuse panel the gap is an optical parameter: the closer the part, the wider the angle at which panel edges illuminate it, and the stronger the uneven zones. Keep a diffuse panel at least a panel-width away and accept that some spread always remains.

Does the part's diameter change the size of the effect?

Yes, and linearly. The apparent edge shift equals the radius multiplied by the sine of the stray-ray angle, so at the same imaging scale a 60 mm part moves twice as far as a 30 mm part for the same angle. At 17.6 μm per pixel, a 30 mm shaft already shifts about 15 pixels for every degree of stray angle, which is why small parts still need collimation.

Does changing the light color fix the uneven bands?

No. The uneven zones come from reflection geometry, not color, so switching white for red or green moves the bands by little. Wavelength still matters for the measurement: a red or 850 nm panel suppresses the interference fringes a coolant film paints on machined steel under white light, and infrared also ignores dye-based marks you do not want to detect. Fix geometry first, then pick color for contrast.