High Dynamic Range photography

Bismillaahir Rahmaanir Raheem

Alhamdulillaah, I’ve just managed to produce my first HDR (high dynamic range) image the results of which I’m pleased with.  Once again, I have CHDK to thank for enabling this feature easily.

Note:  I begin this post with a mildly detailed explanation of the human visual system, HDR & LDR images, and the process to create HDR & tone-mapped images.  The pictures themselves are near the bottom of this post.

First, a little background about HDR.  The way our bodies capture and process imagery is, to put it lightly, amazing.  Starting from when light first hits the cornea through to when we perceive the visual object (not to mention how our brain’s store such visual images, which is far from just keeping a “bunch of bits”), the Words of Allāh resound with truth regarding His Creation:

And it is He who spread the earth and placed therein firmly set mountains and rivers; and from all of the fruits He made therein two mates; He causes the night to cover the day. Indeed in that are signs for a people who give thought. (Alqurʾān 13:3)

Thus, in the way that they are created, our eyes can capture an amazing amount of detail and range in their own way.  The range of regular (so-called “LDR” – low dynamic range) images is quite limited in comparison.  And this is, actually, the vast majority of image-related technologies, be they cameras, display devices, or even image formats such as JPEG.

HDR images, however, are those which do or have the ability to capture image details, specifically color & brightness information, at a much higher level than normal technologies.  Since normal technologies, such as our digital cameras and screens, can not capture nor display HDR images, we have to take a different route to get the information.  One technique is exposure bracketing where one takes a picture of the same scene at different exposure levels, one after another.  The reason for doing this is that, while the normal dynamic range of a camera may be unable to capture the bright, medium, and dark details of an image all at once, it does have the ability to capture these details separately with different settings.

Alhamdulillaah, there is also software that exists that allows you to take these separate LDR images and combine them into one now-HDR image that contains the details from all the separate exposures.  Doing so is not trivial, and it may take one multiple attempts to get something that looks good.  More often than not, the result is eery, because of a technique called tone-mapping.  Tone-mapping is a technique whereby the colors and range of an HDR image are brought down into a simulation of what our eyes would perceive in the scene.  In reality, that’s all but impossible, but it yields some interesting, beautiful, and sometimes striking results.

The specific software I use is the unpronounceable Qtpfsgui (I just say it one letter at a time).  Qtpfsgui is a front end for pfstools, which is an outstanding image toolkit for these kinds of images.  It takes care of aligning, merging, and finally tone-mapping the images one step at a time.  I short-circuited the first two steps (because Qtpfsgui can be fussy sometimes)  by using the command-line tool align_image_stack to align the different exposures (since I moved a bit between exposures) as well as creating the HDR image from the three separate images.  Then, I used Qtpfsgui just for the tone-mapping stage.

The first row of pictures are the original images, taken at -4, 0, & +4 EV settings.  Looking closely, you’ll notice that each range brings out different details: the darkest shows details in the clouds, the middle shows details in the sea, and the brighest shows details in the sand.  These are the separate LDR images at different exposures that I talked-about above.

The second “row”, containing only a single picture, is the result of the several steps I mentioned above to produce an HDR image.  I make no claims into how “real” this image looks, but it does show the details that I was looking for – from the clouds to the sand – in one image.  I also think it looks cool.  😉

This is the first HDR image I’ve created that I’ve wanted to share, and so I took this opportunity to explain the process too.  If you have any questions, then by all means, please post a comment and then subscribe to the comments so you’ll know when I’ve replied.

One Comment to “High Dynamic Range photography”

Leave a Reply

Your email address will not be published. Required fields are marked *