Live data from Hacker News

Using the railway network as a flatbed scanner

philo.gay

51–60 of 81 posts

Re: Using the railway network as a flatbed scanner

#51

Neat. Long Train photos from a still camera here: https://news.ycombinator.com/item?id=49127920

I've further improved my long trains scanning setup with:

* portable battery-powered enclosure with display: https://daniel.lawrence.lu/blog/2026-06-12-standalone-cnc-li...

* fine-grained distortion correction by manual annotation: https://daniel.lawrence.lu/blog/2026-08-02-line-scan-camera-...

Here's a recent Caltrain photo: https://commons.wikimedia.org/wiki/File:Caltrain_Stadler_KIS...

Re: Using the railway network as a flatbed scanner

#52
post #49

Is there something wrong with the pictures in the second half of the article? It seems like they are taking forever to load (about 30 seconds each), one at a time. I’m on mobile (iOS).

I thought it might be a case of accidental huge image files (well I haven't checked the network tab) but it seems to be normal sized images loading at ~5 kB/s for me.

i.e. server is probably overloaded due to this story being on the front page.

Re: Using the railway network as a flatbed scanner

#53
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...

Re: Using the railway network as a flatbed scanner

#54
In 2013-14 or so, one person, Adam Magyar, did a similar thing with a hand-built line scan / slit scan camera and made quite interesting portraits of NYC subway cars and passengers: https://medium.com/matter/einsteins-camera-88aa8a185898 [now paywalled, it wasn't when first published]

Re: Using the railway network as a flatbed scanner

#56
Recycling comment from another submission 17 day ago:

> Random thought: If you stick a very small adhesive mirror to the outside window before boarding, then footage "looking down" at the regularly-spaced railroad ties could contribute to information about the current speed and acceleration.

> Well, on a straight section anyway, if you turn, the inner/outer edges will appear differently-spaced...

> Wouldn't do anything positive in terms of suspicious staff though. They might think it's like some kind of heist-movie that will involve a specialized glass cutter making a circle on the window.

Re: Using the railway network as a flatbed scanner

#58
post #6

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 connec…

> It was a fun little project; the speed of the trains affected the horizontal compression of the images.

A few years ago I took a photo out the window of a Shinkansen going 150 mph and was amused that everything in the foreground tilted significantly to the left because of this effect. This is about as close as I'll get to seeing what it's like to get sucked into a black hole.

Re: Using the railway network as a flatbed scanner

#59

This project is more deeply technical but one thing I find fun is to take a video from a moving train and create a video stereogram by having one eye lagging in time/distance behind the other eye, letting you create very long baseline stereograms. It's fun to be able to see the 3d effects on passing bridges, etc., and for large baselines on long straight stretches you can see the 3d structure of clouds in a fascinati…

I wish I had some way to experience this! I’ve long had a dream of hooking two drones together and flying them around as stereographic pair to compress huge geographic features like mountains but I don’t own a 3D headset

Re: Using the railway network as a flatbed scanner

#60

This project is more deeply technical but one thing I find fun is to take a video from a moving train and create a video stereogram by having one eye lagging in time/distance behind the other eye, letting you create very long baseline stereograms. It's fun to be able to see the 3d effects on passing bridges, etc., and for large baselines on long straight stretches you can see the 3d structure of clouds in a fascinati…

That sounds fun, do you have a sample posted somewhere?
Post reply on HN