Sharpening with style
by Jouko Ruuskanen
Sharpening must be one of the most controversial issues in digital photography.
Countless methods exist, many of them claiming to be "the ultimate,
the best" and so on. In this tutorial I introduce a relatively straight-forward
method of making the best out of Photoshop's unsharp mask (USM) filter.
After all, most of the plugins that exist rely on the same convolution
kernel that is also what the USM filter uses, so there should be no reason
why just plain USM couldn't be used to get great results, provided that
you combine it with some other features of Photoshop. Unfortunately the
full version of PS is required, PS Elements users ... sorry (unless some
friendly soul packages the actions for you).
To start with, let's make one thing clear: there is no such thing as one generic sharpening setting for all images! The sharpening required depends on image size, type (such as portrait,
landscape, architecture, you name it) and noise, to name a few. Also, a
very bright image responds quite differently to sharpening than a dark
one. To make things even more complicated, many real life images contain
both very dark and very bright areas. So how can we cope with these issues?
Some of the basic principles I use in sharpening are the following:
- sharpen only the areas that need sharpening
- sharpening should be applied on the luminosity layer only
- the parameters of the USM filter depend on the image size
- sharpening should be the last step in your workflow
The first can be quite easily tackled: prepare a mask to protect areas
like blue skies, or any even colored, smooth surfaces. That brings up the
next question: how to prepare the mask?
Applying sharpening on the luminosity layer is important, because that
way you can avoid any color shifts that might otherwise occur on the sharpened
The size is important because you don't want to destroy image detail by
using a sharpening radius that is too big for the image size, and a value
too small results as sharpening that can't be noticed at all.
Finally, sharpening should be performed as the last step in your workflow, because you don't want to apply levels or curves or any other changes to artificially generated parts of your image! You have to remember that sharpening is a destructive procedure. Sharpening tries to enhance the contrast at the edges, and by applying
sharpening you modify the existing pixels. Modifying pixels that are already
modified is even more destructive (for example if you sharpen an image
that has already been sharpened), so sharpen as the last step.
|You start preparing the mask by duplicating the background layer, and applying
the Find edges filter. Some sharpening routines just copy the original background layer,
paste it directly onto a new alpha channel, and work on that. That's not
the approach here, because working on a full RGB channel will give a mask
that often goes 'deeper into the shadows', and finds more to be sharpened.
So let's go on and do trick number one: apply a pretty strong curve to
the top layer. The purpose of this is to really extend the mask to all
areas that have edges: we don't want to miss anything that's worth sharpening.
On the right you can see the curve I'm normally using. Note that the top right corner has been modified a bit to a new point of (245,255). The reason for doing that is that the strong curve can bring up some unnecessary noise that the Find edges filter found, and dragging the end point left a bit evens the noise out.
Next thing to do is to apply some Gaussian blur to the layer. Why is that, you might ask... well, you really want to have
some smoothing on the mask, otherwise the difference between sharpened
and unsharpened areas might become too obvious on the final image. Blurring
will also make the rest of the noise on even surfaces disappear. And the
amount of blurring depends on... right, image size! For web size images
try I normally use 1 pixel radius, and for 3000x2000 size images 3 pixels.
Now the layer is ready, so select and copy it to the clipboard. Now is
also a good time to discard the top layer, because you don't need it any
longer. Switch to the channels view, create a new channel, and paste the
contents of the clipboard there. Now you should have a channel named Alpha
|Now that you have the mask, you're ready to do the sharpening, right? Well, not quite... remember that you should apply sharpening to luminosity layer only. It's of course possible to use Edit->Fade..->Luminosity after USM, but you'll want to do it differently, for reasons soon to be
revealed. Now select the original background layer, and duplicate it. With
the topmost layer active, load the selection from the mask channel, invert
the selection, and - if you like to further fine-tune the selection - contract the selection by one pixel. Tight enough selection prevents halo from appearing on the final image. Now you apply USM, the parameters of which depend on.... right again, the size of the image! Because we have the mask to 'protect the innocent', we can leave the threshold to zero. Without a mask the radius should be kept small, ideally 0.5 pixel at maximum, because of the way the USM filter works (large values spread the effect, potentially "inventing" new detail and halo effects, especially on areas with lots of fine detail). With a mask, you don't have to obey that rule, all that really matters is the outcome of the equation amount*radius . Amount of 200 with a radius of 2 gives roughly the same result as 400 and 1. The noisier the image is, the smaller the amount should be, because a value too high will introduce pixel noise. I suggest starting with a value of 200-300 for amount, and for radius a value between 1-1.5 for 3000x2000 images, 0.6-1 for 2000x1400 images, 0.5 for "screen size", and 0.3 for web size.
After applying USM the image will probably appear way too oversharpened. To fix that, bring up the Layer style dialog by doubleclicking the icon of the second layer on the layers palette.
The image on the right shows you the subset of the dialog you'll see. There
are three things that need adjustment. First of all, the Blend Mode should be changed to Luminosity (remember, you don't want any color shifts on the edges). Second modification
is on the blending range, and this is where the true secret lies. Because you applied such heavy
USM, you now take some of it back, but selectively! First of all, the human
eye is much more sensitive to seeing white halos than dark ones, and not
at all sensitive to seeing them in midtones, so you need to modify blending
according to that. Pressing the Alt key and dragging the small white/black
triangles using your mouse allow you control how the topmost layer is blended
with the layer below. Take the white triangle's left part as far left as
necessary, until you don't see any nasty white halos on your image. Then
repeat the same for the black slider: take the right half of the black
triangle as far right as necessary, until any dark halos disappear. Notice
that usually the midtones are left untouched, they can take a lot more
Here are the parameters I usually use. Notice that you can still fine-tune
your sharpening effect by changing the Opacity parameter!
Now you can just flatten the image and get rid of the mask channel, and
you're done! Note that if you're using Photoshop CS, you can do the above
procedure in 16 bit mode. With PS 7, you need to convert the image to 8
bit mode first.
The script can be run using Photoshop 7.0.1 with scripting support installed,
PS CS has it by default. The script is smart enough to check the image
dimensions and apply the right amount of sharpening automatically.
The settings for USM, blending, and mask preparation are the three variables
in the approach described above. Not all images from all cameras will respond
well to sharpening using the exact values used here. That's because some
images/cameras are noisier than others, and from some cameras it's impossible
to get totally unsharpened images to start with. The above works well with
Canon D60, especially when a RAW file is converted without any sharpening
using CaptureOne. 10D and 300D should be fine as well, for any other camera
or image type you should really tweak the parameters. One easy way is to
change the opacity of the sharpened layer. The example above uses 80%,
but if you image still looks oversharpened, you can always lower the value.
And for special purposes, such as portraits, the history brush may be needed
to rub off sharpening from any other areas than eyes.
Some people argue that a small amount of USM should be applied to the image
as the first step, to compensate the effect of the anti alias filter that most digital cameras use in front of the image sensor. Now
remember that most cameras already sharpen the image inside the camera,
and it's not often even possible to get an unsharpened image out of the
camera, especially if you're using JPEG file format. With RAW converters,
it is possible to turn sharpening off when converting the image. In this
case you can apply some USM to your image before resizing and sharpening,
just don't overdo it! Personally I think the local contrast enhancement trick (USM amount 5-10, radius 30-60, threshold 0) does the job just fine.
You can do this in any case, it'll give your image some extra 'snap'.