Monday, July 13, 2009

Making Your Own Panoramas

Don't be scared off by the technical sounding first few paragraphs - the info about making a panorama is written in a simpler way. Everyone can make a panorama - just give it a try!

As some of you may know, my thesis involves matching panoramas to photographs. I have been having some problems with this particular kind of image matching, due partially to the low quality of the panoramas I'm working with. These panoramas were created with data from the Point Grey Research panoramic camera called the Ladybug2 (you may also recall that even Google didn't think much of the quality of the results when they used this camera for their Street View system). So to have some nicer results to show in my work, I decided to take matters into my own hands: I decided to make some of my own panoramas.

There's a nice free, open source piece of software out there called Hugin:

Goal: an easy to use cross-platform panoramic imaging toolchain based on Panorama Tools.

With hugin you can assemble a mosaic of photographs into a complete immersive panorama, stitch any series of overlapping pictures and much more.

With this package, making panoramas with just about any projection and any field of view - all the way to 360 degrees horizontally and vertically - is easy!

But first, if you are curious about this whole "panorama" thing, I suggest you take a look at the PanoTools wiki to learn more. It's got all you need to know, including some equipment that can help with making panoramas, and an explanation of the different projections you can use (i.e. the different ways to take a picture that, say, wraps all around you in the real 3D world, and represent it on a flat surface). The projection I'm using in my work is the cube (never had time to look at other possibilities).

With that out of the way, here's how I went about making my own panorama for my thesis.

First, I needed to find a scene that had a lot of easy-to-match, distinct features. This would save me time later, as you will see. I chose a location in downtown Ottawa, in front of our National War Memorial.

My husband and I took our Nikon D90 (a decent consumer digital SLR) and tripod and set up on the pedestrian walk in front of the actual memorial. After everything was all put up and levelled, I snapped many photos in a full circle around the tripod. I made sure consecutive photos had a lot of overlap between them. Then I angled the camera up and repeated. This wouldn't cover the whole sphere of space around me, but it would capture a pretty good enough of it.

Back home, I fired up Hugin and loaded all the images I took for the panorama. I let the EXIF data in my photo files (embedded by the camera) define the properties of the lens and such. Then I pressed the "Align..." button on the Assistant tab and let it do its thing.

This is where having a good scene can really help. If the computer can automatically figure out which bits of two consecutive images match each other, you won't have to tweak the results as much. Otherwise, you have to go into the "Control Points" tab and delete or adjust the wrong matches, and add in some more good ones. Lots of trees can cause problems in the matching process, so try to find a scene that allows you to include other features other than just trees.

Luckily, my photos matched really well, and the preview of the panorama that popped up looked great! So I went to the "Stitcher" tab and got the real thing.

Here is my panorama of the War Memorial using the equirectangular projection (I converted this to a cube later on). You can click on the image to see some larger sizes.

War Memorial Panorama

Here are some tutorials that might help you out if you want to make your own panorama:

3 comments:

  1. That's really cool! I tried to do a panorama once, standing on the balcony in front of my parents' house.

    ReplyDelete
  2. It's certainly a lot easier with these sort of tools. I think I tried doing one manually once (more in the sense of stitching together a few photos to make a big one, rather than the 360 degree thing), and it didn't really work very well ;)

    ReplyDelete

Comments are moderated - please be patient while I approve yours.

Note: Only a member of this blog may post a comment.