Adobe Photoshop Tutorial. Copyright Michael B. Karbo.

  • Next chapter.
  • Previous chapter.

    26. Histograms and levels

    One of the most elegant tasks in picture processing is Tonal Adjustments, which is also one of the most difficult things to handle.

    In Photoshop Tonal Adjustments are made especially with the functions Levels and Curves, which can be used for the most incredible improvements of poor color pictures. Even the dullest and sadest looking picture can be spruced up, so it looks pretty and inviting.

    But is requires effort to be able to master such tonal adjustments. Levels and curves are actually found not just in Photoshop; they are general functions, which are included in many picture processing programs. The functions are also found in better scanner software, where it is a great advantage to make the adjustments before the scanning itself. Certain digital cameras can also work with histograms and curves.

    To look at histograms

    You will guaranteed experience pictures that are too light or too dark, which have poor contrast or have off colors (got way too red) etc. Before you start repairing such a picture, it might be a good idea to first look at the picture’s distribution of color tones. The most important tool for that examination is the so-called histo-gram.

    A histogram is a curve in a system of coordinates, as you see in Figure 62. The curve represents the picture’s total content of dark, middle and light tones. In the left side you find black, in the right side white. The color tones are divided in 256 steps, and each step is called a level. The curve’s height indicates how big a part of the picture’s total pixel mass is in each level. The higher the curve is, the more there is of that particular color tone in the picture.

    The histogram may appear quite mysterious, but in practice it is quite usable. To make a picture look good, you need color tones in the whole spectrum. The darkest areas in a picture need to be black, and the lightest need to be white.

    Figure 62. The histogram shows the distribution of color tones in the picture. The three small triangles below the curve are used to regulate the distribution of color tones.

    Try to take a closer look at the histogram in Figure 62. It shows a rather even distribution of color tones. The curve is not 100% horizontal, but histograms are never that. There are most pixels in the middle tone area; but there are also both pure black and pure white areas. Thus the picture will be viewed as well balanced. That is the photo fleur.jpg, which you worked with page 96.

    Missing color tones

    If the picture is not ”spread” over the whole scale, then there is probably something wrong with it. Try to look at this histogram:

    Figure 63. The histogram for a photo that is very lacking in contrast.

    Some black and white areas are lacking. There is especially a lack of picture detail in the dark levels. You will see the picture for yourself shortly, but try first to compare the histogram with that in Figure 62. You can see that the pictures colors are largely concentrated in the middle area. And this means that there is very little contrast in the picture.

    A test picture

    The histogram is used to adjust distribution of color tones when you work with the Levels function. You are going to try that now:

    1.   First you need to make a test picture. Open a new picture (press Control+n). Choose the size 800 x 600 pixels:

    2.   Choose the default colors by pressing d.

    3.   Then select the Gradient tool, and choose the color mode Foreground to Background:

    4.   Drag a color sequence all the way across your picture (see Figure 46 on page 100). You need to drag horizontally from the left edge to the right. Then you get a color sequence like this:

    What do you have on the screen now? You have a picture with a smooth transition from black to white.

    5.   How does it look in the histogram? Press Control+l (with lower case ”l” for levels) or select menu items Image --> Adjustments --> Levels. That opens the Levels dialog box, and you see the histogram for the color sequence:

    6.   You can clearly see that there is an even distribution of colors. The curve is not quite flat, but the histogram is symmetrical; there are as many pixels in the light as in the dark area.

    7.   Now you can test the Levels function on the color sequence. With the mouse catch the middle triangle below the histogram, and drag it toward the left:

    8.   See the effect in the picture. Now remember the color distribution in the picture: the area from the right triangle to the middle one represents the light levels. This area gets larger when you drag the middle triangle toward the left. Therefore the picture gets lighter.

    9.   Try to drag the middle triangle toward the right. The picture gets correspondingly darker.

    10. Close the picture without saving it. This was just a test …

    Figure 64. The further the histogram’s middle handle is dragged toward the left, the lighter the picture gets.

    Levels give contrast

    Now you are going to experience the Levels fuunction in practice. That really works!

    1.   Get the picture eiffel1.jpg from the home page for this booklet, and read it into Photoshop. We have previously used that picture, which was taken on a rainy day. The picture is generally low in contrast and quite dull.

    2.   Now you could press Control+l to open the Levels dialog box (that is the fastest). But actually it is far better to use an adjustment layer. That is the safest and most flexible method, siince you can always later cancel or redo the adjustments.

    3.   Select menu items Layer --> New Adjustment Layer --> Levels.

    4.   Click on OK; you see the same histogram as in Figure 63 on page 127, it is actually from that picture. The color tones are bunched around the center area. Actually there are no real dark colors, and there are only a few real light colors in the picture, which therefore appears alltogether too gray. That is easy to correct.

    5.   Drag the left triangle in toward the center. Place it where the ”mountain” begins:

    6.   You see an immediate improvement in the picture. Try also to drag the right triangle a little toward the middle. That gives more light in the picture.

    7.   The middle triangle (also called the gamma value) regulates the middle tones. It is up to you to evaluate, if you need to move it a little bit. Try that; the picture’s middle tones vary a lot from screen to screen, so it is hard to say what looks good on your screen.

    8.   Did everything go awry? Then it is easy to reset to the starting point. Hold the Alt key down and click on the Reset button, which now appeared in stead of the Cancel button. Then you can start over.

    9.   Click on OK when you find the right adjustment. Save the picture as eiffel1.psd.

    10. Now you can see the picture with or without level adjustment by clicking the eye by the adjustment layer to on or off:

    11. You can activate the Levels dialog box by double clicking on the left histogram icon in the layer beam.

    12. If you got too much adjustment, it can easily be reduced. Try to reduce the opacity of the adjustment layer (in the layer pallette) to 60%.

    Three methods

    You can regulate the picture’s level distribution using one of three methods. They are all good in each their own way:

    ·     By moving the three triangles.

    ·     By using the Auto functions.

    ·     By personally indicating dark/middle tone/light with an eye dropper.

    You have tried the first method. Now you also need to try the other one.

    1.   Retrieve and open the picture histo1.jpg. That is a photo from a Danish fiord (called Limfjorden). But the picture lacks lustre.

    2.   Select Levels again, this time directly with the shortcut Control+l. You again see a histogram that is ”out of balance.” Among other things there are hardly any pixels in the light area. But now click on the Auto button:

    3.   Something happens to both the picture and the histogram, which now gets to look like this:

    4.   That gives more zip in both colors and contrast, but it is obviously too much. Cancel with Control+z.

    5.   Click on the Options… button in the dialog box:

    6.   That opens the dialog box Auto Color  Correction Options, where you choose from three different types of auto adjustment. Try all three of them:

    7.   Click in turn on the three algorythms in top of the box. Notice at the same time what happens to the picture. The effects are quite different. We prefer the bottom algorythm ”Find Dark & Light Colors”.

    8.   When you have tried the auto corrections, press Escape twice to close the dialog box. Do not save the picture again.

    The Auto adjustments

    If you just want to use one of the auto adjustments, then you don’t need to open the Levels-dialog box, since they are also found in the menus Image --> Adjustments, and they have each their shortcut. Our preferred auto function is ”Auto Color”:

    Figure 65. Photoshop’s automatic color correction, which often gives good results.

    If you use the Auto Color Correction Options (in the Levels dialog box), you get the option for an automatic correction of the picture’s histogram based on three disfferent algorythms. Here is a brief description of them:

    Enhance Monochromatic Contrast. Increases the contrast in the picture without disturbing the color balance.

    Enhance Per Channel Contrast. This is the default adjustment type (with the Auto button). It also increases the contrast, but it has an unfortunate tendency to exagerate and can give some very peculiar colors.

    Find Dark & Light Colors. This novelty in Photoshop version 7 removes discolorations in the middle tone area and increases the contrast moderately. It is a really good auto function (also called ”Auto Color”, see Figure 65). If you check Snap Neutral Midtones the resultat gets even more neutral in the middle tone area.

    Try the eye droppers

    With the small eye droppers in the bottom right of the Levels dialog box you can force a selected color tone to assume a pre defined value (by default black and white).

    1.   Open the picture eiffel1.psd again. Remove the showing of the adjustment layer Levels 1. Select the Background layer.

    2.   Insert a new ajustment layer. Click OK on the layer name Levels 2, which is seen in the palette:

    3.   You have the Levels dialog box on the screen. Click on the right of the the three small eye droppers in the lower right corner:

    4.   This eye dropper is designed to identify the picture’s lightest color. You can find that in the bottom of the picture to the right. Click with the eye dropper here:

    5.   If you hit off target, you can cancel with Control+z. If you hit right, the whole picture turns much lighter, and the histogram changes. Then select the left eye dropper, which is used to indicate the black color:

    6.   Find a very dark area in the picture. It could be a shadowy area between the trees; click there. Voila! The dark area gets completely black, and the picture’s other tones also change towarrd the dark.

    7.   When it is done, click on OK in the dialog box. Save the image file.

    8.   Now you have a picture with two adjustment layers. You can turn them on and off using the eyes in the layer beams. The adjustments are very different, as you can also see from the histograms. Here is the last version:

    9.   Try to evaluate which of the two adjustments works best. By us it is actually the latter one.

    We hope that you benefitted from the chapter. Color tone adjustment is quite central – you need it again and again. For many it would be logical to start by using the Light/contrast function. But we recommend strongly that you in stead use the Levels function. Once you get used to the histograms, you get a fantastic flexsible tool.

  • Next chapter.
  • Previous chapter.

  • Adobe Photoshop book overview.