Understanding the Histogram
Darrell Young (DigitalDarrell)
Keywords: histogram, nikon, camera, fundamentals, basics, guides, tips
Knowing how to use the histogram of your camera - and your images will get better
Using your camera’s histogram screens will guarantee you a much higher percentage of well-exposed images. It is well worth spending time to understand the histogram. It’s not as complicated as it may look at first.
I’ll try to cover this feature with enough detail to give you a working knowledge of how to use the histogram to make better pictures. If you are deeply interested in the histogram, there is a lot of research material available on the Nikonians forums and on the Internet. Although this overview is brief, it will present enough knowledge to improve your technique immediately.
The sensor of your camera
The camera’s sensor can only record a certain range of light values—about 5 to 7 usable EV steps. Unfortunately, many of the higher-contrast subjects we shoot can contain over 12 stops of light values. This is quite a bit more than it is possible to capture in a single exposure. It’s important to understand how your camera records light so that you can better control how the image is captured.
Look at figure 1 closely. The gray rectangular area represents an in-camera histogram. Examine it carefully! Think about it for a minute before reading on.
The histogram is basically a graph that represents the maximum range of light values your camera can capture, in 256 steps (0 = pure black, and 255 = pure white). In the middle of the histogram are the mid-range values that represent middle colors like grays, light browns, and greens. The values from just above zero and just below 255 contain detail.
The actual histogram graph looks like a mountain peak, or a series of peaks, and the more there is of a particular color, the taller the peak. In some cases the graph will be rounder on top, and in other cases it will be flattened.
The left side of the histogram represents the maximum dark values that your camera can record. The right side represents the maximum brightness values your camera can capture. On either end of the histogram the light values contain no detail. They are either completely black or completely white.
The height of the histogram (top of mountain peaks) represents the amount of individual colors. You cannot easily control this value in-camera, other than changing to a Picture Control with more or less saturated color, so it is for your information only.
We are mostly concerned with the left- and right-side values of the histogram, since we do have much greater control over those (dark vs. light).
Simply put, the histogram’s left and right directions are related to the darkness and lightness of the image, while the up and down directions of the histogram (valleys and peaks) have to do with the amount of color information. I repeated this for emphasis!
The left (dark) and right (light) directions are very important for your picture taking. If the image is too dark, the histogram will show that by clipping off the light values on the left; or if it’s too light, by clipping on the right. This will become easier to understand as we look at well-exposed and poorly exposed images. Check out the Histogram Basic Tutorial in figure 2 below, and then we’ll look at things in more detail.
The basics about the histogram
When you see the three histograms next to each other, does it make more sense? See how the underexposed histogram is all the way to the left of the histogram window and is clipped mid-peak? Then note how both edges of the well-exposed histogram just touch the edges of the histogram window. Finally, notice how the overexposed image’s histogram is crammed and clipped on the right. I hope this helps somewhat! Now let’s look at some histogram detail.
The shape of the histogram
Look at the image in figure 3. It is well exposed with no serious problems. The entire light range of this particular image fits within the histogram window, which means that it’s not too light or too dark and will take very little or no adjustment to view or print.
It contains no more than 4 or 5 stops (EV steps) of light range. To finalize the image, I might increase the brightness in the trees a little, but otherwise it’s a sound image with potential for immediate usage.
Compare figure 3’s histogram to the histogram graph on the left in figure 4. See how the figure 3 histogram does not cram itself against the dark value side, as seen in figure 4? In other words, the dark values are not clipped off on the left. This means that the camera recorded all the dark values in this image, with no loss of shadow detail.
Then look at the right side of the histogram graph and note that it is not completely against the right side, although quite close. The image contains all the light values available. Everything in between is exposed quite well, with full detail. A histogram does not have to cover the entire window for the exposure to be fine. When there is a very limited range of light, the histogram may be rather narrow.
The image in figure 3 is a relatively bland image with smooth graduations of tone, so it makes a nice smooth mountain-peak histogram graph. This will not occur every time, since most images contain quite a bit more color information. Each prominent color will be represented with its own peak on the histogram graph. The most prominent colors will have higher peaks, while the less prominent will have lower or no peaks.
As we progress into images with more color or light information, we’ll see that the histogram looks quite different.
Look at the image in figure 4. This is from an image that exceeds the range of the camera’s digital sensor.
Notice that, overall, this image is dark and looks underexposed. The histogram in figure 4 is crammed to the left, effectively being clipped off. There are no gradual climbs like on a mountain range, from valley to peak and back to valley. Instead, the image shows up on the left side in mid-peak. It is clipped. This is an underexposed image and the histogram reflects that well.
The most important thing to understand when you see a histogram like the one in figure 4, with part of the peak clipped off on the left, is that some or all of the image is significantly underexposed.
Now look at a similar image in figure 5 below. In this image, a larger aperture was used and more light was allowed in. We can now see much more detail. However, once again, the range of light is too great for the sensor, so it is now clipped off on the highlight side (right). The dark-side value is not clipped; instead, the graph extends to the left dark-side edge but stops there.
The image in figure 5 shows more detail but is not professional looking and will win no awards. The range of light is simply too great to be recorded fully. Many of the details are overly light, and that can be seen by the clipping of the histogram on the right side. The most important thing to remember here is that when you see a histogram graph that is crammed all the way to the right and clipped, some or all of the image is significantly too light. Overall, a great deal of the image in figure 5 is recorded as pure white and is permanently gone, or blown out.
It is important that you try to center the histogram without clipping either edge. This is not always possible, as shown in figure 5, because the light range is often too great and the sensor or histogram window can’t contain it. If you center the histogram, your images will be better exposed. If you take a picture and the histogram graph is shifted way left or right, you can then retake the photograph, exposing in the direction of the opposite light value.
If there is too much light to allow centering the histogram, you must decide which part of the image is more important, the light or dark values, and expose for those values.
How to post process using the histogram
The camera, with its imaging sensor and glass lenses, is only a weak imitation of our marvelously designed eye and brain combination. There are very few situations in which our eyes cannot adjust to the available light range. So, as photographers, we are always seeking ways to record even a small portion of what our eye and mind can see.
Since our eyes tend to know that shadows are black, and expect that, it is usually better to expose for the highlights. If you see dark shadows, that seems normal. We’re simply not used to seeing light that’s so bright that all detail is lost. An image exposed for the dark values will look very weird because most highlight detail will be burned out.
Your eyes can see a huge range of light in comparison to your digital sensor. The only time you will ever see light values that are so bright that detail is lost is when you are looking directly at an overwhelmingly bright light, like the sun. So, in a worst-case scenario, expose the image so that the right side of the histogram graph just touches the right side of the histogram window, and the image will look more normal.
Since photography’s beginning, we have always fought with only being able to record a limited range of light. But, with the digital camera and its histogram, we can now see a visual representation of the light values and can immediately approve of the image, reshoot it with emphasis on lighter or darker values, or see that we must use a filter or resort to multiple-exposure high dynamic range imaging (HDR) to capture it at all.
Computer adjustment of images
Looking at the image in figure 6, taken in mid-day overhead sunshine, we see an example of a range of light that is too great to be captured by a digital sensor but is exposed in such a way that we can get a usable photo later.
Notice in figure 6 how the dark values are clipped off and dark detail is lost. But look to the right side of the histogram and notice how the light values are not clipped off. The camera recorded all the light values but lost some dark values.
Since our eye sees this as normal, this image looks okay. If we were standing there looking at the cabin ourselves, our eye would be able to see much more detail in the front porch area. But the camera just can’t record that much light range. If we want to get a bit more detail in the shadows than this image seems to contain, we can do it. Normally, a camera does not give us enough control to add light values on the fly, so we use the histogram to get the best possible exposure and then adjust the image later in the computer.
Some cameras can be profiled to capture light ranges more effectively in one direction or the other, but when you push one area, the opposite area must give. So, we need a way to take all this light and compress it into a more usable range.
We are now entering the realm of post-processing, or in-computer image manipulation. Look at the image in figure 7. This is the exact same image as in figure 6, but it has been adjusted in Photoshop to cram more image detail into the histogram by compressing the mid-range values. Notice that the entire histogram seems to be farther right, toward the light side. Also notice that the mid-range peaks are basically gone. We removed a good bit of the mid-range, but since there was already a lot of mid-range there, our image did not suffer greatly.
How this computer post-processing was done is outside the scope of this book, but it is not very hard. Buy a program like Nikon Capture NX 2, Photoshop, Photoshop Elements, Lightroom, PhotoNinja or another fine graphics program designed for photographers. Your digital camera and your computer are a powerful imaging combination—a digital darkroom, where you are in control from start to finish, from clicking the shutter to printing the image. But, retreating from philosophy, let’s continue with our histogram exploration. Notice in figure 7 how the histogram edge is just touching the highlight side of the histogram window?
A small amount of clipping is taking place, and you can see the slightly blown out area on the peak of the cabin’s roof. Sometimes a very small amount of clipping does not seriously harm the image.
The photographer must be the judge. The greater apparent detail in this image is the result of compressing the mid-range of the light values a bit in the computer. If you compress or make the mid-range light values smaller, that will tend to pull the dark values toward the light side and the light values toward the dark side. So, you will have more apparent detail in your image. It’s like cutting a section out of the middle of a garden hose. If you pull both of the cut ends together, the other two ends of the hose will move toward the middle, and the hose will be shorter overall. If you compress or remove the mid-range of the histogram, both ends of the graph will move toward the middle. If one end of the graph is beyond the edge of the histogram window (clipped off), it will be less so when the mid-range is compressed.
We are simply trying to make the histogram fit into the frame of its window. If we have to cut out some of the middle to bring both ends into the window, well, there is usually plenty in the middle to cut out, so the image rarely suffers. Remember, this is done outside of the camera in a computer. You can’t really control the in-camera histogram to compress values, but you need to be aware that it can be done in the computer so that you can expose accordingly with your camera’s histogram. Then you will be prepared for later post-processing of the image.
In fact, now that we have compressed the mid-range values, figure 8.48 more closely resembles what our eye normally sees, so it looks more normal to us.
In many cases, your progression from the shooting site to your digital darkroom can benefit if you shoot NEF (RAW) images.
A RAW digital image contains an adjustable range of light. With a RAW image you can use controls in Capture NX2, Photoshop, or even the basic Nikon ViewNX2 software included with the camera to select from the range of light within the big RAW image file. It’s like moving the histogram window to the left or right over all that wide range of RAW image data. You select a final resting place for the histogram window, capture the underlying RAW data, and your image is ready for use.
This is a serious oversimplification of the process, but I hope it is more understandable. In reality, the digital sensor records a wider range of light than you can use in one image. While you might be able to use about 5 stops of light range in a normal image, the digital sensor probably records about 7 stops of light range. Although you can’t get all of that range into the final image, it is there in the RAW file as a selectable range. I prefer to think of it as a built-in bracket, since it works the same way.
This bracketed light range within the image is present to a very limited degree in JPEG, but is the most pronounced in pure RAW images. That is why many choose to shoot in RAW mode instead of JPEG.
Your camera meter should be used to get the initial exposure only. Then you can look at the histogram to see if the image’s light range is contained within the limited range of the sensor. If it is clipped off to the right or the left, you may want to add or subtract light with your Exposure compensation button, or use your Manual mode. Expose for the light range with your histogram. Let your light meter get you close, then fine-tune with the histogram.
There are also other Monitor viewing modes that you can use along with the histogram graph, such as the Highlights (blink) mode for blown-out highlights (see the Playback Menu > Display mode and select Highlights). This mode will cause your image to blink from light to dark in the blown-out highlight areas. This is a rough representation of a highlight-value clipped histogram, and it is quite useful for quick shooting. Using your camera’s light meter, histogram, and the highlight burnout blinky mode together is a very powerful method to control your exposures.
If you master this method, you will have a very fine degree of control over where you place your image’s light ranges. This is sort of like using the famous Ansel Adams’s black and white Zone System, but it is represented visually on the Monitor of your camera.
The manipulation of the histogram levels in-computer is a detailed study in itself. It’s part of having a digital darkroom. Learn to use your computer to tweak your images, and you’ll be able to produce superior results most of the time. Even more importantly, learn to use your histogram to capture a nice image in the first place!
Your histogram is simply a graph that lets you see at a glance how well your image is contained by your camera. Too far left and the image is too dark; too far right and the image is too light. Learn to use the histogram well and your images are bound to improve!
Exposure metering and the histogram
The histogram can be as important as the exposure meter. The exposure meter sets the camera up for the exposure, and the histogram visually verifies that the exposure is a good one. Together they will give you the most accurate exposures you have ever made, if you use them both.
If your exposure meter stopped working, you could still get excellent exposures using only the histogram. In fact, I gauge my efforts more by how the histogram looks than anything else. The exposure meter and histogram work together to make sure you get excellent results from your photographic efforts.
Figure 8 above shows two histogram types from my Nikon D7000. The first screen in Figure 8 shows a series of histograms to the right of the small picture of my grandson and me. On top is a white-colored luminance (brightness) histogram, followed by individual red, green, and blue channel histograms (RGB = red, green, blue). On the second screen at right, the luminance histogram appears to the right of the small picture of our cars in the snow.
What is the difference between the luminance and RGB histograms? Let’s examine both histogram types and see.
The RGB histograms show all three color channels that a camera uses—on an individual basis. Remember, the camera combines the red, green, and blue colors from its color channels to make the final color in the picture. The red, green, and blue colors are blended together to provide color in up to trillions of shades, well representing the colors your eyes see in your subjects. Therefore, the RGB histograms are simply representations of how well your camera exposed each basic color that it later combined into the final image.
Luminance histogram - what is it?
How does the luminance histogram differ from the RGB histograms. The luminance histogram is a representation of the perceived brightness (luminosity) from the combination of the red, green, and blue channels shown in the individual RGB histograms. In other words, the luminance histogram tries to accurately reflect the light you actually see by weighting its color values in a particular way. Since the human eye sees green most easily, the luminance histogram is heavily weighted toward green. Notice in Figure 8’s first image (at left) how the luminance histogram on top looks very similar to the green channel histogram below it. Red and blue are represented in the luminance histogram too, only in lesser quantities (59 percent green, 30 percent red, and 11 percent blue = luminance). The luminance histogram measures the perceived brightness in 256 levels (0–255).
In my opinion, the luminance histogram is a more accurate way of looking at the color levels in real images. Since it more accurately reflects the way our eyes actually see color brightness, it may be the best histogram for you to use. Now, let’s discuss the use of a histogram in detail.
Proper histogram use can improve your images
Finding and using your camera’s histogram(s) will guarantee you a much higher percentage of well-exposed images. It is well worth spending time to understand the histogram. I’ll try to cover this feature with enough detail to give you a working knowledge of how to use the histogram to make better pictures. If you are deeply interested in the histogram, there is a lot of research material available on the Internet. Although this overview is brief, it will present enough knowledge to improve your technique immediately.
I am going to concentrate on the luminance histogram. It is the best histogram for most photographers to use since it accurately reflects the way we see light. I am not going to keep on repeating luminance histogram over and over. From this point forward, when you see the word histogram, realize that I am talking about the luminance histogram.
What is the basis for the histogram?
When you take a picture, whether in JPEG, TIFF or RAW mode, the camera presents the luminance histogram based on its approximation of a JPEG image. In other words, the histogram is what the camera or computer would show for an 8-bit JPEG image (256 color levels per RGB channel).
When you take a JPEG (.jpg) picture the camera crams all the light values of the RGB channels into 256 levels. The same thing happens when you take a picture in 8-bit TIFF (.tif) mode. All the light values are reduced to 256 levels. When you shoot a RAW image, there are significantly more than 256 color values available. However, the camera still shows you a JPEG histogram when you are viewing a RAW (.nef) image on the camera’s monitor. In reality, most 12- or 14-bit RAW images can hold from 4096 to 16384 color levels per channel. However, all that color is represented by a 256-color-level-per-channel histogram.
In a way, this is a safety factor for RAW shooters. A RAW image has additional capacity to record light values within the brightest parts of the image (highlight headroom). The camera does not show you the histogram based on the total capacity of the RAW image. It uses a JPEG image as the basis for the histogram. For 8-bit JPEG and TIFF shooters, the histogram gives you exactly what you see and nothing more.
Therefore, if you shoot mostly in JPEG or TIFF, be careful that the histogram is exactly right or you may have badly exposed images. For RAW shooters, the histogram under-represents the actual highlight headroom you have available in the image; however, if you shoot for an accurate histogram anyway, you will have less noisy images, even in RAW, because the limited exposure range of the JPEG-based histogram fits well within the headroom of a RAW image. A RAW shooter just has more room to correct errors in exposure since greater range is available in the image than the histogram shows. As a RAW shooter, I always check the histogram for my best images.
The main point I want to make in this article is use your camera's histogram. Your pictures will be better for it!
Keep on capturing time...
Darrell Young (DigitalDarrell)
Originally written on May 22, 2013
Last updated on January 24, 2021
More articles that might interest you
Chris Linnon (ChrisLinnon) on May 6, 2020
Thanks for a very helpful description on using histograms.
CYL Photos (CYL) on August 27, 2016
Now I get it! Thank you so much!
User on June 11, 2016
Need to learn more about histograms. In my copy of "Mastering the Nkion D750", page 448, the author provided a link to this website to download a .pdf file titled "Understanding the Histogram" (to read off-line). I could not find that link.
SHRIPAD ANNIGERI (adsraj) on March 15, 2016
Very good, educative tutorial on histogram and its usage. Thanks a lot man. Came across a dummy on this topic, specifically for my camera body (D5300), but should be same for other Nikon(and other cameras) as well. http://www.dummies.com/how-to/content/how-to-use-the-rgb-histograms-mode-on-your-nikon-d.html
Phillip Christilaw (PChristilaw) on September 14, 2015
I am new to Nikonians. I found out about it when I bought my new D7100. I have been spending a lot of time looking at the resources Nikonians offers and I am excited.
Gary Worrall (glxman) on August 15, 2015
Thank you Darrell, Very informative, thank you for your efforts, .......Gary
Adam Lumia (Ada3m) on January 22, 2015
Neat, thank you for the article!
David Robert Jackson (Wingnuts) on November 11, 2014
Very very clear and understandable thanks for a great article.
User on June 15, 2013
Thanks for the great article, very helpful and I now understand my cameras histograms much better
Adel A. Mansour (mansour1) on June 4, 2013
Thanks Darrell for sharing your knowledge you nailed many points that used to confuse me like the difference between luminous and RGB histograms.
Christian Fritschi (ChristianF) on May 30, 2013
Thanks Darrell, this is one of the most useful article on the subject. I also take the opportunity to commend you for your "Mastering the Nikon D600". Both required reading in my humble opinion.
Joe Zamudio (cocavaak) on May 29, 2013
Overall a good article. I agree the histogram is extremely valuable. I teach remote sensing and I have a couple of comments. Figure 1. Regarding your statement that the middle ranges “represent middle colors” like gray, light brown or green. Gray is correct, and light brown will be in that range. However, you could get a saturated green that bumps up to 255 (green being a primary color). The histogram here just shows levels of brightness (DN) and mentioning color here is a bit confusing because we don’t see individual histograms for red, green, and blue. You state that the height on the histogram represents the amount of individual colors. Actually, the height represents how many pixels have a certain brightness (or DN) value. In figure 1 an abundance of pixels in the image have values in the low 120s. Figure 3. Your statement that each prominent color will be represented with its own peak is misleading. If we saw one histogram for red, one for green, and one for blue we could start talking about color, but with this histogram that combines all three colors we can only talk about brightness levels. If we looked at individual histograms for the three primary colors we might see that they each contain several peaks, some of which might overlap (as shown in your figure 8). For example, there are probably pixels of green vegetation that have the same brightness or DN value as the blue sky. Essentially, those peaks in the histogram represent different materials or objects in the scene. Shadows and dark objects will be represented by peaks on the left and bright objects will be represented by peaks on the right.
User on May 29, 2013
Excellent article - brings light to bear!
Ernst Schaefer (Erns Eye) on May 29, 2013
Excellent article, Darrell. Thanks for keeping it oriented toward getting better pictures rather than getting buried in techie stuff. I would be interested in your answers to some of the questions about cameras with higher dynamic range and the impact of histogram peaks going past the top of the histogram window.
Narikunni Jayanth (jaydoc40) on May 29, 2013
nice article worthy to be read again.
User on May 29, 2013
Very good article, well pitched and well written.
Patty Booth (Icn3s) on May 29, 2013
Excellent article! Thanks for posting.
MR HUW THOMAS (HUW) on May 29, 2013
great article and so simply put.
Gareth Jones (Llanddwyn) on May 29, 2013
Excellent and concise article. I have tried to understand the histogram for some time and this article fills in the gaps.
Yugal Kishore (yugal_kishore) on May 29, 2013
Thanks Darrell for the excellent article. Please share some information regarding how to avoid clipping of the histogram from the top. I was reviewing some of my images and found it. How do I interpret those?
User on May 29, 2013
Very well done, simply & concisely explained covering the whole subject in one article at a level for new starters in particular.
Kimball Jay Corson (Kimball Corson) on May 29, 2013
I disagree with several of the exposure critiques. I think the girl on the bench is lovely as is and the dynamic computer processing on the cabin in the woods is incredibly phony.
Olivier Rychner (olivierrychner) on May 29, 2013
Nicely done! It must be put high on the beginner's reading list!
Tom Ferguson (tekneektom) on May 27, 2013
Excellent article. Takes a complex topic and makes it understandable. Thanks Darrell.
Gail Peterson (montigre) on May 27, 2013
Excellent article; clear, concise and with good examples. Thank you for sharing!
Robert and Mary Pat Lichtman (Bob98) on May 26, 2013
Thank you for the excellent article. I greatly appreciate that you took the time to put this artile together. It is very helpful!
Henry Torres (htorres) on May 26, 2013
Thank you for explaining this in such a down to earth, easy to understand and able to follow along with using your suggestions. I totally understood how to use my histogram for the first time. Now I know what I was doing wrong in camera, instead of having to use software later thus not always getting the results I wanted in the first place. Now I am confident I will end up with the results I was looking for.
User on May 26, 2013
TO: Catalin Popescu That in shortcut depends on you. It is your photo and it is the most important, that you know what you want to have it as an outcome. If you are photographing night photos, you dont want the sky to be grey or even lighter then that. It should be black. The photo should reflect its original and even hese tools should not affect us in the final decision, what it should look like at the end. It is much better thou, to have many details in the photograph, even sometimes dark (or light) can bring up the purose and sense of the photo. Examples: http://images.nikonians.org/galleries/showphoto.php/photo/417288/size/big/cat/24483 This photo must be clamped to the side, because it is a dark photo. Even it has some middle tones and few lights, the final will look much on the left side. http://images.nikonians.org/galleries/showphoto.php/photo/416228/size/big/cat/24426 Basic photo like this is the best to have all informations in the middle, even there should be some peak due the dark flag holders behind me. Then there are photos, where you want to play with the deeper side, to make them look more sinister, but show them in full. The bellow is a good example. http://images.nikonians.org/galleries/showphoto.php/photo/416232/size/big/cat/24426 So the answer to your question is not easy, it depends what you were photographing, what you wish to say with it and if it is catching the eye. Good luck :)
Harihara Subramanian (shutterbug_iyer) on May 26, 2013
Excellent article. Explains the concept very well. Would have liked some tips on how to correct the setting for additional shots (if there is an opportunity) after seeing the histogram.
Mick Klass (mklass) on May 26, 2013
Are the more recent Nikons (post D200/D80) capable of far more range? 9-12EV?
Marie Sorell (MSorell) on May 26, 2013
Thanks! I've never really got such a simple explanation of this process. Now I "get it!"
Jim Willis (jwillisbarrie) on May 25, 2013
Makes it easy to understand. Thanks
Catalin Popescu (cpopescu) on May 25, 2013
Excellent article! Compressing the mid-tones is a different process than just manipulating exposure in post-processing to move the whole histogram to the left or right as needed, isn't it? If the histogram has no clippings to either side, does it make sense to make exposure adjustments in Capture NX or other software? What would you recommend as a good reading (for a non-pro) regarding compressing mid-tones in software? Thanks, Catalin
William C. Smiley (Synth) on May 25, 2013
Clearly stated and easy to understand.
User on May 23, 2013
I really, really, really appreciated this. Thanks a lot!
Carol Freshley (PhotoSpydie) on May 23, 2013
I really enjoyed reading this article. I especially loved the examples. While I though I understood my camera's histograms I learned quite a bit from the article. Thanks so much for sharing.
Mike Bell (mickeyb48) on May 23, 2013
Fantastic article. Now it makes more sense.
Robert O. Swanson (roswanson) on May 22, 2013
Excellent article as usual...