Is there something that will convert a short video into a panorama of the scene?
July 25, 2011 6:18 AM   Subscribe

I'm looking for software libraries or downloadable software (preferably the former) that can take an input video, and output a panoramic image. For example, something that allows you to stand in one place, turn around taking a video, and then get a massive stitched jpeg.

I've read the previous questions (and answered a few - I work in computer vision) but they all involve using static images and there's lots of additional information you can exploit in the video stream that isn't available from a collection of overlapping images. One previous question addresses the exact issue but there aren't any non-hacky answers to that one, and I'm hoping things have moved on in the intervening couple of years.

If it doesn't exist, I'll write it in OpenCV, but I'm sure it's been done before.
posted by handee to Computers & Internet (12 answers total) 8 users marked this as a favorite
 
I'd be interested in people's answers to this.

One method I've thought about is writing a script which uses ffmpeg to cut the video up into a number of different images and then manually running them through the Canon PhotoStitch software (which came with my camera) to join them together.

Something which doesn't involve hacking up a script and manually loading images would be great - provided that the blending of images together works well. The Canon software may be a pain because it can't be automated, but the results are very good.
posted by mr_silver at 6:45 AM on July 25, 2011


GigaPan (makers of an awesome stepper designed to make panos) suggest their own software, PTGui, and Autopano Pro.
posted by thatdawnperson at 6:51 AM on July 25, 2011


A good place to ask this question would be the panotools mailing list. I've been inactive for a year or so, but it is the largest collection of panorama-interested people on the 'net, and there is constant discussion of new software and new technologies.

I remember that, at least in years past, the reason these things never caught on were all the source format issues (interlacing, rolling shutter, low resolution, etc) although some of that is less relevant now.
posted by fake at 7:01 AM on July 25, 2011


The latest version of theMicrosoft Research Image Composite Editor apparently supports stitching directly from a video. I messed with it several versions ago on just .jpg images and got pretty good results!
posted by Jinkeez at 7:04 AM on July 25, 2011


Steve Mann has a paper on this, but it's from '97 and I don't know if he's currently interested in the subject. Intriguing bloke is Prof Mann.
posted by scruss at 7:20 AM on July 25, 2011


The Microsoft tool that Jinkeez mentioned does it pretty well. I used it only yesterday. You just drop a video in and the rest is more or less automated.

Bear in mind the frame rate and resolution of your video camera and the fact that a typical video shot will tend to exhibit motion blur. With my point-and-shoot Canon, a 360x150ish degree panorama still takes a couple of minutes to shoot as video; don't expect to be able to just spin round quickly unless you've got a very expensive device with a ridiculous frame rate. To get a sharp image you're likely to end up moving the camera from point to point and holding it still at each point, pretty much as you'd do if you were just shooting normal images.
posted by le morte de bea arthur at 7:35 AM on July 25, 2011


VideoOrbits is free software that does this (demos) but doesn't seem to have been touched 5 years or so.

And on a second look it's from Steve Mann, as scruss mentioned.
posted by russm at 7:48 AM on July 25, 2011


oh, and it's right there in the answers to the previous question.

fwiw, it builds for me on OSX with a couple of trivial patches. if that's your platform I can chuck the build somewhere for download.
posted by russm at 8:50 AM on July 25, 2011


russm: "oh, and it's right there in the answers to the previous question.

fwiw, it builds for me on OSX with a couple of trivial patches. if that's your platform I can chuck the build somewhere for download.
"

I don't know about handee, but I'm on OSX and curious about this. Would you mind at least identifying the patches you had to make?
posted by Songdog at 7:26 AM on July 27, 2011


Songdog - patch is here. you'll need MacPorts for some support libraries - I had to install fftw, and it obviously uses netpbm. there may be other ports I already had installed that it also requires.

this was just a "what's the least amount of work to make it build" thing, I haven't actually *used* the output so I dunno if it works.
posted by russm at 3:29 AM on July 30, 2011


oh, and you have to point configure and make at your macports include/lib dirs. this is how I built it -
CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib ./configure
CFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib make

posted by russm at 3:32 AM on July 30, 2011


and finally, to make it actually *work* under OSX, you need a perl module (Image/Size) that Apple don't ship. I use the perl from MacPorts anyway, so I just needed to port install p5-image-size and update the hardcoded /usr/bin/perl shebang in the provided scripts to /opt/local/bin/perl. it's porting from the "hit it with a rock until it fits" school, but the examples now run fine and produce a correct panorama.

a patched and built source tree is here.
posted by russm at 11:43 PM on July 30, 2011


« Older Unpaid unemployment benefit taxes for 2011   |   It's more of an ecosystem than a pool at this... Newer »
This thread is closed to new comments.