The Histogram is Just Data

I don’t mean to be insulting, but I cannot understand when people look at histograms as some magical, mysterious, and intimidating technical artifact. It is not. It is just data about what our sensor is seeing. The histogram is just data, and it is useful. Use it. Do not be afraid of it.

Trigger

A newsletter I received today triggered this semi-rant. But looking back, I see it has been over 3 years since I wrote about histograms, so it is probably time to revisit the subject. This actually is a subject I feel some passion for and believe it needs to be better understood by photographers.

The newsletter author declared that our histograms lie. I realize that click-bait is commonly used to try to get people to read articles, but I still feel it is being somewhat underhanded. Now, in fairness, the newsletter author made some valid points – except for the part about histograms lying.

What is a histogram?

We see this graph of some data and maybe it does look complex and mysterious if you are not used to working with data and don’t know where the data comes from. Let’s get over that by understanding how simple but effective it is.

By convention we play like our cameras measure light in a range of 0 to 255. There are no units: 0 represents black and 255 is pure white. The convention came from the history of early digital cameras. It is obsolete today, but still used. That is a topic for another day.

So there are 256 possible values of brightness (0-255). If we go through and count the number of pixels of each value – the number of pixels in the image that have value 0, the number of pixels in the image that have value 1, etc. – and put them on a graph, we have a histogram.

Here is a simple example:

Again, black is on the left going to white on the right. Even without me showing the actual image, we can see that there is a “bump” of dark values on the left and a larger hill of bright values on the right. In between is a relatively low and even count.

What can we learn from this? It is a black & white image, because there is no separate data for red, green and blue. There is high contrast because of the hills at the dark and bright ends. It is bright but not overexposed. There are deep blacks, but not enough to have lost important information. So, even without seeing the image, we can tell a lot about it. Is the image exposed “correctly”? Ah, that is the question my rant is based on.

This is why histograms are useful. They are useful data about our image. It gives simple information to help us understand our exposure better.

Benefit

Today’s mirrorless cameras bring us the amazing benefit of real-time histograms. We can select to see the histogram live in our viewfinder or on the display on the back.

What is the benefit? We see an immediate graphical view of the exposure the camera is determining. In the example above, we can see that the light tones are very bright, but not overexposed.

I routinely use it to watch for “clipping” of brights or darks. If there is a large hump of data jammed up against the left or right edge, that is probably a problem. I will often choose to override the camera’s exposure determination to avoid these peaks.

Again using the example above and knowing that my camera was in aperture priority mode, we see that it chose 1/750 second as the shutter speed. That works OK in this case, but if I did not agree, I would have easily used the exposure compensation dial to adjust the exposure. I do this a lot.

So the histogram is a quick and easy to get a feeling for the “shape” of the exposure.

They don’t lie

Now coming to the basis of my rant: histograms do not lie (actually, they do; I will say how later and why it doesn’t matter).

The newsletter author gave the example of a picture of some fruit on a dark table with a black background. She said the histogram lied because the camera did not give the exposure she wanted. It tried to make the whole image evenly exposed.

No, the histogram is just a straightforward measurement of the data. If you take your temperature but don’t like the reading you get, it is silly to say the thermometer lied.

What the author was describing was that she wanted to expose to have the same look as the scene she saw. This was a case of disagreeing with the camera’s matrix metering calculation. It was doing it’s job of trying to capture all the data that was there and preventing blown out blacks. But she decided to use exposure compensation to force the camera to expose the scene the way she wanted.

The histogram did not lie. As a matter of fact, she relied on it to do her exposure compensation values. She used the histogram to determine how to override the camera exposure calculation.

Actually, I would have used the camera’s original exposure determination. I like to have all the data available to work with. This is called exposing to the right. Bringing the brightness down in post processing to the level she wanted is simple, non-destructive, and does not add noise. Capturing the compensated image the way she wanted irreversibly crunches the blacks.

They lie

I said they don’t lie, but they do a little. For speed and efficiency the histogram is derived from the jpg preview of the image. Same as the preview shown in the viewfinder or camera back. If you study jpg processing you will see that it alters and discards a lot of information to give a good perceptual result.

So the histogram is not actually looking directly at the literal RAW data from the sensor. But there is little observable discrepancy. On my camera, I find that it exaggerates the highlight values very slightly. Still, I typically back the exposure off to avoid highlight clipping, so it adds a little conservatism into the process.

Trust the data you see. It is good enough.

They’re not the photographer

The histogram gives you data. It does not determine exposure. People talk about “good” or “bad” histograms. This is a misunderstanding. There are no absolute good or bad ones. What counts is did you get the exposure you wanted.

There are valid artistic reasons for shooting what some people would consider bad histograms. If it is what the artist wants, it is correct.

Histograms give us a reading of the exposure. They do not determine what is right. It gives some insight on what the automatic exposure calculation in the camera is trying to do.

Use it

The histogram is a brilliantly simple and wonderfully useful tool. We are lucky to have real-time histograms available to us now. It is a game changer. But it is just data. Do not be afraid of it.

The histogram does not lie. But it does not automatically ensure that the exposure is exactly what you want. You have to sometimes take change and override the camera settings. When you do, the histogram is there showing you the result of your decisions.

It is not magical or mysterious. It is a great tool. Use it. A craftsman know how to use his tools.

Leave a Reply

Your email address will not be published. Required fields are marked *