Post Calendar

May 2009
S M T W T F S
« Apr   Jun »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Curves 1: The Histogram

Modern photographers are inundated with numerous tools for adjusting their images. Some can be used to adjust contrast, brightness, saturation or even fancier sounding things like clarity. Unfortunately one of the most powerful tools at the photographer’s disposal is also one of the least understood, and as a result is frequently avoided. Use any photo editing program and you’re bound to see something called curves, but if you don’t know what that is or how it works you’re missing out on what I think is one of the best means of adjusting and enhancing images.

ps-curvesTo the left you can see what the curves tool looks like in Photoshop CS3 (click to enlarge this or any image in this article). This window shows you a number of things, but the most important is that line running at a 45 degree angle over the histogram. Even though it’s a straight line now that is the curve we will be focusing on. That line is superimposed on the histogram of the image you have open in Photoshop which brings up another topic that is essential but tends to confuse many. The histogram is a display of how all the pixels in your photo are distributed among the range of available tones (or brightness values) from black to white. To understand how to use curves it helps to first have an understanding of the histogram. While I won’t cover every aspect of the histogram (this post would be too long) I will start by providing a quick overview before we get into the key functions of the curves tool.

Histograms

Like curves, histograms will pop up in many places when you use photo editing programs. In Capture One, my favorite RAW converter, you can see three histograms on a single editing page if you turn all the features on! While all these histograms can tell you a lot about your photo, they won’t tell you anything if you don’t know how to view one.

Photoshop CS3 histogramsA histogram is simply a means of grouping & categorizing something and displaying how many of those things fall in each category. For instance, you could create a histogram showing how many M&Ms are of each color in a particular bag. For a given photograph the histogram tells you how much of the image (how many pixels) are at each brightness level. If we assume we are dealing with an image which is an 8 bit black & white then there are 256 possible shades of gray. For a 24 bit RGB color image there are 256 shades of red, 256 shades of green and 256 shades of blue available. These shades range from 0 for black on the left end of the histogram to 255 for white (or maximum red, green or blue) on the right end. It is not uncommon to see these shades referred to as tones, gray levels or as brightness or lightness.

The many histograms (a brief sidestep)

histogram-example

As the example above shows there is not just one histogram we can look at for a given image, there are various types of histograms, each of which has its own uses. When looking at a color photo in Photoshop you can choose between six different histograms to display. The ‘standard’ histogram most people probably have up by default is the RGB histogram, however the other options include Red, Green, Blue, Colors and Luminosity. Human vision is most sensitive to green light, followed by red and finally by blue, and the luminosity histogram takes this in to account and displays how the overall image will appear in terms of perceived brightness. The luminance histogram is created by weighting and combining the separate red, green and blue histograms based on our sensitivity to those colors. The RGB histogram is a straight representation of the digital values (shades) in the image which are not as easily related to perception of the brightness, or luminosity, of the image but can be more useful for determining whether you have clipping problems in your image. I prefer to work with the RGB histogram because I feel it makes it easier to tell whether you have useful separation of detail in the shadows and it provides a clear indication of whether your color channels are clipping.

Contrast

Comparison between the original (left) and a tonally compressed version (right).

Above we can see two versions of the same image. On the left the original image is shown along with its RGB histogram. This image has a large tonal range – we can see that its histogram covers all shades from 0 to 255 although it does drop off some at the ends. The image on the right has had its tonal range compressed by limiting the allowed shades to a smaller range – this can be done using the levels or curves tools. We see that as a result it is lower in contrast and its histogram is much narrower. Although this is a contrived example, the histograms for low contrast images are distinctive in that they are narrow. Beyond describing its contrast another basic description of an image that can be revealed by reading a histogram is whether it appears overall bright or dark. If we saw a histogram that had a higher distribution of pixels towards the left then we could call the image dark, or low-key, whereas a histogram that is much higher towards the right end might be considered bright, or high-key.

Histograms & exposure

Since a histogram is a representation of the the distribution of the pixels in an image according to their brightness (or shade), its shape depends on the exposure. When bracketing exposures, as the exposure is increased the histogram will shift to the right, conversely as the exposure is decreased the histogram will shift to the left. Unfortunately, once again the topic of histograms can become much more complicated when we consider what kind of scale the histogram is displayed on. That’s another topic that could be even longer than this guide to curves and histograms, but there are some other resources about that scattered about the web. You can get a quick idea by checking out this Adobe paper, and doing a web search on “linear vs log histograms” will start to send you deeper down this particular rabbit hole.

Four exposures bracketed from -1 stop to +2 stops.

In the uninspired (photographically speaking) example above we see a photograph taken of the same scene but with varying exposure. The leftmost image was set to underexpose by one stop while the image on the far right had two extra stops added to the normal exposure. Their corresponding histograms show that as exposure is increased the distribution shifts to the right however it also changes in shape as it does this. If we break the image into two regions – the woods in the background and the pond in the foreground – we can see two sections of the image with a noticeable difference in brightness. We can attribute the two peaks of each histogram (less noticeable in the +2 stop exposure) to the corresponding regions of the image. Referencing the histogram for the normal exposure, the leftmost bump corresponds to the woods which is the largest of these two areas in the photograph. The higher the histogram is, the more pixels there are at that brightness, so we have a large number of darker shades. As the exposure is shifted to overexposure the histogram moves to the right. The rightmost bump in each histogram, corresponding to the surface of the pond, moves until it is very close to clipping highlight detail in the +1 stop exposure second from the right. In the rightmost image the exposure was pushed up by two stops and as we can see the surface of the pond is totally blown out as a result. The histogram is also heavily clipped, showing a lot of pixels stacked up all the way against the right end of the histogram. While highlight detail in the +1 stop exposure could be recovered if the exposure was pulled back in a RAW converter, it is unrecoverable in the +2 stop image.

Back to curves

Hopefully this has provided some background to help anyone who was still confused about the histogram. Without an understanding of the histogram you’d really be flying blind if you start playing with curves in my opinion. Because of the length of this I have chosen to break it in to three posts, so if you would like to continue reading please head to the next article: Curves 2: The Curve

Leave a Reply

  

  

  


*

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Help keep this site alive!
Once You Know, You Newegg
Get Adobe Flash playerPlugin by wpburn.com wordpress themes