Image Histogram

An image histogram is a type of histogram that acts as a graphical representation of the tonal distribution in a digital image. It plots the number of pixels for each tonal value. By looking at the histogram for a specific image a viewer will be able to judge the entire tonal distribution at a glance. Image histograms are present on many modern digital cameras. Photographers can use them as an aid to show the distribution of tones captured, and whether image detail has been lost to blown-out highlights or blacked-out shadows. This is less useful when using a raw image format, as the dynamic range of the displayed image may only be an approximation to that in the raw file. The horizontal axis of the graph represents the tonal variations, while the vertical axis represents the number of pixels in that particular tone. The left side of the horizontal axis represents the black and dark areas, the middle represents medium grey and the right hand side represents light and pure white areas. The vertical axis represents the size of the area that is captured in each one of these zones. Thus, the histogram for a very dark image will have the majority of its data points on the left side and center of the graph. Conversely, the histogram for a very bright image with few dark areas and/or shadows will have most of its data points on the right side and center of the graph.

Image editors typically have provisions to create a histogram of the image being edited. The histogram plots the number of pixels in the image (vertical axis) with a particular brightness value (horizontal axis). Algorithms in the digital editor allow the user to visually adjust the brightness value of each pixel and to dynamically display the results as adjustments are made. Improvements in picture brightness and contrast can thus be obtained. In the field of computer vision, image histograms can be useful tools for thresholding. Because the information contained in the graph is a representation of pixel distribution as a function of tonal variation, image histograms can be analyzed for peaks and/or valleys. This threshold value can then be used for edge detection, image segmentation, and co-occurrence matrices.

Histogram vs LCD

Now that you know what a histogram is, you might be thinking to yourself that it would be easier to evaluate the exposure by looking at your LCD screen. This is a mistake! LCD screens have adjustable brightness that you can set yourself, so they’ll never give you a truly accurate rendition of your exposure. You’ll be able to tell if the shot is massively under or over exposed but the screen is really only useful for checking your composition. For accurate results, the histogram is your best friend!

Using The Histogram

The horizontal axis of your histogram goes from white through mid grey to black; from left to right. This is married to a vertical axis, which I always think looks a little like a mountain range, with various peaks and troughs. What this is actually representing is the relative quality of light for the given luminance of the scene. So, a perfectly balanced exposure will show a ‘hump’ in the middle, which tailors off on each side towards black or white. A digital camera that uses 8-bit sampling has 255 shades of grey, meaning that the histogram goes from 0 (black) to 255 (white). The arches on your histogram essentially show the brightness of an image. So, if you take a shot and see that the majority of your vertical arch is to the right of the image you will have a high-key image, which could be overexposed. Reverse this so that most of your data is on the left and you’ll have a low-key shot, which may be underexposed. Remember though that it’s not always a big fat negative to have a spike on one side of your histogram. For example, if you’re shooting with bright sunlight, it would be totally normal to see a sharp right-hand spike. A completely balanced histogram isn’t always going to be your goal. What you have to bear in mind is how to read the histogram, what’s in your scene in terms of brightness, darkness and contrast, and your desired result. With these elements taken into account, you can view your histogram and make adjustments – e.g. adjusting your exposure by changing your aperture, shutter speed or ISO or even recomposing your shot to change the amount of light or dark areas in your image.