Even the histogram will lie to you
Scott_Quier
Registered Users Posts: 6,524 Major grins
We all know about "Exposing to the Right" to get as much photographic data as possible, right? How many times have you done a shoot, checking the histogram and the picture on the LCD (for the blinkies) all the while to make sure you don't over-expose your shots only to get home and find that your shots are not exposed as far to the right as you had been led by your histogram to believe? Happened to me all the time, but I thought there was not much I could do about it ... that I had to learn to compensate for the goofy camera.
Some short time ago, I stumbled across the concept of the UniWB. Seemed like an awful lot of work. More research and I've found a way to make it easy....
Here's the premise. There's more lattitude in the RAW file than the camera is telling you. The histogram and the blinkies represent what's left of the image data after the camera has applied all the "in-camera" presets and genereated the JPG. It gives you no indication of the room you have left in which you can recover the more exposed regions of the photo or the extent to which you can dial back the exposure in post.
The question then becomes, "Well, can we teach the camera to generate a histogram (and blinkies) that more faithfully represents the data as recorded in the RAW file?" Or, put another way, "Can we teach the camera to start the blinkies when the image (or portions thereof) really is over-exposed and not before?"
Of course, the answer is "Yes!" Otherwise this would be a short post But, as in all things, there's a trade off that we'll get to in due course.
Here's an example of the problem. This is approximately how the images looks on the camera LCD (imagine that the red areas are really blinkies ). Judging from this, one would dial back the exposure by at least a stop if not more to get rid of the blinkies.
1. 800, f/2.8, 1/10s
This image, BTW, is completely usable, just dial back the exposure (no highlight recovery needed) and you have a decently exposed image. The point is that the camera is not telling the truth about this.
What I found in my reading, research, and testing is that these blinkies are really the result of the camera applying, in this case, the tungsten WB corrections to the data in the process of generating the JPG. Each of the factory WB presets will impart it's own bias and will cause the above effect to a greater or lesser extent. We need a Custom White Balance (CWB) that is neutral.
Here's what I did to generate that neutral CWB file:
I downloaded (from here) the ExifTool by Phil Harvey. Running this against the dark frame CR2 file using the command:
You remember the shot above with all the blinkies? Well, this is a shot under the same conditions and same settings. Only difference is that I used the above generated CWB.
2. 800, f/2.8, 1/10s
OK, now you know what the trade-off is. You can never, during a shoot, show your clients the images on the back of your camera! They'll think you've gone mad, pull the funding, and kick you to the curb as a poser. Not a goodness!
But, note that there aren't any blinkies! And, the histogram shows the same thing. Even better, during testing, I altered the shutter speed to 1/8s and got some minor blinkies. In post, these turned out to represent blown channels. So it seems to work.
When processing these images, one would set the appropriate WB (that's what the gray target is for) and dial back the exposure a bit - in this case about -0.95 in ACR - remember the idea is to expose as far to the right as possble without blowing a channel. The result is
3. 800, f/2.8, 1/10s
BTW - no other adjustments were made to the images, no curves, saturation, noise reduction, anything. Oh, and no animals were injured during the testing. He may have been bored, but no injured:lol
The bottom line - As long as
Some short time ago, I stumbled across the concept of the UniWB. Seemed like an awful lot of work. More research and I've found a way to make it easy....
Here's the premise. There's more lattitude in the RAW file than the camera is telling you. The histogram and the blinkies represent what's left of the image data after the camera has applied all the "in-camera" presets and genereated the JPG. It gives you no indication of the room you have left in which you can recover the more exposed regions of the photo or the extent to which you can dial back the exposure in post.
The question then becomes, "Well, can we teach the camera to generate a histogram (and blinkies) that more faithfully represents the data as recorded in the RAW file?" Or, put another way, "Can we teach the camera to start the blinkies when the image (or portions thereof) really is over-exposed and not before?"
Of course, the answer is "Yes!" Otherwise this would be a short post But, as in all things, there's a trade off that we'll get to in due course.
Here's an example of the problem. This is approximately how the images looks on the camera LCD (imagine that the red areas are really blinkies ). Judging from this, one would dial back the exposure by at least a stop if not more to get rid of the blinkies.
1. 800, f/2.8, 1/10s
This image, BTW, is completely usable, just dial back the exposure (no highlight recovery needed) and you have a decently exposed image. The point is that the camera is not telling the truth about this.
What I found in my reading, research, and testing is that these blinkies are really the result of the camera applying, in this case, the tungsten WB corrections to the data in the process of generating the JPG. Each of the factory WB presets will impart it's own bias and will cause the above effect to a greater or lesser extent. We need a Custom White Balance (CWB) that is neutral.
Here's what I did to generate that neutral CWB file:
- Go into the camera menus and set all the "presets" to Neutral
- Set camera to manual
- Set ISO to 100
- Set aperture to something, I think I used f/5.6. Doesn't really matter as you'll see in a moment
- Set shutter speed to something easy. I used 1/250
- Put the lens cap ON the lens!
- Take the shot. When you look at the result, it should be all BLACK!!! Cool, right?
- Select it for CWB. How this is done is different for each camera. Read your manual for the details.
I downloaded (from here) the ExifTool by Phil Harvey. Running this against the dark frame CR2 file using the command:
exiftool.exe -WB_RGGBLevelsAsShot img_2452.cr2produced the results
WB RGGB Levels As Shot : 1031 1031 1031 1031Pretty good!
You remember the shot above with all the blinkies? Well, this is a shot under the same conditions and same settings. Only difference is that I used the above generated CWB.
2. 800, f/2.8, 1/10s
OK, now you know what the trade-off is. You can never, during a shoot, show your clients the images on the back of your camera! They'll think you've gone mad, pull the funding, and kick you to the curb as a poser. Not a goodness!
But, note that there aren't any blinkies! And, the histogram shows the same thing. Even better, during testing, I altered the shutter speed to 1/8s and got some minor blinkies. In post, these turned out to represent blown channels. So it seems to work.
When processing these images, one would set the appropriate WB (that's what the gray target is for) and dial back the exposure a bit - in this case about -0.95 in ACR - remember the idea is to expose as far to the right as possble without blowing a channel. The result is
3. 800, f/2.8, 1/10s
BTW - no other adjustments were made to the images, no curves, saturation, noise reduction, anything. Oh, and no animals were injured during the testing. He may have been bored, but no injured:lol
The bottom line - As long as
- one can get over the sickly green color of the image on the LCD and
- one has the time to take multiple exposures to push right up against the right wall of the histogram
Scott
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
0
Comments
I do have one question though. I believe you said that the camera applies the tungsten WB corrections to the data in the process of generating the JPG. So are you saying it does this regardless of the camera's WB setting? If so, are you also saying that using a custom WB setting overrides the camera's selection of tungsten for figuring blinkies and histogram data? But the factory WB presets (cloudy, shade, etc), don't do that?
Thanks and regards,
-joel
Link to my Smugmug site
Each factory WB setting will impart it's own bias to the photo; each bias will impact this observed effect to a greater or lesser extent. The thing is, none of the factory WB presets are free of bias. They are there because they closely "match" the various types of light commonly encountered.
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
Cheers,
-joel
Link to my Smugmug site
Very interesting info, Scott - thanks for writing it up!
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
You've found a good use for the pet in this post. Who, or what would have been the subject otherwise?
I'll need to try this technique soon myself. Thanks!
Question though. My test shot had gray speakers in it that worked pretty well. But what if you don't have something that is neutral gray? Find something as close as possible in the image, I guess?
If you don't have one in the scene, then you need to put one there - hence the WB target in my examples. If your would rather not have a gray target in your shot, put it in there for a shot, then take it out and repeat the shot. Then, in post, get the WB settings from the first and apply them to the second. Easy stuff.
FWIW, to date, I hav seldom run into a situation in the wild (weddings and street) where I have not been able to find a suitable "natural" gray target that gets the WB very, very close. If it's off a touch, then you eye-ball it the rest of the way.
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
Thanks again. I've done some more tests using raw without a neutral gray "something" in the shot and have gotten great results just eyeballing it.
I've got this set up in my camera as my custom WB and will be using it regularly. (Except when someone wants to chimp. Can't have them seeing that!!)
I can't say it enough: Thank you, thank you, thank you!!
Mike
This technique provides no benefit (over what your camera already does) if you are shooting jpg. This technique is all about dtermining when the image recorded has areas that are blown - getting the histogram to better reflect the content of the RAW data. The histogram, regardless of the WB being used, reflects the data in the JPG image - whether that JPG image is your final product or only the JPG embedded in your RAW file.
So, if you are shooting JPG, you are MUCH better off getting an CWB that reflects the lighting conditions as this will minimize the amount of adjustment that needs to be made in PP. Because you have so much less data to work with when dealing with JPG files, you want to minimize the amount and scope of adjustments made to them.
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
First things first - I'm not advocating that this is the way people should shoot. There's lots of reasons why this is not for everyone ... I'll leave the listing of most of these reasons "as an exercise for the student."
For me, the single biggest reason NOT to use this technique is if you intend to show the camera LCD images to a client who may not have 100% trust in your abilities (for those, I shoot a couple of test shots with an "appropriate" WB, show those, reset, and get on with business).
So, what are my feelings/impressions after having shot somewhere between 3,000 and 4,000 frames using this CWB? For me (YMMV) it's almost all positive with very little in the way of detractors. I like to expose as far to the right as possible (given lighting and the limitations that places on shutter speed, etc) and correct the exposure in post (since I'll be doing that anyway) to get as much data as possible in the first two or three stops. Using this technique, I know that the histogram is doing a very good job. When it says, I've over-exposed, I have. If it says I have room before over-exposing, I do. I've encountered very few, if any, false readings.
The one other detractor for me is I need to make sure I have a neutral from which to set the WB later. Usually this isn't an issue. When in doubt, I make sure I get a shot of my WB target.
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
I'm guessing it might be a brand issue as well. Olympus only leaves about 1/2 stop of highlight headroom between RAW and jpg, while Canon and Nikon, for example, leave roughly 1-2 stops.
http://silversx80.smugmug.com/
Olympus E-M5, 12-50mm, 45mm f/1.8
Some legacy OM lenses and an OM-10
In fact, I can think of only one way to do direct, systematic testing of this assumption. Use red, green, and blue gels (for example, in front of the lens), in turn, to restrict the color of light reaching the sensor and set exposure to blow out that channel. Does one get the blinkies and a luminance histogram showing the blow out? Wouldn't be too difficult to do this if one has a Roscoe sample deck, some cardboard, and a little tape ... oh, and a little time.
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
Second - I want to be the first to say that I know relatively little. What I do know, I've learned here or other places - lots of reading. I try to post only what I have actually done and demonstrated to work - at least for me. If it helps others - well that's great and my intent ... in the spirit of pay it forward.
That green LCD image can have a number of benefits. For example, say you're out shooting with a group and you want to be left alone - just let the most gossip inclined individual see your photo. He (or she) will spread the word that you have no clue what you're doing and, all of a sudden, you have time to get your work done. :lol :lol4
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
My Photos
Thoughts on photographing a wedding, How to post a picture, AF Microadjustments?, Light Scoop
Equipment List - Check my profile
Link to my Smugmug site
Unfortunately there is no industry standard for how histograms are created nor is there any agreement what data is necessarily used nor how it is represented.
Here is my own informal relative comparison of several histograms:
http://www.dgrin.com/showpost.php?p=666259&postcount=9
My recommendation is to find out what the histograms in your own (as in "everyone's" own) cameras and software means with relation to your own work. Experience and understanding will reward you with more control in your workflow from acquisition through presentation.
Moderator of the Cameras and Accessories forums
My point is that the in-camera luminance histogram uses a weighted average of the three channels, and cannot be relied upon to tell you if you've blown a channel. If that's important to you (and it is to me), then you should use the RGB histogram, and not the luminance histogram. That's true in Canon cameras that support both types of histograms as far as I know, and most likely in Nikons as well.
There are numerous write-ups around the internet on this subject, and I've already referenced one above. Here's a link to another: http://www.sphoto.com/techinfo/histograms/histograms2.htm
That's a very long article, so here's an excerpt: "Since a luminance histogram has had some perceptual compensation (unbalanced averaging) applied, it may not always show you if you have pixels in the 0 or 255 tonal area. "
Seems pretty clear to me. Do you disagree with this?
Thanks and regards,
-joel
Link to my Smugmug site
I suspect that we agree more than we disagree, but my caution is against "any" assumptions and generalizations because there are "no" standards regarding histograms. Without standards the minute you think you might be able to make assumptions is the same minute you can be misled.
I've heard some rumors that some camera's luminance histograms contain "only" green channel information, based on the assumption that the green channel would clip first. The truth is there is not enough reliable information to ascertain one way or the other and the manufacturers are no help at all since they routinely omit any technical information regarding camera histograms.
While it would seem that RGB histograms should be straightforward, since there is no standard we really don't know anything about linearity or clipping or value averaging or sampling rate or internal adjustments against RAW or ... anything.
Trying to use a camera's histogram is a giant leap in faith and, by itself, a lesson in frustration. That doesn't mean we should disregard the histogram, it just means that we need to learn what the histogram means, as well as what it does not mean, and that can vary from camera model to camera model.
I have 4 different types of Canon dSLRs and it would seem that they each have differences in how the luminance histogram interprets a scene.
Why are there differences? This is digital technology and these histogram tests are against the same CR2 file. There should be no difference if they all use the same method of data sampling and interpretation.
Granted the differences are not humongous but they should be identical since they are all from Canon cameras, yet they are not identical.
Most troubling is how the camera histograms treat the clipped highlights, compared to how some software histograms show much more of the clipped data.
Here are the images I snapped of the 4 histograms. (Look especially at the left 20 percent or so and notice what appear to be averaging and sampling discrepancies in the luminance histograms.)
Moderator of the Cameras and Accessories forums