Welcome to SP!  -
Panoramas? Here is how to do it!
Article
 

Panoramas? Here is how to do it!

  Featured on the Front Page
Panoramas? Here is how to do it!

Page Type: Article

Object Title: Panoramas? Here is how to do it!

 

Page By: Lukas Kunze

Created/Edited: May 13, 2006 / May 20, 2006

Object ID: 193715

Hits: 7529 

Page Score: 91.7%  - 36 Votes 

Vote: Log in to vote

 

Why creating panoramas? I think they show scenery much better than single shots. Additionally panoramas can be used to create very high resolution images from every object with normal resolution cameras. Especially if you want to create posters from your shots an image stitched from many photos has an enormous quality compared to the single photos.

This is a step by step guide to create nice panoramas from the shots you' ve made. But remeber, this is only a brief guide, which helps to get started. The tools I explain in the following are free and easy to use.



 
Ehrwalder Alm Panorama
Panorama created with these tools

Make your shots

Well this is the easiest part, but most of the problems that may occur while creating panoramas are based on bad images. The best solution is to carry a tripod with you. While hiking easy or not too exhausting trails this is fine, but while climbing there would be only a very few people, who carry a tripod with them. To solve this problem and to lighten your rucksack, you' ll have to care about a few things while taking your shots.

  • The first choice you have is how to align your shots. I prefer vertical alignment, because your panorama will get bigger and you' ll have a greater vertical view-angle. On the other hand you need to take a lot of shots to get a fully 360° panorama (about 25).
  • Most of the panoramas I' ve seen on the internet have a lot of sky and only a little bit of landscape. This can be avoided by starting to shoot images with the highest mountain/building/... visible. There you can adjust the ratio between sky and landscape because nothing else will be higher and you don' t have to change the angle of your lens to the horizon.
  • While you turn around try to create an overlapping area of at least 1/5 from image to image. Additionally try to keep the horizon at about the same position.
  • Don' t zoom or change something of your camera settings while you' re taking photos. If your camera supports it, turn off any automatic helpers.


Install the required software

There are a lot of commercial programs available, which do the stitching for you, but why spending money on software, if there are free programs to do this? I' ve tried some commercial programs, but the results satisfied me only on some panoramas. Some time ago I accidentially found some open source tools, which work fine and produce excellent results.

Here is the list of programs, you' ll need and where you get them:

autopano-sift (700KB)This (optional) program can be used to align your images automatically. The results are quiet fine, but I prefer aligning myself. Unfortunately this tool is only available for Windows systems.
Panorama Tools (1MB)This is a collection of programs, which perform all the stitching into one single image.
hugin (3MB)A graphical user interface for Panorama Tools. Available in several languages.
enblend (1MB)This program cares about image composition and make the seam between the images (nearly) invisible.

All of these tools are available for Windows and Linux (excluding autopano-sift). I' ll not focus on installation here, because every tool has installation instructions on its homepage. Additionally I' ll focus on the Windows tools, because I think most of the SP users have a Windows system. The only difference to other OSs may be different button alignments within the GUI, but the basic functions are the same.


Short description of the stitching process of these tools

autopano-sift creates a lot of so-called control points on every image. After this it tries to find these control points on the other images. These point combinations are used to algin/stretch/rotate the images to make them fitting. After this step hugin may be used to edit these control points and to add vertical and horizontal alignment lines. After that Panorama Tools start their work and stitch the images. Optionally enblend may be used to improove the quality of the image.

Preparing your images

If you scan your images from slides, I recommend to use the program PTAverage, which helps to decrease noise made by your scanner. PTAverage is included in Panorama Tools. To use it you need to scan each image several times (don' t move it). After scanning your shots, you have to feed PTAverage with them, which calculates an "average image" from your scans which improves quality. To use PTAverage open a console and type the following to average pict001.jpg - pict003.jpg (PTAverage asks you for an output filename):

ptaverage pict001.jpg pict002.jpg pict003.jpg

After doing that or downloading the images from your camera look at them and adjust color balance and/or brightness of your images if they differ too much. Many image editors (GIMP, Photoshop, ...) offer tools to do so. This helps enblend to hide image borders visible after the stitching process.


Aligning your images

As mentioned above, you can align the images by yourself or let autopano-sift do it for you. I prefer doing it myself, because then you' ll have control about this process. Additionally it is not difficult and helps to improve quality, because a human mind "sees" difficult sections (like objects close to the lens or long ridges) and can put more control points in there.

First of all we need to start Hugin and add images to our new project (File -> New). I recommend to start with two images and after aligning them add the next one and so on.

Start either with the image on the left or right side. This helps to handle control point generation.

After adding two images to the project' s image list, click on the Control Points-tab and look for an interresting spot on the image and click it. Here it is the top of a mountain. It doesn' t matter if you click in the left or right image window.

It is important to have two differen images in the left and right window, because with the control points these two images get stitched together.

Now you have to find the same spot in the other image. After clicking it Hugin adjusts the circle, which marks it. If it raises an error message, don' t bother and adjust the circle by yourself by simply clicking and moving it to the correct position.

If everything is fine click the Add button. Even if you don' t have to align the circle by yourself check if the contents of the circles are about the same, before adding the control point to the list. Add about 10-15 control points.

Now we are ready to optimze the images. To do so click the Optimizer-tab.

Here you need to do three optimizations in the following order:

1Positions (incremental, starting from anchor)
2Positions (y, p, r)
3Everything

After optimizing the Panorama Preview shows the actual panorama. If there are some parts that are not matching, add some more control points and if the image looks fine add the next image to the panorama.

After you have added all images to your panorama you' ll propably get something like the preview on the left side.

Well, this is nice, but not the thing we want to have. Now we have to give Hugin some horizontal and vertical alignment lines to align the hole panorama.

These lines are created like control points, but the left and right image window show the same image and you have to create lines within it.

The left image shows the result after re-optimizing the panorama images. You' ll have to create several alignment lines on several images. Looking at the preview, you' ll see if you need more of them.

Now we' re ready for a first low resolution test stitch, to see if our panorama is ok. Click on the Stitcher-tab and select JPG as output format and adjust the output size of the panorama. To get a feeling of the dimensions click Calculate Optimal Size to see how big your panorama really is. Choose about the half of this size (speeds up the calculations).

If everything is fine change the settings of the stitcher to Multiple TIFF file output and use the maximum size of the panorama. Click on Stitch now! and get a cup of coffee, because your PC' ll have to work for several minutes.

If something is wrong within your panorama add some more control points or alignment lines and retry.



enblend

If you stitch your images into one .jpg file you' ll see the seams of each image. The enblend tool helps to hide these areas. If you have chosen the Multiple TIFF option before stitching, you' ll get several (huge) .tif images. enblend is a command line tool, which combines these images into one. The following command line executes it (copy enblend.exe into the directory, where the .tif files are):

enblend -v -m 512 -o pano.tif panosrc*.tif

The v option enables command line output of what the tool is doing. The program needs a lot of memory, which can be limited by the -m option. I recommend to use the half of your system ram (here: -m 512 limits the RAM used by enblend to 512MB). The o option tells enblend where to store the output file (here pano.tif) while the last parameter are the input files.


Finishing your panorama

After enblend has finished processing, the panorama is nearly done. The only thing left to do is to open the created .tif file with an image editor (doesn' t matter which one). Select an area with no black background and copy and paste it into a new image and save it as .jpg.

Here you can do some final quality improvements like sharpening. If your image editor supports it, select the highest quality level when saving the file.



Happy panoraming and I hope this helps you to create a fine one.


Images

Select a point of interrestPanorama is optimizedPanorama previewBad previewAdding alignment linesAligned Panorama previewRunning a test stitch
Adding files to Hugin.Stitching the final panoramaAdding a control pointSeverl control points addedOptimizing the panorama

Comments


[ Post a Comment ]
Viewing: 1-14 of 14    

Sebastian HammThank you!!!

Sebastian Hamm

Voted 10/10

It is a very good article. Thanks a lot.
I´ll try it when I am back at home.

Salü
Sebastian
Posted May 13, 2006 5:54 pm

Lukas KunzeRe: Thank you!!!

Lukas Kunze

Hasn't voted

Thanks Sebastian, I hope this helps you. A little feedback, if the descriptions are sufficient, would be nice :)
Cheers, Lukas
Posted May 13, 2006 10:21 pm

Rob AVery nice!!

Rob A

Voted 10/10

Now that finals are over,I was going to be bored next week, now you have given me something to do. Thanks.
Later, Rob
Posted May 14, 2006 12:48 am

Lukas KunzeRe: Very nice!!

Lukas Kunze

Hasn't voted

Thanks Rob! I hope this doesn' t bore you too ;)
Cheers Lukas
Posted May 14, 2006 5:45 am

Rob ARe: Very nice!!

Rob A

Voted 10/10

Oh it won't bore me but it will fustrate me for half of the week until I figure it out.
Later, Rob
Posted May 14, 2006 4:02 pm

b_bettsFor lazy people...

b_betts

Hasn't voted

I like to use Autostitch to create my panoramas..
http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html
It automatically figures out how the pictures go together and does a pretty good job IMHO.
Posted May 17, 2006 6:48 pm

Lukas KunzeRe: For lazy people...

Lukas Kunze

Hasn't voted

Hmmm... I' ll test autostitch with one of my "difficult" panoramas which couldn' t be handled by most of the tools I' ve tested...
Thanks for the link to the demo version! Cheers Lukas
Posted May 20, 2006 9:14 am

BobKThanks, Very Useful!

BobK

Voted 10/10

Looking forward to getting the software and trying it myself on my next trip.
Bob
Posted May 18, 2006 2:39 am

Lukas KunzeRe: Thanks, Very Useful!

Lukas Kunze

Hasn't voted

Thanks Bob! Hope this helps you.
Posted May 20, 2006 9:09 am

adrian721Make that 2 for Autostitch

Hasn't voted

Yeah, autostitch is the bomb....I have used a fair number of pano apps and it is my fav. But it is not the best for endless tweaking.
Posted May 20, 2006 4:00 am

Lukas KunzeRe: Make that 2 for Autostitch

Lukas Kunze

Hasn't voted

I don' t know autostitch, but b_betts has posted a link to a demo version. I' ll try this and maybe I' ll post additions here or a new article if there are too many differences...
Posted May 20, 2006 9:11 am

nikolai79Another good software

nikolai79

Voted 10/10

I have used PixMaker PRO, and I think It´s really completed.

Some of the panoramas of this web site were made with this software:

http://www.picoseuropa.net/panoram/panoram.php

PixMaker PRO it´s extremelly easy to use and has the best results of all the programs I´ve tested.
It has a lot of different options, one of the most interesting is an applet java you can add to your web site.

The bad think, it´s not free.
Posted May 22, 2006 7:47 pm

agreenstreetGood write up

agreenstreet

Hasn't voted

Thanks for the info! It's really cool being able to set up your own pano's.
Just one Question:
After I get all my control points in and it looks good, I go to set up the alignment lines, and no matter how many I put in, the pano never levels out. It looks good as far as the edges, but its still angled in the preview screen. Is there something that I'm missing?

Thanks
-adam
Posted Aug 30, 2006 5:58 am

Lukas KunzeRe: Good write up

Lukas Kunze

Hasn't voted

Hmmm... Try to insert a horizontal and/or vertical alignment line in every 2nd image. Reoptimize your panorama and don' t bother about the preview (sometimes the preview hang and didn' t show the real panorama). Try a "preview stitch" with reduced resolution and look at it. If everything is fine try the stitch with full/max resolution...

If this doesn' t work try http://user.cs.tu-berlin.de/~nowozin/autopano-sift to create control points...

Cheers Lukas
Posted Aug 30, 2006 3:06 pm

Viewing: 1-14 of 14