15:57 Sunday, September 09 2010

HDR for dummies

I've been playing with creating HDR (High Dynamic Range) images for a while now. The biggest issue that I've had is that creating an HDR is a lengthy, time consuming, experimental process. Some folks like this, but honestly, I just want to get an HDR now, not spend an hour playing with 30+ variables, only to settle on something because I've run out of patience. To further complicate matters, Linux has a very limited number of options for creating HDRs. The only full featured tool is Luminescence (formally QtPfsGUI), but that's the one with a few hundred knobs & bells that takes an hour of work. There are some command line tools, but they're even worse, as you've still got 300 options, but now you have to read a man page to figure out what they do.
For quite some time, I've stumbled across comments that Hugin, the photo-stitching tool (which has conquered the painful, time consuming process of stitching together panoramas to make it quick & relatively pain free), is capable of generating HDRs. But whenever I Google'd for more info, I'd come across a dozen different so-called HOWTOs, none of which ever worked without upgrading half a dozen other tools to bleeding edge versions (even though these claims date back 2+ years).
I took another stab at this today, and found this tutorial which makes the process of creating an HDR dead simple (one command). All you need is 'enfuse' which is part of the 'enblend' package (ships with Fedora, and prolly all the other major distros). enfuse has a few dozen options, but I've found that I can get decent results without using any of them (which is the goal here). Simply put, all I needed to do was tell it what to name the HDR image (hdr.jpg), and which images to use for input (foo[0-4].jpg):

enfuse -o hdr.jpg foo0.jpg foo1.jpg foo2.jpg foo3.jpg foo4.jpg

It doesn't get much easier than that.