<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w" -->

---
title: Using the railway network as a flatbed scanner | daily.dev
description: A hobbyist details building a homemade slit-scan line camera using an industrial Basler linear-scan sensor to photograph long, continuous scenes from moving...
canonical: https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Using the railway network as a flatbed scanner | daily.dev
og:description: A hobbyist details building a homemade slit-scan line camera using an industrial Basler linear-scan sensor to photograph long, continuous scenes from moving...
og:url: https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w
og:image: https://api.daily.dev/og/posts/LC2YiDf5W.png
og:image:alt: Using the railway network as a flatbed scanner
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the railway network as a flatbed scanner

**[Lobsters](https://daily.dev/sources/lobsters)** · 23 min read · 0 upvotes · 0 comments

## Summary

A hobbyist details building a homemade slit-scan line camera using an industrial Basler linear-scan sensor to photograph long, continuous scenes from moving trains and ferries. The project covers mechanical mounting with 3D-printed parts, capturing accelerometer and GPS data to correct for varying speed and parallax, writing custom capture software with Dear ImGui after OpenCV's highgui proved too slow, and a NumPy-based postprocessing pipeline called grindstone. It also covers color camera quirks like infrared bleed and channel fringing, plus tools for displaying gigapixel-scale images in a browser using OpenSeadragon and vips.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://philo.gay/linecam>

## Community take

How the wider developer community reacted, aggregated from 2 discussions and 118 comments across hackernews, lobsters (as of 2026-08-19).

**TL;DR:** Commenters loved the project's craftsmanship and obsessive detail, sharing many similar past experiments with slit-scan/line-scan photography from trains, planes, and satellites, while a few raised technical nitpicks about wobble artifacts and alternative correction approaches.

**Sentiment:** 78% positive · 18% mixed · 4% skeptical

**The case for**

- Several developers shared their own similar line-scan/slit-scan projects, showing the technique has a rich lineage from Matthias Wandel's early scanner hack to Ward Cunningham's train experiments.
- People praised the image quality and lack of choppiness in the final results.
- Commenters appreciated the deep technical write-up on image processing and distortion correction.
- Some enjoyed the 'using X as Y' genre of hobbyist project and wished it were more common.

**The pushback**

- One commenter argued the wobbly vertical artifacts show the results aren't as good as a normal camera, since accelerometer-based correction has limits.
- Someone suggested a second normal camera for stitching assistance might be easier than relying on acceleration data, implying the current approach is suboptimal.
- A commenter noted images loaded very slowly on mobile, likely due to server overload from traffic.

**By community**

- hackernews (positive): Overwhelmingly appreciative, with a long tail of people sharing their own related projects (slit-scan cameras, line-scan viewers, stereograms, satellite imaging) and a small minority raising technical quibbles about artifacts.

**Open questions**

- Could a second synchronized normal camera replace or supplement accelerometer data for image stitching?
- Is there a way to eliminate RGB fringing for all distances when imaging landscape from a moving train, given parallax-varying speed?

**Highlights**

> As someone who also did some line scan photography, I also ran into a lot of similar challenges! > Displaying and sharing the pictures I've taken has been a pain throughout the project. Most software on my computer doesn't like how big they are, and the most reliable tool I've found for viewing them has been GNU IMP, which feels a bit overkill. I vibe-coded my own image viewer, sriv, to address this: https://github.com/dllu/sriv Also, I found that displaying the images with multiple rows instead of a single super wide image is a lot more ergonomic. > I correct for it for a given subject by shifting the red and blue channels to line up with the green channel. Since the lines are evenly spaced, I can shift by the same amount in opposite directions rather than having to measure separate offsets for each channel. In theory, I could decide how far to shift by correlating brightness shifts across channels, but at present, I do it manually. I implemented the correlation-based approach: https://daniel.lawrence.lu/blog/2025-09-21-line-scan-camera-... Recently, I also vibe-coded a tool for me to manually annotate constraints to fine-tune the distortion correction: https://daniel.lawrence.lu/blog/2026-08-02-line-scan-camera-... For a stationary camera imaging a train, you just need to estimate the train's speed. But for the inverse problem of imaging the landscape from a moving train, the speed varies due to parallax (near things move faster, far things move slower), so there's no way to fully eliminate the RGB fringing for all distances. > The biggest one is to make it not dependent on a laptop to capture images, which will make it less sketchy and easier to bring places. I did just that recently, by adding an NVIDIA Jetson Orin Nano and a 7" 2000 nit touchscreen as well as a custom-designed CNC aluminum case: https://daniel.lawrence.lu/blog/2026-06-12-standalone-cnc-li...
> — [dllu on hackernews · 2 comments](https://news.ycombinator.com/item?id=49349546)

> > but I think the results speak for themselves. ... as in not very good compared to normal camera ? Acceleratometer-based correction can only do so much Normal camera allows you to get a snapshot of 2D area instead of 1D area so you can make any correction for movement afterwards. With linear one you just get artifacts like the introductionary pic being very wobbly up and down.
> — [PunchyHamster on hackernews](https://news.ycombinator.com/item?id=49347239)

> Ward Cunningham and I did something similar back in 2008. We were both at a startup in Portland and our office was along the railroad tracks east of the Willamette. We were up on the 4th or 5th floor right above a lot of train traffic including Amtrak. I brought in some extra Mac gear I had including one of the early iSight cameras which back then was an external device you stuck on the top of your display and connected to the Mac via FireWire. We set it up and rolled the desk over to the window in the office and turned the camera around pointing down at the tracks and Ward got to work hacking something up to do a slit scan. It was a fun little project; the speed of the trains affected the horizontal compression of the images. We could tweak the software to expand or contract the size of the image by adjusting the number of slit scans per unit of time. Of course, that affected the exposure but I recall the camera having some automatic adjustments that gave us trouble. That's about all we did with it. Just a quick afternoon hacking project. Neither of us thought much about it at the time so we didn't save anything.
> — [msisk6 on hackernews · 1 comments](https://news.ycombinator.com/item?id=49345381)

> Has anyone done the same for other rides with wheels? I guess that would end up being NeRF (Neural Radiance Fields) & Gaussian splatting?
> — [Tepix on hackernews](https://news.ycombinator.com/item?id=49345561)

> One fun thing is that the camera is that the projection is perspective in the vertical axis and othographic in the horizontal axis. That's why "zooming out" is done by squashing the image horizontally. Imagine taking a picture with a regular camera of a person nearby and a statue 16x times as large but 16x further away. Both figures would have the same apparent size: they would show up as the same number of pixels in width and height. However, with a line scan camera, the apparent width of objects does not change with distance. Those same objects would have the same apparent height, but the width of the larger statue would be 16x.
> — [pvillano on hackernews](https://news.ycombinator.com/item?id=49355893)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=49344825) · 279 points · 118 comments
- [lobsters](https://lobste.rs/s/n7i1jn/using_railway_network_as_flatbed_scanner) · 1 points · 0 comments

## Similar posts on daily.dev

- [Panoramic Photography With A Linear Scanner](https://daily.dev/posts/panoramic-photography-with-a-linear-scanner-poafdenxm) · Hackaday · 0 upvotes · 0 comments
- [Hackaday Europe 2026: Project Gigapixel](https://daily.dev/posts/hackaday-europe-2026-project-gigapixel-xkb4bkyzw) · Hackaday · 0 upvotes · 0 comments
- [Scanwheel is a drum style mechanical television you can build yourself](https://daily.dev/posts/scanwheel-is-a-drum-style-mechanical-television-you-can-build-yourself-vtt1llsyb) · Hacker News · 0 upvotes · 0 comments
- [Ruby Sees the World: Automatic Measurement from Photos](https://daily.dev/posts/ruby-sees-the-world-automatic-measurement-from-photos-gz3ojkorf) · Ruby Flow · 0 upvotes · 0 comments

---

Tags: [#computer-vision](https://daily.dev/tags/computer-vision), [#image-processing](https://daily.dev/tags/image-processing), [#numpy](https://daily.dev/tags/numpy), [#opencv](https://daily.dev/tags/opencv)

[View this post on daily.dev](https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Using the railway network as a flatbed scanner","url":"https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w"},"datePublished":"2026-08-18T17:24:26.811Z","dateModified":"2026-08-19T04:49:29.611Z","description":"A hobbyist details building a homemade slit-scan line camera using an industrial Basler linear-scan sensor to photograph long, continuous scenes from moving...","image":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","thumbnailUrl":"https://media.daily.dev/image/upload/s--HRgLpUt6--/f_auto/v1722860399/public/Placeholder%2003","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/using-the-railway-network-as-a-flatbed-scanner-lc2yidf5w","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"computer-vision,image-processing,numpy,opencv","timeRequired":"PT23M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Using the railway network as a flatbed scanner"}]}
```

