All About Histograms

What exactly is a histogram? In general, it’s a way to visualize exposure via a bar graph that displays the luminance values of every pixel in a digital image file. From left to right across the X axis of the graph, pixel brightness values from 0 to 255 are displayed. The 0 value is on the far left (pure black) and the 255 value is on the far right (pure white). The Y axis of the histogram is a relative measurement of the quantity of pixels of a particular luminance in the scene. The tallest spikes on the histogram reveal the predominant luminance of the pixels in the image.

READING A HISTOGRAM

Many cameras can display histograms on their LCDs, providing useful information about exposure. Histograms are also particularly helpful in postprocessing, especially of RAW files, so they show up in almost all photo editing software—more on that later.

The middle image shows a gradient from pure black to pure white, and its corresponding histogram, which shows a relatively even distribution of tones from light to dark. The top image is a gradient from pure white to middle gray, and the corresponding histogram shows values only on the right side of the graph. The bottom image is a gradient from pure black to middle gray, and its histogram is the mirror image of the top one.

Wherever you’re reading a histogram, you interpret the data the same way: the higher a peak, the more pixels of a particular brightness there are.

A single peak near the center of the histogram tells you that the majority of the pixels are middle tones, and the image is likely flat because it’s missing highlights and shadows.

A peak to the right side of the histogram tells you there are many bright pixels, while a peak at the left represents many dark pixels.

A peak scrunched up flat against either end of the histogram means clipping has occurred. In practice, that means a spike all the way at the left edge of the graph represents underexposure, with too many pixels of pure black values. The reverse is true with a peak all the way to the right side of the graph. This represents overexposure—too many pure white highlights—and data thrown out at the white end of the spectrum.

The more you familiarize yourself with histograms, you’ll begin to correlate particular scenes with various histogram shapes. A normally exposed portrait, for instance, will likely have a few spikes with the majority of the bumps on the graph distributed well within the middle of the X axis’ spectrum. Whatever you shoot, you can learn to associate particular histogram shapes with the tonal values you want in your pictures. That’s the beauty of working with histograms: the more you read them, the more they tell you.

In Lightroom, you can check your images for blown-out highlights (or blocked-up shadows) by clicking on the “Show Highlight Clipping” triangle in the top-right corner of the histogram. The clipped highlights appear as red patches, here shown on the subject’s overexposed shoulders.

WORKING WITH HISTOGRAMS IN-CAMERA

Many cameras can display a histogram overlay on or adjacent to an image review, so you can take a picture and check the histogram in order to adjust your exposure based on what you’re seeing on the histogram.

A high-key portrait with many light tones and highlights produces a histogram that is heavily weighted to the right. This Lightroom histogram also shows the values of each color channel behind the white portion of the graph, which represents the overall luminance.

Let’s say you’re making a closeup portrait against a dark blue background. You know you should see a peak on the graph near the middle of the X axis (slightly to the left for darker skin, or to the right for lighter skin), as well as a peak near—but not completely—to the left edge of the graph, representing the dark blue tones of the background. If the left peak is at the edge of the frame, it’s rendering the dark blue pixels as pure black. That’s too dark, so you must be underexposed. This is invaluable information, especially since it can be difficult to gauge image quality based on the LCD review image.

There’s an exposure technique that gets its name from the shape of a particular kind of histogram. With more peaks toward the right side of the graph, more of the pixels are lighter values. And because a brighter pixel contains more image-forming data than a darker pixel, some folks suggest this “Expose To The Right” method as a way of maximizing detail in an image file. This approach does raise the risk of overexposing too much and blowing out highlight detail. In practice, this means if you’re shooting a high-key scene (a white dog wearing a white hat in a white room, for instance) you may actually want to expose to the left to prevent overexposure and losing valuable data in your bright, high-key scene.

A typical image—say, a portrait or a landscape—will generally produce a histogram with the peak in the middle of the spectrum, representing the predominance of middle tones typical in most normally exposed images.
A high-key image, one with predominantly white and bright tones, produces a histogram with a peak weighted toward the right side of the graph.
A low-key image with predominantly dark tones and shadows produces a histogram with a peak on the left side of the graph.
When you push the pixels in an image too far, you run the risk of losing image-forming information.

USING HISTOGRAMS IN LIGHTROOM

When processing RAW files in Lightroom, the histogram not only provides valuable exposure information but it can actually be manipulated to alter the tonal values of a scene. Move your mouse over the histogram (found in the Develop module, in the top-right corner of the screen) and you’re likely to notice it reacts to the mouse, signifying which tones you’re hovering over: from Blacks through Shadows, to “Exposure” in the middle of the graph, then on to Highlights and Whites. Hover your mouse over the middle, and click and drag the histogram to the right. You’ll not only see the values in the histogram change, you’ll see the impact on the picture itself. It’s getting lighter, because you are making the same adjustment to the RAW image file as you would by moving the Exposure slider in the Develop module. The same holds true for clicking and dragging to adjust Blacks, Shadows, Highlights or Whites.

That’s not all Lightroom’s Histogram has to offer. In the upper left- and right-hand corners of the histogram you’ll see two triangles.

The white triangle in the top right of th
e histogram shows that highlights are clipping. The gray triangle in the top-left corner shows no clipping is occurring in the shadows. If they were clipped, the triangle would illuminate red, green or blue to correspond to the channel that is blocked up.

If the triangles are dark gray, no values are being clipped.

If the triangles are a specific color—like red, blue or green—they’re indicating which RGB channel is losing data.

If the triangles are bright white, you’re losing image-forming detail everywhere. Click on the white triangle on the left side of the histogram and it will enable clipping indicators, which appear as bright blue pixels where the darkest shadows have become pure black. Click on the white triangle in the top right of the histogram and bright red pixels will signal every place where highlight detail has been blown out.

This image, which is full of mid- to dark tones, produces a histogram that is heavily weighted toward the left side of the graph. The gap between the peak and the left edge of the graph represents a maximum shadow density that is not pure black.

You can also Option-click in the histogram to see the image turn all-white with small areas of black clipping indicated, or it will turn all-black with small areas of white clipping indicated—each based on the area of the histogram you’ve clicked. It’s another way to accurately visualize where and how your exposure and processing choices may be eliminating valuable image-forming detail.

Many photographers use histograms to ensure there are pure white and pure black values in an image file in order to ensure a more pleasing contrast. Adjusting the blacks (by clicking and dragging either the left side of the histogram or the Blacks slider under the Basic heading of the Develop module) until that Clipping Indicator alerts is the perfect way to ensure pure black values, and the same process works at the highlight end of the spectrum.

This image has a preponderance of dark tones, reflected in the left-weighted histogram. Its purple/blue cast in the shadows is translated to the colorful spike of the histogram, which makes it easy to visualize which colors correspond to which luminosity levels, as well.

USING HISTOGRAMS IN PHOTOSHOP

In Photoshop’s Window menu, click Histogram to show the Histogram palette, then click the menu icon in the top-right corner of that palette to open a drop-down menu that allows you to switch from the Compact View to the Expanded View, which simply makes the graph itself bigger, and easier to view, and also enables all sorts of statistical information such as pixel values and the percentage of a tone’s allocation in a scene. You can also switch from RGB to individual color channels and to the Luminance itself. This is a great way to view exposure details, as well as specifics about the individual color channels that comprise an image.

To adjust tonal values in a Photoshop file, simply use Levels or Curves Adjustment Layers. The pixels themselves remain untouched, but the tonal adjustments are evident in the histogram. That histogram is also helpful for ensuring that you’re not adjusting levels too far. This can be evidenced by a histogram full of single-pixel spikes and gaps. Such a “combed” histogram is indicative of detail loss that comes from altering pixels in a heavy-handed fashion. With the preview option selected in any adjustment you’re making (levels, curves, brightness, etcetera), you’ll see the original histogram, as well as the newly adjusted one. If you start seeing a combed histogram, consider backing off to a smaller adjustment in order to avoid throwing out too much image detail.

This series of images shows pure black, pure white and middle gray, as well as light gray and dark gray, each corresponding to a single-pixel spike in the histogram. It’s an easy way to visualize where on the histogram a particular luminosity will be found.

Leave a Comment

Menu