When producing output from high dynamic range image data, one often fights the battle of tonal range compression and re-establishing global and local contrast. You want to pack all of that tonal information into the final image, but in doing so you must necessarily compress the tonal information at the expense of contrast. And contrast is what makes the image look terrific, just like you remembereed the scene and visualized it in your mind's eye.
There are many ways of going about (re)establishing contrast in your toned HDR data. Some applications will do it as part of the toning process, and do it very well. Some applications are better at the tonal compression, but apply heavy-handed local contrast algorithms that leave your image looking unnatural.
This balancing act can lead to adopting a workflow that ultlizes the HDR application to compress the tonal range into a flat looking result that contains all of the tonal data, but lacks contrast. There is nothing woung with this apporach! It often leads to more work, but gives the user more control over the final image. Thus, the source exposures are merged and toned in an HDR application and the flat result is brought into a pixel editor to deal with contrast and color for the final image.
Just like anything else, there are many ways to bring out and re-establish contrast. In this post, I will present a method which is not necessarily novel and does not use some newfangled tools, but is a slightly unorthodox use of a retouching method that is widely used to give retouchers control over various levels of detail in an image (think protrait retouching). This method uses Photoshop.
Many of you may be familiar with the concept called "frequency separation" or "wavelet decomposition." The idea is that the base image can be broken into a low-frequency part and a high-frequency part and the elements of the two parts can be manipulated independent of each other. The typical use is in portrait retouching where the high-frequency part of the image contrains skin blemishes and pores and the low-frequency part contains large areas of color and tone on the model's face. Cloning and healing of the high-frequency details does not touch the underlying color and tone and unifying the underlying low-frequency tone and color does not smooth over the details that make the skin look natural and with texture (versus the fake, plasticky look of over-smoothing).
Well, this concept is nice for HDR images that need local contrast boosted as well. You can decompose your flat image into levels of detail and then individually boost the detail in each level independently. Think of it as a graphic equalizer for your image detail. In fact, there are plug-ins and extensions for PS that do just that, including:
Topaz Detail: https://www.topazlabs.com/detail
Fixel Labs Detailizer: http://aescripts.com/fixel-detailizer-ps/
WOW! Frequency Equalizer: https://www.knowhowtransfer.com …/wow-frequency-equalizer/
These plug-ins/extensions are all good at what they do, but they present the user with simplistic controls that may or may not provide the control you need. And they cost money.
You can achieve the same kind of apporach to local contrast with a little creativity and some Googling. The idea is to find a way to perform frequency separation (wavelet decomposition) of your image and then adjust the contrast of the idividual frequency bands to your liking. Here's one method I came up with.
First, you need a way to separate your image into the various frequency bands. If you are unfamiliar with frequency separation or wavelet decomposition, give it a Google and watch the videos. The basic idea is that your base image gets blurred with a Gaussian Blur radius that gets rid of all of the detail that you want to treat separate from the underlying tone and color of the image - this blurred layer becomes the low-frequency, or "residual" component of the separation. You then subtract the blurred layer from the original image and the result is a mostly gray layer that contains all of the high-frequency detail that you blurred out of the original in the previous oepration. If you then set the blend mode of the high-frequency layer to "Linear Light" the blended result of the blurrred + high-freq Linear Light layer is the original image. Taa daah! Now you can heal and clone out high frequency blemishes, etc. without affecting the underlying tone and color, etc.
The linear light, high-frequency layer looks a lot like the kind of layer that gets generated when you perform a high-pass sharpening operation, or dodging and burning - that is, it is mostly middle gray, with deviations away from middle gray at areas of high contrast in the source image. This is terrific because when you use a contrast blend mode, like linear light, areas of contrast in the original image get amplified, while areas of middle gray in the layer do not affect the blend. This is precisely what we would like to do to re-establish local contrast: amplify areas of contrast in the original image without affecting large, flat areas of tone and color. With the frequency separation approach we can do it selectively, based on detail size (spatial frequency).
Okay- so we need a tool to do the frequency separation - and it would be nice if we could specify how may levels of frequency-based detail separation we want. Well, there is a script for that, and you can download it here:
You need to copy the code text from the above link and paste it into a new text document and name the document "<anything>.jsx" - for example, I call my file "WaveletDecomp.jsx". Place this file in your PS version's Scripts folder and restart PS - it will now be available in the Scripts menu. I did not write this script, so please read the GitHub documents on usage, etc. You can also open the script text in any text editor and read it to follow along with the author's intent.
Run the script and accept the default value of 5 wavelet detail scales - the script will create a duplicate of your original document and then make five layers of detail separation in the new document (it leaves your original image untouched). From my experimenting with the script and editing it, the size of the details in each layer is dependent upon the pixel dimension of your original image. You can experiment with all of these parameters to see what workflow is best for your images. If your original image file has only the background layer, you may get an error message when you run the script - "The command Copy Merged in not available" - just hit "OK" to dismiss the error and the script will continue on its merry way - this part of the script flattens your current document, which will not be possible if the document is already flat, hence the error.
Take a look at the five layers the script created in your new document - you will notice that the script creates each layer and sets its blend mode the "Linear Light". To visualize exactly what each layer looks like, select the five layers and change their blend modes to Normal. Now you can see the primaily gray with darker and lighter edge details in each of the layers. See how the scale of detail changes in each successive image?
Choose any one of the layers, maybe Scale 3, and make a new Levels adjustment layer above that layer. Clip the Levels adjustment layer to the Scale 3 layer and turn off all of the layers above the new Levels layer. Now you are viewing Scale 3 layer in Normal blend mode with a Levels adjustment layer that has not been changed, but will only affect Scale 3 layer when you edit the Levels. FYI - you clip the adjustment layer to the Scale 3 layer by hovering your mouse over the border between the layers and holding down the OPT or ALT key - your cursor icon will change to a double right angled arrow - click on the border between the layers and the Levels adjustment layer will now be indented in the layer stack and clipped to the Scale 3 layer, affecting onyl the Scale 3 layer and not every layer below the Levels adjustment.
With the Levels adjustment dialog window visible, drag the black and white points in equal amounts, say to 50 and 205 respectively. Note the change in the Scale 3 layer - middle gray stayed middle gray, but tones darker than middle gray got even darker and tones lighter than middle gray got even lighter. This is adding contrast to the Scale 3 layer via the Levels adjustment layer. Now switch all of the Scale layers back on and set their blend modes back to Linear Light and toggle the visibility of the new Levels adjustment on and off - see the effect it is having on the image? - it is adding local contrast to that Scale 3 level of detail in the image. Add clipped Levels adjustments to each Scale layer and change the Black and White points to add contrast (keep the midtone value at 1.00). Now you can adjust the amount of contrast for each scale layer by moving the Black and White points on the associated Levels adjustment layer - the more you move the black and white point toward middle gray, the more contrast you are adding and the more detail you are amplifying in that Scale layer. You can also fade the effect back as much as you want by adjusting the opacity of the Levels adjusmtment.
This is like having a graphic equalizer for different levels of detail in your image - the Levels adjustment is where you set the intesity and amount of contrast for each level of detail.
I have recorded an action in PS that runs the Wavelet Decomposition Script (you can change the amount of wavelet levels, but use the default of 5, because that is what the action expects) and then makes the Levels adjustment layers for all five levels and sets their intial black and white points to values that give fairly good, out-of-the-box results. The Action requires that the script be called "WaveletDecomp" (remember that you copied and pasted the script into a text file and named it something.jsx? Call it WaveletDecomp.jsx).
The action also adds a Levels adjustment layer at the top of the Wavelet group with a slight bump to the midtones (Gamma = 1.10) you can dial this back to 1.0 or diable the layer if you do not want the effect.
You can download the Action here:
1) you need to copy-paste the script into a new text document and name the doc "WaveletDecomp.jsx"
2) you need to put this script in the PS scripts folder for the version of PS you are running (PSXX > Presets > Scripts) and restart PS for the script tp be available.
3) load the action into your version of PS - the easiest way to do this is to drop tha action file onto the PS icon in your Dock or Task Bar. You can also load the action from the Actions panel in PS.
Note that you may see banding appear in the new document - this is just spurious rendering artifacts in PS - if you zoom into the image to greater than 50%, the artifacts disappear.
In the next post I will give an example of the action some recommendations on usage.