The Histogram

The histowhat?  One of the best kept secrets digital cameras have to offer is the histogram.  All professional DSLRs offer it, newer prosumer cameras offer it, and it is making inroads into entry level digicams.  Many do not know that this feature exists; some have come across it but do not understand what it is all about.  But what is it?

Convert our photograph into black and white and all the color information is blended together into a monochromatic image.  The tonality will range from black (in the deep shadows), to white (highlights).  The camera breaks up this tonality from 0 to 255, respectively (8 bits).  Cameras then store this information as binary data in the resulting file.  It does this with each of the RGB channels.  Resulting in a 24 bit overall image.

Each pixel, or photo sensing element, is covered by either a red, green, or blue color filter, and therefore only sees a monochromatic image.  These pixels are laid out in an array, referred to as the Bayer Array, named after the Kodak engineer who developed the pattern.

As a consequence of the Bayer Array, green photo sensing pixels outnumber the red pixels in a 2:1 ratio. The number of blue and red pixels is equal.  Since green is between red and blue in the visible color spectrum, this allows better rendition of detail.

The histogram is simply a map of how many pixels are assigned a particular value.  The histogram evaluates the overall brightness (luminance) of all three channels combined.

Although typically only the luminance channel is evaluated, advanced cameras and many software products have the ability to analyze individual color channels.


Exposure and the Histogram

Underexposure
This photo appears too dark.  Looking at the histogram, we see it is shifted left, indicating the bulk of the pixels resides on the lower end of the brightness scale.  Notice the brightest pixels start about halfway between the right border and the rightmost bar.  Each bar in this histogram represents one stop of light - this particular histogram displays four stops of dynamic range.  This indicates the brightest pixel is ½ stop from being pure white.

On further examination, we see the bulk of the curve actually starts at the rightmost bar.  This photo is actually 1 stop underexposed, -1 Exposure Value (EV, equivalent to 1 stop of light).  To rectify this we apply the knowledge we gained from the last chapter on exposures and do one of the following:

  • Add +1 EV on the camera and let the camera decide what to do with it.
  • Use a slower shutter speed, doubling the exposure time.
  • Open up the aperture 1 stop, increasing the amount of light let in and decreasing DOF.
  • Increase ISO sensitivity, doubling the ISO value and increasing the noise in the image.
  • Correct it in post-processing, which results in even more added noise than if shot at a higher ISO.

Overexposure
This photo appears too bright.  Looking at the histogram we see it is right skewed.  There is almost no pure black (0 value) and the highlight peak goes off the scale (255 value).  This clipping of highlights results in loss of detail.  This example is actually 1 stop overexposed (+1 EV):

As with the underexposed image, there are several things we can do to correct the exposure.  Our action to counter overexposure will be opposite of the action used to counter underexposure.  We must also pay special attention and watch for lost highlight detail:

  • Add -1 EV on the camera.
  • Stop down the lense, increasing the DOF.
  • Increase the shutter speed.
  • Decrease ISO sensitivity, though if shot at base ISO, this is not possible.
  • Correct in post-processing, which would result in large patches of white/gray due to the lost highlights.
Proper Exposure
With the correct exposure, we see the histogram distribution matches the image characteristics.  The resulting photograph optimizes color saturation and minimizes noise.  Use of the histogram on the camera allows us to evaluate a photo on the spot and determine what kind of adjustments we need to make to obtain the desired image.  Making these corrections in the camera during the shoot results in better overall image quality and reduces the amount of post-processing work.
 

Images and the Histogram

Here a mid-toned image produces a histogram where it is easy to identify which part of the image results in each peak. Remembering to disregard color information for luminance channel histograms we get:

                • Main peak - Gray background.  Notice the background encompasses a large area and is fairly monotonic.  This results in a high, and sharp peak, respectively.
                • Smaller peak to the right - This is the highlights coming from the tips of the anemone's tentacles and the bubbles.
                • Small peak on the right boundary - This is the clipped whites in the bubble highlights.
                • Peak to the left:  This peak is the anemone body itself, parts of which (the shadow detail) clip to black.

In this example, the curve is a nice bell shape.  This is not always the case.  In fact, it is rather unusual.  Due to the light transmitted through the curved surfaces of the bubbles, a smooth transition from white to gray results.  The resulting histogram reflects this characteristic.

 

Not all histograms are nicely distributed throughout the tonal range.  In this high-key shot, we notice the histogram is right-shifted.  Yet, the hermit is properly exposed.  The large amount of white in this image contributes to this right shifting and is appropriate for this type of image.  It does not, in this case, indicate an overexposure.

 

A low-key histogram is left-shifted.  In this example, there is a huge amount of black.  The entire background essentially clips to pure black.  Notice the small, almost insignificant hump just to the right of the rightmost bar?  This hump represents the tonal range of the snail.

With a little practice and careful experimentation with simple, clean scenes, you will be able to master histograms.  This powerful tool is basically a built in professor that teaches us how to judge a scene, the luminosities, and how to expose for our subject.  Use it to your advantage.


Page: