Histograms and digital imaging…hearing those words puts most photographers to sleep, which is too bad. With a little attention and practice, any photographer can understand and use histograms to give us the best exposure possible for digital image files.
A histogram is a graphical representation of the distribution of data, commonly used in the world of statistics. It is, according to Wikipedia, one of the basic tools of quality control.
In photography, it serves the same purpose, with the horizontal axis telling us how the tones of our images from solid black to solid white are distributed. The vertical axis tells us how many tones there are in the same image. The information in the histogram graphs the colors and tones in our photos whether that histogram is on the back of your camera, on your computer screen, or elsewhere in the world of digital imaging.
RAW vs JPG
A couple important caveats when it comes to histograms and exposure. The art of making a good histogram applies only to making good RAW files. This is because, in many ways, JPGs are a lot like slides! A JPG is a processed file where the original RAW colors and tones have been processed, tweaked, adjusted, clipped, reworked and generally degraded to fit a universal file format. The good news is a processed file can be viewed by anyone with a computer. The bad news is much of the best image data has to be thrown out in that same process. In the best of all worlds, a perfect JPG, like a perfect slide, can sometimes be a thing of beauty.
But most of us live and photograph in the real world, which is where RAW files are important. A RAW file lets us work with the RAW information, as it is right off the digital imaging sensor and then adjust it as needed. We can correct for mixed light, less than ideal exposure, etc. This is done BEFORE the RAW information is turned into a finished or processed file. This same processing usually means a lot of valuable information is thrown away.
RAW files are like negatives! The smart photographer works to get as much information as possible in their RAW files. Like in traditional analog printing, you make the best negative (RAW file) possible and then make the image you want in the final printing during post-production.
Each camera’s imaging sensor has a given number of pixels (or picture elements). The actual number is determined by some simple math. For example, a sensor that has 12 megapixels actually has 3000 pixels on the vertical axis and 4000 pixels on the horizontal axis. Thus 3000 x 4000 equals 12,000,000 and since each 1,000,000 pixels is one megapixel, we have a 12 megapixel sensor.
Each pixel is usually made up of one red, one blue and two greens sensors, a so-called “Bayer array,” used because human eyes are twice as sensitive to green. Each sensor does not literally measure color. There is a colored filter over every sensor because they ONLY measure brightness! Pixels are little “light meters” measuring brightness (not color). Those fil- ters over those sensors and some pretty fancy com- putations turn those brightness readings into the RAW data that ultimately become final images. Since the RAW information has not been processed into a finished file, cameras automatically make a tiny JPG that is embedded in the RAW file, seen as an image on the back of the camera.
The secret to good RAW files? Understanding how to evaluate the histogram on the back of the camera −get in the habit of using the image area that you see to judge framing, focusing and composition, but not to evaluate exposure. Use the histogram to evaluate your exposure−knowing this often means ignoring what look might appear like overexposed images on the camera monitor.
Why is this? Lets go back a bit to the mechanics and especially the mathematics of the histogram. All of the colors in any image are made up of some combination of red, green and blue tones. An image of a gray card will in fact be made up of 128 red tones, 128 green tones and 128 blue tones. An image that is mostly red (or green or blue) will have a higher number of that one color and lower numbers of the others. That is how we get the colors in our images, by mixing varying amounts of red, green and blue.
Now go back to the histogram itself and remember that the left to right axis measures the spread of the tones. Then throw in the idea of the red x green x blue calculation. What that means is that because of the mathematics, only 25% of your possible tones are to the left of the midpoint in the histogram and 75% of the tones are to the right of the midpoint in the same histogram.
For one-time film shooters this is enormously important. With film, the steps from solid black to solid white were equal in value. In digital imaging they are not equal. Again, 25% of your tones are to the left of the midpoint and 75% of the tones are to the right of the midpoint. Repeat that to yourself a few times if you are a former film shooter like me.
So how does that play out in getting the best exposure? First, it means that the tones to the left of the midpoint are best thought of as “bad tones” since there is more space between them (since only 25% of them are on that side but they take up 50% of the histogram). The gaps between the “bad” tones result in coarse transitions in your final image. For example, instead of the red tone going smoothly from red to slightly brighter red, that transition looks coarse and obvious.
On the other side of the same midpoint, the opposite is true. 75% of the tones are crammed into 50% of the real estate of the histogram, so those are “good tones,” where you have less space between tones, resulting in smoother tonal transitions in your final prints.
Also, the space between tones on the side with the bad tones, to the left, exaggerates any noise, especially if your image is underexposed and the histogram is pushed far to the left. A key to reducing or eliminating noise is to expose your RAW file properly, which in most cases yields a histogram as far to the right as possible, as long as you do not cut off tones. The “mantra” or rule to repeat over and over is “expose to the RIGHT!”
Cutting off tones or clipping is a problem if you cut off many tones. This applies to both ends of the histogram, whether on the dark side to the left or on the light side to the right. On the other hand, if the only tones that are cut off are small and obviously pure white, such as car headlights or bits of shiny chrome, that is not a problem.
While the horizontal axis measures the quality of tones, the vertical axis simply measures quantity. If by chance the histogram goes upward and “off the chart,” nothing is wrong. It means that your image has a high quantity of tones and that the histogram display you are looking at is not big enough to show that.
THE GOOD HISTOGRAM
This leads us to what a good histogram looks like. There are many shapes that your histograms can be, most of which are equally valid. There is no single perfect, typical or required histogram. A histogram with two spikes, one to the left and one to the right with few or no tones in between, is probably a silhouette (or a close up of a zebra). A histogram with a giant spike of middle tones but no blacks or white is something that is a middle tone in color and has lots of bits of texture, like grains of beach sand for example. A “perfect” histogram should represent the tones in the image, be spread across the image with a bias to the right (the better tones) and have as little clipping on either side as possible. Other than that, any shape is as good as any other.
The point is to get a good exposure for a RAW file, even if it looks too light as seen on the back of your camera. Do this to avoid a “combed” histogram, which results when you take a digital file that looks good but it is in fact underexposed. In that file you are wasting the best tones (the ones to the right). In order to get a good print with a full range of tones you will have to go into a program like Photoshop, spread the tones out and push them to the right. As you do that, gaps are created as you spread the darker tones apart, moving tones that were to the left into the middle or right side. The resulting gaps between the tones result in the dreaded combed histogram and a print with coarse tonal transition, bad colors and noise.
Digital imaging is the classic example of “garbage-in garbage-out.” With a little care, any photographer can use histograms to get the best exposure possible for their digital images. The two parts of the screen on the back of your camera are like apples and pickup trucks. On one hand, they have nothing in common. But like on an apple farm, knowing what to do with each one makes the whole thing work for the best.
Editor’s Note: The histograms for the images shown are for the FINAL images made with well exposed RAW files that have been processed to look the way they are in the article. Those histograms are NOT the original histograms of the capture RAW files.