Exposure fusion is based on the Burt&Adelson image splining algorithm. This is the algorithm used by enfuse to produce exposure fusions for hugin, and it's also used by lux, with roughly the same effect.
I've been looking at some of my landscape brackets recently, fused with this method, and some of them weren't quite how I thought they should be: if there were 'islands of bright content' in darker surroundings, highlights in these 'islands' would show near-white (overexposed) even though the bracket contained valid pixels for the area in question in the darkest exposure.
How can this be? The Burt&Adelson algorithm is pyramid-based. To form an image pyramid, the image is scaled down repeatedly, producing a series of ever-smaller images - the 'pyramid'. The scaling-down combines several pixels from a larger image into one pixel in the next-smaller pyramid level. If some of the contributing pixels are overexposed (white), their combination will be partly informed by the white contribution, which is not a correct value to calculate with. With ever smaller pyramid levels, the problem gets worse. When the pyramids are combined in the fusion, these wrong pixels eventually produce the artifacts I noticed.
Is there a remedy? I think I have figured it out: the trick is to first hdr-merge the bracket, and then to create a faux bracket from the HDR rendition. I'll describe the process using lux:
- create a PTO named 'stack.pto' from your bracket with align_image_stack
- hdr-merge with lux: lux --hdr_merge=yes stack.pto
- create a faux bracket from the result: lux --compress=yes stack.pto.lux.1.exr.lux
This simple three-step process is already pretty good, but I found a way to improve it further, by using a different method for HDR merging, which I call HDR fusion. The modified process goes like this:
- create a PTO named 'stack.pto' from your bracket with align_image_stack
- hdr-fuse with lux: lux --fuse=yes --hdr_spread=1 --snapshot_extension=exr stack.pto
- faux bracket from the result: lux --compress=yes stack.pto.lux.1.fused.exr.lux
Give it a try, I think the result is a fair bit better than using plain exposure fusion! Comments welcome.