Thursday, October 28, 2010

The Histogram - demystified!

Many of the features of digital cameras are similar to those of film cameras, or can be related to film photography. Histograms are one of the exceptions. You might have come across them if you are a statistician, but histograms only entered the world of photography with digital imaging.

What is a histogram?
A histogram is a ‘diagram in which columns represent frequencies of various ranges of values of a quantity’, says The Concise Oxford Dictionary. This is one of those definitions that only makes sense once you have seen examples.

In statistics, histograms are used to make numbers visual. A simple diagram is usually much easier to understand than a mass of figures. Also, diagrams can reveal relationships between some of the numbers that are hidden in the raw data.

256 tones
In digital photography, a histogram displays the tonal distribution of an image. It does this by categorizing every pixel into one of 256 groups, where 0 is black, 255 is white and all the other numbers represent shades of grey.

This image of a flag and landscape translates into the histogram shown here. The peaks of the tones towards the centre of the histogram indicate that this is a well-exposed image.
Some cameras also show histograms for the red, green and blue components of the image. These are the colour histograms for the flag image.

On the histogram, the horizontal axis shows the group numbers with 0 (black) at the left and 255 (white at the right. The vertical axis indicates the number of pixels in each group.

Within these axes is the impression of a solid graph − in fact, what you are seeing is 256 upright lines crammed so close together that they are touching each other.

What does a histogram tell you? Well, if nothing else, it will warn you of over or underexposure. If there are lines right up against the left of the diagram, the chances are the image is underexposed. If there are lines right up against the right of the diagram, the image is probably overexposed. A typical well-exposed image will show the main distribution of tones around the centre, reducing towards the left and right (though there will be exceptions).

EOS digital cameras, except the DCS series, will show a histogram for each image you shoot. When an image is displayed on the preview screen, press the ‘info’ button to the left of the screen. The display will change to give you a smaller image, plus the histogram and some basic exposure data.

An additional feature is the ‘highlight alert’. This makes any overexposed areas within the image ‘blink’. This can be very useful when shooting static subjects, such as landscapes. If parts of the image blink, you can apply exposure compensation and take another shot to bring the tones into an acceptable range. Use this feature and you should never come away with another overexposed image.

It is not just on the backs of EOS digital cameras where you will encounter histograms. You will also find them in some imaging software. The Canon File Viewer Utility shows them, for example, as does Digital Photo Professional. But the place many photographers will come across histograms is in Photoshop (Image>Histogram). Not only can you see the overall display, but you can also check the tones in each of the 256 levels for the overall image, or for each of the red, green and blue layers.

You will also find histograms in some of the other areas, such as Image>Adjust>Levels, where you can adjust the image to suit its output by clipping the levels so that you work with fewer than 256.

No comments:

Post a Comment