This technique provides a more technically exact way of improving the contrast of an image by working with the tonal graph (histogram) to ensure that the image has a fairly even spread across the whole luminance spectrum.


There is a lot of jargon in that opening paragraph. Basically a histogram is a graph of the tonal range of your image. Understanding how to use a histogram is a very important skill to develop if you want to improve your digital images. You can find some good tutorials are the following sites:

A Practical Example

In Photoshop, the levels tool is on the Image>Adjustments menu. Alternatively, this tool can be applied as an adjustment layer on the Layer menu. This has the advantage of allowing further adjustments after the effect has been applied. In the GIMP this tool can be found on the Tools>Colour Tools menu and also directly on the Colours menu. The example image used below has first been slightly rotated and then cropped to improve the composition.

Conference hallThe levels tool is particularly useful if the very low and/or very high ends of the spectrum do not have many pixels in them. You can then use the tool to expand the dynamic range of the image.

Such an image will tend to look fairly flat because it does not have any detail either in the highlights or the shadows. Consider the image on the left, taken on a hot, hazy day in Southern China. Because it is overcast, the light is very diffuse and the image does, indeed, look rather flat.

Levelled imageBy altering the levels, we can improve the dynamic range in the image, adding a little more vibrancy to the final result. In the processed image, shown here, the sky is a little bluer, the reds and golds are a little richer, and some of the haze in the original image has been reduced. The effect is subtle but really improves the overall appearance of the image.

So, how is the levels tool used?

Setting the Levels

Levels dialogueThe levels dialog for this image is shown on the right. The first thing to notice is that the graph has nothing at the far right, indicating that there are no really bright pixels, and also nothing at the far left, indicating that there are no very dark pixels. This is the idea situation for the application of this tool.

The small thumbs under the graph show the positions after I have made the adjustments. I have brought the white thumb down to the upper end of the graph. This allows Photoshop to expand the dynamic range of the image upwards into the unused regions of luminance, making some of the pixels brighter. I have also moved the black thumb upwards. Usually I would position this on the lower end of the graph, but in this case I have chosen to move it a little deeper into the graph. This allows Photoshop to expand the dynamic range of the image downwards, making some of the pixels darker. The grey thumb in the middle could also be moved - this adjusts the midpoint of the image brightness: if it is moved upwards it makes the overall image darker, if it is moved downwards it makes the overall image brighter.

Notice the Channel drop down at the top of the dialog. This is set to RGB, meaning that the dialog is adjusting luminance for all the colours in the image. This is what you would usually want to do, but if necessary you can also adjust each of the red, green and blue channels separately.

Experiment with different settings for the three thumbs on the histogram panel and see how this affects the image.

You can find a good tutorial on the Photoshop levels tool at the Cambridge in Colour site.

Back back to the index of techniques.