Tonal Range

Expanding the tonal range of an image is the overall goal of HDR (High Dynamic Range).

When you see the prints of Ansel Adams and Fred Archer, you begin to understand the impact that HDR has on digital imaging.

They were able to capture and render images on analogue film of scenes that spanned an extremely wide EV (exposure value) range. Understanding and applying the Zone System in Film Imaging is analogous to applying HDR in Digital Imaging.

Before going any further in this tutorial, you need to do two basic things.
  1. you should make certain that you understand what an HDR image is.

  2. you should know the basic steps in using your camera to record the series of images necessary for HDR.
For a detailed answer to these questions and for a list of website addresses discussing opposite thoughts about recording images with a wide dynamic range go to  the main HDR page.

In brief, the tonal range of
  • Print paper is 8EV
  • An LCD screen is 8EV
  • Analogue film is 10EV
  • An digital sensor in an average amateur camera is 12EV
  • An analogue light meter (like Sangamo Weston) is 14EV
  • A top digital sensor is 14EV
  • The range of a sunset is 16EV
  • An digital sensor in a top professional camera is 19EV

So the main aim is to squeeze the full tonal range of the subject into an image with a narrower range.

In the "old days" of film the words of wisdom from the wizened photographer were, "Expose for the shadows, and develop for the highlights."

That's a good maxim for digital users too, since you can always pull some detail from the shadows, but you can’t rescue anything from blown or burnt out highlights.  Hence, HDR has a use.

The first image was taken "on the hoof" and was not planned as HDR.  The car was 30 minutes away, and the tripod an additional 25 km by gravel roads.  I exposed for the outside of the cave, and then carefully without much movement for the cave interior.

Paint Shop Pro HDR With A Slight Misalignment

The algorithms in the HDR routine look for contrast changes at edges.

The inside of the cave has no details in the shadows for the image exposed correctly for the cave exterior, so there's a big contrast change at the cave mouth.

The outside of the cave has little detail in the highlights for the image exposed correctly for the cave interior, so again there's a big contrast change at the cave mouth.

This gives the range for HDR, and providing the alignment is close, they should match up.

tonal range 1/4 sec at f22
tonal range 1/50th sec at f6.3
1/4 second at f22
1/50th second at f6.3

The two images were not taken with HDR in mind, so the main "rules of HDR" were broken.

tonal range hdr dialogue

On the first attempt the mismatch can be seen, but using <align images>, alignment occurs. 

tonal range preview window

If you try this with multiple images which "break the HDR rules" you’ll find the software will NOT cope.

Setting the brightness and local tone mapping values produces a pretty reasonable result.

An adjustment in the image tonal range is all that is required to complete the job.

tonal range cave

Setting The Parameters

So if Paint Shop Pro works by following edges and tone range boundaries can I emulate this and set my own parameters?

Sharply defined edges lend themselves well to masking in Paint Shop Pro.

Working on the darker of the two images, the edge of the cave mouth was traced using the magic wand; the Wacom graphics tablet is really the only option for fine control.  The darker cave section was chosen and selected to make a mask.

tonal range magic wand

Layers > New Mask Layer > Show Selection

At this stage the mask can be edited and fine tuned by painting on the mask layer with white to expose the layer underneath and black to hide it.

tonal range layers
Since we know that there is a slight mismatch in the alignment of the images using the pick tool this misalignment can be adjusted as the position of the base layer can be moved during the process of assembly.

The brighter of the two images is copied and pasted under the darker one with its mask, and again the Wacom graphics pen is the ideal tool to move it into position with fine control

The advantages, here, are that the individual layers can be adjusted or manipulated using all of the adjustment tools, and the layer mask tweaked to suit the demands of the user.  The fine use of the Wacom tablet pen gives a control not possible in the algorithms in the HDR routine.

Another Way Of Merging

And onto another image and way of merging

The second series of images was specifically taken with HDR in mind.

The second series of images was specifically taken with HDR in mind.

Richard and I had been having a debate about HDR for several months.  Then, subsequently, I was reading a book on Night Photography which contained a detailed chapter on the use of HDR in recording images at night, it seemed the right time to test the theories out for real, and push them to the limit especially with Paint Shop Pro in mind.

The range of all of the exposures that evening was over 7 stops, but applying the parameters, a 5 stop range met the project brief.

tonal range 80 seconds at f11
80 Seconds at f11
tonal range 40 seconds at f11
40 Seconds at f11
tonal range 20 seconds at f11
20 Seconds at f11
tonal range 10 seonds at f11
10 Seconds at f11
tonal range 4 seconds at f11
4 Seconds at f11

Load the images into Paint Shop Pro’s HDR editor File > HDR Photo Merge ...

tonal range hdr dialogue

Paint Shop Pro’s HDR algorithm was allowed to do its best and a pretty fine job it does too. 

tonal range final hdr


Can masking give a similar result?

I’ve never been over talented with the masking brushes on fine images.  The cave mouth had a coarse edge, and when I tried to manually cut a mask on this second image I failed miserably.

 So my next question was how can I cut a mask without using a brush, but leave myself the option of using the fine use of the Wacom pen to tidy up at the end and tweak the image?

The middle exposed image, and the two end images were chosen since they gave detail in the highlights; detail in the shadows and opportunity to adjust some of the highlight areas.

Step One

Load the first image into Paint Shop Pro.  To generate each mask for each layer you must have each image opened separately.

Adjust > Brightness and Contrast > Threshold sets pixel below a chosen value to be black; and every pixel above the value to be white.  The value 180 seems to be a good value at which to start.

tonal range threshold dialogue

Make the mask.  Layers > New Mask Layer>From Image

tonal range threshold

Save the mask into a file to be used later.  Layers > Load/Save Mask > Save Mask to Disk.  It’s a good idea to choose names that are meaningful.  Mine were, eg. 180pic14 which meant picture 14 with threshold set to 180.

tonal range save mask

Do that for each image.

Step Two

Clear all images of the Paint Shop Pro work area and re-load the three images you’re going to use for the composite.

Choose the brightest image for the background, the mid-image for the middle layer and the darkest image at the top of the stack.

  • Select the middle image Edit> Copy
  • Select the brightest image Edit > Paste as New layer
  • Select the darkest image Edit > Copy
  • Select the brightest image Edit > Paste as New layer

Select the top layer in the layers palette.  Reload the mask made from this layer.
Layers > Load/Save Mask > Load Mask from Disk ...

tonal range load mask

Do this for the middle layer in similar fashion

And there you have it.  More importantly, each of the layer masks can be edited; and you can use a different threshold value to make a different mask to experiment to improve on your result

tonal range hdr from layer method

Page Links

Paint Shop HDR

Setting Parameters

A Third Way To Merge

Enjoy This Site?
Then why not use the button below, to add us to your favorite bookmarking service?

Return to top

Site build It!

Use the Contact Form to ask questions, provide feedback or comments.

Questions are good - so are comments - or requests!

Return to Terry from Tonal Range
Copyright© 2009-2011.