on landscape The online magazine for landscape photographers

What’s up with the Histogram?

How to interpret your camera's histogram

Skip to Comments
Tim Parkin

Tim Parkin

Amateur Photographer who plays with big cameras and film when in between digital photographs.

Flickr, Facebook, Twitter

First of all - a caveat. This research was done on a Canon 5D Mk II (Read Tim Parkin's review of Canon 5D Mark III). If there is enough interest in the article, I am happy to continue by looking at Nikon cameras or other Canon cameras where possible. I have to admit that the delay in this article hasn’t just been because of a lack of time. I have been banging my head against a wall trying to find out just what is happening inside raw files and histograms. Fortunately I think I have got somewhere (although I might have to follow up with a more rigourous analysis with notes).

Whats up with the histogram?

I think most of us who use digital cameras (and that must include 95% of film users as well, with their little digital playthings) have looked at a histogram or the ‘blinkies’ to check whether they have over exposed their pictures and I’m sure a large fraction of those have heard of ‘expose to the right’. But how accurate can we actually get our exposure using these tools? We’ll take a look at just what this information is showing us and how best to use it. First of all, a quick note on why getting everything close to clipping is so important.

Exposing to the right.

Because digital data stores luminosity values linearly, the last ‘stop’ of light takes up half of the total amount of data that the camera can store. Actually forget that load of gobbledegook.

The more you can overexpose the scene without clipping, the better shadows you will get. Full stop. This means that you want to push the highlights as close to clipping as possible in order to avoid noisy shadows, even if the result looks over exposed on your LCD. Back to the histogram...

What data does the histogram and the preview ‘blinkies’ actually represent?

The first thing to be aware of is that both the histogram and the preview are not actually built using the raw data. They are created from a full size jpg that the camera embeds in each raw file. The problems with the histogram appear because the jpg is created using all of those settings that you ignore because you are shooting RAW (you are shooting RAW aren’t you?).

So, if you have increased the contrast and saturation in order to get a more pleasing LCD view, you’ve also changed the levels in the histogram and changed the point at which the blinkies trigger.

So what settings on your camera affect the histogram and blinkies?

  • Contrast
  • Saturation
  • Sharpening
  • Colour Temperature (and tint)
  • Colour Space

Some of these affect your histogram/preview (for now I’ll just refer to the histogram) more than others. For instance, sharpening a smooth file will have very little affect. Sharpening a very fine pattern will create a large boost in highlights (all of the edge contrast will be enhanced and if the file is all edges...).

Contrast will affect the overall clipping levels the most, where an increase will push light values lighter and dark values darker (and vice versa). Saturation reduces the levels of the non-primary colours and it’s effects are hard to predict.

The biggest influence on the histogram is surprising though. The colour balance you set will cause the most significant problems and to understand why, you need to know a little about how raw files work.

What’s in a raw file

Some of you may know that most digital sensors have arrays of colours in them called ‘bayer arrays’. Each pixel only collects light of a particular colour and it takes a group of four pixels to record proper colour information.

These four pixels are made up of two green, one red and one blue value. Because the green pixels dominate in both amount and colour content, when you apply a colour temperature to your picture, the conversion multiplies the red and blue channels in order to ‘balance’ up the picture. Here are some sample values for different colour temperatures.

  • D65 (red 2.3x blue 1.25x)
  • Tungsten (red 1.4x blue 2.4x)
  • Shade (red 2.5x blue 1.2x)

Because the JPG, preview picture and histogram all use these multipliers, you can quickly see that even if only the red channel looks like it is clipping in your picture, it is almost certainly not doing so (especially if you are working in the shade).

If the histogram on your camera is split into 5 sections horizontally, this means that if a red channel looks like it is just clipping, it is probably a whole section less than is shown (in the shade). For the blue channel, it is probably half a section less.

This pretty much means that the only channel whose data you can trust is the green channel.

Here's a visual example so you can see what is going on..

Histograms from a picture on the edge of clipping

The top row of images show a the back of a Canon 5Dmk2 having taken a picture at Hardcastle Crags at about 3pm on a cloudy day - probably about 5,800K colour temperature. As you can see, the preview shows the blinkies for a large part of the sky and the colour histogram shows the blue channel blowing out. The second images show the photo being opened in lightroom and record pretty much the same information.

However, the software I have been using to analyse the images have allowed me to extract the real raw data and create a histogram for it (the extraction software is called 'dcraw' and the histogram generation is done using a program called 'histogrammer'). This histogram shows that the blue channel is a long way from clipping and it is actually the green channel that is clipping very slightly. The red channel, that looked like it was almost clipping as well, is actually half way down the histogram (which probably represents about a whole stop of headroom!).
The final image shows the raw file as the camera sees it - notice the strong green cast from all of these green pixels!!

As an aside, what it does mean is that generally when you are taking a sunset, the red channel isn’t clipping anywhere near as much as you think it is.. The same goes to a lesser extent if you are working in deep shade where everything becomes blue.

So what can I do about it?

Well - there are a few tricks you can do, but you may not like them. There is a technique called ‘UNIWB’ (universal white balance) with which you can trick your camera into using unity multipliers for your jpg (i.e. force it to show a histogram for the raw data!). The problem with this is that in doing so, the pictures that end up getting displayed on your LCD come out looking green (as per the final image in the example above).

The way you do this ‘forcing’ is to drop a pink raw file onto your memory card and use this to set a custom white balance. You can follow the links at the bottom of this article if you want to do this (there are more complicated ways to do it better but you’ll get 90% of the benefits by just using one of the sample raw files you can download).

Alternatively, you can just ‘know’ what is happening to the histogram and use your common sense to cope with the headroom.

What about those Damned 'Blinkies'

Well it turns out that the blinkies use a combination of red green and blue channels and don't adequately show individual channels clipping very well at all. In fact, even with the UNIWB stuff, the blinkies on their own are flawed. The only real way to be sure is to use the UNIWB and keep an eye on the individual colour histograms..

Can I get the best of both worlds, a good histogram and a nice LCD display?

Well yes you can! Sort of..

I’ve started to play with using a custom setting (C1) which uses the UNIWB pink custom white balance and then having C2 as my ‘normal’ LCD display. C1 should allow me to check the proper histogram for my conditions - get an idea for the relationships between the different channels and clipping and then switch to C2 for taking and checking the shot. Not perfect but it should be a useful ‘learning’ aid.

In a perfect world what would happen

Well - in a perfect world the camera manufacturers would do a few things that would help the photographer..

  1. Show real, raw data histograms and blinkies.
  2. Allow you to ‘expose to the right’ but still show a well exposed LCD preview.

In order to do both of these it would be really nice to have a read out which tells you what percentage of pixels in the picture are clipping (possibly for each channel) and maybe also let you specify what percentage of pixels you want to allow to clip as an exposure system. A sort of ‘clipping priority’ to complement ‘aperture priority’ and ‘shutter priority’.

What about the other variables, saturation, contrast, colour space?

Well after a fair bit of testing, I can highly recommend setting your contrast as low as possible, your saturation at 0, your sharpening at minimum and using AdobeRGB as your colour space. If you can combine these with the UNIWB, you will get an almost perfect representation of what is happening in the RAW file..

Can I find out more about this?

You certainly can - the origins of the UNIWB are in the Nikon camp and long threads on Nikonians talk about it (you can actually set the RGB multipliers on Nikon cameras). Also, a very clever fellow named Guillermo Luijk worked out the 'custom white balance' stuff for the Canon.

Hopefully my contribution has been to make things a little more accessible? Who knows - if this has been pitched a little too geeky or too basic, please let me know. I'd be happy to expand or simplify in a future section.


Guillermo Lujik - Created 'Histogrammer' software and documented a lot around the process of creating UNIWB for generic cameras

Malcolm Hoar - Documented UNIWB for Nikon cameras (much easier to setup for it)

  • Rob

    OK, you’ve tempted me to wade into something I’m not entirely sure about. I’ll admit to having a degree in Electronic and Electrical Eng, so not entirely clueless as to how this stuff works. Hope this doesn’t lead into a whole new area, but is something I’ve been debating with myself for some time.

    What you say about the JPEG I agree with and it makes exposure judgement difficult, but I guess it errs on the safe side of over exposure as the JPEG has the least latitude.

    Whilst I’ll agree that underexposure is a bad thing in digital images and that it loses a great deal of data, I’m unsure if over exposure doesn’t great another set of digital issues. When you manufacture contrast from an ‘overexposed’ digital image (ie exposed fully to the right; one where the exposure is more than you would probably have made with the equivalent slide film), the intervening data has to be estimated or interpolated. This should be less ‘noisy’ than expanding an underexposed image, but it seems to me to lead to some of the ‘digital’ colours we see in some landscape photography, due to the brightness of the colours in the overexposed data being maintained. This can be controlled in photoshop but..

    Is the best histogram is the one that needs least manipulation; ie is closest to the photographer’s pictorial intent?

    The thing I’d like to know more about is how the sensitivity of the sensor is actually mapped to luminance levels in the histogram – The assumption about expose to the right is based on quality being linear. Given how difficult it is to render detail in bright autumn colours I often wonder whether there is a sweet spot that’s not always fully to the right.

  • stevefrance

    Interesting Tim. When I first picked up a digital SLR 3 years ago, it took me not very long at all to get totally frustrated with the whole concept of the histogram, and how digital cameras meter and record light. And even more so with the digital way of shooting.

    The fact is..they dont record light well, and never have. Even now with the latest and greatest, they still fail to record good detail in the shadows due to noise, artifacts, poor contrast etc.. Yes you can expose to the right.. and it helps… but why should you?!?! No one has ever said! Yes technically it produces better quality and can remove some of the issues, but the fact is.. if your paying 2k for a camera and it cant record a photograph well, using the same methods of exposure you would do with a film camera…something is seriously wrong..isn’t it?

    For example, your light meter records a tone at 1sec at f16. But taking an image with these settings results in a histogram setting much more to the left than the right (the scene is of average tone for this example) Now shooting the same scene, leaving your aperture alone and increasing the shutter speed results in a much better histogram.
    You say thats great… but that isn’t what the true light of the scene is.. is it? You are changing it. And this isn’t for artistic merit.. its just to capture a good enough image to work with. We’re not taking about exposure compensation here to record tone… just simply taking a photograph.
    Isn’t this quite simply telling us that digital cameras are basically failing in their nature to capture the light as you want it to.. and thus detrimentally adding a further step.. and one that isn’t needed, taking film photography into the equation?

    Ive spoken to so many photographers about this, and for those brought up on digital they have no problem with it. For them… ‘Film users are old and outdated and dont embrace the technology available due to silly romantic notions about the art and how to record light’ blah blah..

    For me though the histogram is a very poor substitute to the light meter, and the digital camera still doesn’t compare in quality and tonality to film.

    And this takes me to the art of photography..
    How important is the art of photography now? Hasn’t digital completely devalued the art? Many would argue not.. and that its improved it. Yes, digital may of broadened the net and helped many to find the joy of photography, and it can be argued its more cost effective (I would say that’s only for those who run businesses) but isn’t learning to see, record and use light, not an art in itself? I guess the question has to be asked.. yes it is.. but how it is, does that matter in itself?

    People can and do make wonderful photographs using digital cameras.. but the process of how to make a beautiful image….hasn’t it been lost in a world of techno, or has the process been bettered?
    Rather than learning about the makeup of light, its properties etc..learning about previsualisation, the zone system, exposure management etc.. AND GETTING IT RIGHT AT THE SCENE….hasn’t it now just come to take a few pics, make sure a histogram isn’t blinking, then merge them in ps back at your computer.. job done.

    I guess for many there is nothing wrong with that… but to me that is completely and utterly boring. Isn’t the whole concept of photography embracing and enjoying the full procedure and testing and learning a skill/craft? Good composition is great, but if your just going out there, shooting great compositions, but just shooting bracketed pictures and merging in photoshop…aren’t you robbing yourself of learning an aspect of photography? Is that or isnt that important to people these days? Does the histogram and digital editing replace that… and it is equal in terms of learning and becoming a better photographer? I mean… what is a Photographer today?

    Im afraid i simply cannot embrace the digital camera. Ive had 5d’s and 5dmk2’s.. but now my life is again simple, using film, learning an art, pushing myself in the field to wait and capture light and a scene competently. Not relying on digital processes, but just a simple light box, patience, and craft.

    I dont need to ‘see’ what ive captured so I can do it again because I got it wrong. And indeed im not afraid if i do get it wrong. That is part of the process.
    I may see plenty of digital images these days.. and one thing I can say.. they all look the same, and for me that is an indictment on digital photography today.

  • Neil Bryce

    Sounds like pixel peeping taken to the extreme and has as much importance as canon and nikon users arguing over whos image has the least noise at iso800. Being a sony user I doubt I’ll have the joys of using the UNIWB but as I’d open the image in a RAW converter and tweek it anyway, getting in the ballpark with the JPEG blinkies and tweeking in a RAW converter seems close enough for me.
    Don’t forget exposing to the right also helps conform to that other digital commandment; thou must not have any blacks in the image anywhere.

  • EmDashMan

    @Stevefrance: What an interesting take on the subject. I have come to realise that, in the field of digital photography, there are many areas where a little knowledge quickly leads you down extremely complicated cul-de-sacs which can cost you an awful lot of time/money. Take [colour management | sharpening | DOF | COC | histogram | hyperfocal distance | megapixels | resolution | whatever]. Please…

    I veer wildly between two extremes. 1: Just going out and taking some shots, and playing around with them in PS to get something that looks nice. 2. Reading learned treatises on a subject, trying out the detailed techniques described to process my pictures, and rapidly losing the plot.

    On balance, I prefer approach 1, but can’t stop myself turning down the next cul-de-sac!

  • Impressively in-depth article on digital exposure. I generally use the expose to the right methodology but my technique comes from experimentation and good old trial and error vice this level of study. I now know pretty well how far I can push my histogram rightward based on the conditions. Sure it looks a little (or sometimes a lot) overexposed on the LCD but drop it back on the computer, apply a curves or levels adjustment to bring the exposure back to what I saw in the field and the results are great. It’s a very useful shadow noise reduction technique.

    I’m one of those people who has been drawn to photography by digital and I absolutely love it. I spend a great deal of time trying to understand light, studying composition, previsualizing, and taking introspective looks at what I enjoy in imagery as do many of my digital colleagues. I spend every bit as much time recce-ing, watching the skies, analysing OS maps, and waiting for the light as the guy down the ridge with the 4×5. My histogram is the visual digital equivalent of the zone system. I see the digital camera as simply a medium to attempt to translate what I find visually appealing into two dimensions. In that regard it is no better or worse than the medium of large format or medium format or good old fashioned oil paints. (I’m only talking about the art of making images here and not the art of making prints). Like any medium one has to learn to get the very best from it and, in my opinion, therein lies the technical art and craft of photography. I know what I need to do using my digital camera to translate a scene in two dimensions and if that sometimes means bracketing at the scene to “get it right” then I will do it proudly. I’ll make multiple exposures to enable super resolution imagery as well. I’ll also make frequent use of tilt-shift optics, filtres, reflectors, or an old hat if it will help me control light, achieve focus and make the best image I am able.

    Don’t get me wrong, I make every attempt at making an image that does not require anything more than a few minutes of post-processing but if my medium forces (or enables) me to take other steps I will do it unashamedly in order to achieve the result for which I am aiming. A photographer is the same in the digital age as he was back in the days of tin types but with a different medium for capturing the light and different tools in the dark room.

    • Very eloquently put Bob and I whole heartedly agree with everything you say. I hate the fact that almost every thread on this site has to turn into a bash the digital SLR users. The camera is just a tool and they all have their pros and cons, you just have to learn to get the best out of your chosen medium…

      I’m also sorry (or should that be pleased!?) to say that I just don’t get this whole noise in the shadows business. I use a 5D MkII (as I think you do?) and I can honestly say that as long as I get my exposure right in camera I don’t see any noise :-)

    • kevin lockwood

      Well put Bob. I have a film background spanning 3 decades, and commenced using a DSLR only 4 years ago. Getting it right in camera is fundamental when shooting transparency film, and the same applies to digital capture.

  • The Nikons and for that matter all other DSLR are the same – histograms and clipping is calculated from processed data (JPEG) not RAW. To some degree that was discissed on LibRaw blog here http://www.libraw.org/articles/white-balance-in-digital-cameras.html

    On Nikons however it is possible to cater for that in sort of acceptable way by using so called UniWB (a special white balance with channel multipliers set to 1,1,1,1) with neutral picture control (sharpening, contrast, hue all set to 0) and linear or even reverse sRGB curve. This will result in JPEG that has the least altered data from RAW and thus accurate histogram and clipping warnings.

    More details on UniWB are here http://forums.dpreview.com/forums/read.asp?forum=1021&message=22208854

    In practice I only use UniWB with linear curve and neutral controls which is nearly always sufficient. In a daylight (if I can) I try also to compensate the channel misalignement by using magenta colour correcting filter (CC30M or CC40M). This in conjunction with UniWB gives properly white balanced picture on my Nikon LCD so it’s easier to reviiew as well. More details on why using magenta CC filters help can be found here http://www.libraw.org/articles/magenta-filters-on-digicam.html

    • Hi Alexy, not sure if you’ve had a chance to read the article yet but it mentions the UNIWB and links to Malcolm Hoars article on UNIWB and in particular Nikon Cameras.. I’ve been playing with my CC40M’s as well to see what the results are like and it’s something I forgot to mention so really appreciate the comment!

      • Yes I know about Malcolm site but I wanted to point to the source. The UniWB was introduced and explained on DPReview forums by Iliah Borg (photographer, and developer of RawMagick and RPP RAW converters). The thread I pointed out to was where his daughter Julia Borg discusses the UniWB a few years ago.

  • CraigV

    A little late in commenting, but I have to confess to only recently finding the site…sorry.
    I may have completely missed the point here, but are the factors affecting the histogram and hence the final image a facet of using a Bayer type sensor? Would the results be any different using a Foveon type sensor as installed in Sigma’s SD range? Or is it simply because there’s an A-D conversion being done and we’re all at the mercy of a bit of silicon as opposed to film.

    • I think one of the main problems is the extra green sensors which unbalances the RGB ratios but the blue and red are not naturally balanced correctly either. I think the foveon would probably help as long as the sensitivities of the RGB components are fairly close. The manufacturers could easily make a histogram that was correct and could balance the colour correctly but everyone is frantically trying to get higher and higher ISO’s and the solutions would probably reduce the performance slightly. I have high hopes for the new Sigma foveon but not at the current list price (about £6,000!)

  • I too have just read this interesting article. I am just in the progress of migrating over from Olympus to Nikon (currently using their film camera the excellent F4). I should be interested in a similar look at say the Nikon D700 or its sucessor (D800?)… maybe the new camera will resolve this problem.

    Personally I tend to ignore the highlight blinky on my E-3 and just pay attention to the seperate shadow blinky (something the D700 does not offer!). I didn’t realise until reading your article that the histograms were derived from the JPEG nor that having my colour profile permanetely set to AdobeRGB affected it.

  • SosFM

    Yet another latecomer to the article who yet again has only just discovered the Web site. I also read with interest and felt utterly deflated by the end. I knew that the histograms were derived from a JPEG and thought I really understood histograms and all that they were telling me. Unfortunately all this tech stuff has knocked my legs from under me, but you know what, I dont care! I am sticking with the knowledge I have about histograms, I am in the same camp as Bob-G. Yes my DSLR is a computer and processor but at the end of the day that is not why I use it. To me my camera is a means of taking photographs and a means of getting out into nature and the countryside and enjoying been part of it and recording what I see around me and experience. I am definitely not a geek, I read this techno stuff with some hope of improving my knowledge and understanding but thats as far as it goes. I really am not bothered about the intricate detail and using unity multipliers (half this stuff sounds like it belongs in the TARDIS). We are in danger of having our passion transformed from something that is inspired by nature into technoscience gobbledook that is reserved for scientists, electrical/computer engineers and academics. Not for me thanks, I will leave that to the people who design these expensive pieces of equipment that we play with, they are the ones who never see the light of day, unlike us. Let me out taking photographs in our wonderful, wild countryside and been satisfied witht the images I produce.

    • Heh, totally agree. The last thing you want to be doing is dealing with this when you are in the field and the camera manufacturers should have realised this a long time ago – part of the reason why I find film cameras so attractive.

    • Here here – all interesting stuff to some degree, but for me seeing the scene and capturing the feel of it in the final image is the most important thing.
      BTW, I’m very pro digital, but equally look back at my Velvia slides of 8 years plus ago and often think wow, I’m pleased with that. Digital is a tool that makes my life easier in some respects, although I do find myself sitting in front of a PC more than I would ideally like rather than out making more images!

  • tonyshaw

    Hi Tim
    The Sony 900 that you used in your camera comparisons has luminance histogram as well as the RGB of the Nikon here. This is the one I use to shoot to the right and then in Lightroom adjust back as required. This as you will know helps keep the signal to noise ratio down due to there being more information in the right side. How would this fit into the tests done here?
    By the way – congratulations on the Take A View commendation!

  • You can get reasonable results setting cameras to B&W with a daylight WB. Very unscientific, but consistent and lets you get a feel for the camera.

    I’ve found the histogram to be a very poor visualisation of the exposure of an image. In general what it tells you at a glance is that you have large areas of mid-tone which are largely falling somewhere. Great for a journalist to know he’s 2/3rds under, or a great zero for bracketing.

    But how about small details. Given the huge canvas that is say a 10MP image, most small details will hardly register their presence on a histo. How about a field of flowers compared to specular highlights on water. In both cases the histogram might look very similar [..-oOXx-……..] but the field of flowers needs to be pulled back and you might be lucky to actually see them register [.-oXx–…….-.]

    I’ve not used Sony/Canon but have used Leica/Nikon/PhaseOne and in general I find the histo to be a very misleading tool, it’s usefulness really more geared to the auto workflows of shoot, chimp, +/- exposure, shoot, chimp, etc. The M9 has a facility to zoom in on an are of the image and see the histo for it, so maybe I should not be so quick to judge. I just think it’s a crutch that stops you from learning.

  • Tim Ball

    This is complicated by the fact that apart from DCRaw, most Raw Processors also seem to display the JPG generated histogram, at least the ones in Canon’s DDP and DxO Optics, seem to mirror the one on the 5DII LCD.
    When I try to work out the implications of this in processing an image, I find myself rapidly getting beyond my ability to cope with!

  • Does anyone know the reason why we have the Bayer pattern on sensors? I’ve heard the reason as “our eyes are more sensitive to green” but that really doesn’t make a whole lot of sense to me. Just because “our” eyes are more sensitive to green, why should the camera sensor be made to be more sensitive as well?

    • It’s also that green filters pass through the most light and so better iso performance.

  • mhenasey

    This article is nearly two years old and I hoped that camera mfgs and software companies would’ve worked a lot of this out but it seems that things are just as bad as they have been for years. I’m astounded there’s no standard for displaying histograms, they are all different everywhere. RAW processors are in the same boat. Who’s to be trusted? Which histogram, which RAW processor? They all render something different. Its quite disheartening and I feel that those who shoot film may still hold the advantage on their simplicity and reliable output. What’s a guy to do in this digital world where everything seems like a ‘lie’ and every choice seems like the wrong one?

    I’m basing a lot of this nonsense on the fact that when I open a RAW file from a D800 on ACR 7.1, Lightroom 4, Capture One Pro, Aperture, Nikon Nx View, and RPP, everything looks different! Some worse than others, some better than others! Don’t get me wrong, choice is good, but sometimes too many choices is a bad thing…

    • Yes it’s very frustrating – would be nice to have a standard raw file based on exposure zones and a standard profiled colour and then a histogram that displayed the actual exposure information rather than made up jpg data.

  • So after all these years since this revelation about the histograms on the backs of our cameras, is anyone still using UniWB and CC30M/CC40M today? Are the latest digital cameras so much better today than yesterday that these methods are now obsolete?

    • AlexeyD

      I was using UniWB on my Nikons to judge the blown highlights. ETTR is not something I use so in that prospective its irrelevant.

      This summer however I mostly moved to Kodak SLR/n and this is where they did get it right – the histogram there comes from RAW file not jpeg so it is more accurate.

      In regards of different RAW development results, I suppose its not that different from film – using different developers, water and process the end result was also varying to a degree. It became less so with C41 or E6 but still true to a degree.

On Landscape is part of Landscape Media Limited , a company registered in England and Wales . Registered Number: 07120795. Registered Office: 1, Clarke Hall Farm, Aberford Road, WF1 4AL