Your camera lies to you. Possibly quite a lot.

sk66

Advertiser
Messages
8,712
Name
Steven
Edit My Images
Yes
A while ago I started questioning "why" there is "extra headroom" in a raw file that is not displayed on the camera. I knew that *all* histograms are based on a 0-255 scale for the sake of simplicity/consistency, but that's irrelevant...it's just a scale within which to define things.
I knew that the camera preview/histograms are based upon the thumbnail which is sRGB and that will have some effect on the histograms as opposed to a wider color space. But that shouldn't significantly affect the ability to interpret/define 0-0-0 or 255-255-255.

So I ran a test. I used an image borrowed from Cambridge in Color designed to push histograms. (note that the article itself is outdated and "wrong" in relation to current cameras)

I took a picture of the test image in raw with the camera's jpeg settings set to most accurately represent the displayed image.

Here are the histograms as they appeared on the camera. (the stripes are due to photographing a screen with a low refresh rate)
CameraHistograms.jpg


And here they are as they appear in PS (no edits performed, sRGB color space, LR looks similar).
PhotoshopHistograms.jpg


There are huge discrepancies between them. And the camera luminance histogram looks more like a stack-up of the RGB histograms than an actual luminance histogram.

Some conclusions I came to.
The thumbnail may actually be optimized for the cameras display and only have 256 colors.
That some "perceptual bias" is being applied to the RGB curves based upon their percentage of contribution to the "percieved exposure." (30/59/11, RGB)
And that the REI (recommended slight underexposure) may also be being applied.

What this amounts to is the camera histograms are not "true" at all. They are "an interpretation" of the data displayed in accordance with what the manufacturer recommends you should do.

This is not just a Nikon thing (although Nikon does give a "disclaimer" for it). Canon's have similar issues. In fact, Canon's may be worse because at least some will report a color/highlight clipped if any of the levels hit ~250 instead of 255.
(Here's a link to similar Canon Specific 5D tests. Item 9)

I'm not an ETTR guy or "histogram reviewer;" I seldom even review images on the camera except when first setting up. And then I just judge the image itself.

Maybe that's why I found this so alarming. If I were to push this right using the luminance or highlight warnings I would have severely blown the blue channel. Or if I had been using the R/G channels I might have pulled the exposure back unnecessarily.

Granted, this is a "test image" and you are unlikely to encounter all of these simultaneously in real life, but it is quite possible to encounter one or two.

If anyone has any other explanations or thoughts, I'd love to hear them.
 
I would disagree with this based on your method. You are not keeping things the same.

On one hand you're analysing an image and on the other you're analysing the image of an image. You could pinpoint the blame on the monitor or graphics card, not just the camera.

Scientifically, this is not a fair test.
 
As omens has said - the Lightroom graph is Lightroom's interpretation of the data (or possibly the true data) while the camera graphs are the camera's interpretation of your monitor's interpretation of Lightroom's interpretation of the data plus visual artefacts from photographing a screen, optical effects from the lens and probably interference from ambient light.

If you want to compare you need to put the image on your camera's card directly.
 
WHY WORRY about it??????

Valid question. There's nothing we can do about it anyways.

Personally, it's not an issue. But for someone who does ETTR, or judge their images by the histograms, it might matter more.

It's just knowledge...Knowing the camera has this behavior allows me to (hopefully) better evaluate an image by the camera histograms If I so choose. But, for me it just means that the best way to judge an image is just by how it looks (because I'm leaving that "extra headroom" as "recovery" if needed and not ETTR)
 
sk66, although you may not have done any editing when displaying in PS (or LR) there has been PP applied by the programme.

I'd be interested to see how the image looks when imported into ViewNX2 or CaptureNX2 which both use Nikon's own display algorithms rather than Adobe's "guestimation".
 
Won't the camera be using a Picture Control, which will boost certain colours and use certain contrast values amongst other settings, which the editing program, (manufacturers own software aside) will not do the same in the same way?

I set my Picture Control to Neutral to try and get a more accurate Histogram. As much as a Histogram on a camera can be when it is derived from an in camera processed Jpeg. For me it works well and I get a pretty good representation of the exposure.
 
sk66, although you may not have done any editing when displaying in PS (or LR) there has been PP applied by the programme.

I'd be interested to see how the image looks when imported into ViewNX2 or CaptureNX2 which both use Nikon's own display algorithms rather than Adobe's "guestimation".

Absolutely the image is being "interpreted." I'd have to find/load a copy of NX2 (I have several disks somewhere).

I don't think Adobe's presentation of it is a "guestimation," I'd say it's probably more "accurate" than NX2 because NX2 programs automatically apply/display the camera's jpeg settings to the raw file and Adobe does not (LR does apply a profile, PS does not).

I used the default (zeroed) ACR settings when importing the image into PS and assigned it the sRGB color space.
 
I wonder if the image is processed to take into account the sensor's characteristics?
 
Won't the camera be using a Picture Control, which will boost certain colours and use certain contrast values amongst other settings, which the editing program, (manufacturers own software aside) will not do the same in the same way?

I set my Picture Control to Neutral to try and get a more accurate Histogram. As much as a Histogram on a camera can be when it is derived from an in camera processed Jpeg. For me it works well and I get a pretty good representation of the exposure.

Yes, the Jpeg shown on the camera is using the cameras jpeg settings. There is no way of getting around this so I tried to set the jpeg settings so that the jpeg/raw/original all appeared as close as possible.

If you look at the two renditions (of the same image) the hue/saturation/luminance are both pretty close. Some of the difference is due to taking a picture of the camera's LCD with another camera, the color banding was much less notable.
I think they are close enough that the differences in the histograms are not justified.

Edited to add: This is the one area of variability I am not entirely certain could not have been done "better." The camera must use some jpeg settings in order to render an image. Perhaps putting everything to negative settings would have generated more similar histograms. It certainly would have generated a bad jpeg and undesirable image preview. But *maybe* that might be a better choice for someone who uses histograms extensively.
 
Last edited:
I don't think Adobe's presentation of it is a "guestimation," I'd say it's probably more "accurate" than NX2 because NX2 programs automatically apply/display the camera's jpeg settings to the raw file...
Just a tiny correction, as NX2 does not apply these settings...

Try your test again, but this time shoot i jpeg for a more "proper" comparison...
 
Just a tiny correction, as NX2 does not apply these settings...

Try your test again, but this time shoot i jpeg for a more "proper" comparison...

Are you certain? I thought they both display the raw file with the jpeg settings from the camera. I'm pretty certain View NX2 does...they aren't "applied" as in "locked in" and I didn't mean to imply they were.

I'm not sure what you mean by shoot 1 jpeg for a proper comparison. I'm 99.99% certain the jpeg would look like the jpeg thumbnail. If you meant "don't use two images," I didn't. This is one image with the preview being displayed on the camera, and the exact same image being opened in PS.

What I'll probably do is take an image with jpeg setting trying to get the histograms to match those of the raw file to see if it's even possible. I could take the image as raw+fine but I don't really understand the point.

I could see the point if one shoots in jpeg and wants to see if the recorded jpeg matches the thumbnail jpeg/histograms. But I can't really see that being different.
 
Last edited:
Absolutely the image is being "interpreted." I'd have to find/load a copy of NX2 (I have several disks somewhere).

I don't think Adobe's presentation of it is a "guestimation," I'd say it's probably more "accurate" than NX2 because NX2 programs automatically apply/display the camera's jpeg settings to the raw file and Adobe does not (LR does apply a profile, PS does not).

I used the default (zeroed) ACR settings when importing the image into PS and assigned it the sRGB color space.

Adobe's products apply a camera calibration preset to render the RAW file, usually the Adobe Standard by default. It is the equivalent of the camera applying a Picture Control to the in camera Jpeg to render the image on the LCD and the Histogram. How does it boost colours and contrast? I don't know. :shrug: But it is doing something. ;)

So you have tried to replicate the 'look' of an image on the cameras LCD screen, an uncalibrated screen designed to make images look their best. :eek: It brightens dark images and saturates dull images to some degree to make them look good in the shop. :bonk: I've seen images look perfect on the LCD screen, but have been very underexposed when the Histogram has been looked at. And if it's set to alter its brightness in reaction to the ambient light, then all bets are off for exposure, and brightening and darkening the image changes the colour representation too. And you wonder why the Histograms in camera and editing software are different. :thinking:

In some ways, blinkies aside, the image on the LCD can't be relied up on for much. Yes, the Histogram is a Picture Control applied to the RAW to attain a preview, but as I said, if you set the Picture Control to Neutral settings, and the open up in ACR or LR with a Neutral Camera Calibration preset for your camera (found one for mine on the internet) you have the best chance of everything matching up.

That said, I'm most worried about getting the exposure as best as I can in camera, I don't take notice of colours because they are dull because of the Neutral Picture Control, and as I don't shoot Jpeg, I process the image to be how I want it to be once it's in the computer.
 
Adobe's products apply a camera calibration preset to render the RAW file, usually the Adobe Standard by default. It is the equivalent of the camera applying a Picture Control to the in camera Jpeg to render the image on the LCD and the Histogram. How does it boost colours and contrast? I don't know. :shrug: But it is doing something. ;)

Yes, raw data has to be defined in relation to something for it to be displayed. Otherwise it's just a bunch of digits. It has to be processed and a color profile applied. The profile ACR/LR uses (or mine is using) is "camera neutral."

But this doesn't really matter all that much in terms of the histograms. You can try it for yourself by applying any/all of the standard profiles (maybe not a custom one) and any of the standard color spaces to a raw file and you won't cause shifts like this. You can even convert it to CMYK or LAB and the luminance channel (the only common one) will not shift significantly.

IMO, only two things can cause shifts like these. One would be large selective changes to HSL for the individual channels which was not done. The other would be a different way of interpreting/displaying the data which is what I believe is being done.

So you have tried to replicate the 'look' of an image on the cameras LCD screen, an uncalibrated screen designed to make images look their best.

Maybe I'm being dense, but I don't really see your point. The purpose was so that the same image displayed as closely as possible the same on both the computer (raw file) and on the camera screen (jpeg). It wasn't optimized to look it's best.
As noted above none of the picture styles would/will cause a shift like this, not even going from neutral to vivid. Changes in exposure would not cause these kinds of differences.
I could have gone the other route and try to get the histograms to match, but I don't think that will be possible. I will try though just to see. If there is a "better way" to set up a camera so that the histograms truly "match," and histograms are important to you; that might be nice to know.

I also have my camera set to neutral normally but that doesn't change much. And that's the problem. The only tools we have to judge an exposure are the histograms, highlight warnings, and preview. If none of them are "accurate" (or may not be) and you don't know why/how they are different, then how are you really judging the raw exposure at all? You're not, it's just a ballpark estimate (or may be) and that's the "disclaimer" Nikon includes in their owner's manuals.
 
Why do you assume Adobe's histogram is correct, and both Nikon and Canons are wrong ?
 
Are you certain? I thought they both display the raw file with the jpeg settings from the camera. I'm pretty certain View NX2 does...they aren't "applied" as in "locked in" and I didn't mean to imply they were.
Now I'm not certain anymore! :LOL:

A quick check shows you're right, that ViewNX2 do by default use the Picture Control info. In Capture NX2 you must enable Picture Control for the settings to be applied/shown.

I'm not sure what you mean by shoot 1 jpeg for a proper comparison. I'm 99.99% certain the jpeg would look like the jpeg thumbnail.
Yes, that was my point. Then we could establish whether or not the LR/PS histogram deviate from the in camera histogram...

But maybe I should read the thread more slowly again... :D
 
I wish I understood more on these things :/ really ... I just look at a histogram and think "ok, not too high on either side, a nice mountain works best .." - when it comes to the technicalities behind such things, my brain has a spasm, won't allow me to comprehend! Maybe it's better that way?
 
But how does any of this help us take "Nicer" pictures?

Good question, and I think it kind of depends on what type of photographer you are. And possibly on which brand of camera you are using. For me, it doesn't make much difference because I'm not a big histogram user. I don't take a lot of "still" shots where I get second/third chances.

But if you do, and you like to ETTR, check for channel clipping etc etc in order to get the absolute most from an image, then maybe you need to modify your approach somehow.

If you're a Canon user and your camera shows clipping at 250 instead of 255 then you could decide that a little bit of clipping in the preview histograms is actually desirable.
If you are a Nikon user and you know that the individual colors are shifted in the histograms based upon their "perceptual weight" then you know blue clipping is worse than shown, red is probably a little worse, and green is less than is shown. And you also know that with a Nikon a "clipped highlight" is actually a blown pixel at 255-255-255 even in the raw file. Which seems to be different than for a Canon (or some).

Apparently we cannot know/see/judge exactly what is in the raw file...even relatively (just color space and scale would be minor). We've all accepted that there is "more." If you want to actively make use of it then you probably need to do some testing/ monitoring to really know what your camera is telling you and how it truly relates to the raw file.

I had never compared a camera histogram to a raw histogram. If I even looked at the camera histogram it was hours, even days before I ever opened the raw file. But I do use the histograms for editing...and it's always been "that's what it is that I have to work with." I had always presumed/been told that "a histogram is a histogram and here's how you read it." And I assumed the histograms I was working with looked very much like the ones used during the capture (and long forgotten). But now I know that a histogram is not a histogram. They need to be read "differently" if I am to get predictable/ controlled results from a raw file. Or maybe I need to bracket shots regardless of what the camera is telling me if I want the absolute most from an image.

Does this really matter? Is it critical? Obviously it's not critical. If you tend to stay "safely in the middle" then you're probably fine just carrying on. Thats kind of "me." But now it's got me wondering how much better my raw files might possibly be if I approached it differently because "the middle" isn't actually necessarily the middle (nor are the left/right sides for you ETTR people).
And to some it does/should matter because what you *think* you're doing may not be what you *are* actually doing.

This probably won't significantly affect the way I work most of the time... I'm old, habit bound, and my subjects don't usually lend themselves to it. But it is something I am now aware of and can explore further when the subject/mood suits me and maybe it will improve my results.

How you use the information is up to you.
 
I wish I understood more on these things :/ really ... I just look at a histogram and think "ok, not too high on either side, a nice mountain works best .." - when it comes to the technicalities behind such things, my brain has a spasm, won't allow me to comprehend! Maybe it's better that way?

Well, it's worked well enough since the implementation of the modern LRGB histograms.
IMO there are certainly more important things to worry about when it comes to photography... like composition...
 
Does it matter as much to someone who only shoots RAW, and changes exposure 9/10, in some manner or other, anyway?

And yes, composition, and not blowing out highlights are my first ports. On cam.
 
Last edited:
Thanks "Sk66". A nice friendly answer and I understand a little more now.

(If only I could work out what ETTR means. Thought you were going on about Bronica's till I put my glass's on. No "Chimping" with one of them)!!:thinking:
 
Does it matter as much to someone who only shoots RAW, and changes exposure 9/10, in some manner or other, anyway?

Depends on what you are basing your exposure adjustments on. If it's just highlight warnings/luminance histogram, and you are adjusting them to be in the middle, then no, probably not. Because what you are being shown is "conservative" (Canon's more than Nikon). Your not at risk of blowing highlights.

If it's based upon RGB histograms, then probably, but clipping in a single color channel is much less detrimental to an image in general.

If it's based upon the metering, then not at all, much more important is metering mode/point.
 
Thanks "Sk66". A nice friendly answer and I understand a little more now.

(If only I could work out what ETTR means. Thought you were going on about Bronica's till I put my glass's on. No "Chimping" with one of them)!!:thinking:

ETTR is "Expose To The Right." It's a whole philosophy of exposure/editing where the histograms are pushed to the right side in order to take advantage of "headroom" in a raw file. For these people, this should be a huge consideration IMO since the whole point is to get everything from a raw file possible.
 
This Whitepaper by Adobe shows why some people choose to ETTR.

All the divisions in the Histogram (on the camera in the example) do not contain the same amount of information. The final sector of the Histogram on the right, the brightest tones in the image, contains half the information in the whole file. Underexpose by too much and half the information may be gone. :eek:

Also, having to brighten an underexposed image will exaggerate any noise, apart from having less information to work with. ETTR, and then darkening the exposure because the image is too bright, and any noise is reduced and you may get the maximum range of tones recorded.

Now whether you want to go along the ETTR route is one thing, but not underexposing too much seems to be a good idea. ;) And the Histogram, in conjunction with the blinkies, is the best way to enable you to see whether you have a good exposure imho. And seeing whether anything overexposing is not important to the overall image. The Sun will almost always be an overexposed blob for example, but how is the rest of the scene exposed?
 
Last edited:
If you want to examine your raw files, raw histograms and raw clipping data then take a look at the free software available here....

http://www.rawdigger.com/

It will also show what a raw file "looks" like before it has been processed (converted to colour space, white balanced, gamma curved, sharpened, saturated etc. etc.) into a usable picture. Then you will see just how much processing is applied to turn a raw data file into an image and why there is a gap between the histograms produced from each type of file. The processing necessary to produce a proper image also explains why the histograms from a camera JPEG, DPP, Lightroom and so on can all look different and why there may be more salvageable data in a raw file than one which has already been manipulated into a ready to use JPEG.
 
All the divisions in the Histogram (on the camera in the example) do not contain the same amount of information. The final sector of the Histogram on the right, the brightest tones in the image, contains half the information in the whole file. Underexpose by too much and half the information may be gone. :eek:

Absolutely although ETTR isn't just about making the most of that last stop, it's also about preserving shadow detail. When you ETTR you're pushing information into that last stop where most of the juicy digital goodness lies but you're also opening up the shadows and avoiding blocking them out. It's a trick with multiple benefits. :)

As for the camera lying, the histogram is there as a general guide rather than an absolute measurement so as long as it shows me basically what's going on and isn't half a stop out on luminosity then I'm happy. If I were a scientist I might think differently but I'm not, I'm just a plain simple photographer so a basic guide is fine for me. :)
 
There is one very good reason why the in-camera histogram is at best an approximation of the underlying RAW data. A bayer array contains twice as many green sensels as blue and red. What this means is that if you generate a JPEG from a RAW file with as little processing as possible and no white balance applied you actually get a very green image. So in order to show you an appropriately white-balanced JPEG, the camera has to amplify the red and blue values. The result is that your histogram calculated from the resulting JPEG may show clipping in the blue and red channels where the underlying data may be more than a stop short of clipping. There is your headroom.

There are two ways around this

1. Use a camera with a RAW histogram. As far as I know that limits you to a Leica M Monochrom or a Canon with magic lantern installed.

2. Setup a UniWB. This means setting a white balance in camera that requires no amplification of the red and blue signals when producing a JPEG. The result is a very green preview JPEG but accurate histogram, although you may need to tweak the contrast of the picture setting to get the clipping indicators just right.

I started with 2. and still use it on my non-canon cameras. It works perfectly and is a small price to pay for accurate exposure. But of course I never shoot JPEG anyway. Magic lantern means that my 5D III has the RAW histogram available anyway.
 
This And the Histogram, in conjunction with the blinkies, is the best way to enable you to see whether you have a good exposure imho.

Well, it is all we have to work with. But what if your Canon is throwing a highlight warning because a pixel is at 240-230-250? (which seems like it might be the case)

Or if your Nikon is showing the histogram "underexposed" because there is a lot of blue in the image? (which also seems to be the case)

For instance, I do a lot of BIF and shots that have a lot of sky in them. And for years my "default" was to have +.3/+.7 EC set into my Nikons based upon the camera histograms. And I constantly have issues with noise/color noise in sky areas.
I've always believed that the noise issue with the blue areas was due to the Bayer array and photon noise. And I still believe some of it is. But what if it's also/actually the blue sites clipping due to being underreported. This seems quite likely to me because of the behavior witnessed in the camera histograms and due to the pattern (regular) and color (grey) of the "noise."

Now the question becomes what can I do about it? And the answer to that is subject/situation dependent. Because, unless the sky is the subject then it doesn't matter as much and I may just have to accept it.
 
Granted, this is a "test image" and you are unlikely to encounter all of these simultaneously in real life, but it is quite possible to encounter one or two.

If anyone has any other explanations or thoughts, I'd love to hear them.

I have seen this in real life - actually it is quite common.
Sunsets...
If you are taking a picture of a gorgeous red sunset, when reviewing the images on the back of the camera the brighter areas are often yellow instead of red. Then, glancing back up at the real thing there is no yellow.
The Yellow is purely an artefact of the red channel clipping.

When this occurs, the white histogram looks fine and there are no blinkies.
The only clue is the RGB histogram which shows the red channel hitting the top of the scale.

I know RAW has more latitude, and it is possible to pull some of the red back in PP; but in my experience this rarely gives satisfactory results. The best that can be hoped for is to make it natural looking.
The only sure fire solution is to keep underexposing until the sky on the screen is the 'real' colour; any PP will now be polishing the image instead of trying to make the image resemble what you actually saw.
When experimenting with this clipping on a sunset, I achieved identical results using a Canon 5DII and Panasonic LX3.
 
There is one very good reason why the in-camera histogram is at best an approximation of the underlying RAW data. A bayer array contains twice as many green sensels as blue and red. What this means is that if you generate a JPEG from a RAW file with as little processing as possible and no white balance applied you actually get a very green image. So in order to show you an appropriately white-balanced JPEG, the camera has to amplify the red and blue values. The result is that your histogram calculated from the resulting JPEG may show clipping in the blue and red channels where the underlying data may be more than a stop short of clipping. There is your headroom.

There are two ways around this

1. Use a camera with a RAW histogram. As far as I know that limits you to a Leica M Monochrom or a Canon with magic lantern installed.

2. Setup a UniWB. This means setting a white balance in camera that requires no amplification of the red and blue signals when producing a JPEG. The result is a very green preview JPEG but accurate histogram, although you may need to tweak the contrast of the picture setting to get the clipping indicators just right.

I started with 2. and still use it on my non-canon cameras. It works perfectly and is a small price to pay for accurate exposure. But of course I never shoot JPEG anyway. Magic lantern means that my 5D III has the RAW histogram available anyway.

Actually, the Nikon is showing blue and red lower than "actual" and the green higher.
The point isn't really that they are different, or to see the raw data directly. The problem is in "how" they are different.

It is a simple fact that raw data has to be processed to be seen. You are never seeing the raw data directly, it always has to be interpreted. And it would be fine if the histograms were not identical, I wouldn't expect them to be. But I would expect them to resemble each other.

Using raw histograms or uni-wb are a "workaround." I say this because you certainly are not going to use an uncorrected image as a final result and what you (I) really want to see at the time of recording is a reasonably close approximation of what the final image will be.

But they should make the histograms more "accurate." I say "should" because the Nikon seems to push the color channels around based upon their "perceptual weight" and making an image greener should make them even worse. But it should make the luminance histogram/highlight warnings (for luminance) more accurate.
Except maybe for Canons if the camera is going to report a pixel as clipped due to only the green channel being high (which they seem to do).

This is something I will have to test...
 
So I've now applied a UniWB to both of my cameras. The histograms are much closer now. I'm using the "camera neutral" profile with everything but contrast set to middle and contrast set at max(D4) or next to max(D800).

There is a quirk though. As suspected, the D800 is still pushing the green histogram, but not as much as I suspected it would. And it is still pulling the blue histogram but not much. So I think it is much more usable now...I can live with knowing the two channels are a little offset. Maybe later I'll consider programming a custom tone curve into the camera...I don't know.

The D4, on the other hand, does not seem to be pushing the histograms much at all regardless. It's pretty reasonable with any WB setting. It seems the D4 has a different (more "correct" IMO) approach to presenting the information, which makes some sense.
The D4 UniWB doesn't seem to be much better, just "different." I'm going to try another(3rd) UniWB for the D4 to see if I can get any further improvements, if not I may not use one at all.

Now, I'm not comparing camera histograms to raw histograms, I am comparing camera histograms to editing histograms. To me, that matters more because those are what I'm going to be using.


FWIW, Ive tested both cameras w/ many WB settings to include Uni on many scenes, to include the original test image.
 
Last edited:
Back
Top