Web DevCenter    
 Published on Web DevCenter (http://www.oreillynet.com/javascript/)
 See this if you're having trouble printing code examples

The Ideal Digital Photographer's Workflow, Part 5

The Three Ideal Stages for Sharpening Your Images

by Ken Milburn, author of Digital Photography: Expert Techniques

Would you believe that every image shot by a digital camera needs to be sharpened -- not once, but three times? Well, you shouldn't, because it's not always true--but almost always, it is.

The first time you sharpen, you do it because it is in the nature of most image sensors and of such things as dust-protecting and low-pass filters, which are built into most digital cameras (most especially those meant for pros and prosumers). The image sensors (except the Foveon sensor used in Sigma cameras) have to interpolate the colors in the image from something called a Bayer pattern. The Bayer pattern is the name for the way individual sensors are grouped and filtered for sensitivity to the three primary colors: red, green, and blue. Because the eye is most sensitive to subtleties in green, there are two green sensors in each RGB group. A computed algorithm has to be applied to this pattern so that the picture ends up being interpreted (somewhat) as though each sensor had three transparent layers (which is how color film works). In the process of sorting out all of this, the camera's computer actually makes the picture just a bit fuzzy.

Now, to be fair, most camera software gives you an option to sharpen the picture in the camera. If your objective is to end up with the highest quality image possible, don't take the camera up on its offer to do this work for you. It simply doesn't have the brain power that your hunky computer does. Nor does the camera have your own subjective judgement as to what you want to see. To make matters worse, the sharpening adjustment parameters that make one picture look superb may make another look just a bit (or very) coarse, or downright ugly. You need to use your own judgement to get exactly the look you want. It takes practice, technique, and perhaps some software tools you may not already own.

You'll understand all of this a lot better as we just jump into this article. I'll explain the three stages of sharpening that are almost always necessary. I call them rescue, effect, and output. Also, there are a few things you should do before you even start sharpening.

Before Sharpening

Start with as much image information as you can get for your picture. Set your camera for the lowest ISO setting that will give you the picture you want. The lower the ISO setting, the less noise you'll have in the picture. Noise is always the biggest contributor to loss of image quality in a digital image. Second, don't set your camera to use any color balance or shadow/highlight corrections (unless you have to shoot JPEG). If at all possible (and if your camera permits it), take the picture in RAW mode. In the camera's RAW interpreter, set the color balance, exposure, shadow, and midtone settings to the point that looks best to you. Do not use noise reduction or sharpness settings unless lack of time simply leaves you no other choice. Finally, save from the RAW interpreter at the original resolution (or twice that, if you use a Fuji Super CCD camera) and in 16-bit mode.

If you have to make any optical corrections, such as for barrel and perspective distortion, do so now. This is because these operations will contribute to softening the image and you want to keep the number of necessary sharpening stages to a minimum.

Rescue Sharpening

This is the stage that "corrects" the problems that result from the camera's behind-the- lens filters, Bayer interpolation, and (sometimes) even the fact that you can't afford the sharpest lens of the focal length you wanted to use to take the particular picture you want.

Note: There are two kinds of blurring that aren't likely to be helped by sharpening: out- of-focus blur and motion blur.

Theoretically, you should do rescue sharpening before you do anything else. In a sense, that's what you're going to do. However, I suggest a slight variation on this plan: first, use Adjustment layers to correct the image's brightness, contrast, and color balance. By using Adjustment layers, you'll still have the original intact as the Background layer, so you can always go back to your original. The big advantage you gain is that sharpening is always somewhat subjective. So you'll be able to judge your sharpening previews much more accurately if you have an image that's more representative of the end product you want than the original image is.

You should also do your "spot retouching" before you sharpen. That is, whatever techniques you use to eliminate skin defects, dirt on the sensor, or litter on the landscape. Do not, however, do major retouching that involves image compositing. That will come later.

Here's a good step-by-step routine for first-stage, or rescue, sharpening that you can paste on your wall:

  1. Do use Adjustment layers to do the various gamma adjustments (Auto, Levels, Curves).
  2. Do overall color balance adjustments (gray card, color balance).
  3. Do any color effects you're likely to want to use with a Hue Saturation Adjustment layer.
  4. Remove any image noise. I highly recommend using Nik Dfine, but if you can't afford it, you can download some effective noise removal Actions from Adobe Studio.
  5. Do basic retouching.
  6. Do basic sharpening.

At this stage, I don't recommend you use any of the more powerful sharpening tools suggested for use in the second (creative effect) stage of sharpening. Use Unsharp Mask (USM) or Simple Sharpener. The exact settings you want to use will vary depending on your camera, settings, and image size. However, here's a good opening suggestion for settings that typically work for a 6MP image with Photoshop's built-in Unsharp Mask filter. Be sure the preview window in your sharpening tool is zoomed in to 100 percent and that the Preview box (they all have one) is checked. Now, play with the adjustments until the image looks believably sharp, but not exaggeratedly so. If you start to see white or black "halos" around the edges, back off. Ditto if the edges start getting jagged. Figure 1 shows a 100 percent view of the same image before and after successful rescue sharpening.

Figure 1. Here you see the stages of initial sharpening using the Photoshop CS Unsharp Mask filter. The image on the left is the unsharpened interpretation of a high- resolution RAW file. At right is the USM initial sharpening result and the settings used.

Effects Sharpening

It may be that Stage 1 was all the sharpening you need to do before sharpening for final output. Chances are, however, that that's not the case. You'll find many instances where using the right kind of sharpening can create real drama.

The Unsharp Mask filter is a very versatile tool that can used in conjunction with many of Photoshop's other capabilities to create a variety of special effects. One of the most useful techniques is to copy your base layer, convert it to monochrome (choose Image -> Desaturate, not Mode -> Grayscale; you want to keep the overall image in RGB or Lab mode), and then Find Edges.

You can then blur the result with the Gaussian Blur filter to control the width of the edges and turn the result into a new channel. The new channel can then be used as a selection so that the Unsharp Mask filter gets applied only to the edges inside the selection. I'd give you complete instructions for doing this, but you're better off to simply go to Adobe Studio and download any of the several Actions that do it for you. Better yet, you can pay $19 for a professionally written filter and Action from Fred Miranda called Simple Sharpen that does an even more sophisticated, 16-bit version that stops the Action and gives you suggestions for making other adjustments.

You can get even more versatile and visual controls from several commercial sharpening plugins. In my opinion, it's worth collecting them all, because each produces different effect or has a different range of effectiveness. My favorites are PhotoWiz Focal Blade (see Figure 2) and Power Retouche's PR Sharpness (see Figure 3). You will notice that the interpretations seen in the preview windows for Focal Blade and PR Sharpness are quite different from one another. (A third plugin option for sharpening is the Imaging Factory's Unsharp Mask Pro.)

Figure 2. PhotoWiz' Focal Blade is one of my two favorite third-party filters for very powerful special effects sharpening. You can get almost unlimited effects and still remove over-sharpening artifacts.

Figure 3. Power Retouch Sharpness Pro is my other favorite. Like PhotoWiz, all adjustments are interactive and you can instantly see the results in the preview window.

Output Sharpening

The resolution of your output device (whether it be offset press, inkjet printer, or the Web) is likely to be quite different from what you've been seeing on screen. That does not mean that you should have done any sharpening that you've done up until now any differently. What it does mean is that if you want the image you are going to finally present to look as detailed as possible, you are going to have to duplicate the image you have created so far and sharpen it just one more time especially for the device you are going to use to present that image. It is a very good idea to rename these images so that version contains the name and resolution of the output device and to then save those images in a directory or CD that is just for images meant to be printed.

There are two ways to accurately sharpen for printed output: experimentally or with Nik Sharpener Pro. To do it experimentally, use the Photoshop Unsharp Mask filter on several sections of the image -- each with different sharpness settings. Use a text layer to annotate the setting for each section. You can then output this "test" print. Use the USM settings that are closest to the best results. If you want to be really accurate, create another grid with settings that are closest to the best results. If you're really organized, write down the best settings for each different size of image that you're likely to produce from a given original file size.

If the above sounds like way too much work, and you figure your time is worth between $79.95 and $329.95, get one of the three versions of nik Sharpener Pro that is best suited to the type of printing you do. This program takes into account both the size of the image being sharpened and the resolution of the image to be output, and then automatically does the sharpening that will produce the best possible result.

Figure 4. For final sharpening, nothing I've seen beats nik Sharpener Pro. You just put in the print size, the viewing size, and the printer resolution and Sharpener Pro does a perfect sharp of making the sharpest final image possible without oversharpening.

If your output is going to be displaying the image on screen, first duplicate the image and reduce it to the size and resolution at which it is going to be shown. At the same time, convert the color from Adobe RGB '98 to sRGB. That will narrow the color gamut to more closely resemble the "average" gamut of color monitors. Now, simply experiment with the USM filter. I usually start with the same settings that I used in the rescue stage, and then keep sharpening until the result just looks either unnaturally crisp or starts to show edge artifacts (halos).


In this article, you have learned that there are, ideally, three stages at which you should sharpen your images: rescue, creative effect, and output. You have also learned the sharpening requirements for each of these stages.

Ken Milburn has been a photographer, both full- and part-time, for nearly five decades. In addition to countless articles, Ken has written 17 books on web design, Flash, Photoshop, and digital photography. His latest book, for O'Reilly, Digital Photography: Expert Techniques, was released in March 2004.

Return to the Web Development DevCenter

In March 2004, O'Reilly & Associates released Digital Photography: Expert Techniques.

Copyright © 2009 O'Reilly Media, Inc.