Line scan camera image processing

Internet loses it over “time-stretch” train pics: art, geekery, and banding wars

TLDR: A line-scan camera turns moving trains into long, stripey “time photos,” capturing full train lengths with minimal distortion. Fans are wowed, while skeptics debate banding and whether it’s art or just scanning; the HN thread lit up with jokes, nitpicks, and nerdy clock-talk.

A blog post on line-scan train photography sent the internet into a tizzy, with a Hacker News thread racking up big points and strong opinions. The camera captures one thin slice over and over as a train moves past, turning the horizontal axis into time instead of space—so backgrounds become stripes and trains become runway models. Cue amazement, confusion, and a lot of “wait, what?” energy. The HN thread quickly split into camps: the “this is real art” crowd versus the “it’s just a fancy scanner” skeptics. One popular nitpick: those vertical lines. Are they exposure quirks or timing wobbles? User shrx went full lab coat, asking if banding comes from gain settings or an unstable clock. Others shrugged and called it a “barcode railroad” while memeing the duck-billed Pato train as doing a photo-finish duck face. Techies poked at the author’s “energy function” for finding motion—half cheering the clever trick, half calling it glorified edge detection with math cosplay. Meanwhile, model makers drooled at 100,000‑pixel-wide train shots and minimal distortion, dubbing the results “train-length selfies.” Love it or roast it, everyone agreed: these strip photos make everyday trains look wildly cinematic and weirdly beautiful.

Key Points

  • A line scan camera with one or two pixel columns scans moving objects, producing images where the horizontal dimension represents time and static backgrounds appear as stripes.
  • Line scan cameras minimize perspective distortion and can capture entire train lengths, enabling extremely wide images (over 100,000 pixels).
  • The author uses an Alkeria Necta N4K2-7C with a 4096×2 Bayer array sensor and saves raw output as 16-bit binary arrays.
  • Film-based photo finish/strip cameras operate similarly but require pulling film at an appropriate speed due to lower sensitivity compared to modern digital sensors.
  • A gradient-based energy function is used to detect moving regions in long captures by contrasting time-direction gradients against the total gradient magnitude.

Hottest takes

“Is the vertical banding due to the camera being unable to have a fixed exposure gain configured? Or just due to slight variances in the sampling times due to unstable oscillator frequency?” — shrx
“This isn’t photography, it’s a receipt printer for trains” — rail_skeptic
“Horizontal time? So it’s basically CCTV that went to art school” — bytebard
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.