Advertisement

How to Use the Histogram

by
Student iconAre you a student? Get a yearly Tuts+ subscription for $45 →

In this tutorial you'll learn about the histogram, and what it's able to tell you about your photography. If you're going to use the back of your camera as guide to judging exposure, then you need the histogram. Understanding it fully will help you capture better, more flexible images!

Republished Tutorial

Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. This tutorial was first published in April of 2010.


Equipment

You don't necessarily need a Digital SLR to see the histogram on the LCD screen on your camera. A lot of point-and-shoots, particularly the advanced point-and-shoots, have the option to view the histogram when playing back your images. Check your camera's manual for full details.


Software

For this tutorial you don't really need image-processing software, but I'll be using it to show you how proper exposure really makes the most of your pixels. This is keeping with the theme of getting it right in-camera before you bring it to your computer.

It's best to experiment with different exposures in-camera before bringing them into your image-editor (Lightroom, Photoshop, Camera RAW, Aperture, etc) to try these experiments for yourself. It will help you better predict how an image will behave before you start tweaking it.


My Problem

In my early years of digital photography I would snap off a photo, check it out on the back of my camera and say to myself, "that looks good." It looked like I had detail in my shadows, detail in my highlights, and everything looked fine. I'd bring the image into Photoshop, only to discover that this powerful and expensive piece of software couldn't bring my highlights back, or my shadows, or correct a particularly nasty colour cast.

"But it looked fine in my camera. What happened?!" I'd frustratingly ask myself.

Frame after frame had exposure problems I didn't know about until it was too late. In fact, I had a photojournalism assignment that didn't get posted on the wire because I had ruined my exposure. Needless to say, my editors were not happy. My pride took an even bigger hit.

My problem wasn't that I didn't know how to photograph. My problem was that I ignored my good friend, the histogram, and trusted what my LCD was showing me. Once I started listening to my histogram, everything made a lit more sense. It told me the most important thing: whether my image was usable.


The Histogram

The histogram is a graph that shows you the distribution of tones — shadows, midtones, and highlights — within your photograph. The shape of the graph varies greatly depending upon the type of image and how you exposed it. The histogram can be divided into three main sections: shadows (left), midtones (center), and highlights (right).

histogram

The histogram follows the additive color model with values ranging from 0 (black, no color) to 255 (white, all colors), per color channel (RGB). So, your camera can "see" 256 levels of red, green, or blue. The combination of numbers per channel determines color, while the sum determines its luminosity (brightness).

additive color wheel

In reality the digital camera's sensor doesn't record any color at all. It really only records the color grey and its 256 levels of variance. Color is simply determined by the which photosensor was hit and for how long and how intensely. A digital sensor records a greyscale image. It's the image-processor that adds color definitions.

So, the historgram only displays the range of grey tones within your photograph and how dark or light they are. Even if your camera can display a RGB histogram, its only telling you which photosensors were activated and by how much. In my opinion, the RGB histogram really only works if you're checking for white balance, not exposure.

http://www.photoaxe.com

Despite the existence of Photoshop and RAW, your camera and image editor, no matter how expensive, only has those 256 levels to work with. Once a pixel goes outside the 0 to 255 range, its gone. It never happened.

Digital sensors are digital signals — a series of 1's and 0's. Essentially, "yes" or "no" without "maybe". So, even the highly-praised flexibility of RAW is no match for film and is still limited to 256 levels displayed by the histogram. The image below shows how digital actually chops off information.

The three sections: shadows, midtones, and higlights have approximately 85 levels each with level 128 being the middle. The centermost positioned pixels within the histogram have the most flexibility as they are neither too dark nor too light. This means that none of the three color channels are maxed-out or at zero, giving your image-editing software more accurate room to work.


Where the Light Should Fall

The closer to either extreme your image's histogram leans, the more you've locked the image in terms of exposure and color-correction, even in RAW. A poorly exposed image presents a litany of problems and can add a lot of time and frustration in post-production. Some of these problems include noise, wild color shift, blown highlights, lost shadows, color banding, and complex sets of adjustment layers and masking.

A good spot to have the "hump" or "hill" of your image's histogram is slightly right-of-center. This helps ensure you haven't blown your highlights, but still have good detail in the shadows when you go into post-processing. This enables the software to stretch, compress, bump left or right the pixels with little or no problem. It also allows the "auto" settings of your software, be it Photoshop, Lightroom or Aperture, to do most of the heavy-lifting so you can move on to the next one — saving you time.

The reasoning behind not perfectly centering your exposure on the histogram is a commonly taught film technique of slightly over-exposing the negative. Slightly over-exposing, and I do mean slightly, brings the photograph closer in line with what the eye sees thereby making the scene more believable.

However, you can't over-expose a digital sensor like you can a film negative. Shooting digital is more like shooting chromes or positive slide film: your exposure needs to be dead-on.

RAW Exposure Table

I shot the above images in the RAW file format. You can see how much the histogram must be shifted to help bring the pixels within the 0 to 255 limit. You'll also notice how color dramatically shifts and where detail is permanently lost, even with the new "Fill Light" and "Recovery" tools introduced in Adobe Photoshop CS3. Where Photoshop has had to do nearly no thinking is in the properly exposed image.

The RAW file-type does give you a tremendous amount of flexibility over shooting JPEGs, but the reality is that nine out of ten times you'll need to convert it to a JPEG in order for your lab, printer, or the web to display it. I personally shoot RAW when I need absolute control over my image, especially in difficult lighting situations. However, the flexibility of RAW doesn't negate the need for good technical skills.


Pick Your Battles

The camera simply cannot match the dynamic range of the human eye. So, in particularly contrast-heavy lighting like the midday sun, you have to pick which part you're going to expose.

If you expose for the highlights, you'll lose the shadows. If you expose for the shadows, then the highlights are gone. If you expose for the midtones, you could still blow-out the highlights.

The internal metering of most cameras only displays a 4 to 5 stop range (-2..-1..0..+1..+2). That is not much in a contrast-heavy situation with bright highlights and deep shadows. If you have f-nothing in the shadows but f-bizillion in the highlights, err on the side of preserving the important highlights.

©2009 Daniel Sone

Important highlights vary from situation to situation. In the above example – 2:00pm harsh sunlight – it was important to have detail in the building, clothing, and clouds. I shot it at 1/125 @ f/13, ISO 125, no flash. I did clip just a handful of pixels (white flowers), but there's detail in his clothing, the masonry of the building, and texture in clouds. A good understanding of the histogram enabled me to extract a lot of usable pixels out of this contrast-y situation — in camera as a JPEG.


Conclusion

It took some time (and a lot of mistakes) to improve technically and rid myself of the "I'll fix it in Photoshop" mentality. I now shoot my RAW images as if I were shooting JPEGs. This helps really ensure I get the most out of my photograph and really utilize the power of Lightroom, Aperture, Camera RAW, or Photoshop because I've given myself and the software the room to work its magic.

Besides, why would I want to triage a photograph on my computer when I could have just perfected it in-camera? Remember, even a Hasselbald can take a bad picture.

Advertisement