/ CAMERAS

Histograms are a bad product

I had to read six how-to pages from high-production-value sources to learn the key:

Another thing to mention: the histogram and blinkies are usually based on a JPEG rendition of your image. If you are shooting a raw file, your actual image will have a slightly greater dynamic range and, the clipping, if there is some, should be reduced. (B&H, “How to Read Your Camera’s Histogram”)

Before we get into why this means histograms are a bad product, let’s do some backstory. One shoots RAW for several key reasons. I won’t post them all here, but some of the key ones are:

  • Using 12- or 14-bit formats allows one to make dramatic brightness changes without introducing banding (quantization errors).
  • Using an un-tone-mapped format allows one to make contrast and brightness adjustments on an image that might otherwise have crushed blacks or blown highlights.
  • Using a pre-demosaiced format allows one to make dramatic white balance changes using different color-specific gains without introducing color shifts.

Fundamentally these are all brightness adjustments, either applied globally (“exposure”), selectively to luminance groups (“highlights”, “shadows”), or selectively to color groups (“red”, “blue”). The higher-bit-depth RAW formats let one make larger adjustments without introducing artifacts. Typical artifacts might be banding, blockiness, color shifts, bleeding colors, clipped colors, etc. That means anyone shooting RAW is inherently extremely concerned with brightness. Not in the sense of having the “desired brightness” in “the image” (because a RAW isn’t an image) “straight out of camera”, but rather with having all the data required to achieve the desired brightness in post-processing.

Wouldn’t it be incredibly annoying if the software in the camera designed to tell the photographer whether the data is there … Simply didn’t do that? Hm.

Here are how five of the six articles describe how to interpret the histogram.

a heavy concentration at the left side of the graph means the image is underexposed and you’ve lost detail in the shadow areas (Nikon)

components up against the right edge are saturated, with no gradation (Canon)

with absolute black on the left and absolute white on the right (Fujifilm)

Worst case: a tall line at the right edge of the histogram. The taller the line, the more highlight information you’ve lost. (Thom Hogan)

Spikes up the left or right edge of the histogram indicate “clipping” of that tone and a loss of detail in that area. (Digital Photography School)

These all suggest the user should change the exposure to move the image data away from the edges in order to eliminate clipping. But remember what B&H said at the top of this article: that the histogram is based on the JPEG, i.e. after all the exposure edits have been applied. If the “editor” (the camera) decided to throw out a stop of data at the top end, then it’ll show clipping where there is none – and if it decides that landscapes should be dark and contrasty and crushes a stop worth of shadows to black, then it’ll show more clipping where there is none in the RAW. If your histogram shows clipping, there isn’t necessarily clipping.

It does not fulfill the basic promise it claims – that it can be used to set the exposure – for the person who cares most that it’s correct. In my book, a product that fails to fulfill its primary promise to its primary user is a bad product, no matter how much “it’s a hard problem”-ing its creators do or how many tradeoffs to second priorities would have to exist.

(I think the histogram’s creator might argue it’s fulfilling its promise as long as, when there is clipping, the histogram shows it. If so, I’d argue they should change their documentation to narrow the product’s intended scope. I’d also somewhat snarkily compare it to how a Cessna 172’s fuel gauge is only required to read correctly when the tank is empty, and whose pilots have determined to ignore the gauge entirely as a result.)

Hilariously, although the explicit message is buried in the second-to-last paragraph of one B&H article, it’s implicitly scattered throughout every other article and in the product. For example:

  • Many claim the far right isn’t just “pure white” but actually 255, which refers to the maximum value of an 8-bit (JPEG, not RAW) format.
  • The histogram of the same scene changes if you choose a different tone-mapping option (e.g., Vivid, Flat, Portrait, Portra), which suggests it’s after tone-mapping (i.e., not RAW).
  • The histogram in Lightroom changes as you move sliders, which also suggests it’s computed after tone-mapping.
  • The articles describe the histogram in terms of images and post-processing choices such as “high-key” and “low-key”. RAW is not an image; it’s data. Data can only be an image after some interpretation from linear pre-demosaiced data to RGB24, and image data near the top of the sensor’s full well capacity can yield an image in which most pixels are very dark. This vaguely implies, again, that the histogram is based on the image, i.e. after JPEG processing.
  • Most photographers using DSLRs are JPEG-only shooters and the articles don’t specifically mention JPEG or RAW, so we should expect they’re written for JPEG-only shooters. For them, the articles are entirely accurate.
  • Articles use weenie words such as “may”, “might be”, and similar that make the articles technically true. These are techniques some authors use to obscure the truth but preserve a defense.
  • The histograms look low-resolution, which I chalked up to poor UI, but which I now realize is because they’re 256 bars wide, and that looks low-res on such a large screen on the back of the camera.

I only learned this when I purchased a new camera with slightly worse dynamic range and – afraid of blown highlights – I used the histogram religiously to avoid them. I often had to shoot at -2 to -4 EV, which was completely unlike my previous camera (often shot -1/3 to -1 EV) and exceeded the dynamic range difference I expected (~1/3 EV less capability). In editing, I had far more highlight detail than I needed, and I found the problem when I dug into just why I had underexposed so much. The net result was muddy, noisy shadows that I had to increase sometimes by 3 - 5 stops (the equivalent of ISO 100 to ISO 3200).

Also, at the top of the article, I lied. I found it not only in B&H’s article, but also in Wikipedia:

This is less useful when using a raw image format, as the dynamic range of the displayed image may only be an approximation to that in the raw file. [citation needed] (Wikipedia, “Image Histogram”)

It’s a hilarious soft-of-endorsement of this piece that some well-informed and perhaps equally-frustrated RAW shooter tried to add this note where they could, only for some less-informed one to find it hard to believe.

Thankfully, if you were to check that article now, you’d find it cited to the one article in six that cared to mention the limitation. Thanks, kind stranger?

isaac

Isaac Reynolds

I'm a Googler, product manager, pilot, photographer, videographer. I've been the lead product owner for Pixel Camera Software since its inception. I hold a BS in Computer Engineering from the University of Washington in Seattle, near my hometown. I live near Denver after escaping Mountain View during COVID-19.

Read More