A histogram is a graph that can help you evaluate a digital image. Histograms can be found on digital cameras and in computer software.
A histogram uses a linear scale of 256 levels, and shows the relative distribution of pixel color values in the image, from black to white and everything in between. 0 is solid black and 255 is pure white. The darkest shadow values are shown at the left end of the scale, and the highlight values are at the right end.
The height of the vertical line at each position across the graph indicates the amount of pixels at that value, relative to the rest of the pixels in the image. A tall vertical line indicates a large number of pixels, and a short line indicates a relatively small number of pixels at that level. Together, all the vertical lines make up the shape of the histogram.
© 2005 Nat Coalson
The luminosity histogram for this image shows a smooth distribution of tonal values. Shadows are at the left, highlights are at the right. You can see from the histogram that most of the values in this image are found in the 3/4 tones, or the area between midtones and shadows, which corresponds to a visual evaluation of the image. The darker parts of the rocks and trees are represented by the "hump" in the histogram. Learning to see how a histogram correlates to the complete image is very helpful when adjusting tones in your images.
There are two common types of histograms: luminosity (or brightness) and RGB. A luminosity histogram is often the most useful type. It shows the averaged brightness values for all the red, blue and green values combined. This is useful for determining how the brightness values are distributed throughout the image.
In an RGB histogram, the values are averaged for the actual RGB colors, and can displayed as separate overlays on top of one another so you can evaluate individual color channels. Note that brightly saturated colors may often appear clipped in an individual channel; this is normal. Many professional and prosumer digital cameras can display an overlay RGB histogram; in Photoshop, this option is under the Colors dropdown on the histogram palette.
One of the most useful features of a histogram is that it can help you determine if any areas of the image are clipping. "Clipping" means that the color value of a pixel has either been pushed to pure black (0, 0, 0 RGB) or pure white (255, 255, 255). When a large area of pixels is clipped, it contains no detail.
This histogram shows clipping in the shadow areas. No detail is visible in these areas.
This histogram shows clipping in the highlights. On a print, this would just show white paper.
In most cases, a few clipped pixels in an image are not a problem; actually, a few clipped pixels here and there in both the shadows and the highlights indicates you've reached the maximum dynamic range possible for that image. But you want to avoid having large areas of clipped pixels in either the shadows or highlights, because these areas will reveal no detail and degrade the appearance of the image.
Shape is Relative
You may have heard that a good histogram has a smooth, bell curve shape.
In reality, there is no such thing as a "correct" shape for a histogram, because every image is different. Take a look at these three histograms. Each is "correct" for the image but very different from one another:
The histogram is just one of many tools you can (and should) use to evaluate the quality of data in your images. Many digital cameras include a histogram to assist you in making proper exposures. Use the camera's histogram to evaluate the range of tones in a capture, and if possible, reshoot the image with different exposure settings to get a better image. In a "typical" landscape image, the ideal is to have data distributed across the entire length of the histogram. This indicates a wide range of tones. If you have a histogram that indicates a low dynamic range, or a lack of contrast, you can use tools in Photoshop to expand the range of values in the image. More on that in a future article.
All photographs © Nat Coalson