Cameras & sensorsHow-to

Line scan HDR imaging: cycling two exposures per pixel

Set up line scan HDR imaging by cycling a short and a long exposure on alternating lines: line-rate math, exposure ratio, registration and checks.

LumaSpec Vision12 min read Share on LinkedIn

On this page 9 sections
  1. 01What cycling mode actually does
  2. 02The numbers that set the two exposures
  3. 03Worked example: 360 mm web at 1.5 m/s
  4. 04Setting up cycling mode on the camera
  5. 05How to verify the HDR line is real
  6. 06Lighting for two exposures
  7. 07When the usual answer is wrong
  8. 08Checks before you commit
  9. 09Questions

A glossy web that carries both matte black print and bare metal is the classic line scan headache: an exposure that holds the highlights leaves the dark zones in noise, and an exposure that lifts the shadows clips the highlights to flat white. The fix is dynamic range built in the camera, not a bigger light. Line scan cameras with a cycling or HDR mode run two integration times in alternation — a short one for the bright zones, a long one for everything else — and hand you both streams in one image. This guide shows how the mode works, the arithmetic that sets the two exposures, the setup steps on the camera, and the checks that prove the fused line is real.

What cycling mode actually does

In standard line scan capture, every triggered line uses the same integration time. A cycling or HDR mode removes that constraint: the camera applies a different parameter set to each triggered line — integration time, gain, and where the hardware supports it, a different light-source trigger. For HDR you cycle two integration times. Alternate lines of the output image then carry the same strip of web sampled at two brightness scales: the long exposure for shadows, the short one for highlights. You de-interleave the stream into two images and either fuse them or run detection per zone.

A line scan camera building an image line by line The camera images one thin line of the moving web per exposure, lit by a line light. An encoder on the conveyor triggers each line so the pixels stay square at any speed.one line per exposureLine scanline lightweb speed vencoderline rate = v / object pixelexposure < 1 / line rate
A line scan camera building an image line by line. The camera images one thin line of the moving web per exposure, lit by a line light. An encoder on the conveyor triggers each line so the pixels stay square at any speed.

Two other routes reach the same result. Dual-line sensors place two active rows one pixel apart, expose them simultaneously with different times, and output the pair interleaved — no line-rate cost, and the row offset is a fixed, calibratable shift. Sensors with per-pixel exposure assignment go further and offer up to four integration times inside a single line. All three variants buy the same thing: highlight headroom.

A current CMOS line scan sensor delivers roughly 60 to 70 dB of usable range; the EMVA 1288 comparison data states the measured value for a given camera. A web of matte black print against a specular flash off polished metal spans well beyond that. That gap, not a shortage of light, is what cycling mode closes.

Method How it works Line-rate cost Registration
Line-alternating cycling Two integration times alternate on consecutive lines Each channel gets every second line One-line shift between channels
Dual sensor lines Two adjacent rows expose at once, different times None Fixed row offset
Per-pixel exposure split Pixel groups inside one line use different times None Within the same line

The numbers that set the two exposures

Work in this order: geometry, line rate, long exposure, short exposure. Nothing downstream can be chosen before the line rate, because the line period is the box every exposure must fit in.

R = v / p line rate in lines/s from web speed v and object-side pixel p T = 1 / R line period t_long ≤ 0.8 · T long exposure, leaving readout margin r = t_long / t_short exposure ratio extra range = log2(r) stops = 20 · log10(r) dB

The object-side pixel is the sensor pixel size divided by the magnification. The ratio r comes from the scene, measured rather than guessed: capture one normal image at t_long, read the grey value of the brightest zone, and ask how far below clipping it must sit. When a specular flash needs ten times headroom for its shape to stay readable, r = 10 — 3.3 stops, 20 dB. Start there. Ratios past 16:1 (4 stops) are real but push the short exposure into the low single-digit microseconds, where light level and trigger jitter start to dominate.

The blur check runs on both exposures: web speed times exposure stays under one object-side pixel, or the dark channel smears.

On a fast small-sensor camera the period is already tight. The LS-LCM-0016 is a 2K GigE camera with 7 μm pixels and a 58 kHz line rate:

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

At 58 kHz the period is 1 / 58,000 s ≈ 17 µs, so the long exposure tops out near 14 µs. That is the room the period gives you, which is why HDR ratios at high line rates come from shortening the short exposure, never from lengthening the long one.

Worked example: 360 mm web at 1.5 m/s

Run the full chain once, on paper, before touching the camera:

  • Sensor: an 8K line with 7 μm pixels gives 8192 × 7 μm = 57.3 mm of sensor length — the reason 57 mm image-circle glass is standard for these sensors on M72 mounts.
  • Geometry: to cover a 360 mm web, m = 57.3 / 360 = 0.159. At a 600 mm working distance, f = WD · m / (1 + m) = 600 × 0.159 / 1.159 ≈ 82 mm, so fit an 80 mm lens: it gives m = 80 / (600 − 80) = 0.154 and a 57.3 / 0.154 = 372 mm field of view, the web inside it with about 12 mm spare.
  • Object pixel: p = 7 μm / 0.159 = 44 μm.
  • Line rate: R = 1500 mm/s ÷ 0.044 mm = 34,100 lines/s ≈ 34 kHz, so T = 1 / 34,100 = 29.3 µs.
  • Long exposure: 0.8 × 29.3 µs = 23.4 µs, set 23 µs. Blur = 1500 mm/s × 23 µs = 34.5 µm, under the 44 μm pixel at 0.79 pixel. Pass.
  • Short exposure: 23 µs / 10 = 2.3 µs. Its blur is 3.5 µm, negligible.
  • Ratio: 10:1 adds log2(10) = 3.3 stops = 20 dB on top of the sensor's own range.
  • Aperture: at f/8 the depth of field is ≈ 2 · N · c · (1 + m) / m² = 2 × 8 × 44 μm × 1.159 / 0.0253 ≈ 32 mm, far more than web flutter needs. If the short channel starves, f/5.6 doubles the light ((8 / 5.6)² = 2.0) and still holds about 22 mm.
  • Data rate: 8192 × 34,100 = 279 Mpx/s, 279 MB/s at 8-bit, comfortable on 10 GigE.

Two 8K cameras from our line scan range carry that rate:

Line scan cameras10 GigE line scan camera, 8K, Mono, 12 V±10% (LS-LCM-0067)LS-LCM-0067
Interface
10GigE
Sensor format
Medium format
$1,459.00View part
Line scan camerasLine scan camera, 8K, 10GigE, Mono, 8192*4 resolution (LS-LCM-0099)LS-LCM-0099
Lens mount
M72
Interface
10GigE
$1,439.00View part

Because the exposures alternate, each channel samples the web every two lines: 2 × 29.3 µs = 58.6 µs of motion, 88 µm on the web. If bright-zone defects are as small as dark-zone ones, trigger at 68 kHz; then T = 14.7 µs, the long exposure drops to about 11 µs, and the ratio holds at 11 µs / 1.1 µs. Decide this before ordering, because it sets both the camera's line-rate grade and the lens's light budget. The decision for the common case: full resolution in the dark channel, half-rate sampling for the highlight guard.

Line-scan camera line rate
Units
Pixel on the part
– mm
Line rate needed
– kHz
Longest exposure
– µs
Data rate
– MB/s
Lines per metre
–
Encoder setting
–

Square pixels: line rate = speed / pixel on the part; the exposure must end within one line period. Encoder: lines per pulse = (π × roller diameter / pulses per revolution) / pixel on the part.

Find line scan cameras Open the full calculator

Setting up cycling mode on the camera

  1. Fix the geometry and the line rate first: lens, working distance, object pixel, lines per second. The line rate setup guide covers that stage, and encoder ticks per pixel sets the trigger scale.
  2. Meter the web with the production light on. Capture a single-exposure image at your intended t_long, then read the darkest zone you must resolve and the brightest peak. If the peak clips, halve the exposure until it reads about 80 %, and take r as the ratio between the exposure that shows shadows and the one that holds highlights.
  3. Compute t_long and t_short with the formulas above and run the blur check v · t ≤ p on both.
  4. Open the camera's web interface or its GenICam feature tree and find the HDR or cycling control; cameras that have it place it with the acquisition and exposure controls. Enable it and enter the two integration times as the two parameter sets — the camera alternates them in the order you list them, and that order decides which output lines are short. Write the order down.
  5. Keep the line trigger on the encoder. Cycling changes what happens between triggers, not the trigger rate, so the scale from step 1 stands.
  6. Run the light continuous. To strobe, remember that pulse width is the effective exposure: per-line alternation means alternating pulse widths, and the controller must follow line by line — lighting controllers for line scan cameras covers what the controller has to do.
  7. Capture a moving target with both zones — black anodized strip beside bare aluminum, or the web with a printed grey wedge — then verify.

Cameras without a dedicated HDR mode usually get there with the sequencer: camera sequencer control alternates exposure and gain per line, and alternating two exposure times per trigger builds the pattern without serial commands.

How to verify the HDR line is real

  • De-interleave first. On a bright patch that reads 250 counts in the long channel, the short channel should read about 25 — the exposure ratio, within sensor linearity.
  • Check both ends of both histograms: long-channel specular peak under 240 counts (8-bit), and the darkest zone the short channel owns at least 25 counts above black. Outside those numbers the ratio or the light is wrong, not the fusion.
  • Flat-field each channel separately. The two exposures see different vignetting and fixed-pattern noise; one gain map across both leaves a low-frequency band in the image.
  • Fuse with the one-line shift. The short exposure of a given object point arrives one line later, so shift that channel by exactly one line — v × T of web motion, 44 µm here — before blending. Test with a straight edge lying along the transport direction. The HDR capture and fusion guide covers the blending pipeline, and two-exposure HDR densitometry shows the calibration that keeps fusion radiometric when you measure rather than detect.

Lighting for two exposures

The short channel reads the bright zones, so photons are rarely its problem. The lighting demands are steadiness and uniformity, because the finished image now spans roughly 100:1 in scene brightness between the zones the two channels own.

  • Brightness sets the long exposure. At 23 µs the dark zones must still clear the noise floor, and a faster web shortens both exposures together — HDR re-spends photons, it does not create them. When the dark channel is noise-limited, the answers are a brighter line light, a lower f-number, or a slower web.
  • Wide webs bring the dark band across the web, and HDR reproduces it faithfully in both channels: see line scan illumination uniformity.
  • Thermal drift reads as a slow gain change that a start-up flat field cannot chase. Fan-cooled housings exist for exactly this; the LED thermal management guide puts numbers on it.

For wide webs, a high-uniformity, fan-cooled line light such as the LS-LSC-0074 — 484 mm, 24 V — holds its line steady over a long shift.

Line scan lights484 mm High uniformity line scan light, fan cooled (LS-LSC-0074)LS-LSC-0074
Size
400 mm +
Voltage
24 V
$1,539.00View partBuild a system with it

When the usual answer is wrong

  • Glare, not range. When a specular wash hides texture in the bright zone, HDR records the wash twice, in two exposures. Polarize or change the lighting angle first — the glossy panel scratch lighting approach — and add stops only after the glare is gone.
  • A web that is simply dark. HDR extends the top of the range; a noise floor problem in the long exposure needs light, aperture or speed, not a second exposure.
  • Very fast webs. When the period shrinks until t_long cannot hold the dark zone above noise, a dual-line sensor that exposes both times simultaneously is the right hardware: neither exposure pays the alternation tax.
  • Slow webs, small parts. If one exposure already keeps the peak under clipping and the darkest zone above noise — the two histogram checks answer this — the mode buys nothing. Where no line scan camera exists yet, an area scan camera in line scan mode covers slow webs with the same speed-and-pixel arithmetic.

Checks before you commit

  • t_long ≤ 0.8 · T and v · t_long ≤ p, both numbers written down.
  • Ratio r from measured grey values, not from a dynamic-range figure on a sheet.
  • Both histograms in range on the real web at production speed.
  • Per-channel flat fields, and the one-line shift in the fusion path.
  • The trigger-rate decision — R or 2R — made before the camera grade is chosen.
  • Light uniformity across the web, and output drift checked after a warm-up run.
  • Data rate on the chosen interface at the final trigger rate.

The line scan camera finder filters by line length and interface, and the configurator walks camera, lens and light in order. Send the web speed, the width and the two grey values through the contact page and we will size the exposure pair for you.

Questions

How much dynamic range does a two-exposure HDR pair add?

The ratio of the two integration times, in stops: extra range = log2(r). A 10:1 pair adds 3.3 stops (20 dB), 16:1 adds exactly 4 stops, and 100:1 adds 6.6 stops. On a sensor with about 60 dB usable range, 10:1 takes you to roughly 80 dB — enough for black print beside bare metal. Ratios above about 16:1 usually fail on light, not math: the short exposure drops under 2 µs at web speeds.

Does cycling two exposures halve my line rate?

The sensor still outputs a line for every trigger, but each exposure channel appears on every second line, so each channel samples the web at half the trigger rate — 88 µm instead of 44 µm in a 34 kHz, 1.5 m/s set-up. Full-rate sampling in both channels means triggering at twice the rate, which halves the period available to the long exposure. Most detection software picks a channel per zone, so the halving only matters where both zones hold equally small defects.

Should I cycle gain instead of exposure time?

No — not for highlight headroom. Gain amplifies after the pixel is read: it lifts shadows but clips highlights at the same point and adds read noise. Exposure time moves both ends of the scale, which is the half of HDR you actually need. Cycle gain only when the line period is too short for the long exposure you want, and accept the noise cost in the dark channel.

Why do edges in my fused HDR image look like a comb?

The two exposures of one object point arrive one line apart, so one channel lags the other by one line period of web motion. Shift the late channel by exactly one line before fusing. A sawtooth locked to the line grid means the shift is missing or wrong by one; a sawtooth that drifts along the image points to encoder jitter or repeated ticks instead — fix the trigger, not the fusion.

Do I need continuous or strobed light for line scan HDR?

Continuous is simpler and is the default for cycling mode: both exposures read the same steady line. Strobing works when the controller follows the camera line by line and the pulse width alternates to match the two integration times — a fixed-width strobe quietly caps your long exposure. Strobe when you need peak intensity the continuous duty cycle cannot reach, or to freeze vibration.