9

Why don't cameras show a histogram based on the RAW data rather than on the JPG preview?

I know that a RAW file is not a viewable image and can't be displayed without applying curves and defining how the image should be interpreted. But why don't cameras show a histogram that accurately shows how much latitude I have in the image?

For example when shooting high contrast scenes (for example at sunrise) I know that I can overexpose the highlights to a certain extent to retain detail in the shadows and bring those areas that appear clipped in the JPG preview back in post.

But every camera I've worked with shows me the histogram based on the JPG preview and the picture style and tells me that those areas are clipped.

Is there no way of seeing the actual dynamic range captured by the sensor? Why does no camera manufacturer implement that? It shouldn't be too difficult.

  • 1
    I think this is covered here: what is UniWB?. Apart from why don't manufacturers apply this technique when you're shooting in raw? – MikeW Sep 4 '16 at 23:00
  • @MikeW That looks very interesting, thanks for the link! I really never heard of that. Still I'm wondering why camera manufactures don't implement that. They could apply those corrections to the histogram only so the preview of the image doesn't appear to have a colour bias. – Jannik Pitt Sep 4 '16 at 23:05
  • 1
13

Why don't cameras show a histogram based on the RAW data rather than on the JPG preview?

My notion is this: Because it would not be useful, because raw images don't yet have white balance in them, but the JPG images do have WB. For example, Daylight white balance will shift the red channel substantially higher, and the blue channel substantially lower. Incandescent white balance, the opposite. This is why we need to learn that red or yellow flowers probably get clipped in daylight. It could be your concern about headroom. So if concerned about clipping, we certainly need to know this more realistic final result. The JPG may not be precisely how raw will actually be adjusted later, but it offers a real good start on the histogram.

My image shows white balance Temperature and Tint action (from http://www.scantips.com/lights/whitebalance.html ). The spike at right end is a white balance card in the image, which a) is a white card, Not a red card, and b) should have equal RGB components.

Two things we do need to know about our histograms.

  1. Our RGB images are of course gamma encoded, and our histograms of course contain and show this gamma encoding in the data. Therefore, "midpoint" of our histogram data is NOT 128, but is instead about 3/4 scale around 73% at 186. This is variable, Not precisely 73%, because white balance and other camera adjustments can shift and affect it (WB and contrast or Vivid, etc). But one stop down from 255 is around 3/4 scale in the histogram (certainly NOT 50%). Gamma affects the data values, but does not affect the end points or clipping. But yes, white balance can affect clipping.

  2. Cameras often show both a single graph of grayscale luminosity, and also three RGB graphs. Only RGB is the real data (gamma encoded, but real data). Only RGB can show clipping. Because grayscale luminosity is only a math manipulation showing data that is NOT real, converted data that does not exist (unless you properly convert to grayscale). http://www.scantips.com/lights/histograms.html

  • 4
    Interesting take. This invalidates the whole UniWB idea. There's no use knowing that the red channel isn't clipped under UniWB, if you will change it to sunny in post anyway. – ths Sep 5 '16 at 8:58
  • The JPEG histogram is better for people who are happy with the AWB, camera selected target color space (sRGB) and the way how the manufacturers software auto converts the image to 8 bit RGB. It is not so great for people who tweak WB, mid tones, contrast etc. in the editor in every picture and print on large gamut printers. – MirekE Sep 5 '16 at 16:04
  • 1
    The WB clipping animation is interesting, but I suspect that you can revert the clipping by lowering the Exposure slider and compensating the lightness with curves, midtones and other ACR tools. – MirekE Sep 5 '16 at 16:15
  • 2
    Sure, less exposure is lower data values, but you cannot judge WB in raw data. The point is, WB changes things. Why wouldn't we want to know what it does? – WayneF Sep 5 '16 at 16:29
  • That's why i have saturation and contrast turned way down, so the preview will encompass the maximum range. – ths Sep 5 '16 at 18:57
2

Just a guess, but I'd assume camera companies use the JPEG preview for the viewfinder rather than the full RAW data because they probably feel you'd prefer having instant/live feedback when viewing images, rather than waiting for the camera's ARM-based processor to chew through the full 24MB to 50MB images' worth of data in the RAW files to come up with histograms and blinkies. And what you get off the JPEG preview is typically "good enough."

It's probably a lot faster (not to mention simpler) to use the JPEG preview because it's already available for viewfinder display and already cached for display, rather than requiring a lot of data read/writes from the card (which would further slow down getting you that final histogram).

Even Magic Lantern's RAW histogram feature doesn't actually use the full data of the RAW capture, but the RAW data from the much lower resolution video feed.

1

Why don't cameras show a histogram based on the RAW data rather than on the JPG preview?

If you shoot raw and know what you do, raw histogram is a great thing to have. But if you don't, JPEG histogram is a better approximation of what you get and less confusing for the end user, because further clipping may occur during processing.

If you use programs like RawDigger, you probably noticed that displaying raw histogram in one way may not be enough, so complexity of the implementation may be another reason why we don't see raw histograms in cameras very often.

But every camera I've worked with shows me the histogram based on the JPG preview and the picture style and tells me that those areas are clipped.

Is there no way of seeing the actual dynamic range captured by the sensor? Why does no camera manufacturer implement that? It shouldn't be too difficult.

Some Leica models have raw histogram or approximation of thereof. Magic Lantern hacks for Canon firmware apparently show raw histogram as well.

  • Yeah but I don't see a reason why there's no feature that shows me when my highlights truly clip. Of course you can look at the zebra or the RAW histogram and both will tell you that the whites are clipping when in reality you can pull that back in the RAW file. I have an old Rebel camera lying around I'll try out how the RAW feature of magic lantern works. – Jannik Pitt Sep 5 '16 at 16:01
  • 1
    If it is in the raw, it means it can be salvaged, but it does not mean it actually will be. That can possibly be the reason you don't see it on most cameras. – MirekE Sep 5 '16 at 16:08
  • I wouldn't say your "salvaging" the highlights when pulling them back in the RAW converter. When importing the image the converter applies a curve and interprets the image a certain way. But the image it comes up with isn't the "original version" and any changes you make only modify that version. Your not actually salvaging the file or making changes, you just interpret the RAW data a certain way. – Jannik Pitt Sep 5 '16 at 19:35
  • Yes, "pulled back" is a better term. – MirekE Sep 5 '16 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.