For our simple example, we used a straight Sharpen filter, which worked fine. Unfortunately, the real world is a little more complicated than two shades of gray with a straight-line edge between them. We need to be able to control the amount of sharpening that is done and how it is applied, and for that we use the Unsharp Mask. Contrary to its name, it does actually sharpen your image. An Unsharp Mask gets its name from the fact that it applies a Gaussian blur (the "Radius" value) on a copy of the data and then compares the original data against the blurred data. In areas where there isn't a lot of detail, there wouldn't be much difference (the "Threshold" value controls how much it considers to be a significant difference), so the function won't try to change values (changes are controlled by the "Amount" in the Unsharp Mask settings). In areas where there was detail, the original data and the blurred data would be significantly different, and thus the function senses there is detail or an edge there.
Probably the biggest problem in using the Unsharp Mask is determining how to set the three controls (Amount, Radius, and Threshold for Photoshop users; other programs often use different terminology, apparently so that they don't receive nasty letters from Adobe lawyers). Most written advice I’ve seen always gives one set of starting points, then leaves the rest up to you to determine visually. And every writer’s starting point seems to be different. But if you read the last paragraph carefully, you'll already have some ideas about what these values might be.
First, let’s get rid of one notion, that there’s a magic starting place that applies to all images. Instead, let me suggest that there are at least two starting places, and many images need to use selections to apply different sharpening techniques to different areas. More on that in a bit.
Next, let’s make sure you know what each of the controls refers to:
Follow along at home: Start up Photoshop. Recreate your own simple gray block document to match the example (above). The lefthand block should have an RGB value of 86, 86, 86 and the righthand block a value of 43, 43, 43. If you use the Paint Bucket tool to create the blocks, make sure that anti-aliasing is off. You want solid blocks of a single color value.
Sharpening makes the edge of the lighter block a lighter value of gray, and the edge of the darker block a darker value of gray. Select Unsharp Mask from the Filters menu and set starting values of 100 for Amount, 2 for Radius, and 0 for Threshold.
Amount: determines the aggressiveness of the "sharpening" action. With your simple two-gray image, try amounts of 100, 200, and 400 (make sure the Preview box is checked in the Unsharp Mask dialog so that you see the changes as you make them; you should also be viewing at Actual Pixels size). What you should see is that as the amount is increased, the colors of the new edges get more exaggerated. In other words, the light line that gets added on one side of the boundary gets lighter with each increase, the dark line on the other gets darker (though that’s often more difficult to see).
Radius: determines how wide an area at the transition is affected. Try increasing the Radius to 4 and 8, and you’ll see that area that is modified at the transition widens. Note, too, that the further away from the actual transition point you get, the less the Amount is applied.
Threshold: determines how much difference there must be between two adjacent pixels before any change is made. In our simple example, you’ll have to enter very high numbers before you see how this works (try 25, 50, and 100). Note that threshold and radius interact a bit. With a Threshold of 100 and a Radius of 1 or less, almost nothing changes, but if you increase the Radius, you’ll start to see the effect again.
Okay, I wrote earlier that there isn’t a magic starting place that applies to all images. While that’s true for Amount, both the Radius and Threshold probably should be started at specific points:
Radius: start with .5 and try to avoid going much higher, if possible. I believe it’s better to apply Unsharp Mask twice with .5 and .3 than using an initial radius of .8. Why? Because any value larger than .5 starts to affect more than one pixel beyond the transition point, which starts to produce more visible halos, especially if you need to use aggressive amount values. If you’re printing with an inkjet printer, the dot gain you get from the ink spreading on the paper often masks these halos, so go ahead and try higher values if you’d like, but only if you analyze the results from the final output (not the screen).
Threshold: start with 0 and leave it there if your image is relatively noise-free. Using any other value for Threshold applies the filter to only parts of the image, and I believe there are better ways of handling partial sharpening than using Threshold (see Edge Sharpening, below). Sometimes you can get away with using modest threshold changes. But I’m starting to notice that I can detect images that have been sharpened with the threshold set to something other than 0. Sharpening tends to apply a film-like grain to the overall image, especially if you’re working with a digital camera or scanner that has channel noise in it (look at the individual RGB channels for a sky area under high magnification; are all channels smooth gradations, or is there a random pattern of darker and lighter pixels in one or more channels?). Personally, I sometimes like that effect, but using Threshold other than 0 tends to make for unevenness to this “grain.”