An artists journey

The Histogram is Just Data

Spanish moss and cyprus

I cannot understand when people look at histograms as some magical, mysterious, and intimidating technology. 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

I received a newsletter that triggered this. Histograms are a subject I feel some passion for and believe they need to be better understood by photographers.

What got my attention was that 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

.High contrast but well controlled histogram.© Ed Schlotzhauer

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 what the data is telling us. Let’s get over that by understanding how simple but effective it is.

A histogram is a measure of our image. It is a quick to read summary of the brightness values our sensor is seeing. But it is just an indirect measure, like taking our temperature is a measure of our health. The thermometer reading gives us some general feedback on our health, but does not specifically tell us whether or not we are healthy or why.

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.

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 that data on a bar graph, we have a histogram.

An analysis

Here is a simple example:

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 fairly high contrast because of the hills at the dark and bright ends and relatively low values in between. 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 the histogram for this next image. Review the histogram description while looking at the image.

Grass behind scrollwork on a bench.© Ed Schlotzhauer

This is why histograms are useful. They are useful summary data about our image. It gives simple information to help us understand our exposure better. But it is just information for the photographer. It is never good or bad in itself.

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 indication of the brightness range the camera is seeing. 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 may be a problem. I will often choose to override the camera’s exposure determination to avoid these peaks.

Again, using the example above I agree that the overall exposure is OK with me. 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. Or, I could use manual exposure to freely set the exposure to anything.

With experience, we automatically get a lot valuable information from the “shape” of the exposure as seen in the histogram.

Antique Packard hood ornament© Ed Schlotzhauer

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 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 its 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 set her exposure compensation values. She used the histogram and her experience to override the camera and force it to underexpose the scene.

Personally, 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. There would be little or no data in those areas.

Tunnel through the mountains©Ed Schlotzhauer

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. This is 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 derived directly from 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. If the histogram has significant data far to the right, I typically back the exposure off to avoid highlight clipping. The fact that the data comes from the jpg preview 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.

My typical workflow is to use the histogram to capture the maximum data I can in the frame. Final exposure settings will be done in post processing. Having all the data gives me more flexibility.

Sunset on the plains, two trees©Ed Schlotzhauer

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 sometimes must 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 knows how to use his tools.

Comments

Leave a Reply

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