Hugin — Stitching auto-exposed panoramas
This tutorial explores a feature available first in the 2009.2.0 Hugin release.
Hugin has a new stitching option designed for stitching bracketed panoramas. Usually a quality camera has a 'bracketing mode', you can shoot each position of the panorama with several exposures and when stitching select Fused and Blended in the Hugin Stitcher tab, this fuses each bracketed stack and then seam blends the stacks together.
For cameras without a bracketing mode it is simpler to shoot an entire panorama for each exposure level, but these panoramas are not easy to divide into 'stacks'. Now with Hugin 2009.2.0 you can select Blended and fused when stitching (instead of Fused and Blended), this blends each of these panoramas before fusing them all together in one go.
This new feature has some other uses which are explained in the rest of this tutorial.
Problems with auto-exposure
The standard advice for shooting panoramas is to disable all 'automatic' camera features, i.e. to use fixed focus, aperture, white balance and shutter speed. This advice hasn't changed, but many point and shoot cameras don't allow you to alter any of these settings, this tutorial shows you how to get the best from a sequence of photos taken with auto-exposure.
If you do have such a sequence of photos, Hugin will automatically use any camera EXIF metadata to set the EV (Exposure Value) of each shot. During stitching this information is used to adjust each shot to the average EV of the whole sequence. This works very well when the exposure difference is less than about 1.0EV.
For situations where the light in the scene changes between shots (e.g. sun going behind a cloud), or where there is no EXIF metadata available, you can optimise exposure in the Exposure tab, Hugin will look at the overlaps and adjust the exposure based on values in the photos themselves. Sometimes these EV values need to be reset, use the Reset... button in the Camera and Lens tab to do this.
In extreme cases you can also widen the feathering in the seam blending stage by setting -l 29 as enblend parameters in the Stitcher tab.
Using a combination of blending and fusing
Hugin has long used seam blending with enblend for creating invisible seams between photos with similar exposures. Hugin also uses exposure fusion with enfuse for selecting the best parts from photos with dramatically different exposures - Usually this exposure fusion is used for assembling stacks of bracketed exposures, but it is also good for blending partially overlapping photos.
Here are four shots taken with a cheap cameraphone:
The range of variation betwen the sky and ground photos is around 3EV, this is much more than can be hidden by seam blending with enblend. Here is the (not so good) result from stitching this in Hugin using the default Normal -> Blended panorama output option which corrects exposure before seam blending:
Note that to equalise the exposures of the overlapping photos, Hugin has overexposed the sky and underexposed the ground. Note also that the overlapping photos have little common detail, resulting in an ugly seam between top and bottom.
Hugin now features an additional Exposure fusion - > Blended and fused panorama output option. This uses a two step process, first images with a similar exposure (within a 0.5EV range) are seam blended together with no exposure correction, then these blended layers are exposure fused into the final panorama result:
That's it, this isn't the highest quality example but hopefully it shows the possibilities of this new Hugin functionality.
September 2009 — Bruno Postle. Updated April 2010