BW-MCE-0202201801-I000 - A Sample Histogram - Unit Sales - Version 00

BW-MCE-0202201801-I000 – A Sample Histogram – Unit Sales – Version 00

Series Introduction:

As an instructor of both photography and post-processing courses, I am often surprised by the number of people who are not aware that these products offer histograms for judging exposure accurately. I am even more shocked by the number of people who do not understand the contents of the graph that is the histogram or how to interpret it regarding the associated image.

This article, the first in a series on the histogram, introduces the reader to the structure of the histogram and the ways that it can be used to achieve better results, both in the field and at the computer.

Before we dive in too far here, let’s establish a starting point. Let’s first make sure that for every camera and editing application that we are using, that we can see the histogram. For your actual camera that may mean finding the histogram somewhere in the camera’s menu system and making sure that it is turned on (the camera’s manual, you have read that right, comes in extremely handy here). In whatever editing application you are using, make sure you know where the histogram is displayed and then be sure you know what histogram features are available in that application’s histogram display.

As we progress forward through this series, being able to accurately and efficiently view your histogram will significantly help in understanding the concepts discussed herein, and more importantly, improve the quality of your images, both pre and post shoot.

BW-MCE-0202201801-I007 - This sample image was used to generate the RAW Digger Histogram

BW-MCE-0202201801-I007 – This sample image was used to generate the RAW Digger Histogram

The series will be broken down as follows, from our starting point here in Article One:

  • Article One: Shooting In The Dark, Introducing the Histogram
  • Article Two: Conquer The Light Around You, The Histogram On The Camera
  • Article Three: After The Fact, The Histogram In Post-Production
  • Article Four: Simply Elegant, The Histogram In Lightroom
  • Article Five: One Tool With Many Faces, The Histogram In Photoshop
  • Article Six: Advanced Views, The Histogram’s Many Hidden Treasures

Getting Started:

Okay, now let’s dive in. So I was lamenting the fact that many people we unaware of either the histogram’s existence, or it’s proper interpretation in diagnosing exposure quality for an image. For many of you, hearing the previous sentence, your reaction may have been “so what, that’s what I use my preview screen for.” Sadly this is the case for many, and even sadder it is creating some awful results.

I am going to make a statement here: You should never use your preview screen for determining if your exposure is correct. Your preview screen is for deciding did you want that telephone pole coming out of that guy’s head or not. If you use your preview screen for determining exposure, you are seeing a lie. Why you ask? Well, it’s all about the ambient light around you, either surrounding your camera as you are shooting, or filling the room where you are editing.

A simple analogy here, watch a movie, at the movie theater, with the house lights on. I can see you cringing already, and I know why. The thought of watching a movie, with the house lights on, is not so appealing. The screen is washed out, the colors not vivid, and the subtle details lost. Well, guess what, the same thing is happening to your image when viewed with copious amounts of surrounding light. And if you think about it, the image on the screen hasn’t changed, just the light around it. While this is happening around you, you are making shooting and editing decisions, especially in regards to exposure, which are just wrong.

Start taking pictures in a dark place, and the problem compounds itself. Imagine shooting a band in a nightclub, or street photography at dusk. The ambient light around you has begun to fade and all of the sudden your preview screen images look brightly exposed, saturated with color and chock full of texture and details. If you rely on your preview screen, as the judge of exposure quality, then you are going to be sorely disappointed later on.

Okay, so hopefully I have convinced you that the preview screen is for composition and the histogram display is for judging exposure. Let’s leave that assumption and what to do about it alone until the next article, where we will discuss shooting using your histogram. For right now let’s talk about what the histogram is and how we should be interpreting the data contained within it.

What Is A Histogram:

In order to understand the data in a photographic histogram, we need to understand generically what a histogram is and what does the graph displayed therein actually mean. Histograms have been around for much longer than digital photography has, and their construction is quite simple. The definition of any histogram is “An accurate representation of the distribution of numerical data.” Specifically the distribution of that numerical data into segments or classes. Let’s take that definition and start with a simple example, a graph comparing sales people.

Assume we have the following salespeople, and each of them has sold a number of units (we don’t care what they are selling, just how many):

Salesperson Unit Sales
 Adams, Fred 25
Aiken, Sarah 32
Alsace, Rubio 18
Bell, Lilly 19
Canon, Terry 34
Darch, Phillip 65
Fowler, Shelly 48
Lindgren, Emmelie 56
Luci, Antonio 78
McDermott, Christine 62
Mott, Adam 71
Pickett, Jane 62
Reader, Nicole 49
Rice, Ted 52
Saltiel, Len 38
Smith, Rob 33
Smith, Stephanie 82
Taylor, Sylvia 71
Thomas, Michael 66
Wilkinson, Todd 65
Zanger, Suzy 31

We would expect to see a sales graph that looks like the one we see here:

BW-MCE-0202201801-I001 - A Sample Histogram - Unit Sales - Version 01

BW-MCE-0202201801-I001 – A Sample Histogram – Unit Sales – Version 01

If we think back to the definition of the histogram, we see that the unit sales figures for each salesperson provide the numerical data points and the salesperson names end up being the segments or classes in the graph to which these data points belong. The order of the segments, in this case, happens to be alphabetical, but it could just as readily be random.

We should make a couple of other observations while we are at this point in the discussion. The y-axis of the histogram (the vertical axis of the histogram) derives it scale from the numerical data points recorded. In this case, it’s the unit sales figures that are driving the scale of the y-axis. And again, in this case, it’s the 82 units that Stephanie Smith sold, that is forming the upper limit of that axis.

Let’s change our units sales figures a bit and observe the resulting changes in the histogram:

Salesperson Unit Sales
 Adams, Fred 225
Aiken, Sarah 332
Alsace, Rubio 415
Bell, Lilly 519
Canon, Terry 634
Darch, Phillip 565
Fowler, Shelly 448
Lindgren, Emmelie 556
Luci, Antonio 887
McDermott, Christine 462
Mott, Adam 571
Pickett, Jane 362
Reader, Nicole 449
Rice, Ted 452
Saltiel, Len 538
Smith, Rob 635
Smith, Stephanie 482
Taylor, Sylvia 471
Thomas, Michael 366
Wilkinson, Todd 465
Zanger, Suzy 431

With these new sales figures in place we now see a histogram like the one that we see here:

BW-MCE-0202201801-I002 - A Sample Histogram - Unit Sales - Version 02

BW-MCE-0202201801-I002 – A Sample Histogram – Unit Sales – Version 02

Not much in the way of new and exciting information here, yet it is still a bit insightful. Even though we have the same segments (salesperson names) as before, we can readily see that the y-axis (the vertical axis) has changed. It has rescaled itself to accommodate the increased size of the numeric data points, much the same that an image histogram would update its scale to accommodate a shift in tonal values.

Let’s make this example of rescaling a bit more extreme and use the sales figures that you see next to generate a new histogram. Now clearly this indicates a problem with your sales team, but we are not here to fix that issue:

Salesperson Unit Sales
 Adams, Fred 0
Aiken, Sarah 0
Alsace, Rubio 0
Bell, Lilly 0
Canon, Terry 0
Darch, Phillip 0
Fowler, Shelly 0
Lindgren, Emmelie 0
Luci, Antonio 0
McDermott, Christine 12000000
Mott, Adam 0
Pickett, Jane 0
Reader, Nicole 0
Rice, Ted 0
Saltiel, Len 0
Smith, Rob 0
Smith, Stephanie 0
Taylor, Sylvia 0
Thomas, Michael 0
Wilkinson, Todd 0
Zanger, Suzy 0

Not unexpectedly we would get a histogram that looks like the one we see here:

BW-MCE-0202201801-I003 - A Sample Histogram - Unit Sales - Version 03

BW-MCE-0202201801-I003 – A Sample Histogram – Unit Sales – Version 03

Once again, the y-axis of the histogram is adjusted to match the peak of the numerical unit sales data provided, and we would expect the same results in an image histogram if the tonal data in the scene were distributed in the same manner. In other words, if the scene had all of its data in one, or at least very few segments, we would expect a histogram that showed exactly that. It may be hard to imagine that at the moment, but let’s take this a little further, and I think that will start to make sense.

Why don’t we go ahead and leave our imaginary salesforce behind and begin to think of these histograms as representing images? For now, we are going to forsake the world of color and just think in terms of black and white. The great thing about working in black & white is that it simplifies the way we get to think about the data points. We only have to deal with shades of gray, and we consider both black and white as a shade of gray as well. In our first image histogram example, we are going to assume that we have a 5 megapixel (5,000,000 pixels) camera and that that camera only sees twenty-one (21) shades of gray. In the data table below, you can look at the shades of gray from black to white, with 5% grayscale increments in between. Giving us twenty-one (21) shades of gray to consider, or in histogram terms, twenty-one (21) segments to divide those 5,000,000 pixels into:

Grayscale Level Pixels At That Level
100% Grayscale 184225
95% Grayscale 185332
90% Grayscale 185414
85% Grayscale 196519
80% Grayscale 225565
75% Grayscale 226342
70% Grayscale 234448
65% Grayscale 233556
60% Grayscale 247887
55% Grayscale 246462
50% Grayscale 275571
45% Grayscale 285362
40% Grayscale 314463
35% Grayscale 343452
30% Grayscale 285530
25% Grayscale 256635
20% Grayscale 227482
15% Grayscale 236493
10% Grayscale 227366
5% Grayscale 196465
0% Grayscale 185431

Our new example histogram, shown here, has a lot more data points to deal with, but it is still merely placing those data points into the appropriate segment buckets (the grayscale percentages) and scaling the y-axis as needed:

BW-MCE-0202201801-I004 - A Sample Histogram - Unit Sales - Version 04

BW-MCE-0202201801-I004 – A Sample Histogram – Unit Sales – Version 04

At this point, knowing what you know about the construction of a histogram, it should be a little easier to visualize how image data is mapped into the graph. It is merely a pixel by pixel distribution of the data into the available segments. In other words, each pixel has a tonal level (in this case a grayscale percentage), with all the pixels at a specific tonal level added together and represented by a graph bar for that level.

Right now, there is probably a little bit of a disconnect in the conversation, especially if you have seen image histograms before and you are looking at the previous sample graphs. The thought, likely going through your head is “the histograms I have seen look more like an area graph.” Something similar to the example histogram that is displayed next:

BW-MCE-0202201801-I005 - A Sample Histogram - Unit Sales - Version 05

BW-MCE-0202201801-I005 – A Sample Histogram – Unit Sales – Version 05

Your observation is correct, your interpretation of that observation is not. The histogram, even an image histogram, is typically always constructed as a bar graph. We are not trying to show trending here, or connections between tonal levels. That would not convey the meaning of the data correctly at all. The difference between our examples and actual image histograms is simply the number of segments. Rather than twenty-one (21) grayscale levels, the typical digital SLR is working with 4096 tonal levels, or in easy to relate to numbers here, 4096 salespeople. Consider a histogram with that number of segments:

BW-MCE-0202201801-I006 - A Sample Histogram - Unit Sales - Version 06

BW-MCE-0202201801-I006 – A Sample Histogram – Unit Sales – Version 06

Now that looks more like what you might be used to seeing. Here we have a distribution of data across 4096 segments, the data points in each segment are being added up, and the bars that you see above indicate how much data is in each of the segments.

Well that wraps up our introduction to the histogram, at least the part of the introduction that gives you the background information on what they are. In our next article we will discuss how the histogram can be used to evaluate the exposure that created the graph. We will explore some myths about the typical image histogram. We will also explore the concept of mapping the scene as the camera saw it, to the histogram display you should expect as a result.