Using the Histogram to Get Better Photos

Decipher what it says, use it to your advantage

By mattb123 in Articles and Tips on Jul 18, 2014
Using the Histogram to Get Better Photos

Have you ever wondered what that graph-looking thing on your camera display or in Lightroom was? Or what you are supposed to do with it? If so, then read on to find out more about the mysterious histogram and what it can do for you and your photography.

A histogram simply is graphical representation of the distribution of data. This can be applied to many things dealing with science and statistics, but in this context we will be discussing the histogram function on our cameras and the histograms generated by image editing applications like Photoshop or Lightroom.

While it may look confusing at first, a histogram can tell us things about an image that might not be immediately obvious by just looking at the image, especially on the small screens on the backs of our cameras.

Being a two dimensional graph, the histogram has two axes, the horizontal (x) represents tonal variation and the vertical (y) is the number of pixels in the image containing that value. Darker values fall on the left side, gradually getting lighter to lightest values on the right. These values represent the RGB value which is a scale of 0 to 255 where 0 is the farthest left column and 255 is the farthest right. A RGB value of 0 is pure black with no detail and a value of 255 is all white with no detail. Once you know that you can quickly see how tonal values are distributed in your image with just a quick glance at the histogram.

Histograms can be generated for the whole image or for individual color channels (in the screenshot above), or both (in a stacked manner, as in the examples below).

There is no generally accepted and universally correct histogram, but there are typical ones. If you are taking a photo of a typical daylight scene with some (but not a lot of) shadows and some (but not a lot of) highlights, the histogram might look similar to this one:

Example of a typical daylight image and histogram

Click image for larger version

What this shows is that most of the tonal values fall to the darker half of the middle range of values. The blue spike that touches the left side represents the darkest shadows of the image and the spike to the right are some whites (or light greys). The lack of a spike against the very right side shows that there are no significant blown out (all white with no detail) portions. For an image with lots of earth tones and a cloudy but not overcast sky, that is a reasonable looking histogram.

If I was shooting in the dark, I should expect my histogram to reflect that by having most of the data pushed to the left (dark) side.

An image with a lot of darkness in it would have a histogram like this one:

Example of a dark (night) image and histogram

Click image for larger version

Conversely, an image in a very light environment should have most of the information wind up in the right side of the graph. White sand beaches and snow scenes are examples of these types of light scenes.

Example of a light image (snow scene) and histogram

Click image for larger version

Our cameras will assume any scene to be about as light as what is called 18% gray. That’s a degree of brightness you would expect in an average image that is not especially light or dark. When you shoot a scene like that the meter will do a pretty good job of setting a correct exposure and the resulting photo should look pretty much how it looked to your eye.

If the scene is particularly light or dark, the camera will still assume the scene will average to 18% gray and set the exposure accordingly. But 18% gray is too light for your typical night shot and it’s too dark for something like a beach or snow scene. So in these cases you want to make adjustments to tell the camera not to meter it like a standard looking scene. If you like to shoot in auto or semi-auto modes like Av or Tv, the adjustment to make is the +/- button, or exposure compensation. Setting that to a higher or lower value than 0 will tell the camera to assume the scene to be lighter or darker. In manual exposure mode, you could adjust the shutter speed, f-stop, or ISO to achieve the same thing. 

So in short, average scenes have a peak or peaks in the middle, dark scenes have them on the left, and light scenes have them on the right. A snow scene with a histogram that peaks in the middle will probably look too dark. A night shot with a peak in the middle may look too light. This can be fixed easily enough in post, but ideally, if you can fix it when the shot is taken that will yield the best shot with the most detail. The exception to that is the ETTR technique where you try to push the histogram as far right as you can without clipping (clipping is the loss of detail due to values outside of typical visible values). This usually captures the most detail and then the exposure is adjusted down in post to reflect how it actually looked.

In the following diagram, you will see a breakdown of what the histogram tells us. This shot of a fox in the underbrush was shot in mid-morning in bright light. The metering was done without using the +/- ev compensation so the camera assumed it to average out to about 18% gray. In this case that was correct and most of the image's tonal range lies in the mid tones. Since the histogram is not pushed to the right we can see there is not a significant amount of dark shadows. Conversely, the little bot of histogram touching the right side represents the highlights in the image. So after taking the shot, a quick glance at the histogram will show that this is a correctly exposed shot.

This diagram shows what the histogram can tell us about this image.

Click image for larger version

So next time you are out shooting, try having a look at the histogram and see if you can see what was described here. Adjust your exposure compensation if need be and try again, noting what changes in the histogram between shots. The histogram is the ultimate scientific chimping tool!

The histogram is often great for avoiding or correcting common exposure mistakes once you know what you are looking for (or looking to avoid).

You can also view the histogram separated into three sections representing red, green, and blue (RGB) which could be useful for certain specific situations. For the purpose of this article I'm using the combined version.

On a Pentax K-3, K-50, or K-500, a histogram overlay can be displayed over photos in playback mode by pressing the INFO button when in playback mode and selecting the Histogram option.

On a Pentax K-5, a histogram can be displayed over photos in playback mode by pressing the INFO button repeatedly until the histogram option appears.

Most of the histograms in this article were generated with a handy Google Chrome browser extension called EXIF Viewer which is also handy for finding out details of photographs you see online that have intact EXIF data. It generates a histogram even if there isn't any EXIF data in the image file, so it's good for seeing how various images you come across look in terms of the histogram. 

The histogram used in the diagram was generated using another handy and free Chrome extension call Image Histogram.

Comments

 

 


fb.com/PentaxForums PentaxForums +Pentax Forums @PentaxForums News | Reviews | Forum

Support Pentax Forums Pentax direct from Ricoh USA Support Pentax Forums