Sunday, May 8, 2011

About Histograms

One major advantage of Digital over Film is that you can see the results instantaneously, and if needed change the settings and re-take the shot. We normally use the camera's LCD screen for that. However, LCD screens can be deceptive. A more accurate way of determining whether the exposure was correct or not is using the histogram. Almost all digital cameras have them, so lets learn how to read and interpret them.

First of all, a histogram is nothing but a bar chart. Lets take a look at a simple example of a bar chart:
This bar chart is of a hypothetical mark distribution in a class. On the Y(vertical) axis, we have number of students. On the X(horizontal) axis, we have categorized marks into 4 groups, 0-25, 25-50, 50-75 and 75-100. You can see that the height of each bar is proportional to the number of students getting marks that fall into that group.

A histogram is basically the same thing. Instead of number of students on the Y axis, we have number of pixels. On the X-axis, instead of categorizing students by their marks, we categorize pixels by their brightness values, into 256 categories, ranging from 0-255 (for jpeg, 8-bits=>2^8=256 values). 0 represents pure black, while 255 represents pure white. A typical histogram looks like this:

You will not see all this, of-course. The camera will only display the distribution, to save space:
So now, the taller the bars in a specific region, the more the number of pixels having those brightness values. So how do you use this for exposure?
A normal image will have a full spectrum of tones ranging from black to white, well distributed. If the histogram has too many pixels on the left side, it means your image is underexposed, while if there are too many on the right side, the image is over exposed. If you have a very tall bar just near 0 or 255, it means the shadows or highlights respectively are clipped(lost all detail). You may have many times experienced highlight clipping... the sky becomes completely white, losing all detail of clouds, etc.

See this example of histograms of differently exposed images:
Courtesy: http://www.thecolorblindphotographer.com/

So next time you take a picture, don't rely on the LCD screen. Take a look at the histogram too!(and underexpose/overexpose if necessary)

PS: Sometimes the histogram SHOULD have more values on one side, for example snow. It should appear white-ish in the image, so you want most of the pixels to be on the right side. However using the histogram, make sure the highlights DO NOT get clipped.

3 comments:

  1. thanks. very helpful. will share.
    doug

    ReplyDelete
  2. Man ! Awesome..article ! Simple to learn basics...reading all other articles.... ! Good go :) Plz write some articles on tips n tricks for portraits and natural scene photography ,.

    ReplyDelete