The Levels Command

Although it's misleading to call the Auto Levels, Auto Contrast, and Auto Color commands just presets for Image Adjustments Levels ” after all, each Auto command affects no two images in exactly the same way ” it is accurate to say that the three Autos are based on Levels. Not only do the Auto subroutines hail from the same source as Levels, but the Levels dialog box lets you apply and modify the behavior of all three Auto commands. If the Autos are the brightness correction drones, Levels is their queen .

The Levels command lets you adjust the specific brightness values of highlights, shadows, and midtones in each of the three (or four, in the case of a CMYK image) color channels. Like many of Photoshop's most essential commands ” Unsharp Mask, Gaussian Blur, Hue/Saturation, and the upcoming Curves ” Levels has been a staple of Photoshop since Version 1.0. In fact, you could say it's one of a very few functions that put Photoshop on the map in the first place and continues to make Photoshop what it is today. So far, this chapter has already taken an in-depth look at the histogram, which is the most obvious aspect of Levels; let's see what else the command offers to make it one of Photoshop's most respected features.

Input and output levels

Although the histogram is arguably the most important occupant of the Levels dialog box, as shown in Figure 12-12, it doesn't actually do anything. It's just data for you to watch as you use the triangles and eyedroppers to change the values plotted within it.

image from book
Figure 12-12: Use the Levels dialog box to map existing brightness values in the selection or layer (whichLevels calls the Input Levels) to new brightness values (the Output Levels).

The numerical option boxes are arranged in two groups: Input Levels and Output Levels. You compress and expand the range of brightness values in an image by manipulating the Input Levels. Then, if you like, you can convert those brightness values to new brightness values by adjusting the Output Levels options. With that in mind, review how the individual options inside the Levels dialog box work. Throughout, you'll see the effects of various settings on the mother and daughter pictured in Figure 12-13. The color cast is too orange, and the brightness values lack luster. The plan, therefore, is to transform the image, as shown in the second example in Figure 12-13. The Levels command was used to modify the brightness and contrast levels of each color channel, one at a time, which both brightened the photograph and removed the color cast.

image from book
Figure 12-13: Orange and dull (left), the subjects are released from their dreary surroundings (right), thanks to some well- targeted brightness and contrast corrections in the Levels dialog box.

The following list explains the option boxes and slider bars in the Levels dialog box, in the order they appear on your screen:

  • Channel: Select the color channel that you want to edit from this pop-up menu. Each channel presents a slightly different histogram to which you can respond with a unique set of Input Levels and Output Levels settings. You can even apply settings to the full-color composite image in addition to the individual channels. For examples of this feature's use in a typical image, see the next section on applying Levels one channel at a time.

    Tip  

    Press Ctrl (or z ) and a number key to switch from one channel to another. For example, Ctrl+1 switches to the Red channel in an RGB image or the Cyan channel in a CMYK image. Ctrl+tilde (~) ( z +~) returns to the full-color composite image.

  • Input Levels: Use these options to modify the contrast of the image by darkening the darkest colors and lightening the lightest ones. The Input Levels option boxes correspond to the slider bar immediately below the histogram. You map pixels to black (or the darkest Output Levels value) by entering a number from 0 to 253 in the first option box or by dragging the black slider triangle beneath the histogram. For example, if you raise the value to 50, all colors with brightness values of 50 or less in the original image become black, darkening the image as shown in the first example of Figure 12-14.

    image from book
    Figure 12-14: Raising the first Input Levels value to 50 (left), separately lowering the third value to 200 (middle), and combining the two changes (right). The histogram's blue portions show the dark colors that have turned black in the preview above; the red areas indicate the colors that have turned white.

    You can map pixels at the opposite end of the brightness scale to white (or the lightest Output Levels value) by entering a number from 2 to 255 in the third Input Levels option box, or by dragging the white slider triangle beneath the histogram. If you lower the value to 200, all colors with brightness values of 200 or greater become white, thus lightening the image as shown in the second example of Figure 12-14. In the last example, the first value was raised and the third value lowered , thereby increasing the amount of contrast in the image.

    Tip  

    Although common to many of Photoshop's dialog boxes, the Tab and arrow keys are particularly useful when working with Levels. Press Tab to advance from one numeric field to the next; press Shift+Tab to back up. Press the up and down arrow keys to modify values. Each press of an arrow key raises or lowers the value by 1(or 0.01 in the case of the gamma value, discussed shortly). Press Shift with an arrow key to change the value in increments of 10 (or 0.1). Under Windows, you can also arrow through the Channel options.

  • Clipping previews: Photoshop provides an additional hidden technique when dragging Input Levels slider triangles. If you press and hold the Alt key(Option on the Mac) while dragging the black or white triangle, Photoshop previews the clipped colors inside the image window. Clipped colors are those that change to black or white in at least one color channel.

    For example, when you Alt+drag (or Option+drag) the black triangle, colors that show up as anything but white are turning black in one or more channels.

    In the first example of Figure 12-15, the yellow pixels have turned black in the blue channel, the red pixels have turned black in both the blue and green channels, and the black pixels are black in all channels. When Alt+dragging(or Option+dragging) the white triangle, colors that show up as anything but black are turning white. So the red pixels are white in the red channel, yellow pixels are white in the red and green channels, and white pixels are white in all channels.

    image from book
    Figure 12-15: The results of Alt+dragging (or Option+dragging) the black (left) and white (middle) slider triangles. The black and white overlays (right) highlight the image's large areas, which turn black or white in at least one color channel.

    By way of advice, a little clipping is inevitable, but you want to avoid as much clipping as possible. As shown in Figure 12-15, if you were to apply these values, fully a third of the image would turn black or white in at least one channel, as illustrated by the black and white overlays in the final image in the figure. This means partial or complete loss of detail in those areas. Higher contrast is good, but moderation is important here.

  • Gamma: The middle Input Levels option box and the corresponding gray triangle in the slider bar (both labeled in Figure 12-16) control the gamma value, which is a handle of sorts that allows you to adjust midtones in an image without upsetting shadows or highlights. Imagine a rubber band stretched between two fixed points, black and white, as in the first example in Figure12-17. This rubber band is the brightness curve . The gamma value tugs at the middle of the rubber band, arching it evenly as in the right example in the figure. The gamma value transforms every color except black and white, and adjusts other colors according to their proximity to black and white. This means it affects midtones more dramatically than shadows and highlights.

    image from book
    Figure 12-16: The middle Input Levels number and the gray slider correspond to the so-called gamma value.Identified here by its Greek symbol, the gamma value lets you adjust midtones independently of shadows and highlights.

    The gamma value ranges from 0.10 to 9.99. The default value of 1.00 indicates a straight brightness curve (like the first image in Figure 12-17), which results in shadows, midtones, and highlights receiving equal amount of correction according to the first and third Input Levels values. Increase the gamma value or drag the gray slider triangle to the left to lighten the midtones independently of black and white, as in the first and second examples of Figure 12-18. Lower the gamma value or drag the gray triangle to the right to darken the midtones, as in the last example in the figure.

    image from book
    Figure 12-17: Photoshop maps brightness values in an image along a straight line, from black to white (left). The line is called a "curve" because it can bend, and the gamma value is what does the bending. Here, the gamma value tugs the curve upward (right), thereby lightening all colors except black and white.

    image from book
    Figure 12-18: Raising (left and middle) and lowering (right) the gamma value to lighten and darken the midtones in an image. Dark and light colors are also affected according to their proximity to black and white. Only black and white remain entirely unchanged.

    The gamma value bends the curve up or down, as shown in Figure 12-19, after which Photoshop translates the values back to the 8-bit-/channel space.

    image from book
    Figure 12-19: The Input Levels values generally increase the contrast of an image, while the Output Levels values always decrease the contrast. Here you see the results of experimenting with raising the first Output Levels value to 100 (left), lowering the second value to 175 (middle), and combining the two settings (right).

    image from book
    Like math? You'll love calculating brightness values

    Photoshop typically calculates the brightness value of medium gray as 128. So you may wonder why the gamma is expressed as a decimal value instead of as a whole number, with 128 being the default. The reason is rather technical, so if math isn't your bag, consider yourself forewarned. But if you like math ” or if you don't, but you like to torment yourself ” here goes: The equations associated with each of the gamma corrections are as follows :

    x=y 1.3 , x=y 2.0 , and x=y 0.6 respectively.

    If y represents the old colors and x represents the new ones, the gamma value is computed as an exponent. So the new colors equal the old colors to the power of gamma. But if you were to take a brightness value such as 128 and raise it to the power of, say, 1.3, you'd blow it out of the park, sending it to 549, or more than twice the brightness of white. The trick is that the brightness levels are mapped to decimals between 0 and 1, where 0 is black, 1 is white, and 0.5 is medium gray. (The same is true of many equations inside Photoshop.)

    image from book
     
  • Output Levels: Use these options to limit the range of brightness levels in a selection by lightening the darkest pixels and darkening the lightest pixels. You adjust the brightness of the darkest pixels ” those that correspond to the first Input Levels value ” by entering a number from 0 to 255 in the first option box or dragging the black slider triangle. For example, if you raise the first Output Levels value to 100, no color can be darker than a brightness value of 100 (roughly 60 percent black in print lingo), which lightens the image as shown in the first example of Figure 12-19. You adjust the brightness of the lightest pixels ” those that correspond to the third Input Levels value ” by entering a number in the second option box or by dragging the white slider triangle. If you lower the value to 175, no color can be lighter than that brightness level ( roughly 30 percent black), darkening the image as shown in the second example of Figure 12-19. For the final example in the figure, the first value was raised and the second value lowered, thus dramatically decreasing the amount of contrast in the image. Note that any change to the Output Levels values decreases the contrast of the image.

    Tip  

    As it turns out, you can fully or partially invert an image using the Output Levels slider triangles. Just drag the black triangle to the right and drag the white triangle to the left past the black triangle. This flips the colors, so white maps to dark and black maps to light.

Applying Levels one channel at a time

Now that we've seen how the Input and Output Levels work, let's try applying them to a full-color photograph. The following steps describe how the brightness values and the color cast associated with the low-contrast, shadow-heavy image that appears at the top of Figure 12-20 were corrected.

image from book
Figure 12-20: Starting with the photograph shown at top, the settings for the Red(second), Green (third), and Blue (fourth) channels were modified, according to the feedback provided by the histogram and the image preview. Finally, after returning to the RGB composite view, the gamma value was increased to 1.11, thus lightening the midtones (bottom).

STEPS: Correcting Brightness and Contrast with Levels

  1. Press Ctrl+L ( z +L on the Mac) to display the Levels dialog box. As illustrated in the first example in Figure 12-20, most of the colors for this image are clustered on the right side of the histogram, showing that there are far more dark colors than light.

  2. Press Ctrl+1 (or z +1) to examine the red channel. Given that it's an RGB image being edited, Ctrl+1 ( z +1) displays the histogram for the red channel. The channel-specific histograms appear inset into the images in Figure 12-20.

  3. Edit the black Input Levels value as needed. Drag the black slider triangle to below the point at which the histogram begins. In this case, there's not much going on in the histogram until the point below the "t" in the word "Input." The black triangle was dragged to the beginning of the spike, changing the first Input Levels value to 55, as you can see in the red histogram in the second example in the figure.

  4. Edit the white Input Levels value. Drag the white slider triangle to below the point at which the histogram ends. As shown in the second example of the figure, the white slider triangle was dragged to the endpoint of the last peak of the histogram.

  5. Edit the gamma value. In many cases, you'll want to drag the gray triangle to the gravitational center of the histogram. Imagine that the histogram is a big mass and you're trying to balance the mass contents evenly on top of the gray triangle. If the histogram is weighted too heavily to the left, everything will topple off the triangle. To avoid this, drag the gray triangle to the left. In the case of the red channel, the histogram appeared to be pretty well balanced, so the gamma was left alone.

  6. Repeat Steps 2 to 5 for the green and blue channels. At this point, your image probably suffers from a preponderance of red. To correct this, you need to edit the green and blue channels more or less in kind. The graphs in the third and fourth examples of Figure 12-20 show how the histograms were edited. Feel free to switch back and forth between channels as much as you like to get everything just right.

  7. Press Ctrl+tilde ( z +tilde on the Mac) to return to the full-color composite histogram. After you get the color balance right, you can switch back to the composite mode and further edit the Input Levels. You can bump up the gamma a few notches to account for dot gain.

    You may notice that your composite histogram has changed. Although the histograms in the individual color channels remain fixed, the composite histogram updates to reflect the individual channel modifications. In Figure 12-20, as you can see, the colors are well distributed across the range.

  8. Press Enter or Return to apply your changes. Just for fun, press Ctrl+Z (or z +Z) a few times to see the before and after views of your image. If your image is anything like mine, you'll be amazed by the transformation.

Customizing the Auto functions

Returning to the tour of the Levels dialog box, we transition from the painstakingly manual to the fully automatic ” namely, the Auto button. The behavior of the Auto button depends upon the settings you specify in the Auto Color Correction Options dialog box (described next). The default behavior of Auto is perfectly analogous to the Auto Levels command, but you can change that by clicking the Options button.

The moment you click the Options button, Photoshop applies the default Auto function and invites you to select a different one if you prefer. But that's just the beginning of what you can do inside the Auto Color Correction Options dialog box. Pictured in Figure 12-21, this dialog box lets you modify the behavior of the Auto correction and apply your changes to any and all future adjustments.

image from book
Figure 12-21: Click the Options button to take the "auto" out of Photoshop's automatic color correction functions. These options let you apply the default Auto command (usually Auto Levels), modify the behavior of the Auto button, and adjust the target colors for shadows, midtones, and highlights.
image from book
Applying the Auto commands to a batch of images

For an example of when this might come in handy, suppose you have a batch of photos that share similar problems or were shot under similar conditions.

  1. Make adjustments to the first photo with specific attention to the Target Colors & Clipping settings.

  2. Turn on the Save as Defaults check box and click OK twice to exit the Levels dialog box.

  3. When you open another photo in that group , you can simply choose the desired Auto command to instantly apply your customized correction settings. Because it's an Auto command, Photoshop automatically adjusts the settings to reflect the needs of the specific image.

image from book
 
image from book
Using Macbeth charts with the Levels eyedroppers

The eyedroppers are designed to be used with photos shot using Macbeth charts , the popular professional-standard color swatch boards . The figure starts with an image that has a severe blue cast, but thanks to the Macbeth chart it was simple to determine which colors the camera should have shot.

  1. Open the scan in Photoshop.

  2. Choose the Levels command.

  3. Select the gray eyedropper tool.

  4. Click the chart's neutral gray swatches. The result appears in the second image in the figure that follows. Because neighboring pixels may vary widely, you may have to click more than once to hit a pixel that satisfactorily balances the colors.

  5. Use the black and white eyedroppers to sample colors inside the chart's black and white squares. Because these eyedroppers map to absolute colors, they have a tendency to clip far too many colors.

  6. Adjust the Input Levels values in the individual color channels to back off the black and white sliders. The final result, with adjusted blacks and whites, appears at the end of figure.

image from book
A color-flawed digital photograph (left), the inside of one of the gray swatches was clicked in the accompanying Macbeth chart with the gray eyedropper (middle). Then the black and white eyedroppers were used to sample blacks and whites. The Input Levels were adjusted by hand to compensate for the extreme clipping (right).

By default, the eyedroppers map to black, white, and gray. But you can change that. Double-click any one of the three eyedroppers to display the Color Picker dialog box. For example, suppose you're making final adjustments to a CMYK image, and you know that the lightest color your press will print is C:2, M:3, Y:5, K:0. To ensure that even your lightest highlights will print, double-click the white eyedropper, set the color values to the previous values, and then click a pixel in the image window. Instead of making the pixel white, Photoshop changes the clicked color ” and all colors lighter than it ” to C:2, M:3, Y:5, K:0, which is great for avoiding hot highlights and ragged edges.

image from book
 

Here's how the options work:

  • Algorithms: The top group of options determines the type of correction you want to apply. Despite the long, somewhat confusing names , these three choices are equivalent to Auto Contrast, Auto Levels, and Auto Color, as labeled in the figure. (If you like, you can position your cursor over each name to see an informative tool tip telling you just this.) Turn on the Snap Neutral Midtones check box to apply Auto Color's gamma correction, originally illustrated back in Figure 12-7. You can even combine this gamma correction with the contrast correction algorithms from Auto Levels or Auto Contrast.

  • Target colors: The Target Colors & Clipping settings come into play not only when you click the Auto button but also when you choose a future Auto command. The three color swatches let you modify the target values for the shadows, midtones, and highlights in your image. Just click in a swatch and then dial in a color, or click outside the Color Picker to lift a color directly from the image.

    In Figure 12-22 for example, the two Auto Color options, Find Dark & Light Colors and Snap Neutral Midtones are selected. Then the Shadows swatch is clicked to change the color to a dark red.

    image from book
    Figure 12-22: Click the Shadows, Midtones, or Highlights swatches to modify the target colors.

  • Clipped values: The two Clip values determine the percentage of total colors in the image that will be clipped away to either black and white or the alternative Shadows and Highlights colors. Enter higher values to increase the number of pixels mapped to black and white; decrease the values to lessen the effect. Figure 12-23 compares three different values applied to both Clip options. The first example illustrates values of 0.50 percent, which clip away only one half of one percent of all colors in the image. Other examples show higher values of 3.50 and 9.99 percent (9.99 percent being the highest value you can set). As you can see, raising the Clip value increases the contrast; lowering the value produces more subtle, more photographic effects.

    image from book
    Figure 12-23: The results of applying the Enhance Per Channel Contrast (Auto Levels) setting with the Clip values for both Shadows and Highlights set to their low (left), medium (middle), and maximum (right) values.

  • Save as defaults: If you select the Save as Defaults check box, your settings will be remembered the next time you use the Auto button inside the Levels or Curves dialog box. This button also saves target color and clipping changes for future applications of the Auto commands. Be careful using this, as you'll have to return to the program defaults if your current settings ever cease to be your preferred Levels settings. To restore the defaults, press the Alt key while the Auto Color Correction Options dialog box is open, and note that the Cancel button turns to a Reset button. Click Reset to reset the defaults.

Eyedropping neutral colors

Like the Auto commands, the eyedropper tools in the bottom-right corner of the Levels dialog box apply automatic adjustments. But instead of permitting Photoshop to hunt down shadows and highlights automatically, you specify exactly which colors you want to change.

To use an eyedropper, click its icon and then click a pixel in the image window. If you click a pixel with the black eyedropper tool ” the first of the three ” Photoshop changes the color of that pixel and all darker pixels to black. If you click a pixel with the white eyedropper tool ” the last of the three ” Photoshop maps it and all lighter pixels to white. The remaining gray eyedropper tool works a bit differently. Rather than mapping a pixel to, say, an absolute gray, the gray eyedropper merely neutralizes a color. For example, if you click a dark red, Photoshop shifts all colors so red becomes gray. But that pixel remains dark ” its luminosity does not change.



Photoshop CS2 Bible
Photoshop CS2 Bible
ISBN: 0764589725
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net