Enfuse merges overlapping images using the Mertens-Kautz-Van Reeth exposure fusion algorithm.1 This is a quick way for example to blend differently exposed images into a nice output image, without producing intermediate high-dynamic range (HDR) images that are then tonemapped to a viewable image. This simplified process often works much better than tonemapping algorithms.
Enfuse can also be used to build extended depth-of-field (DOF) images by blending a focus stack.
The idea is that pixels in the input images are weighted according to qualities such as, for example, proper exposure, good local contrast, or high saturation. These weights determine how much a given pixel will contribute to the final image.
A Burt-Adelson multiresolution spline blender2 is used to combine the images according to the weights. The multiresolution blending ensures that transitions between regions where different images contribute are difficult to spot.
Enfuse uses up to four criteria to judge the quality of a pixel, which Table:weighting-criteria briefly describes.
- The exposure criteria favors pixels with luminance close to the middle of the range. These pixels are considered better exposed than those with high or low luminance levels.
- The saturation criteria favors highly-saturated pixels. (Note that saturation is only defined for color pixels.)
- Local Contrast
- The contrast criteria favors pixels inside a high-contrast neighborhood. Enfuse can use standard deviation, Laplacian magnitude, or a blend of both as local contrast measure.
- Local Entropy
- The entropy criteria prefers pixels inside a high-entropy neighborhood. In addition, Enfuse allows the user to mitigate the problem of noisy images when using entropy weighting by setting a black threshold.
Table 1.1: Enfuse's four weighting criteria.
For the concept of pixel weighting, and details on the different weighting functions, see Weighting Functions.
Adjust how much importance is given to each criterion by setting the weight parameters on the command line. For example, if you set ‚Äė--exposure-weight=1.0‚Äô and ‚Äė--saturation-weight=0.5‚Äô, Enfuse will favor well-exposed pixels over highly-saturated pixels when blending the source images. The effect of these parameters on the final result will not always be clear in advance. The quality of the result is subject to your artistic interpretation. Playing with the weights may or may not give a more pleasing result. The authors encourage you to experiment, perhaps using down-sized3 or cropped images for speed.
Enfuse expects but does not require each input image to have an alpha channel. By setting the alpha values of pixels to zero, users can manually remove those pixels from consideration when blending. If an input image lacks an alpha channel, Enfuse will issue a warning and continue assuming all pixels should contribute to the final output. Any alpha value other than zero is interpreted as ‚Äúthis pixel should contribute to the final image‚ÄĚ.
Enfuse reads all layers of multi-layer images, like, for example, multi-directory TIFF images4. The input images are processed in the order they appear on the command line. Multi-layer images are processed from the first layer to the last before Enfuse considers the next image on the command line.
 Tom Mertens, Jan Kautz, and Frank van Reeth, ‚ÄúExposure Fusion‚ÄĚ, Proceedings of the 15th Pacific Conference on Computer Graphics and Applications, pages 382‚Äď390.
 Peter J. Burt and Edward H. Adelson, ‚ÄúA Multiresolution Spline With Application to Image Mosaics‚ÄĚ, ACM Transactions on Graphics, Vol. 2, No. 4, October 1983, pages 217‚Äď236.
 Downsampling with a good interpolator reduces noise, which might not desired to judge the image quality of the original-size image. Cropping might be an alternative, though.