By Ellis Vener
“The map is not the territory” – Alfred Korzybski
What is a histogram and what does it tell us about a photograph?
A histogram is nothing more than a bar graph. It shows how the luminance values in a digital or digitized photograph are distributed. The linear scale in a histogram runs from black at one end to white at the opposite end. With the exception of a scanned negative, the scale runs from left (black) to right (white). About 99 percent of the histograms we use in photography today have 256 increments, corresponding to 8-bit data depth. The histogram maps the distribution of the luminance values either as a composite of the red, green, and blue channels or in each channel, as you may have seen in the histogram display on some cameras and as option in Photoshop.
The horizontal scale of the histogram measures exposure latitude, and the vertical scale measures quantity: it tells us how many pixels in the image have a specific luminosity value. While the horizontal scale is measured in absolute values (0 to 255) the vertical scale is effected by several factors: the color space, bit depth, and if you are shooting jpegs, the compression level.
Above, the histogram display from Adobe Photoshop Camera Raw shows channels represented by different colors.
That brings up another issue. Exactly what data is the histogram you see displayed on your camera’s LCD preview screen based on? More than likely, the data being sent to the preview is based on a highly compressed low-resolution jpeg using an 8-bit-per-channel version of the color space you’ve chosen and possibly incorporating the tone settings you (or the camera manufacturer) have set as in camera processing parameters.
For those of us who shoot raw and use larger color spaces and 16-bit-per-channel bit depth, there’s more information in the raw file than the histogram will lead you to believe. That’s both a bad thing (not all of the information is represented in the histogram’s analysis of the data) and a good thing (you know that at least you’re working safely).
Figure 1: The extended view of the Photoshop CS3 histogram (above) shows the histogram of a NEF file from a Nikon D300, first processed using Adobe Photoshop Lightroom v.1.3 and output as a 16-bit per channel image in the Pro Photo color space and then opened in Photoshop CS3.
Figure 2: The histogram changes significantly when a duplicate the image (created in Photoshop CS3) is converted into 8-bit per channel Adobe RGB(1998) form (above).
Figure 3: Above you see the resulting difference in the histogram when a second duplicate was made from the 16-bit per channel Pro Photo TIFF, and converted into 8-bit per channel sRGB form.
Figure 4: The histogram above simulates the loss of data that happens in-camera when you opt for to output a fine/large JPEG instead of a raw file. Notice that while the shape of the two JPEG histograms (Figures 3 and 4) are very similar to each other, there's a definite large spike on the tail of the red channel in the straight raw (NEF) to JPEG version (Figure 4) that isn't there in Figure 3.
So a histogram is a useful tool for helping you analyze, at a glance, how the information and exposure data in a photograph is distributed. It shows the luminosity range of the image along with how it is distributed.
How can we use this information to make better photographs? The late Bruce Fraser articulated a key concept by explaining ”tonal differences are detail.”
The first thing we need to watch for is clipping. A warning sign of clipping is when you have anything resembling a peak at either end of the histogram. Remember: the taller the bar the more data is at a specific level of luminosity. Unless there are detail-free areas of black or white in significant size in the photograph it is likely that your exposure setting (aperture + shutter speed + ISO setting) is destroying (“clipping”) the differences that define detail at the extremes of your exposure. That can be a problem for wedding photographers.
One rule of thumb when using a histogram to evaluate exposure is the oft-cited expose to the right. There is a sound reason for doing this and it goes back to how the CMOS and CCD sensor arrays in digital cameras and scanners work. These arrays are linear devices. In most current DSLR cameras, the CMOS or CCD records data in either 12-bit or 14-bit-per-channel form. Each additional bit doubles the degree of differences that can be recorded.
It’s important to understand that each pixel in a camera’s array is a separate monochrome device. It does one job: record the total amount of light striking it. A 1-bit device is like a light switch: it has two states, it’s on (white) or it is off (black). A 2-bit device has four states (or 4 shades of gray: white, light gray, dark gray, black). A 3-bit device has 8 states (white, six shades of gray, and black), a 4-bit has 16, and an 8-bit device has 256 (2 x 2 x 2 x 2 x 2 x 2 x 2 x2). A 12-bit device has 4,096 and a 14-bit device has 16,384 states it can be in. Obviously, the more states the smoother the transition between one shade of gray and the next.
To keep this simple I’ll use a 12-bit-per-channel model. Devices record light in a linear manner, but the pixels do not evenly share the wealth of detail. The brightest stop of exposure contains half of the available states, or levels of detail (2,048 in 12 bits). The second brightest stop down contains a quarter of the total (1,024) the third brightest contains 512 levels, the fourth brightest 256, etc.
So the further to the right you expose without clipping the highlights, the greater amount of differences you are recording. Once you have recorded the image you can start teasing it apart to see the differences in tone.
When you start with an underexposed image and have to lighten it during processing you create gaps between the steps because you have fewer and cruder gradations of information recorded. Visually this shows up as banding (abrupt changes in tone). Noise begins to visibly become more apparent, too. Yes you can reduce noise with software, but at the expense of detail and time. So exposing correctly in the first place results in both better image quality and saved time.
If you come from a background of shooting film “expose to the right” echoes the advice of master black-and-white photographers who taught us to expose for the shadow details and process and print for the highlights.
Many cameras today now offer the option of either viewing a simple composite luminance histogram or if you choose, to let you examine a per-channel view to see more precisely what the exposure level is in each color channel. If you fall into the class of people who believe that the more information you have to work with, the better informed your decisions are, you should explore this option.
The histogram display in Adobe Photoshop Lightroom translates different areas of the histogram in terms a photographer understands more intuitively: Blacks, Fill Light, Exposure, and Recovery (recoverable highlights). These areas are indicated by a lighter gray background when you hover your cursor that section of the histogram.







Comments (24)
PPA has a penchant for light gray fonts which are difficult to read. Black is better.
Posted by Bob Hall | December 10, 2007 9:29 AM
Posted on December 10, 2007 09:29
A histogram is NOT a bar graph. A bar graph is for discontinuous data, a histogram is for continuous data. Had the colors been lumped into groups, like Red, Green, Blue, with no in-betweens, one would present the data as a bar graph.
Posted by Bob Hall | December 10, 2007 9:33 AM
Posted on December 10, 2007 09:33
Nicely written article!
Posted by Bob Hall | December 10, 2007 9:44 AM
Posted on December 10, 2007 09:44
This is a clear and well written article. Covers the subject in an intelligent, easy-to-follow manner.
Posted by PhotographyVoter.com | December 16, 2007 5:23 AM
Posted on December 16, 2007 05:23
Actually, a histogram is a bar graph, because the data is discontinuous. The very nature of a digital capture assure that is is 100% discontinuous - it just looked like it isn't.
Posted by Neal | December 16, 2007 4:32 PM
Posted on December 16, 2007 16:32
this is really good info ...
all i knew about histograms is that we should try to make it like mountain and it should be in the middle ...
thanks for this info ... this is good ...
Posted by subcorpus | December 16, 2007 6:18 PM
Posted on December 16, 2007 18:18
Very helpful info for a new photographer like me. Thanks!
Posted by Thomas L | December 16, 2007 7:09 PM
Posted on December 16, 2007 19:09
A histogram is not a bar graph. Ask any statistician.
Posted by Brendan | December 16, 2007 9:31 PM
Posted on December 16, 2007 21:31
A histogram is a distribution of binned data. It resembles a bar graph, but reports data by height, where a bar graph reports data by area. However, for the sake of layman's arguments, the point is to make non-statisticians understand the concept.
Anyway, the article has some nice insights for folks new to the idea of using a histogram. Statistical lexicon notwithstanding.
Posted by Scott | December 16, 2007 11:33 PM
Posted on December 16, 2007 23:33
This in fact IS a bar graph. For it to be digital, that means it has to be non-continuous. Each color has to be represented as color X or color Y or color Z, etc. There are just so many colors on the bar graph (and the nature of shading is such) that it appears to be continuous. But if you want truly continuous, you have to use analog (aka film), which can capture infinitely small subtleties in light differences. A digital camera must at some point assign it either one color value or another.
Posted by Ross | December 17, 2007 9:42 PM
Posted on December 17, 2007 21:42
I'm more confused than when I began.
Posted by Mark | December 17, 2007 9:55 PM
Posted on December 17, 2007 21:55
Great article! This is a good lesson for anyone with a digital camera (that displays a histogram) as I would assume most who buy digital cameras are fully learned on all its features.
A lot of the photographs I take are product or set up shots. Knowing the histogram helps me take better photos that show all the item's details (even in shadow) without turning the highlights into bright, white blotches.
I only wish that more lower end digital cameras shot to (or at least gave the option) a raw format or, at the very least, something uncompressed, like TIFF. For personal use I prefer a more compact camera but desire the options of higher end camera. Dragging a $700 digital SLR everywhere for quick photos isn't convenient but the quality of my photos suffer due to the lack of features on most small, pocketable cameras.
Oh, off topic, what is this blog's anti-spam "type this word" measure called? I am looking for myself and a friend.
Posted by Aaron | December 18, 2007 8:02 PM
Posted on December 18, 2007 20:02
Great text! Thanks!
Posted by pepemosca | December 18, 2007 8:14 PM
Posted on December 18, 2007 20:14
Great article. Best I've read here so far. Ellis is a wonderful contributor to photo.net and I was glad to see him as author.
Posted by Paul | December 20, 2007 12:30 AM
Posted on December 20, 2007 00:30
Aaron-
You might be looking for the term CAPTCHA?
Posted by R | December 20, 2007 10:03 AM
Posted on December 20, 2007 10:03
Bob! Neal! Scott! Ross! Why is it necessary to belabor inconsequential distinctions between continuous and discontinuous - with respect to histograms? Who cares all that much?! Lunatic fringe literalists will debate anybody about anything with little more purpose other than to just be an annoying pain in the butt. In the end, the point to be made (if there ever was a point) is barely relevant, and usually ridiculous. If you simply enjoy grinding away in an endless, useles nagging debate, let me introduce you to my ex-wife!
Posted by Roc | December 20, 2007 12:46 PM
Posted on December 20, 2007 12:46
What is photo histogram?
http://garmahis.com/tutorials/what-is-photo-histogram/
Posted by Michael Garmahis | December 20, 2007 4:43 PM
Posted on December 20, 2007 16:43
Ellis, well written and easy to understand. You just eared a spot in my RSS aggregator. Nice work!
Posted by Casey Wise | December 21, 2007 8:05 AM
Posted on December 21, 2007 08:05
OMG... it's funny to watch the "rabbit hole" that the conversation went down. I especially like Roc's comment! Thanks for the perspective. On the article... I enjoyed it. Succinct, detailed but not too long and great visual examples. Thank you.
Posted by Patrick Shuck | December 22, 2007 10:12 AM
Posted on December 22, 2007 10:12
The problem with this article is that someone who understands terms like "distribution of luminance values" and "discrete channel data" already knows exactly what a histogram is, or can quickly figure it out. Not going to help my budding but non-technical photographer girlfriend.
Posted by Adam | December 23, 2007 4:27 AM
Posted on December 23, 2007 04:27
Nice article: and could care less whether it's a bar graph or not.
I think I get it...
"Keep the lumps in the square."
Posted by CJ in Austin | December 28, 2007 3:31 PM
Posted on December 28, 2007 15:31
Bar Graphs are cool
Posted by Ryan | January 9, 2008 4:49 PM
Posted on January 9, 2008 16:49
Very nice article on the Histogram palette. I love that someone is still shouting "expose to the right."
Jim Hoerricks
Forensic Photoshop
Posted by Jim Hoerricks | March 7, 2008 7:12 PM
Posted on March 7, 2008 19:12
I read this article and unfortunately still don't know what i should be looking for on my histogram.
although the article does explain a little more to me, i still don't know what a "good" histogram should look like, and once i do know that, not sure how to get it there.
can anyone please go a little more basic in an explanation?
thanks
Posted by shuttersue | April 26, 2008 11:00 PM
Posted on April 26, 2008 23:00