Boost Your Scanning Skills
May 7, 2002 - PC Magazine
By Luisa Simone

With prices that seem to drop every day, chances are that if you don't already own a scanner, you are in the market for one. Good news: You can purchase a basic flatbed scanner for well under $100. $200 to $300 will buy you high-powered hardware and full-featured software from well-known manufacturers like Epson, Hewlett-Packard, and Microtek.

The heart of a scanner is the CCD (charge-coupled device)—the electronic sensor that converts analog artwork into digital images. The best of the new scanners are built around CCDs that have optical resolutions of 1,200 or 2,400 dots per inch (dpi) and can capture 42 or 48 bits of data for each dot (pixel).

These CCDs can perceive fine detail and the widest possible range of gray tones and color values. Scanners that capture 36, 42, or 48 bits of data per pixel actually produce much more color information than is needed by image editing programs, which typically handle only 8-bit gray-scale images and 24-bit color images. In fact, the scanner doesn't communicate this information in its entirety to many of your software applications (the notable exception is Photoshop, which offers tonal and color correction tools for 48-bit images). The additional data is used by the scanner to resolve the last few bits of tonal or color information with greater accuracy (the way you might use extra decimal places in a number before you round up). So unless you are a graphics professional prepping images for the high-end print market, a consumer scanner has all the power you'll ever need.

And don't sulk if you happen to own an older scanner that captures only 600 dpi and 24 or 36 bits of color data. These scanners can still generate high-quality images. Their limitations appear only in extreme situations—if you try to enlarge artwork by more than 200 percent, for example, or need to resolve detail in photos that have very poor contrast.

Scan Problems

When you have scanning problems like blurry images, overly dark printouts, color imbalances, or unwieldy file sizes, don't assume the hardware is at fault. The secret to getting great scans is making some knowledgeable choices about file type, resolution, and image enhancements before you click the scan button.

You'll find these all-important options in the control software bundled with your scanner. Usually, Windows-compatible scanners rely on the TWAIN protocol, which lets you access the scanner from any compliant application—an image editing program like Photoshop or a word processing program like Microsoft Word, for instance. All of the sample images for this article were produced using an Epson Perfection 1200s, but the features found in the Epson TWAIN driver are standard fare. The look and feel of your scanner's interface may differ slightly, but the functions will be comparable.

Twain Types

When scanning artwork for printing in documents, there are three basic image types: line art, black-and-white photos, and color photos. When you access your scanner using the TWAIN driver, you are usually asked to choose one of the three. Behind the scenes, each of these corresponds to a computer color mode. Line art is scanned and stored as a simple black-and-white (or 1-bit) image. Black-and-white photographs are scanned using 8 bits of data per pixel, so a pixel can take on one out of a possible 256 shades of gray. Color photographs can contain up to 16.7 million colors, and require 24 bits of data for each dot in the scanned image.

Line-art scans are most useful for specialized tasks like optical character recognition (OCR) or fax transmission. In most other situations, avoid line-art mode altogether—even if you happen to be scanning a black-and-white drawing. Because a line art scan contains only 1 bit of data per dot, it requires very high scanning resolution. Line art images are the least capable of being enhanced digitally. And, because intermediate gray values are automatically forced to either black or white, scans done as line-art are most subject to scanning artifacts. Lines drawn too lightly in places will appear broken at those spots. Lines too close together will blend into one solid black mass. When scanning line art, match the scanner resolution to that of your printer. This will give the best results.

You'll find that you have much more control over the final image quality and file size by scanning artwork in either gray-scale or full-color mode. Even though scanner manufacturers usually identify these file types as black and white photo and color photo, they are not limited to photographic images. In either of these modes, you can scan a wide range of artwork—including technical illustrations, watercolors, paintings, and dry-point etchings.

Bigger Is Not Better

Most people understand that scanned images are composed of pixels, but many think that more pixels—in the form of larger dimensions or higher resolution—translate into better pictures. But no image—scanned or otherwise—can be reproduced at a higher resolution than that of the output device, whether a printer or a monitor. Any other data is extraneous. Rather than improving image quality, the data wastes resources. Unnecessarily large files will bog down your applications, eat up disk space, and slow your printer. Worse, if you post that image to the Web, you will force site visitors to endure lengthy downloads.

 
Figure 1
Click to enlarge
As you can see in Figure 1, scanner interface software allows you to specify the size of the area you want to scan (the source), and the size of the resulting digitized image (the target). The dimensions of the target image—its width and height—should match the size at which it will be viewed. Anyone who has surfed the Web has run into plenty of images that are much larger than the size of the display. So if you are printing a photograph at 3 inches wide by 4 inches high, enter those dimensions into the appropriate text boxes. When the target image is larger or smaller than the source image, the scanner software will automatically adjust the scaling factor.

If you routinely use an image-editing program like Photoshop, you know that you can resize a picture after you've scanned it. But this software-only method, which uses interpolation to generate intermediate pixels, can soften a picture. Using the scaling mechanism built into your scanner will produce a sharper picture.

You should also pay attention to the source dimensions. Too often, users scan an entire image when they want to use only a small portion. This isn't a tragedy if you are scanning into an image-editing application, because the cropping tool discards the extraneous data when you trim the edges of the image. This isn't the case with desktop publishing programs and business applications. In these, the cropping window merely hides the unused portion of the image. The extra image area continues to hog resources. So if you are scanning images directly into desktop-publishing or word-processing software, specify the source dimensions in the TWAIN driver. Enter values into the appropriate text boxes or draw a selection marquee inside the preview window.

In addition to specifying the picture's dimensions, you should also specify the resolution. The resolution—the number of pixels per inch—should be based on the capabilities of the output device. For example, although a computer monitor can display the full range of grayscale and color values, it is a relatively low-resolution medium—72 or 96 dpi. You should scan images intended for screen display at a 1:1 ratio—pixel for pixel. For maximum accuracy, specify the size of screen images in units of pixels, such as 100 pixels wide by 120 pixels high.

If you are scanning images for printing, things get a little more complicated. The resolution of a printer and the resolution of a scanned image are only indirectly related. Printers employ a special grouping of dots (called a halftone cell) to simulate the full range of gray shades or color tones. For the best results, set the scanning resolution to double the halftone resolution of your printer. If you're sending your files to a commercial printing service, the printer will simply tell you the appropriate halftone resolution (usually 133 or 150 lpi, or halftone lines per inch). Most manufacturers, however, publicize the hardware resolution of their printers, but not the halftone resolution. Our "Suggested Scanner Settings" table lists the optimum scanning resolution for different types of printers.

Watch Your Tone

Putting the advice we've given thus far to use will ensure that you produce efficient scanned images. You won't waste system resources, wait for interminable printouts, or contribute to Internet overload. But these techniques do not guarantee that your scans will look good. A scan will mimic the flaws in the original artwork, such as underexposure or a color cast. And the scanning process itself can blur an otherwise sharp photograph or push color values out of balance. You can correct these problems and enhance subpar artwork, but only if you learn how to evaluate and manipulate the tonal and color values in a picture.

 
Figure 2
Click to enlarge
When faced with a poor original, the knee-jerk reaction is to adjust brightness and contrast controls. If your scanning software offers these familiar controls, resist the temptation to use them. They do little to improve tonal values, because they affect all values equally. Instead, find controls within your TWAIN driver (shown in the Image Controls dialog box in Figure 1) that allow you to change the shadow, highlight, and midtone or gamma levels independently. This allows you to address just the problematic portions of the image. For example, dense shadows can be lightened up without losing highlight detail.

In most cases, adjusting the gamma improves the image dramatically. The amount of correction to apply depends on the content and condition of the original artwork, of course. Use the preview area to judge the effect of your changes.

 
Figure 3
Click to enlarge
Though the mechanism might vary, you correct color casts in much the same way that you correct exposure problems—by adjusting the highlight, midtone, and shadow values. Instead of applying these changes to the tonal values of a picture, you apply them to one of the three color channels (red, green, or blue) that comprise a digital image. In Figure 2, for example, adjusting the midtone and highlight values for the red channel (but not the green or blue channels) removes the artificial sunburn from the skin tones in the photo. Figure 3 shows the corrected and uncorrected images side by side.

Notice that the Epson TWAIN driver utilizes a tone map, where the diagonal or curved lines represent the relationship between input and output values. Tone maps provide more control by letting you adjust multiple values along the curve, such as the quarter-tone values shown in Figure 2. As you explore your own software, you may discover other methods of adjusting tonal and color values. For example, interactive histograms provide great feedback by graphing the distribution of tonal values in the picture. Fundamentally, the process of adjusting the shadow, gamma, and highlight values is the same across the range of scanner software.

Unsharp Masking

Adjusting the tonal values in a picture should increase the image clarity and bring the details into focus. Scanned images often look slightly blurry, though—an artifact of the scanning process. Despite what your instincts tell you, increasing the resolution won't help. Instead, you can improve detail by increasing the contrast along the edges of elements.

 
Figure 4
Click to enlarge
Most scanner drivers include a function called Unsharp Mask for this very purpose. Unsharp Mask is best described as a combination of smoothing and sharpening routines. The smoothing operation eradicates stray noise, or dirt. The sharpening filter then looks for contrasting neighboring pixels, because these typically define the edges of elements. Only these already contrasting pixels are emphasized. As you can see in Figure 4, the result of this one-two punch is a much clearer picture.

If you take a close look at Figure 4, you'll see that Photoshop's Unsharp Mask filter produces a much sharper image than the Unsharp Mask filter built in to the Epson TWAIN driver. Here's why: Most off-the-shelf scanners offer Unsharp Masking as an all-or-nothing proposition. In order to avoid distortion, this automated function uses modest sharpening values that sometimes don't increase the focus sufficiently. Photoshop's Unsharp Mask filter gives you total control over the sharpening process and lets you configure several key settings, including the amount of sharpening and the contrast level (or threshold) at which the sharpening level will kick in.

Preprocessing vs. Postprocessing

So here's the question. Should you try to enhance images as part of the scanning process (preprocessing), or should you use the admittedly more sophisticated tools of an image-editing program (postprocessing)?

There are no easy answers, but in general, you should perform basic tonal and color adjustments as a preprocessing function. This lets you adjust tonal values using the additional data represented by the scanner's 36-, 42-, or 48-bit internal scanning mechanism, and preserves the widest range of tonal values in the final scan. If you are scanning directly into a business application or a desktop publishing program, then use the cropping and filtering tools—including the Unsharp Mask—found in the scanner driver. If you plan to alter the picture in an image editing program, you don't necessarily need the scanner's advanced filters. You will achieve better results using the more sophisticated tools offered by Photoshop and the like.

In the final analysis, there is no such thing as the perfect scan. Image quality—like art itself—is a subjective. Even so, working through the techniques shown here will help improve the clarity and efficiency of your scans. Though mastering the art of scanning takes time and effort, the benefits are worth your perseverance.

Suggested Scanner Settings
Output Recommended scanning resolution
Commercial image setter or service bureau
(2,540 dpi)
266 or 300 dpi
High-resolution printer
(1,200 dpi)
200 dpi
Medium-resolution printer
(600-700 dpi)
150 dpi
Low-resolution printer
(300 dpi)
75 dpi