Friday, July 11, 2014

Bracketing, HDR & ToneMapping via RAW

W

hilst much of the web based advice on HDR focussed on using a bracketed set of jpeg file, you can and perhaps should, consider working with the RAW files. With a fair bit of conscious effort. I did avoid using detailed technical terms in my previous discussion of HDR, but in the context of why begin with RAW files is better, I will need to get technical. RAW files start with a larger bit depth (12 or14 bits for each colour) in the colour space than jpeg which only use 8 bits, so you begin potentially with more detail in terms of the intensity reading. Not all HDR can read RAW files but most of the better packages claim to. I have found Picturenaut (which is a community supported effort that came out of Germany to fill the void that HDRShop left when it languished as it became commercial) suits my approach, the raw format i use and other software tools I have (particularly lightroom). It has the advantage of being able to do automatic image alignment, color balancing and ghost removal during import and merge (great features if you don’t always use a tripod). It also does the tone mapping fast.

The first step in any HDR system is to merge the source images and these will get combined into a large and higher dynamic range file (normally this will work on a 16 or 32bit colour space. Like RAW files these are frequently in a propriety format (and large). The software Picturenaut generate HDRcalled radiance HDR, with a format designed by Greg Ward (now often referred to as RGBE) which can store all this information and it is becoming somewhat of a standards. Some issues that can affect this merge are poor registration of the images (ie not taken on a tripod) and this is can cause ghost and shadows or just “soft” images. Better programs like picturenaut and photomatrix can do some alignment by feature match, or subjects that move between exposure (ghosting again) or strongly overexposed and/or underexposed source images in the bracketed set. Most packages then display this composited file and it will probably look flat and perhaps a little dark. Don’t worry the best bit is about to take place.

Example using the Reinhard tone map in picturenautThe tone mapping step is where you map all the detail of intensities back into an image that can be reproduced within the dynamic range limits of the intended display or print that hopefully will match what you saw when you took the photos. This is a large and intricate topic and many approaches have been applied. For gene4ral use I like the approach described by Eric Reinhard, which draw heavily of traditional darkroom techniques such as those of Ansel Adams. It is  a logarithmic dynamic range compressor but with a more linear portion of the dark and light ends. There are many variant with names such as Photoreceptor or just Reinhard. Better Tone mapping software lets you adjust the various key settings, and at the same time shows the intensity and/or a preview, letting you refine the tone mapping.

hdr picurenaut tonemap

The three panels below  show three other common tone mapping approaches. The Adaptive Logarithmic, also know as Drago, after its developer, is also popular and suits situations where you want to preserve the colour in highlights (such as a sunset), The Bilateral  is an example of an unfortunate choice in tone mapping that falsify the colours in this particular image.

Example using the Drago tone map in picturenaut Example using the Exposure tone map in picturenaut Example using the Bilateral tone map in picturenaut

Adaptive Logarithmic

Exposure

Bilateral

hdr ltr histoTo finish my photos for display of the web I have imported the files into lightroom, fixed any excessive clipping in the blacks, then exported the images, at a lower pixel count (made then smaller) sharpened for the screen and set them to sRBG but with no other post processing.

 

This good blog post by Klaus Herrmann which to put in his words creating HDR images the right way, does deal with creating 16 and 32-bit Colour in HDR images. His HDR cookbook is worth a read as well.
(I have found that whilst picturenaut can create both 16 and 32 bit TIFF images, I have been a little disappointed with the 32bit versions which often can’t be read by lightroom or “flatten out” when edited. The images show here is based on 16bit HDR)

No comments:

Post a Comment