Gigapi: a Raspberry Pi rig for gigapixel photography

We’ve seen a number of photographers who have taken to the Pi as a way to bring down the cost of the sort of kit that was, pre-Pi, outside the budgets of mere mortals. Case in point: gigapixel photography. A gigapixel image is made up of (at least) a billion pixels, which means you’ve now got access to the sort of fine and vivid detail on your monitor that we mere humans with our shonky eyeballs could only dream of until recently.

At the moment, a camera that can take a gigapixel image all in one shot is the sort of fantasy hardware that the military is pouring millions into. But if you’re not in charge of a defence silo, you can still take your own gigapixel images by stitching together many megapixel-sized images from an SLR camera on a motorised mount into a giant, seamless mosaic with very fine detail. You’ll need something approaching a defence budget if you’re going to do this yourself without building your own hardware, though; I spent a few seconds googling and found that off-the-shelf motorised rigs for your camera can cost nearly $1000.

Tim and Jack Stocker thought this was daft, so they built their own out of MDF, some Lego turntables, and a Pi with a cheap stepper motor attached.

Gigapi in use. (We love the yellow paint job – it’s a beautifully made piece of kit.) Click to enlarge.

This is the instrument box Tim is holding in the photo above, opened so you can peer inside. Click to enlarge.

The Pi has a lot of computation to do here: Jack’s software (which you can download on GitHub) works out the horizontal and vertical angles required, the camera sensor size, the length of zoom used and the image overlap required to stitch everything together into a tidy mosaic later on. It figures out how many photos are needed to complete the picture, when the stepper motors should be moved, and by how much and in what order; and when and for how long the shutter should be opened – it also deals with the focus.

You’ll find a long description of how to reproduce the Stockers’ setup, with a parts list, enough information for you to make your own shutter control circuit and more at GigaPi.

For obvious reasons, I can’t host a sample gigapixel image here. But you can find some pictures taken with the Stockers’ rig, one of which is a simply ridiculous 15.2 gigapixels (and enormous fun; it’s full of Easter eggs, and the detail’s so good that you can count how many peanuts are left in the bird feeder) at gigapan.com.

Bonus fact of the day: Sophie Wilson, of ARM and BBC Micro fame, is also a gigapixel photographer, and she’s created some really beautiful pictures using the technique – the architectural photos are my favourites. She occasionally gives talks in and around Cambridge on the subject, minus the Raspberry Pi (I spotted an advert for one in my local post office last week). Keep an eye out if you’re in town.

 


Pi-A-Sketch

Francois Dion is someone I exchange emails with every now and then. He’s the guy behind the excellent (and multilingual: check the site for posts and tutorials in English, French, Portuguese and Spanish) Raspberry Pi Python Adventures blog. He’s a hackspace member from North Carolina, and he’s been giving lecture-demonstrations of the Raspberry Pi (and lasers) to interested groups, and promoting it in schools locally. Our community would be nothing like as large and colourful as it is without people like Francois, who put their own time and energy into spreading the word about Raspberry Pi with no support from us at the Foundation – we are very, very grateful to Francois and all the other people out there who make so much effort on this project’s behalf. (Seriously; next time I’m in NC, I will be making a studied effort to fill Francois full of gratitude-symbolising food and drink. In as many languages as I can muster.)

Francois has been making something really cool.

circles on a greyscale display

Is it e-ink? No…

A little while ago, he attended a session at PyPTUG (the PYthon Piedmont Triad User Group) about motors. “We did a lot of stuff with motors. DC, servos, H bridges, PWM and steppers. It was a very dense 3 hours. We covered a lot, and it was a lot of fun.” He went away to think deep thoughts about what sort of fun you could have with a Pi and some stepper motors; and he came up with the Pi-A-Sketch.

Pi-a-Sketch set up, stepper motors visible

The stepper motors you can see here have the same diameter as the shaft of the familiar twirly knob they replace.

Equipped with an Etch-a-Sketch, some stepper motors, a battery pack, a Pi, an 8-channel Darlington pair and some leds, wires and headers, Francois has made a device that uses Python to draw all those things on an Etch-a-Sketch that, as kids, had us throwing the things at the floor in frustration at the uselessness of our fat thumbs. Horizontal, vertical and diagonal lines? No problem. And with a bit of help from Bresenham’s algorithm, you can draw circles too. (Eben has a funny story from when he was about 11 which involves Bresenham’s algorithm, a BBC Micro, the days before the internet, inter-library loans and the month’s wait he had to endure before he was able to get his hands on the very simple information he needed to draw a line on the screen. Ask him about it if you see him and you need a reminder of how lucky we are to have the ability to look this stuff up online.)

“What practical use is all this?” I hear you mutter at the screen. Well, so far it’s gone down a treat at talks Francois has been giving about the Pi and programming. This sort of demonstration is exactly the sort of thing that captures the imagination, and opens up the eyes to what you can achieve with a little programming and a little solder flux. Here’s something familiar that you can pass around an audience (thanks to that Kodak battery pack), made magical with the addition of a little science. We love it, and so did the audience at the IEEE in Winston Salem, NC, where Francois first showed this project off.

Circles and lines on Etch-a-Sketch panel

Instructions on how to get the hardware set up are available at Raspberry Pi Python Adventures, and Francois will also be writing a post about the Python that you’ll need to get things working in the next few days. (I’ll update this post when he’s ready – in the meantime, you can find the source code at Bitbucket.) Thanks Francois; we look forward to hearing more from you!