Histogram: How To Visually Extract and Interpret Data

minutes read

If you have minimum to no clue about what histogram is, this article is perfect for you!

Histogram, in my opinion, is one of the best inventions that came together with digital photography. The little graph appears in the LCD screen on the back of the camera tells you everything you need to know about the exposure and the quality of light your image has captured.

histogram in photography

It gives you feedback in almost real time so you can change the settings in you camera and re-shoot the image until you are satisfied.

But wait, there’s more!

Histogram can also guide you in post-processing. It tells you whether you have processed your images too bright, too dark, whether there is posterization, etc.

Mastering histogram is almost as important as mastering the exposure triangle!

But here’s the issue...

Not everyone pays attention to it when shooting or editing, which I think is a huge mistake! For those who tried, many complained it’s too complicated to understand.

Today, I'm going to crack the histogram code for you! In this article, you’re going to learn:

  • 1
    The anatomy of a histogram
  • 2
    How to visually extract data from a histogram
  • 3
    How to use it to guide post-processing
  • 4
    Case studies - put everything into practice!

Now, let’s start with some basics.

**If you want more in-depth tutorial on histogram, the links are at the end of this article.**

The Anatomy of A Histogram

If you find it challenging to understand histogram, it’s likely because you don’t know what each component of the chart means.

To help you with that, I’m going to break it down for you. After this, when you look at a histogram again, you’ll know where to look at and able to visually extract the information almost instantly.

So, let’s break it down into its axes and the graph itself!

The Axes

I used to have a hard time remembering which is the Y-axis and which is the X-axis. If you are as confused as I did before, here’s a little hack I did to remember which is which.

This hack requires you to visualize. Since there are only two axes, you only need to remember one in order to know the other one.

histogram axes

Here it goes:

Y-axis is the vertical axis. Why? Because Y has a long vertical tail! I know it sounds really silly...but hey, whatever that helps me (and you) to remember!

Now that you know which is X and Y, so what? What do these actually mean?

X-axis represents tonal range with values from 0 to 255. When you look at the axis, 0 is on the far left because it represents pure black (0 has no tonal value). On the other end is 255 where it represents pure white (255 is the maximum value).

Y-axis is pixel count - the number of pixels on each point of the tonal range. There isn’t a scale on it and the value is arbitrary.

The Graph

histogram graph

When you plot the number of pixels for each tonal value along the axes, you’ll get multiple dots. If you join these dots together sequentially, it forms a line with multiple spikes on it. That’s essentially how the histogram looks like!

Taking this further, let’s draw several vertical lines to divide the histogram into five different tonal zones.

The Five Tonal Zones

Starting from the left to the right, these zones are: blacks, shadows, midtones, highlights and whites. As you may have already guessed, these correspond to the tonal range from 0 to 255.

But what is the difference between blacks and shadows or highlights and whites? Let’s check out each zone one by one:

histogram tonal zones

A: Blacks - These are pure black with no details captured in it (a.k.a. clipping). If you brighten it up, you’re only going to see more image noise. It also has a very narrow tonal range which sits towards the far left of the histogram. When a histogram touches the far left of the chart (tonal range of 0), this means shadows clipping has occurred in the image.

B: Shadows - Without looking at the histogram, it’s easy to confused shadows with blacks particularly the darker shadows. It has a slightly wider tonal range compared to blacks. Shadows contain some details and can be brightened to certain extent. Gone too far and image noise starts to appear in those areas.

C: Midtones - It has the widest tonal range and is where the majority of the pixels fall under. You can stretch it, shift it either way and tones will likely to remain safe.

D: Highlights - Has a similar characteristic as shadows. It’s the brighter part of the image with visible details to certain extent. Adjust cautiously as you can easily push it to the far right of the histogram towards clipping.

E: Whites - Has a similar characteristic as blacks. It’s pure white with no details in it. When the histogram touches the far right, it means details in the brightest brights are clipped.

Now, let's put everything you have learned so far into context!

The histogram above actually belongs to this image below. The red arrows is pointing at the corresponding part of the image from its histogram.

histogram on image

Histogram Pattern Recognition

Apart from providing you the information on exposure, histogram also gives you visual clues on the quality of the captured light.

What does it mean by that?

For example, you can tell by just looking at the histogram whether the image has good or low contrast, if there is any color cast or posterization, etc.

How?

Pattern recognition.

Once you have seen the pattern, you’ll be able to spot it the next time you see it again! So, let’s check out some examples.

1. Contrast

low contrast histogram

Low contrast

high contrast histogram

High contrast

Contrast is the difference between tones. An image with good contrast pops almost instantly and one with low contrast often looks washed out.

With that in mind, you would expect to see pixels present in both darker and brighter zones of the histogram in images with good contrast. Conversely, if the contrast is poor, you’ll see pixels scattered around the midtones only.

A high contrast image has a distinct look where the histogram is stretched to both ends (but without touching the far left or the right). A low contrast image, on the other hand, has its histogram concentrating in the middle.

2. High Dynamic Range

high dynamic range histogram

I called this the "U" shaped histogram or the "smiley face"

For those of you who does HDR photography, histogram should be your best friend!

HDR photography has a bad reputation because people do it for the wrong reasons. In my opinion, you should only do HDR if your camera failed to capture the full dynamic range of the scene in a single exposure.

How do you know that?

By looking at the histogram!

A high dynamic range scene is essentially a high contrast scene. When you look at the histogram, you should see the graph stretched into both directions. The main difference between a high contrast scene (as explained above) and a high dynamic range scene is that the latter has one or both ends of the graph hitting the far left and the far right of the histogram.

This essentially means both the highlights and the shadows are clipped (or nearly clipped). You will not be able to recover much details in these areas. One of the options you have is to bracket exposure and combine them later in post-processing to create an HDR image.

3. Color Cast

color cast histogram

Color histogram shows blue and green color cast

Depending on what image editing software you use, you may or may not have color histogram. The principles are exactly the same as the conventional luminance histogram, except the histogram for each individual RGB channels are displayed separately or superimposed on each other.

One of the software with color histogram is Adobe Lightroom.

Although the graph looks complicated, the way you interpret is exactly the same. The advantage of color histogram is that you can see the distribution of the primary colors.

Spotting color cast is fairly simple. Look at the right side (highlights) of the histogram to see which of the color channel(s) is offset to the right. It can be a single or a combination of two colors.

For example, if you see blue color offsetting to the right side of the histogram, it means the image has a blue color cast. However, this doesn’t mean whether it's good or bad. The histogram is providing you with the information and it’s up to you the photographer to decide if you want to keep it or not!

4. Posterization

posterization

If this is the first time you have ever heard of posterization, you must be scratching your head right now!

...and thinking: “Poster? As in movie poster?!”

You know what...you’re absolutely right!

Just look at this famous artwork of Obama above. Yes, it does look artsy and I know you’re probably drawn to the different tones and colors on his face, right?

That’s basically the concept of posterization.

posterization histogram

Posterized image: histogram that looks like a comb

The terminology is explained very well by Cambridge in Colours: “The term posterization is used because it can influence your photo similar to how the colors may look in a mass-produced poster, where the print process uses a limited number of color inks.”

Posterization occurs when you stretch the histogram too much during tonal adjustment. The histogram of a posterized image has multiple spikes that make it looks like a comb.

How about the image? The effect is more visible in area where there is a smooth tonal gradation, such as the sky. When it’s posterized, the smooth transition from lighter to a darker tones becomes bands of colors.

posterized image with banding

Posterization in the foreground

Using Histogram To Guide Editing

Besides providing visual information on exposure, histogram can also guide you in image post-processing.

I used to judge how well an edited image looks on my computer screen. Later I realized it was a big mistake because the brightness of my computer screen changes constantly and therefore not objective and totally unreliable.

Then, I gradually started observing the histogram while applying adjustments at the same time. It’s interesting to see how different adjustments shift the histogram in different ways.

For example, if I want to make an image brighter, I can adjust Exposure or Whites. In regardless of what I choose, I watch the histogram as I move the adjustment slider until the graph is in the whites zone but without hitting the extreme right of the histogram to cause clipping.

This is particularly useful when I’m creating black and white images because I often want the image to have a complete full range of tones.

You can do the same for darkening the image without causing shadows clipping or increasing contrast without posterization. There are no rules on how you should use histogram to guide post-processing.

Personally, I don’t let histogram decide how my images look. An image with its histogram well within the borders doesn’t necessarily mean it's a good image. Ultimately, I look at my image and decide if I want certain adjustments more or less.

In a nutshell, I use histogram to guide me, not to decide how my images look for me.

Case Studies

In this section, I'm going to show you three scenarios with images and their histograms. Try and think at each step what you would do next.

Case 1:

Let's start with a nice and easy one!

This was taken at sunrise. The sun has just risen above the horizon and was behind the buildings on the left. The distant view in the centre was too bright and the foreground was just a little dark.

histogram showing bright highlights

The highlights are almost clipped

Looking at the histogram, you can see the pixels are distributed across the tonal range. This means there seems to be good contrast. There is a spike in the shadows which correspond to the dark foreground. On the right, there is another spike in the highlights/whites which correspond to the bright background in the image. If you brighten up the image globally, the highlights will definitely clip!

The questions is: how can you improve this image?

Don't over think! I told you we'll start off gently 🙂

We know the background is too bright as indicated on the histogram. This can be rectified by sliding Highlights to the left. As you do so, you can see the spike in highlights/whites moving to the left.

shadows and highlights adjustments

If you think the foreground is too dark, move Shadows to the right to open up the shadows just so slightly. Don't go overboard because the image will look unnatural and noise will start appearing.

after reducing highlights

After highlights and shadows adjustments

Case 2:

This is the view of the Hong Kong bay taken from the highest building in Hong Kong mainland. As you can imagine, shooting from a high vantage point through glass windows will inevitably cause light loss and haze in the image.

low contrast histogram

Low contrast with blue/green color cast

On first glance of the histogram, you can tell the contrast is pretty poor straight away! On the right side, you can also see the individual histogram for RGB isn't lined up. The blue and green seem to dominate the right, which means there is blue and green color cast.

Depending on how you interpret the image, you may decide to keep or remove the color cast as much as possible.

So, what can you do to improve this image?

Personally, I didn't do anything that was even remotely complicated. I increased Temperature to remove some of the color cast, stretch the histogram to gain more contrast by using a combination of Dehaze, Contrast and Clarity...and this is how the histogram (below) looks in the end:

low contrast improve with contrast, dehaze and clarity

After contrast and temperature adjustments

Case 3:

Ok, this is a tricky one.

highlights clipping histogram

Just before you scroll down to check out the histogram. This was taken at sunset, a typical situation where there is often a strong contrast between the background and the foreground. When you check out the histogram you see this:

Any ideas?

The graph has hit the far right of the histogram. The shadows are doing ok, but it's in the shadows/blacks zone - which means you shouldn't brighten it too much.

With such high pixel count in the far right, even if you slide the Highlights adjustment all the way down, you wouldn't be able to recover any details. The highlights are essentially clipped (or blown out)!

One way to overcome this problem is to bracket exposure, i.e. shoot for HDR.

Make It Part of Your Workflow

Histogram is severely underrated!

It exists in almost every digital camera and image editing software but most people don’t pay attention to it. I used to get annoyed when I accidentally switched it on trying to view the image I’ve just taken on the LCD screen of my camera!

At this point, I hope you agree with me that mastering histogram is just as important as mastering the exposure triangle! In fact, histogram is actually easier to understand than the inter-relationship between shutter speed, aperture and ISO.

There are so much valuable information contained in this little graph. Histogram is very visual. Once you know it, it only takes a few seconds to extract the information you need by simply glancing at it!

When you start to use it as part of your routine, I guarantee you will notice an improvement in the quality of your photos!

Want To Dig In More?

Are you all fired up now?

If you want to know more about histogram (yes, there are a lot more about this little graph!), here are some other tutorials to help you.

You can also check out my ebook - Dissecting Histogram: Un Unwritten Manual. Access it under Courses in the top menu.

For more tutorials on image editing technique, please check out the editing technique resource page!


dissecting histogram photography ebook



Related Posts

How to Accentuate or Add Drama and Mood in Editing

How to Accentuate or Add Drama and Mood in Editing

Color Analysis for Photographers: The Essential Guide

Color Analysis for Photographers: The Essential Guide

Focus Stacking: How To Create Front-To-Back Sharpness In Your Image

Focus Stacking: How To Create Front-To-Back Sharpness In Your Image

How To Add Image Depth With Saturation and Lightness

How To Add Image Depth With Saturation and Lightness

Yaopey


  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
    >