What is a Histogram and how to use it?

54 likes

A histogram: you might have heard of this weird nerdy word thrown in by photographers. While it might sound like a shady social media platform, it’s an essential tool to learn and master if you want to have full control on your images.

Picture this: It’s summer and you are taking outdoor photos under the harsh sunlight. You try to look at your images on the LCD screen but because of the bright light, you can hardly see anything. You arrive home, offload your images on your computer and realize that all your photos are either overexposed or underexposed. <insert cursing here>
How you can judge the exposure of your images when you can’t even see the LCD screen, without having to buy expensive add-ons for your camera?

Answer: You check the histogram.

1- So what is a Histogram?

To put it very simply, a histogram is a visual representation of the light and dark pixels in your photo.
Imagine a guy with a sever case of OCD who rips apart your image and aligns on a graph every single pixel from the darkest one to the brightest one. There, you’ve got a histogram.

Side note: There are actually 2 types of histograms: Luminosity and Color. For this tutorial, I am focusing on the luminosity instead of the color. Both work the same way but the color histogram gives more information on each of the color channels.

2- How to read a Histogram:

The histogram makes it really easy to understand how ‘light’ is distributed in your image. If you don’t know how to access it on your camera, read the manual. It’s important.

The left side of the graph represents the shadows, The middle part of the graph represents the midtones and the right side represents the highlights. The closer to the left edge the pixels are, the darker they are, and the closer they are to the right side, the brighter they are.

In the graph above, we can assume that we have a nicely exposed image, with lots of pixels in the midtones, not too many dark shadows, and very few highlights. In an ideal shot, the histogram should cover the whole graph from edge to edge. This means that you are covering a wide tonal range which makes it easier to work on images.

Sometimes, there are many pixels that are pressed against the very left or very right edges of the graph. This is called “clipping” and is something you should try to avoid, since it means that those pixels are either pure black or pure white and contain no information, making them unrecoverable during post-processing. Keep in mind that sometimes clipped highlights are unavoidable, especially when you have the sun in your image :)

3- How to understand the Histogram:

If you’ve ever heard a “pro photographer” friend say that the ideal histogram is “bell shaped”. My advice is to stay away from that friend.

There is no ideal shape of a histogram. All images are different. They capture various moods or type of light so the resulting shape will be different. I did mention earlier that the ideal histogram would cover the graph from edge to edge, but I didn’t talk about the shape. I’ll illustrate this point with some examples:

“Bell-shaped” histogram:

A bell-shaped histogram has few shadows, few highlights and a lot of mid-tones. I purposefully decreased the contrast in the below image just to illustrate how it looks with this type of histogram. There might be a lot of information in the midtones but there aren’t any dark shadows and bright highlights.

Low-key histogram:

A low-key image is an image with a lot of shadow and very few highlights. The image of the monk below is basically all black, except for the candles and the monk. The histogram is pushed towards the left because of all the black area and since there aren’t many highlights, there’s almost no information on the right side of the graph. Of course, this doesn’t make it a “failed image” because of the shape of the histogram. Note that the shadows are clipped in this image (sticking to the very left side). This is a case where clipping doesn’t matter, because the surrounding is supposed to be entirely black. It all depends on the image.

High-key histogram:

A high-key image is the opposite of a low-key. There are plenty of highlights (bright image) and few shadows. In the image below, you can see that the entire image is bright and there are no dark parts. The histogram is pushed to the right and there’s very little information on the left side (mainly the darker leaves).

High-Contrast histogram:

In the image below, there are almost no midtones. It’s all either very dark (sky) or very bright (marble tiles). The histogram illustrates the lack of information in the midtones. There are almost no spikes in the middle part and everything is pushed to the sides.

Low-contrast histogram:

Just to illustrate the opposite of the image above, the landscape shot below lacks contrast. There are no shadows and no highlights. This is why we see gaps on both sides of the graph because there are no pixels to be found, giving the image a soft feel. Again, this is a case where not covering the entire histogram from edge to edge works, it depends on the mood of the image.

4- How to fix an image by looking at the Histogram:

So now that you’ve seen the examples above, you might have an idea of how your image is going to look according to the histogram. If you find yourself unable to see the image on your LCD, check the histogram instead (actually, just get into the habit of always checking the histogram, it’s much better).

First, think about the mood you want to capture. then check the histogram to see how the image turned out. Try not to rely too much on the LCD preview.
Is the graph pressed on the left side? Your image is underexposed.
Is the graph pressed on the right side? Your image is overexposed.
Is the graph centered with gaps on both sides? You have no contrast in your image.

However, the main reason you’d want to check the histogram is to avoid clipping. you don’t want to lose details in your images so make sure your histogram doesn’t have spikes pressed against the edges of the graph.
Another way to preview clippings on your image is to turn on the “clipping warning” on your camera, if you have that option. This will make the lost details blink on your LCD.

To get the best exposure possible checking the histogram, here’s a little trick that many people don’t know:

Do you see those faint vertical lines on the histogram? These are not to make it all pretty. Each line represents a “stop”, so you can change your settings accordingly.
In the example above, you can still underexpose (or overexpose) by half a stop before clipping your image. (If you don’t know what a stop is, another tutorial is scheduled to explain that too). Always try to have the maximum coverage from left to right on your histogram, don’t worry about the shape.

I hope this makes it a little easier to understand how a histogram works and how to use it to understand your images. Please don’t hesitate to ask questions and feel free to share/pin this tutorial if you liked it. If you want more tips and tutorials about editing or photography in general, check out my Tutorials section.

[…] so much amazing stuff on the internet to do with photography lately. I loved this description of a histogram (hint: nothing to do with hayfever. Are you sick of my hints, yet?) and how to use it by an […]

[…] so much amazing stuff on the internet to do with photography lately. I loved this description of a histogram (hint: nothing to do with hayfever. Are you sick of my hints, yet?) and how to use it by an […]

thank you so much! THANK YOU for including so many examples, I have been trying and trying to figure out how to remove the background for jewelry pictures. I made a really good lightbox and adjusted the white balance and all that but it is still not enough. I have watched a MILLION tutorials, all different methods, and none of them were exactly right. ESPECIALLY for what happens when it is a really light-colored piece of jewelry, so thanks for including the all white one! Paths doesn’t cut it, fuzzy select, intelligent scissors and color select don’t remotely cut it.… Read more »

[…] The first thing we need to do is analyze the photo and figure out what needs to be improved. I shot this on a tripod with a wide angle (28mm). The sky was very bright, and the whole foreground was in the shade. So obviously, the foreground is way too dark and the sky is fairly exposed. If we quickly check the histogram of this image, we can see that we don’t have any lost details or clipping (if you don’t know how to read a histogram, I wrote a tutorial about it). […]