Image Retouching

Image Retouching

Now that you've created an image, there are a number of things you can do to improve image quality before posting it on a Web site, sending it to Grandma, and so on. As a group , these techniques are called retouching. There are many fine references that explain the how and why of digital photo retouching. This section introduces a few techniques that I've found useful, but it certainly isn't meant to replace a good tutorial.

Cropping

One of the first techniques I'll discuss is familiar even from the days before computers, when it was commonly applied to photographs. I'm referring to cropping: the process of trimming off irrelevant parts of an image in order to better highlight the intended subject (or subjects) of the picture. The technique remains important in the digital age. Proper use of cropping will always lead to better esthetics, no matter what the medium. This is really a graphic design issue, which is important when designing a Web site, for example.

From a technical perspective, cropping can significantly reduce the size of an image file. There's no point in making someone download or manipulate unnecessary data. As an example, consider a 4" x 6" photograph with 3/4 inches of unnecessary space around each edge. The entire photograph takes up 24 square inches, but the area of interest is only 2.5" x 4.5", for a total of just over 11 square inches. In this case, proper cropping of the image can reduce the file size by more than half. For a 300-dpi uncompressed image, this saves about a megabyte of disk space.

Although the space savings is not as important for the smaller images common on the Web, the esthetic benefits remain . Here is an example of a fictitious family homepage, where "Bob" and "Mary" are telling their online friends about their summer vacation. Figure 22-3 shows their Web site, with an image exactly like the original photograph. Notice the image needs to be fairly large in order to show the detail of the lighthouse. In Figure 22-4 , the excess sky and ground have been removed, and the image has been somewhat reduced in size. When saved as a PNG, the file size goes from 42K to 30K, a 28% reduction. Of course, if Bob and Mary had wanted to present the lighthouse as only a small, lonely building on the edge of a cliff, the wider-angle uncropped image might have been appropriate. Or if they'd wanted to provide more detail, a larger, cropped image might have been appropriate. But esthetics is a matter for another book.

Figure 22-3. Fictitious homepage before cropping.

Figure 22-4. Fictitious homepage after cropping.

Brightness, Contrast, and Tone

Most people understand the concepts of brightness and contrast, if only from twiddling the knobs on a television or monitor. But these are also important ways to increase image quality. Practically all image-processing programs allow for adjustment of brightness and contrast, sometimes automatically. But often it is more useful to work with a similar concept, called tone. Tone adjustment is the process of remapping the brightnesses in an image, without affecting the color. For example, a washed-out image has a disproportionate number of bright pixels. Such an image can be tone-adjusted to darken appropriate pixels, thus providing an increase in contrast.

The easiest way to explain is with some examples. Let's use the picture of the lighthouse from Bob and Mary's vacation. Just on first sight, the picture looks a little washed out; everything's too bright. Using the GIMP, I can right-click and select Image > Colors > Levels from the menu, and I obtain the window in Figure 22-5 . The jagged line with black underneath is a histogram, which shows me the relative number of pixels with different brightness values. The brightnesses are shown in the gray-shaded bar directly underneath. My visual impressions are confirmed by the histogram; most of the pixels are over toward the white, or bright, end of the histogram, and there are no pixels at all below a certain shade of dark gray!

Figure 22-5. Levels dialog from the GIMP.

To remedy this situation, I can drag the black triangle underneath the brightness bar to the right, just to the left edge of the histogram. This will map the dark gray colors in the image back down to true black and set the brightnesses of other pixels in the image proportionately. Since the Preview box is checked, I see the results as soon as I let go of the triangle. Although the changes to the image can't easily be included here, trust me, the image looks much better just after this one operation!

In the case of a dark-toned image that doesn't have any pixels near white or completely white, you could also move the upper white triangle to the left. Basically, you want to use the black and white triangles to bound the limits of the pixel brightnesses displayed on the histogram. Then the darkest pixels in the original image will be mapped close to black, and the lightest pixels will be mapped close to white.

How about that third triangle? That controls the tone, or balance between light and dark. Moving the triangle to the left will bring more of the dark pixels into the "light half," and moving the triangle to the right will bring more of the light pixels into the "dark half." Generally the ratio of light to dark pixels should be from 1.5:1 to 2:1. In terms of the histogram, this means there should be a little less than twice as much area under the curve to the right of the middle triangle as there is to the left. In the case of our lighthouse image, the middle triangle looks just about right where it is. The best advice, of course, is to use the GIMP's preview feature to experiment with an image and see what tone suits it best.

The visual representation of tone that the GIMP provides can perform the same functions as brightness and contrast adjustments, and more, and is more intuitive in that you can estimate beforehand the type of change required to get a desired effect. Typically, adjusting only the brightness and contrast of a digital image is still comparable to an old television set: Twiddle the knobs until it looks good.

Color Adjustment

Sometimes you may find that the color in scanned photographs is slighly "off." This can be due to an actual color imbalance in the photograph or may be an artifact of the scanner that was used. For example, a picture taken in the woods on a sunny summer day may have too much green light illuminating the objects of interest, and this effect can be exaggerated when it is scanned. There are two major types of operations that can be useful in these cases: saturation adjustment and color balance.

Saturation refers, roughly , to the "amount of color" in an image. Completely saturated colors are bright and glaring, much like magic marker colors or neon lights. Moderately or lightly saturated colors have pastel-like shades, and completely unsaturated colors are not really colorsthey are shades of gray. Saturation adjustment is often available on televisions , where it is typically called "color."

If an image seems too gaudy or too drab, the solution is probably a saturation adjustmenta decrease in the first case, and an increase in the second case. In the GIMP, the adjustment is available by right-clicking on the image, selecting Image > Colors > Hue-Saturation, and adjusting the Saturation slider. The Hue and Lightness adjustments in this particular dialog box are not usually of interest for retouching photographs, but they can be very useful for other applications (one example is making color variants of a texture for 3D rendering).

We discussed saturation first because the second color operation is much easier to perform if the saturation is correctly adjusted. Color balance allows you to adjust the relative amounts of red, green, and blue in an image. In the GIMP, color balance can be changed by right-clicking on the image, and selecting Image > Colors > Color Balance from the menu.

Each of the three color levels can be either increased or decreased; if all the levels are increased equally, there is no net color shift, just an increase in brightness. Likewise, decreasing each of the three color levels equally produces only a decrease in brightness. To maintain the brightness of an image while adjusting its color, try to keep the sum of changes in the three primary colors to zero. For example, in an overly green photograph, a good adjustment might be Red +5, Green -10, Blue +5.

As we discussed earlier, in the section about JPEG compression, the human eye isn't the greatest at detecting absolute colors. We tend to judge a color based on the colors surrounding it; hence, obtaining a neutral color balance can be surprisingly tricky. An excellent indicator of color balance can be obtained if there are light-colored flesh tones in the image or photograph. In this case, use your hands or other, neutral-colored windows to block out extraneous parts of the photograph, and focus on the flesh tones. Are they appropriately colored? Are they too red? Adjust the color balance until these tones are close to correct, and the rest of the photograph will probably look fine.

Halftone Images

One of the most common ways of displaying photographs or other smoothly colored images in print is the process of halftoning. The image is created so that lighter-colored pixels are drawn as small dots of ink and darker -colored pixels are drawn as large dots. When viewed from afar, the dots appear to merge into a continuously colored image relative to the background color. In the usual applications, this is white paper. Halftone images work quite well to fool the human eye, but they pose a problem when scanned. Typically, the dot size is large enough that scanning the image at any more than 100 dpi will pick up the individual dots. The result is a digital image with strong moire patterns that can sometimes make it difficult even to see the intended image.

Luckily, there are ways to successfully scan a halftone image. The key is to actually scan the image at as high a resolution as possible and to then average the image before scaling it down. Usually a scan resolution of 400 dpi or higher is preferable. The averaging operation smears together all the pixels within a certain distance of each other. The best radius for the averaging is about the same factor as you intend to scale the image, perhaps even 1 more. After the image is resized, the moire patterns will be almost completely gone.

As a concrete example, consider a 2" x 3" halftone black-and-white photograph in an old newspaper. Using the GIMP, the following steps will work to successfully digitize this image.

1.        Scan the image at 400 dpi. The resulting image will be about 800 x 1200 pixels. Assume we want to scale it down to about 200 x 300 pixels, a factor of 4. Since it's a black-and-white photograph, you may want to right-click and select Image > Grayscale to remove any yellow tint resulting from the old paper.

2.        Right-click and select Filters > Blur > Gaussian Blur from the menu. Gaussian Blur will work to average the pixels in the necessary way. In the Radius box, enter 1 more than the scale factor, namely, 5.

3.        Now go to Image > Scale and enter the appropriate pixel sizes in the dialog box. The image will be resized, and at this point it will probably show no trace of the original halftoning.

4.        You can also try Filters > Enhance > Sharpen to see if it improves the image. Whether or not it helps depends on the type of image.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

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