If you have ever clicked through your camera’s image playback and review options you may have encountered a histogram. A histogram is a graph that can be displayed next to our pictures in one of the viewing options on most cameras or image editing software.
Most histograms will have several peaks and valleys in the graph and while no two histograms are exactly alike there are similarities. That’s all well and good, but what is it that a histogram graphs?
Before we can dig into histograms it will help if we keep in mind a few of the technical limits of our cameras. These limitations aren’t new; photographers have had to deal with similar issues throughout history. With today’s automatic cameras the built-in software for the most part works well creating images within these boundaries. However if we understand what the limitations are are we can guide the camera toward capturing even better picture.
First, a digital imaging sensor has pretty much the same properties as slide film in its ability to capture light. Both a digital imaging sensor and slide film can record about five stops of light. Briefly this means that if your exposure is at f/8.0 than the darkest part of the scene that the sensor can record with detail will lie at about f/4.0 and the brightest about f/16. Anything that reads as darker than f/4.0 will be detail-free black, anything brighter than f/16 will render as pure white.
This range of captured tones from light to dark is often described using the word ‘latitude’. As in: A digital camera has an exposure latitude of 5-stops.
Next, our cameras break this 5-stop range down into 256 tones that range from pure black to pure white. These tones go from all black to almost black to less black through grays and into less white, almost white and finally all white.
Any scene that contains more than 5-stops will have details outside of this range ‘clipped’. Our eyes see across about a 16-stop range so a camera is always at a disadvantage in capturing scenes as we see them, especially if the scene encompasses a wide exposure latitude.
OK, cameras have a 5-stop range or latitude of usable light for exposures. This 5-stop exposure latitude is sub-divided into 256 tones that range from pure black, through the grays and up to pure white. These are our basic assumptions when we work with histograms.
Now we need to take a look at a histogram as shown below. A histogram has the bottom of the graph (the X axis) ranked from darkest black on the left to purest white on the right. Numerically at the left end of the bottom line we have “0” and on the far right we have “255”. The camera in this example breaks down the graph into five vertical regions to help us visualize our 5-stops of exposure latitude.
In a basic histogram we ignore color, we only deal with brightness. Every pixel on the camera’s sensor is analyzed and the pixels are sorted by their brightness value into the 256 possible tones that the camera can capture. Then the camera simply displays a graph showing the count of pixels at each of the 256 possible tones.
The actual number of pixels per tone isn’t really the issue, what we are looking for is the distribution of pixel tones across the graph. From the graph above we can see that all of the recorded pixels are well within the 5-stop range of the camera’s sensor. We can also see by the distribution that there is a little crowding of the pixels down toward the dark end of the scale with almost nothing at the very brightest end of the graph.
This distribution doesn’t mean that we have to do anything. However if in our judgment the building’s details that are a little dark on the lower left side are important we might choose to take another shot at a different setting. We might try another exposure with the lens open to f/3.5 and the shutter still at 1/1000 which would move all of the pixels toward the right side, brighter value. (Alternately we could adjust the exposure compensation to +0.5). By looking at the graph we can tell that in this case we do have about ½ stop of exposure latitude at the brightest end of the scale unused.
Histograms are also used in photo editing software. Here are three examples from Adobe's Lightroom3
A histogram isn't a light meter and it doesn't measure image quality. There is no such thing as a bad histogram or a good one for that matter. Histograms are simply another tool that helps the photographer judge the image based on its tonality. Because all things being equal, how the photographer chooses to capture the tonal range of a scene is what can make the image unique or just another shot.
Summary: Every image has a histogram and every histogram is different. A camera has an exposure latitude of about 5-stops and that range is subdivided into 256 tones from black to white. A histogram graph is built by sorting an image’s pixels into the 256 possible tones and then graphing the resulting count of pixels at each tone. By looking at the distribution of the image pixels across the available tones we have a tool that can help us decide on possible adjustments to exposure values for subsequent shots.
Working with images – Histograms are an important feature in many Adobe image editing programs. Editing packages use histograms to depict the current state of an image file's tonal range. Photoshop Elements 9, Lightroom 3 and Photoshop CS all use histograms as editing tools.