Histograms... WTF?

What Is A Histogram?

Firstly, what on earth is a histogram? In simple terms it's just a graph which groups numbers of things into specific ranges.

Specific to digital photography: a histogram is a graph which shows the number of pixels at relative brightness (luminosity) values from pure Black (which has a luminosity of 0) on the left of the graph, to pure White (which has a luminosity of 255) on the right of the graph (this is assuming your digital camera takes an 8 bit image and for the sake of simplicity that's exactly what I'm going to assume).

Almost every new digital camera has a histogram that you can view, either live on the LCD screen as you're composing your picture, or as an overlay on top of a picture you've taken, or often both. The user manual for your camera will tell you how you can view the histogram. And it's there for a very good reason. Because with a histogram you can tell at a glance whether a picture is properly exposed or not.

If I was to take a picture of a black piece of paper, then every pixel in the picture is going to be very dark. This means that when we view the histogram there is going to be no bright pixels and as a result, the histogram on the back of the camera will look like this:

Showing a histogram with shadows to the left
Shadows to the left of the Histogram

If I was to take a picture of a white piece of paper, then every pixel in the picture is going to be very bright. This means that when we view the histogram there is going to be no dark pixels and as a result, the histogram will look like this:

Showing a histogram with highlights to the right
Highlights to the right of the Histogram

So this demonstrates that black and dark pixels (Shadows) are represented by bars at the left of the histogram, and bright and white pixels (Highlights) are represented by bars at the right.

If I was to take a picture of a grey piece of paper, then every pixel in the picture is going to be grey. This means that when we view the histogram there is going to be no dark pixels and there will be no bright pixels so if properly exposed the histogram will look like this:


Showing a histogram with midtones in the middle
Midtones in the middle of the Histogram

Now although these examples refer to black, whites and greys exactly the same principle applies to every colour too. Reds go from very dark to very bright:

Showing a range of the color red from dark to light


As do blues:

Showing a range of the color blue from dark to light


And greens:

Showing a range of the color green from dark to light

Every colour your camera can perceive has a luminosity value somewhere between 1 and 254 (remember 0 is always pure black and 255 is always pure white).

Any scene where you have shadows in some areas, midtones in others, and bright highlights will result is a histogram that looks like this:

Showing an example histogram

This shows a good spread of light and dark pixels across the image but crucially, because the histogram is not touching either the left or right edge, I can see that there are no pure black pixels and there are no pure white pixels. Why is that important? Because if the picture is showing pure white or pure black I have lost all the detail in those areas and I don't want an image with no detail, right? This is called "clipping" and in all normal circumstances is to be avoided. If all my shadows are pure black then I have underexposed my picture. If my highlights are pure white then I have overexposed my picture. The trick then is to use the histogram as a guide to adjusting your aperture, shutter speed or ISO so that you don't clip either your highlights or your shadows. It is perfectly possible, for example, to take a picture of a polar bear on snow and not have a single pure white pixel. Sure, the histogram in an example like that will be weighted heavily to the right, because there will be almost no midtones or shadows, but all the detail of the snow and the polar bear's fur should still be there - if you've overexposed then all that detail will be gone. All you need to do to avoid that, is to check the histogram and if it's overexposing adjust your settings accordingly. It's actually really that simple.

There will be occasions, however, when it's just not possible to adjust the camera settings enough to avoid pure whites and pure blacks. Sometimes a scene will present itself where if you try to prevent overexposing you have to underexpose too much and you clip your shadows, and if you try to prevent underexposing you overexpose too much and end up clipping your highlights. This tends to happen in high contrast scenes in bright daylight with both lots of highlights (e.g clouds) and lots of shadow (e.g. shade under trees). This means you have exceeded the "Dynamic Range" of your camera.

What's that now? Dynamic Range? WTF? This is a complex subject and I will address it in depth in a later article, but for now it's enough to know that it is the full range of bright and dark pixels that can be recorded by your camera in one exposure. Each camera has a different dynamic range.

There are a couple of ways you can overcome the problem of exceeding the dynamic range of your camera but these really apply to landscape photography where you have a bit more time. The trick with nature photography is to avoid taking pictures in the middle of a bright sunny day. Evenings, early mornings and overcast days will reduce the amount of bright light significantly making it far less likely you will exceed the dynamic range.

Once again, there is nothing more certain to help than proving this for yourself. When taking pictures, use the histogram. Take a moment to see if you are overexposing and increase the shutter speed or reduce the aperture or ISO as fits your needs. If you are underexposing, decrease the shutter speed or increase the aperture or ISO. See which situations overwhelm your camera and exceed the dynamic range - ask yourself would taking the picture in less light help and try taking scenes in the early morning or evening (if you can) to see what effect this has.


Popular Posts