Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.
(by Hans Loepfe, HALO Photographs, Zurich, Switzerland)

Advanced High Dynamic Range (HDR) Workflow applied in Photoshop

(update: March, 2009 - The title of this procedure may be misleading, this procedure is actually referring to LDR and not to HDR. Still it works quite nicely)

Overview

Photoshop provides a technique to work with masks. Each mask allows full visibilty contol over select portions of a layer - just like in a 'collage'.

This technique can be used to obtain a high dynamic Range of a scene shot with bracketed images.
When shooting bracketed images never change the f-Stop as it would influence the depth of field and the hyperfocal distance. Only change the exposure time in order to obtain optimum results. Normally one takes a minimum of three bracketed shots of a scene.

Later at the computer - our digital lightroom - one loads the three images in Photoshop and creates the masks to be used to obtain a maximun high dynamic range of properly illuminated sections throughout the scene.

The principle of this technique is visualized below and explained in full detail further on using an example of a scene shot with multiple images and stiched into a Panorama with the aid of PTGUI (www.ptgui.com).
The scene I used in this example is a Glass-Window painted by Augusto Giacometti in the Church of Grossmuenster in Zurich, Switzerland. The goal was to obtain the maximum high dynamic range for the backlit windows only.

(a similar and much simpler workflow is described in the document Applying the simple High Dynamic Range (HDR) Technique).

Applying High Dynamic Range in Photoshop
Image Layer Masks:
over exposed
medium exposed
under exposed
lateral view of the Image Layer Masks
Legend:
visible composite
feathered sections
invisible sections

Workflow in detail

Prepare and stitch the panorama in PTGUI with the output settings shown below in the screen shot of PTGUI.
Screenshot of PTGUI Pro 'create Panorama'
Screenshot of PTGUI Pro 'create Panorama'

- Comment on the output format applied:
- When saving in PSD format the output consists of three layers, hence no layer alignment needed. But PTGUI does yet not write the EXIF data (Capture Data, aperture, Shutter Speed and Focal length) into the output file.
- When saving in TIFF format the EXIF data is written to the output files but layer alignment is needed.

The example described below uses the TIFF format as output.
The output chosen here results in three (3) separately blended files of the panorama.
Each file corresponds to one of the exposure settings upon shooting the panorama.

From now onwards work in Photoshop only.
Open Photoshop and open all three output files created by PTGUI.
Move and match each layer into a new file and save it in PSD format (xyz_b012.psd)
Rename each layer in the new file as reference to the original files (created by PTGUI).

renamed Layers in Photoshop
renamed Layers in Photoshop

Select the medium exposed file (xyz_b_1.tif).
Convert it to Greyscale and invert it.
- Image / Mode / Greyscale / discard Color information
- Image / Adjustments / Invert
The sections with the most amount of light appear in black.

In xyz_012.psd select the layer you are currently working with. In this case Layer ′b1 medium exposed′. Arrange both files next each other on the screen.
The image to the left serves as an aid when deciding about the selection.

Comparison of lightness amount
Comparison of lightness amount

In xyz_b_2.tif (refer to the picture to the right above) find the region with the most amount of black.
Use the Magic Wand Tool to select the region that is over exposed.
Use the Magic Wand Tool with the following settings:
- Tolerance: 15 / Anti-alias: on / Contiguous: off / Sample all Layers: off
The image should be enlarged to at least 100% in order to fine tune the selection (add to and subtract from).

In this case the result will look like the image below.

Amount of lightness selected
Amount of lightness selected

Once the selection corresponds to the overexposed areas, save this selection to the file xyz_b_2.tif.
- Menu / Select / Save Selection / New
Name the selection eg. ′b2 Manual Medium1′
Minimize this file (one might use it again later to adapt the selection chosen).

In file xyz_b012.psd select the topmost layer ′b0 over exposed′ (deselect all other layers).
Open xyz_b_0.tif and do the same as describe above.
Convert the image to Grey Scale, invert it and select the region that is over exposed.
Save this selection to xyz_b_0.tif named eg. ′b0 Manual Over exposed1′
Also minimize this file (one might use it again later to adapt the selection).

In this case the result will look like the image below.

Amount of lightness selected
Amount of lightness selected

When comparing the two selections the over exposed area in the file xyz_b_0.tif is a fair amount larger than in the file xyz_b_2.tif.

The two selections for the over exposed areas will be used as masks for their corresponding layers in xyz_b012.psd.

Resize the Window for the file xyz_b012.psd to the maximum your screen allows.
Select the layers ′b1 medium exposed′ and ′b2 under exposed′.

selected layers in Photoshop
selected layers in Photoshop

Load and invert the created selection ′Manual medium1′ from the file xyz_b_2.tif.
- Menu / Select / Load Selection / in Source: select: ′xyz_b_2.tif′ / in Channel select: ′Manual medium1′ / select ′Invert′.

Photoshop: Load specific Selection
Photoshop: Load specific Selection

In order to avoid unwanted artefacts, the loaded selection needs to be expanded by 2 pixels and feathered by 2 pixels as well.
- Menu / Select / Modify / Expand / 2 Pixels
- Menu / Select / Modify / Feather / 2 Pixels
- Now click the button ′Add Layer Mask′

Update (12/2008): Alternatively one might use a more simple selection procedure as follows:
To convert an image to a layer mask,
- from the layer you want to use as a mask, select All and then click copy
- go to the layer you want to apply the mask, click add layer mask
- select the empty layer mask, then Alt-click it and paste
- the layer mask is now filled with the grey-scale image. For the purpose described here we need to invert it
- click Image/Adjustments/Invert
The resulting mask is a ′negative′ of the original image in grey-scale to be used for fine-tunning the overexposed areas

The trick applied here becomes visible for the first time as the overexposed areas in Layer ′b1 medium exposed′ are masked out and the image section of the Layer ′b2 under exposed′ becomes visible.

Medium Exposed Image, masked
Medium Exposed Image, masked

(In order to avoid visible artefacts, your specific selection may need further adaptation.)

Now select Layer ′b0 over exposed′ and make it visible. Then do the same as above for the selection ′Manual over exposed1′from file ′xyz_b_0.tif′.

Over Exposed Image, masked
Over Exposed Image, masked

The final result is shown above.
Note the fine differences in detail (of course this example could use more fine-tuning).

Now it is time to save the file xyz_b012.psd.

For final touch-up enlarge the image to 100% or more and move through the whole image to correct section that show artefacts or other over exposed areas.

Make sure to apply changes with the ′Brush Tool′ (small radius) only in the two available layer masks by toggling between the 2 layer-masks and covering or brining forward desired areas of a layer beneath one other.

When finished time has come for final corrections such as rotating, cropping, flattening, applying filters and adjustments to levels and curves etc..

Final comments:
Alternatively one might prefer to work with the Lightness channel in LAB mode to create the masks for Layers b1 and b0.

A Key-role in this procedure plays the use of the ′Magic Wand Tool′ to find the proper selections for the medium and over exposed layers. The value for Tolerance indicated here might vary, depending on the initial exposures.

A major benefit of this procedure is that it provides means allowing better control and modification to the final output.
A major drawback is that this procedure requires tedious work. To me the additional work pays-off as it delivers far better results than using an automated process provided by various software available on the market.


Last updated: 12. December, 2008 by Hans Loepfe (HALO-Photographs), Zurich, Switzerland.
In case you would like to contact me please use this Contact form: Contact & Anfragen