January 20, 2019

Painless Panorama Stitching in Linux with Hugin - page 2

Getting Started With Hugin

  • August 26, 2010
  • By Akkana Peck
Assuming the fast preview looks okay, proceed to Step 3: Create panorama... Choose a filename: you don't need a file type, like filename.jpg, since Hugin will just ignore it and create a tiff no matter what. Wait a while (not as long as step 2). Don't worry, the result will be worth the wait.

When the dialog disappears, your panorama is ready, as a .tif file in the directory where your original images were (Figure 3). Take a look!

<em>figure 3, click to see the full-sized panorama</em>
figure 3, click to see the full-sized panorama

It'll probably have lots of extra black around the edges, so you'll need to crop it in an image editor like GIMP. And you'll probably want to convert it to some other format -- TIFF files aren't that useful, since they're quite large and most browsers can't display them. If you don't need cropping and just want a different format like JPEG, use "convert", from the ImageMagick package:

$ convert mypanorama.tif mypanorama.jpg

JPEG is a lossy format, meaning every time you make a change to it, you lose some detail. If you have the disk space, it's best to keep the TIFF, and just create a JPG when you want to put the file on the web or share it with friends.

If the final image looks a little too dark or too light, or not contrasty enough, go back to Hugin and try the Exposure tab. Try different presets there and see how the results compare.

Fixing problems

I skipped over a big assumption back in step 2: "Assuming the fast preview looks okay." What if it doesn't? There are some cases where Hugin gets confused and you have to do some manipulation by hand.

If your camera's lens is unusual, or if you're stitching images scanned from a film camera, you might need to set lens information in the Camera and lens tab (Figure 4).

<em>figure 4</em>
figure 4

The only field you're likely to need is focal length, at the bottom left.

If you have display problems with Hugin's Fast Preview Window, the problem might be Compiz. Upgrading to a newer distro might fix the problem (some recent Compiz fixes made it more tolerant of programs like hugin); or you can disable Compiz.

But occasionally Hugin really gets confused about how to match your images. In Part II, I'll discuss some ways to rescue a difficult panorama job, as well as some of Hugin's other fun features.

Meanwhile, you can find lots of tutorials and examples at Hugin's project page, hugin.sourceforge.net. So have fun stitching!

Akkana Peck is a freelance programmer and writer, amateur photographer and the author of the book Beginning GIMP: From Novice to Professional. She's also a control freak who loves fiddling with devices and making them do things they aren't supposed to be able to do.

Most Popular LinuxPlanet Stories