Sharpening is easy to understand at the simplest level—given two digital photos, one sharpened and one not, you’ll always point to sharpened one as having more detail and being “better focused.” Yet, if you were confronted with two sharpened photos, one well done, and the other less so, you might not be able to differentiate between the two.
Unfortunately, most digital photographers have learned sharpening by fixed rules that specify exact values to use in Photoshop's filters, and therefore neither understand why they use the tools they do, or how they might be using them rightly or wrongly. This article attempts to clarify the problems created by digital imaging, and how to apply the correct amount and type of sharpening to fix them.
Why Is Sharpening Necessary?
The nasty truth underlying all digital recording techniques is that they turn analog signals into discrete samples of the original. CD players, for example, sample sounds at 44 kilohertz (i.e., 44 thousand times a second) and record each sample using 16 bits of data. The frequency of digital sampling and the amount of data sampled determine how well the analog original can be reproduced. The coarser the sampling, the less the digital recording is like the original.
State of the art consumer digital cameras have a sampling frequency of 4500 by 3000 pixels (e.g., Kodak Pro 14n), with the amount of data recorded being 12 bits for each of the red, green, and blue colors. These numbers are actually relatively crude compared to the analog reality, where detail and color variations are nearly infinite. The real world sports an infinite number of shades of blue in the sky and an endless amount of detail, but your digital camera only captures between 1000 and 4500 pixels of horizontal detail in perhaps thousands of shades of possible blues. While that’s pretty darn good, it does cause two resolution-oriented problems:
Detail smaller than the pixel size is usually lost.
Where transitions between details occur within the area of a single pixel, the transition usually results in a digital value that is neither of the original values.
This second problem is what makes details in your photographs look fuzzy. The classic example is that of a diagonal transition line that transects a pixel. The pixel can either be white, black, or some in between value. If the camera were to render the pixel as entirely white or black, then you’d see an artifact known as the stairstep, so named because a diagonal line gets rendered as a series of pixel blocks that resemble a set of two-dimensional stairs. The alternative is to record the pixel as an "in-between" gray (which still produces a bit of a stairstep effect, but isn't quite as obvious). Neither case is correct, and both tend to reduce apparent sharpness.
All digital cameras use in-camera interpolation to detect edge transitions, and use some form of digital sampling to create “in-between” values for those diagonal lines. The result? Instead of a precise transition from one pixel value to another, diagonal details (and sometimes small horizontal and vertical details) are rendered as a more gradual transition from one color to another. Our brains have been programmed to see blurry or soft edges as being out-of-focus, thus unmodified digital photographs always tend to look just a tad soft. That’s even true of higher resolution cameras and scanners—film images I’ve had scanned on 4000 dpi drum scanners still look a little soft in the detail areas.
Worse still, most digital cameras employ what is known as an anti-aliasing filter--essentially a diffusion filter over the sensor. (The exception is the Kodak Pro 14n). Why? Because the Bayer pattern sampling used in digital cameras has a tendency to produce colored artifacts and moire patterns on small detail. By blurring the light slightly so that multiple photosites get some of the information from a particular detail, this lessens the chance that these hard-to-remove artifacts appear. Unfortunately, it also has a further tendency to make edges less distinct.
The method by which most digital photographs are “corrected” is to apply a sharpening “filter” using an image-editing program, such as Photoshop. What these filters do is to detect transitions (edges) and make them more pronounced. The easiest way to see this is to use two gray blocks:
Open your image editing program and create two adjacent gray blocks (it doesn’t matter what size). The lefthand block should have the RGB value of 86, 86, 86 (in Photoshop, doubleclick on the foreground color in the tool palette, then enter those values directly into the RGB section of the Color Picker that appears). The righthand block should have the RGB value of 43, 43, 43. Be sure that these blocks touch one another, and that you’ve turned off any anti-aliasing options in the tools you used to create them.
Zoom way in on your image (500-1000%). You want to see the transition line between the two blocks clearly, so place it in the middle of your window.
Use the Sharpen filter (in Photoshop: Filter->Sharpen->Sharpen).
Note how the software lightened a single pixel column on the light gray side and darkened a single pixel column on the dark gray side (just each side of the cursor in the image, above). Essentially, the transition is being exaggerated. At this close view, your eye can easily see the change, but now select Actual Pixels (View->Actual Pixels). Since you know what to look for, you can probably still make out the light gray column (though I bet you can’t see the dark gray one, especially if your monitor has been correctly color calibrated). Use the Undo command (Ctrl-Z in Windows, Apple-Z for Macs) to toggle back and forth between the unsharpened and sharpened versions. The sharpened version should indeed look sharper. (For extra credit, rotate the unsharpened version 45 degrees and repeat the sharpening step; the unsharpened version should seem significantly softer than the sharpened version).
Okay, now you know what to look for in sharpening: sharpened digital images have a slight “halo” at edges, one that can usually only be seen by enlarging the pixels or knowing exactly what to look for. If you performed the extra credit assignment in the last paragraph, you also are aware that diagonal edges can obtain interesting "artifacts" when sharpened (the vertical artifacts are rather mild-mannered in comparison, aren't they?).