Second Picture is devoted to original tutorials about 3D graphics, Photoshop, Photography and Web Design.
19.02.2008 Category: Photoshop Tutorials
This is an article about Photoshop HDR imaging. The following HDR workflow is explained in detail:
In picture 1 you see the final result. Click on the image to see a larger version at the bottom of this page.
Creating an HDR image in Photoshop is very simple:
When the merging is done you see the preview window like in picture 2. On the left side you see the original photos, in the middle you see the HDR photo and on the right side you see the histogram. The red ticks in the histogram represent EV steps. Normal digital camera is able to capture 6-8 EVs of dynamic range. My HDR photo covers a dynamic range of almost 10EVs (picture 2). So there is more dynamic range than a single shot could capture. In my example the HDR image is made from 9 shots with 1EV intervals. Some might think that 9 exposures is ridiculously too much. It's true that the dynamic range of 10EVs could be captured even with just two shots but the result would be of lower quality. I don't know the merging algorithms of HDR programs but presumably they take best parts of the photos and / or do some averaging between the pixels in different shots and therefore noise is reduced effectively if there are several exposures. So several photos with small exposure intervals is better than a few photos with large exposure intervals (at least what comes to noise). My example photo is noise free even in the darkest shadows.
(One might wonder, what is the meaning of the slider below the histogram. That's just for viewing the HDR image at different exposures. All the HDR image data remains intact while using the slider.)
After clicking OK in the HDR tool, the image is normally opened in Photoshop. At first it should be saved. An HDR photo can be saved for example to PSD or OpenEXR format. I personally use OpenEXR because it can be opened in several other programs (such as Photomatix) that support HDR imaging.
Picture 2. Merge to HDR tool in Adobe Photoshop.
In picture 3 you see how the original HDR image looks like in Photoshop. Let's examine it a little and set some goals. There are obviously several problems: yellow cast, perspective distortion, some barrel distortion, and distracting elements on the left side. My goal is to fix all these and create a symmetrical and simple high contrast photo with completely black sky.
Picture 3. The original unprocessed HDR image in Photoshop.
First, let's do some basic clean up to fix some problem areas. I adjusted the exposure slider (in the bottom of the HDR image) about +4EV to see the problem areas in the sky. My goal is to have completely black sky. If you look at the original image on the left (picture 4), you see several lens reflections and a few stars. I use Clone Stamp Tool and other copying methods to get rid of these (see the picture on the right). After clean up there are still some large faded lens reflections in the sky but these will be darkened to pure black later in the tone mapping process.
Picture 4. Basic clean up in Photoshop.
The next step is perspective correction. First I turn Grid on (View > Show > Grid) to be my guide. Then I use Perspective Tool (Edit > Transform > Perspective) to fix the perspective distortion. After that I notice that there is unfortunately some barrel distortion. Barrel distortion is somewhat tricky to fix but doable with careful use of the Warp Tool (Edit > Transform > Warp). To keep the maximum image quality, It's best to commit all transform operations at once. In picture 5 you see the image after perspective correction.
Picture 5. The perspective is corrected.
There are some distracting elements in the lower left corner of picture 5. Next I'll use Clone Stamp Tool and other copying methods to fix that area. Now the photo is cleaner and the effect of symmetry is stronger (picture 6).
Picture 6. Symmetrical and simple.
Now is the time to remove the yellow / red cast from the HDR photo. I do that by applying Hue / Saturation adjustment filter. I decrease the saturation of reds and yellows (picture 7).
Picture 7. Yellow cast has been removed with the Hue / Saturation tool.
There are some very dark areas (top of the domes and stairs) and some very bright areas (light poles). I can predict that these are going to problems in the tone mapping process. For example, in the tone mapping process, when I'd be adjusting the toning curve to darken the sky, I'd spoil the domes and the stairs. Similarly when I'd be brightening the church, I'd spoil the lights. The solution to my problem is local exposure adjustment that can be done manually:
In picture 8 you can see the image after exposure adjustments. The domes and stairs are brighter and the lights are dimmer. This is the beauty of properly made HDR photos. I can apply +1.5 exposure adjustment to dark areas without revealing any noise!
(One tone mapping method is to expose the whole image manually and then just do the actual tone mapping with Exposure and Gamma method. However, I won't need more manual exposure control with my example photo.)
Picture 8. Domes and stairs are made brighter and lights are made dimmer.
Now the image is ready for tone mapping. I did a lot of Photoshop processing before the actual tone mapping. The reason is the fact that when working on HDR photo, one can execute radical color correction operations without losing any information (because of the high dynamic range). I recommend doing all color correction before tone mapping and also to save the image just before tone mapping.
In Photoshop, the tone mapping process is started by converting the image mode to 8-bit or 16-bit:
In picture 9 you see the HDR image with the default settings of Local Adaptation method.
Picture 9. The default settings of local adaptation.
Take a look at picture 10. On the left you see the default toning curve which produces picture 9 and on the right you see adjusted toning curve that produces picture 11. How to modify the toning curve? Well let's inspect the histogram for a while. The steep mountain on the left represents the pixels of the sky and the mountains in the middle represents the pixels of the church. I want to achieve two things: black sky and good contrast to the church. The curve on the right does just that. All the pixels on the left side of the left control point become completely black. The right control point is moved to the left just where the "mountains" start. This means that the brightest pixels of the HDR photo will become almost white. These two adjustments also make the curve really steep which equals to high contrast.
Picture 10. On the left: The default toning curve. On the right: Toning curve adjusted for high contrast.
In picture 11 you see the the tone mapped image. Notice that at this stage the photo isn't an HDR image anymore. It's just a 16-bit image.
Picture 11. 16-bit image after Photoshop HDR conversion.
The last thing to do is sharpening. I convert the image to a smart object and apply Smart Sharpen filter to it. In picture 12 you see the final sharpened photo.
Picture 12. The Final sharpened photo.