By Ellis Vener
“The map is not the territory” – Alfred Korzybski
What is a histogram and what does it tell us about a photograph?
A histogram is nothing more than a bar graph. It shows how the luminance values in a digital or digitized photograph are distributed. The linear scale in a histogram runs from black at one end to white at the opposite end. With the exception of a scanned negative, the scale runs from left (black) to right (white). About 99 percent of the histograms we use in photography today have 256 increments, corresponding to 8-bit data depth. The histogram maps the distribution of the luminance values either as a composite of the red, green, and blue channels or in each channel, as you may have seen in the histogram display on some cameras and as option in Photoshop.
The horizontal scale of the histogram measures exposure latitude, and the vertical scale measures quantity: it tells us how many pixels in the image have a specific luminosity value. While the horizontal scale is measured in absolute values (0 to 255) the vertical scale is effected by several factors: the color space, bit depth, and if you are shooting jpegs, the compression level.
Above, the histogram display from Adobe Photoshop Camera Raw shows channels represented by different colors.
That brings up another issue. Exactly what data is the histogram you see displayed on your camera’s LCD preview screen based on? More than likely, the data being sent to the preview is based on a highly compressed low-resolution jpeg using an 8-bit-per-channel version of the color space you’ve chosen and possibly incorporating the tone settings you (or the camera manufacturer) have set as in camera processing parameters.
For those of us who shoot raw and use larger color spaces and 16-bit-per-channel bit depth, there’s more information in the raw file than the histogram will lead you to believe. That’s both a bad thing (not all of the information is represented in the histogram’s analysis of the data) and a good thing (you know that at least you’re working safely).
Figure 1: The extended view of the Photoshop CS3 histogram (above) shows the histogram of a NEF file from a Nikon D300, first processed using Adobe Photoshop Lightroom v.1.3 and output as a 16-bit per channel image in the Pro Photo color space and then opened in Photoshop CS3.
Figure 2: The histogram changes significantly when a duplicate the image (created in Photoshop CS3) is converted into 8-bit per channel Adobe RGB(1998) form (above).
Figure 3: Above you see the resulting difference in the histogram when a second duplicate was made from the 16-bit per channel Pro Photo TIFF, and converted into 8-bit per channel sRGB form.
Figure 4: The histogram above simulates the loss of data that happens in-camera when you opt for to output a fine/large JPEG instead of a raw file. Notice that while the shape of the two JPEG histograms (Figures 3 and 4) are very similar to each other, there's a definite large spike on the tail of the red channel in the straight raw (NEF) to JPEG version (Figure 4) that isn't there in Figure 3.
So a histogram is a useful tool for helping you analyze, at a glance, how the information and exposure data in a photograph is distributed. It shows the luminosity range of the image along with how it is distributed.
How can we use this information to make better photographs? The late Bruce Fraser articulated a key concept by explaining ”tonal differences are detail.”
The first thing we need to watch for is clipping. A warning sign of clipping is when you have anything resembling a peak at either end of the histogram. Remember: the taller the bar the more data is at a specific level of luminosity. Unless there are detail-free areas of black or white in significant size in the photograph it is likely that your exposure setting (aperture + shutter speed + ISO setting) is destroying (“clipping”) the differences that define detail at the extremes of your exposure. That can be a problem for wedding photographers.
One rule of thumb when using a histogram to evaluate exposure is the oft-cited expose to the right. There is a sound reason for doing this and it goes back to how the CMOS and CCD sensor arrays in digital cameras and scanners work. These arrays are linear devices. In most current DSLR cameras, the CMOS or CCD records data in either 12-bit or 14-bit-per-channel form. Each additional bit doubles the degree of differences that can be recorded.
It’s important to understand that each pixel in a camera’s array is a separate monochrome device. It does one job: record the total amount of light striking it. A 1-bit device is like a light switch: it has two states, it’s on (white) or it is off (black). A 2-bit device has four states (or 4 shades of gray: white, light gray, dark gray, black). A 3-bit device has 8 states (white, six shades of gray, and black), a 4-bit has 16, and an 8-bit device has 256 (2 x 2 x 2 x 2 x 2 x 2 x 2 x2). A 12-bit device has 4,096 and a 14-bit device has 16,384 states it can be in. Obviously, the more states the smoother the transition between one shade of gray and the next.
To keep this simple I’ll use a 12-bit-per-channel model. Devices record light in a linear manner, but the pixels do not evenly share the wealth of detail. The brightest stop of exposure contains half of the available states, or levels of detail (2,048 in 12 bits). The second brightest stop down contains a quarter of the total (1,024) the third brightest contains 512 levels, the fourth brightest 256, etc.
So the further to the right you expose without clipping the highlights, the greater amount of differences you are recording. Once you have recorded the image you can start teasing it apart to see the differences in tone.
When you start with an underexposed image and have to lighten it during processing you create gaps between the steps because you have fewer and cruder gradations of information recorded. Visually this shows up as banding (abrupt changes in tone). Noise begins to visibly become more apparent, too. Yes you can reduce noise with software, but at the expense of detail and time. So exposing correctly in the first place results in both better image quality and saved time.
If you come from a background of shooting film “expose to the right” echoes the advice of master black-and-white photographers who taught us to expose for the shadow details and process and print for the highlights.
Many cameras today now offer the option of either viewing a simple composite luminance histogram or if you choose, to let you examine a per-channel view to see more precisely what the exposure level is in each color channel. If you fall into the class of people who believe that the more information you have to work with, the better informed your decisions are, you should explore this option.
The histogram display in Adobe Photoshop Lightroom translates different areas of the histogram in terms a photographer understands more intuitively: Blacks, Fill Light, Exposure, and Recovery (recoverable highlights). These areas are indicated by a lighter gray background when you hover your cursor that section of the histogram.