Lair of FinFarenath
Digital Image enhancing for High Dynamic Range Compression ( HDRC )
HalfDragon : : Home : : HobbiesSection > DigitalPhotography : : HDRImageCompression 
Home
About FinFarenath
Interests 'n' Hobbies
Projects
Friend's Lair
Site Map
Gallery
Diary
Links
Log In
19 Oct 2017|guest

Digital Image enhancing for High Dynamic Range Compression ( HDRC )

Under Construction stillHigh Dynamic Range images are a suitable and good way to have images of photographs with hight contrast to be able to be displayed for a natural eye of the viewer on digital media. Most cameras are unable to take such photos directly so I wrote this little manual on how to create such a visually alike image with simple techniques. In nature when doing landscape work that includes sky, especially early or late in the day, the contrast range encountered often exceeds that which film or imaging chips can handle. It's therefore necessary to find a way to reduce the contrast range to something that the camera can handle so that the highlights don't burn out and the shadow areas don't turn inky black.

In order to get a higher dynamic range you can blend multiple differently exposed images. The easiest way to do so is to average all of them. However, the resulting image usually suffers from low detail contrast and looks dull. On the other hand, we can preserve detail contrast while compressing overall contrast by using blurred masks, gradient enhanced masks or -even better- with the smart blurred masks.

The basic idea is to combine the images using only shadows and midtones. We create a blurred mask for each image with a curve mapping highlights to black and mid tones and shadows to white. The background image is of course not to be masked.

This mask should be blurred for smooth gradients and small details in order to prevent their contrast, but leave hard edges intact, where the contrast can be reduced savely. For this purpose the desaturated copy of the image is treated with the smart blur filter and then inverted.

 
 

Blended result of the images. Photos were shot at Exposure time: 0.5 sec., Aperture: f/6.7, ISO: 200 / 2 sec., Aperture: f/6.7, ISO: 200 / 8 sec., Aperture: f/6.7, ISO: 200
 
 

Preparing the Camera and shooting the photos

Importing the photos to a graphic editing program

 
The following steps are common to all approaches. Use your favorite digital image retrieval program to convert the dark and light frames to 8 bit TIFFs. This technique will work on JPGs as well, but not on RAW files. You can also work with 16Bit mode as it will produce a more vivid color range if your image program supports this.

Put both images on screen at the same time. Select the dark frame and press CTRL-A to select the whole thing. Press CTRL-C to copy it. Close that picture, as you no longer need it.

Select the light frame and press CTRL-V to paste the dark frame into it.

If you look at the Layers palette you will now see your light image as Background Layer and your pasted dark image as Layer 1.

Combining the images

There are different approaches that you can try so as to blend these images together to increase apparent dynamic range. The first, manual painted matte, is the traditional method that's been around a long time. I still use it as it gives you the most control and ability to finetune over the other methods. It is the most labour intensive and requires some manual dexterity on your part. It also is the most flexible.

The second, the layered masked matte, is easier, and doesn't require any eye-hand coordination on your part.

Manual painted matte

This is the most labor intensive but surely the most precise and controllable of the manual methods. Use Layer / Add Layer Mask / Hide All. Now select the Paintbrush Tool and choose a fairly large brush. Start painting over the light part of the image. You are removing the overexposed layer and revealing the darker image underneath. Don't worry about overdoing it because once the light layer is removed the process stops. Be careful not to get too close to the dark area with the large brush. Also, make sure that you don't miss any areas that you want to include.

Change to a smaller brush and increase the magnification. Very carefully erase the light layer along the edge of where the dark area meets it. If you make a mistake, use the History Palette to go back.

The only drawback with this method is that it requires sometimes good painting, and this can become difficult if the dark and light areas aren't large and easily paintable. The advantage is that it gives you very precise manual control of what gets blended and what doesn't.

Layered masked matte

This is the easiest manual technique. Starting with having done the pasting of the dark image on the light one, add a Layer Mask. This is done by clicking on the second icon on the lower left of the Layers palette. You will now see a white rectangle next to the image on the Layer 1 layer.

 

Click on the background layer on the palette and the press CTRL-A to select the whole image. Press CTRL-C, copying it to the clipboard. Now hold down the ALT key (Option on the Mac) and click on the white mask rectangle on the Layer 1 palette.

The whole image will now turn white. Next, press CTRL-V to paste the contents of the clipboard onto the white mask. You will now see a B&W mask image. With the B&W mask displayed go to Filter / Blur / Gaussian Blur and set the Radius to about 40 pixels. Click on the Background Layer and you're done.

Oh yes. With this technique you may want to select the background layer and add an appropriate curve to brighten up the dark area a bit prior to flattening the layers.

Final cleanup

This is the final bended image. All techniques will produce roughly similar results, with the painting technique providing the most control but also the most work. The Layer Mask technique is easy to use and costs nothing.

Once the image has been flattened your work has just begun. Now you can do fine tuning of Layers and Curves and color balance, as well as any other adjustments that you care to make. But, you'll be starting with an image that is much closer to what you'll likely want the final print to look like than if you had tried to coax detail from the shadows the traditional way. Of course blown-out highlight would have been irretrievable. Naturally any sharpening should be saved for last, preferably just before printing.


All content is copyright © 1989-2007 by FinFarenath. All material on this website is the property of the author. Any copying or quoting from this text is forbidden and requires a written permission of the author. The legal disclaimer applies for all the pages found under this domain. Ideas, requests, problems regarding FinFarenath's dragons lair - send feedback. This site was created at 15 May 2007.