Tag Archives: histogram

An Introduction to Histograms

I’ve been corresponding with a talented beginning photographer who I met in Yosemite several weeks ago. We’ve been having wonderful, in depth discussions on many topics. Today we touched on the topic of histograms.

Overall brightness of the green channel

The graph above is part of just about any raster editing program (raster is pixels while “vector” is lines. Think Photoshop (raster) vs Illustrator (vector) ). It’s also integrated into your camera. I’ll explain that part in a minute. This specific histogram came from GIMP which is free and remarkably powerful. I used it exclusively for about 2 years until I was pushing it beyond its capabilities.

A histogram shows the color values in your image. The left side shows the darks, the right side the brights, and the middle are the (wait for it…) the midtones. A digital image is using red (R), green (G), and blue (B) channels.

When you have maximum values for each channel you get white:
R = 255
G = 255
B = 255

When you have this combination you get black — absence of light:
R = 0
G = 0
B = 0

Of course this works differently when you print. Then you’re in a whole different color model and you’re dealing with reflected color — and they’re approximations. CMYK. Cyan, Magenta, Yellow, and BlacK (I know, that makes no sense but the K is at the end). What’s important with this discussion today is RGB. CMYK comes into play when you’re doing layouts and colors start looking brown and overly purple — a whole different topic.

The histogram at the beginning was specifically for the green channel. You can see that there’s something of a cliff off to the right. That’s indicating that there’s more green in the image than can be rendered. The green has been overexposed. To the left you can see the darkest part contributing towards black. That looks pretty good since you can almost always darken an image to add black. What you can’t do is reduce white to recover lost detail. The areas that are 100% white in an image have no data in there — there’s nothing to recover.

An ideal histogram will have some at far left, something approaching the far right, and a lot of data in the middle. This gives you maximum editing potential. Below are some examples of overexposed, under exposed, and something closer to ideal (In terms of the histogram anyway. The photo itself is a long way from inspiring).

Here is an example of an overexposed image. The values in the histogram spike all the way to the right. There’s data all across the other values, but the brights are so bright that the image is unusable to me.

Overexposed image. Note the right side of the histogram – slammed all the way to the right.
Overexposed photo at Sempervirons Falls

Below is an underexposed image. This isn’t always a bad thing because it can bring out some rich colors. You have some latitude when editing if you shot the photo in RAW. For example you can increase the exposure, brighten the whites, adjust contrast with precision, etc. When increasing the exposure you should expect  some noise in the image. There is just enough color data here to make an interesting photo.

Underexposed. The values are mostly to the left.
A little dark but not too bad.

Below is an example of an even distribution in the histogram. This is pretty close to ideal, even if this example photo itself is a little boring. There is color information all across the histogram with lots of data in the middle. This gives me lots of room to adjust in post processing.

There is plenty to work with here.
SOOC for the histogram above

This isn’t a blog about editing, but below is the result of some minor edits just by moving around basic control points in the Tone Curve tool. I created some controlled contrast by reducing the exposure, darkening the darker midtones and brightening the brighter midtones.

Slight contrast added in the midtones

Changes after darkening and contrast

The great news is that you can inspect this in camera while you’re shooting. You can shoot, check the histogram, adjust as needed, and shoot again with the new setting. The great thing about Canon is that you can see one histogram (showing just lights and darks) or you can set it to display RGB values. Here’s a picture of the back of my camera from a little fooling around last night.

Yes we’re Giants fans. Yes it’s been a rough year

In this example you can see a whole lot of Red with a spike of it off to the right. Same for green, and less so for blue. This one shows a whole lot of red throughout. While shooting this it was pretty obvious that things were going to overexpose — I mean heck I’m taking a picture of lights. But I wanted at least one channel with a lot of usable information in the darks and mids to get across what I had in mind. It’s a dark photo with some areas of bright light.