- Worldstart's Tech Tips And Computer Help - http://www.worldstart.com -

Histogram Basics

Posted By On November 17, 2004 @ 10:08 PM In Digital Photography | Comments Disabled

Histogram Fun

A Hist-o-what?

A histogram is a graphical representation of the light values of the image. Yeah, I know, that really helps. Many newer digicams include a histogram display, and it’s actually one of the most useful features you can have on a digital camera.

First off, let’s look at a picture of one:

Wait, don’t stop reading! I know, I know, it looks confusing, but just hang in there :-)

The area on the left represents the dark tones, the middle is the mid-tones, and the right is the light tones. The basic idea is to keep the pixels from “falling off” of either edge – especially if it’s a big “hump” of pixels. Now, they can be near an edge, just not dangling around outside of it.

If they fall to the outside, you have areas of detailess white or black (gasp!). These pixels show up in your image as just pure back or white—there isn’t any “information” in them. You can’t use software to correct it, since there’s nothing there to correct. By keeping your pixels from “falling off the edge”, you can adjust them (to a point) in your imaging software.

Let’s look at a “bad” histogram:

Note that, unlike the first one we looked at, the “mountain” of pixels at the left is getting chopped off. That means there are going to be some areas of pure black in the photo. Again, when a pixel goes pure black or pure white, there’s no information in it. No amount of digital trickery can help a poor, informationless pixel.

Oh, here’s the picture that came from:

See how dark everything is? It underexposed, to be sure—but it didn’t look that way on my LCD screen. Since it’s hard to judge exposure just by studying your LCD screen, a camera’s histogram display can be seriously handy. When I saw this nasty little histogram with all its pure black pixels, I added some light via exposure compensation and all was well.

Of course, there’s a bit more to histograms than just keeping your pixels from falling off the edges and avoiding areas in your photo with no information.

Now a little more advanced stuff.

As we discussed previously, if you have pixels falling off either edge of a histogram, you have exposure troubles. Well, there’s a little more to it than that (you knew there was :-) . You also may want to learn where the major “humps” in the histogram should be when you look at it.

For example, if I shoot a snow scene, I would expect to have most of my pixels on the right side of the graph. After all, snow—even the yellow variety—tends to have quite a bit in the way of light tones. So, if I look at the histogram and discover most of my pixels are hanging out on the left side, I know that the image is underexposed. I’ll adjust the settings and re-shootdespite the fact that I may not have any pixels getting chopped off the edges.

Here’s a “correct” histogram from a snow scene photo I took last winter:

The photo:

Since the photo is primarily white snow, most of the pixels are to the right of the histogram. In fact, I have a few that are almost dangling over the edge (they’re the ones that make up the bright snow on the “s” curve). There’s virtually nothing in the dark pixel range, so the left side of the histogram shows only a token smattering of pixels. If it hadn’t been for the few small shadows, that area would have been completely devoid of any pixel action.

Now, if the major “hump” of this histogram had been on the left instead of the right, it would have told me I had an underexposure and needed to add some light with exposure compensation.

On the other hand, if I shoot an image that has a lot of dark areas, I would expect most of my pixels to lean toward the left side of the graph. If they were all on the right, I’d know I needed to “darken up” the exposure a couple stops. Let’s look at this histogram from last week:

It came from:

The “spike” on the left represents the hair on the back of my neck when I saw the bear coming over the top of the hill – Just kidding :-) .

Nope, that spike represents the dark tones of the bear. There’s a lot of this photo that is dark to mid tone, so that makes up the bulk of the center of the graph. Since there’s not much in the way of highlights, the graph falls almost all the way off to the right. Had a lot of the pixels been on the right, I would have known I was overexposing the scene (too many light pixels). If that spike you see on the right was “cut off” I’d know I was underexposing.

The one thing both of the above photos have in common is that they were saved by histograms. Yup, neither was exposed properly when I first shot it. The white snow underexposed (as snow usually does) and the bear was a bit overexposed (and that required some fast exposure compensating, let me tall ya). Once I saw the histograms for each image, I made a quick correction and the images were saved.

If you get what you think is a “bad” histogram, just use exposure compensation to adjust for it. 

All that said, there isn’t any generally “right” or “wrong” histogram. If you were hoping I’d show you a histogram and say “Just match your photos to this”, I gotta say sorry. A histogram all depends on the photo you’re taking—no two are alike.

Frankly, it really takes time and practice to get good at reading them. Each picture is going to have a different histogram. The trick is to decide if the histogram you’re looking at seems correct for the picture you’ve just taken.

Start by just making sure you’re not losing pixels over either edge. Once you’re comfortable with that, start looking at the distribution of the pixels on the graph.

One last thing…

In the past, we’ve talked about how your eyes can see a much larger range of brightness than the camera’s sensor can. You can look out the window on a sunny day and see detail in both the highlights and the shadows. Your camera can’t. It will either give you detail in the shadows and blow out the highlights or give you good detail in the highlights and black shadows.

With this in mind, you may find yourself in a situation where you just can’t get a perfect exposure. You see your histogram and have pixels falling off BOTH sides! At that point, just do what ya can—the light range in the photo is beyond your camera’s ability to capture it. Correct for the highlights or shadows and let the rest fall where it may.

Happy shooting!

~ Steve

Article printed from Worldstart's Tech Tips And Computer Help: http://www.worldstart.com

URL to article: http://www.worldstart.com/histogram-basics/