Go to TopWhat is Sharpening?

Most digital cameras set the focus by a technique called "Edge Detection". They search for rows of similar coloured pixels that to one side have pixels of a dramatically different colour while those on the other have a colour that closely matches the row. Such features are taken to be edges and, naturally, to appear "in focus" the edges must be sharp. Accordingly, the camera then adjusts the focal length of the lens to achieve the greatest contrast in as many of the edges detected as possible.

When editing an image, sharpening is achieved using the same general technique, but whereas the camera accentuates the edge by adjusting the focal length, sharpening an image that's already been captured is achieved by adding contrast to the edge.

Go to TopTwo Rules

There are two key rules that must be followed if you are to get the best possible results out of sharpening:

  • It should be the final editing action taken before the image is sent to the printer, CD-ROM, screen or whatever medium is to be used to deliver it to the person who is to see the image.
  • It should be done ONCE only. If you are not satisfied with the result it is vital you UNDO the action before sharpening again using different settings.

The reason for the the first of these is in two parts. Critically, the settings you select for sharpening should depend on the intended output media. If you are producing an image that will be displayed on a computer screen or TV as well as being printed then, ideally, you need different versions of the image for each medium, making it pointless leaving other editing till later. Should you not leave sharpening till last, you may be tempted to sharpen the image again and that conflicts with the second rule.

The second rule is of prime importance as the following demonstration shows...

Checkerboard image demonstrating two stage sharpening

The three patterns above each simulates the same small portion of a photograph. On the left is the original unsharpened image. The central image shows the effect of extreme sharpening, and the patten on the right shows the effect of doing this a second time.

If applying extreme sharpening on real photographs, especially if they have a large number of small highlights or shadow areas, a "salt and pepper" effect is often created caused, as white and black spots appear where the contrast effect has been applied.

When a second sharpening is applied the effect is largely been destroyed to be replaced by what might be called a blurred halo effect, caused by the contrast effect applied on the first sharpening itself being sharpened.

The other effect that will be noticed is the colour distortion at the pink-grey boundary where a cyan boundary is introduced. To understand why this takes place you need an appreciation of the components of the colours involved. Each is made up of a mix of red, blue and green on a scale from 0-255

Red Blue Green
White 255 255 255
Grey 127 127 127
Pink 255 127 127
Red 255 0 0
Black 0 0 0
Cyan 0 255 255

There are a number of boundaries to consider:

  1. White - Grey
  2. White - Pink
  3. Pink - Grey

In the first case, the white, which already holds the maximum value for the three colour channels is unaffected by sharpening as they cannot be increased further. Each of the three channels on the grey side hold equal and lesser values and each, in this extreme case, are reduced to zero forming a black boundary to the edge.

In the second case, again the white is unaffected by the sharpening as all three channels are at the maximum and are equal to or greater than the pink's three colour values. On the pink side, the red channel is equal to the red component of the white so no change is made to it on sharpening. However, in order to introduce the contrast the blue and green channels are reduced to zero, leaving the pure red.

In the third case, The pink's red channel is already at maximum and beating the value of the grey's red channel, so the only way to introduce the required contrast is to reduce the pink's blue and green channels. This means the grey's blue and green channels will increase while the red is reduced to zero. It is this that results in the cyan effect on the grey side of the boundary.

Go to TopUnsharp Mask

Filters Menu - Unsharp Mask

Newcomers will frequently turn to the Sharpen option found on the Filters menu. However, for considerably more control over the sharpening effect, avoid the Sharpen option and instead use the "Unsharp Mask" tool. This is found on the "Filters" menu. On selection the Unsharp Mask  dialogue opens, displaying a preview of the top left corner of the current image.

The first thing to do is manoeuvre the preview to show a relevant part of the image, either by using the scroll bars or by clicking on the arrowed cross button on the bottom right of the preview to reveal a thumbnail you can use to position the preview.

Filters Menu - Unsharp Maskmanoeuvring the image preview

manoeuvring the image preview

Next adjust the controls.

Amount: This might be considered the primary control and is used to adjust the strength of the contrast added to the edges found in the image.

In the first illustration below a significant additional amount has been applied to the image. This is excessive and was applied only to ensure the effect is made clearly visible.

It can be seen how, not only has contrast been added to the pixels at the borders, but also a graduated effect applied as you work away from the edges themselves.

In addition, the effect is so pronounced that even the apparently smooth sky shows that variance in tone has been detected, treated as edges, and had contrast applied.

Excessive Amount of Sharpening Applied Radius Reduced while Sharpening

Threshold Control increased afer sharpening

Excessive Amount of Sharpening Applied Radius Reduced while Sharpening Threshold Control increased afer sharpening

Radius: To reduce the "halo" effect on the lighter side of the edges, the radius should be adjusted.

The initial value of five is already excessive for all normal photographs, so normally this value will be reduced. The second image in this sequence, shows the halo effect is far less pronounced after the radius has been reduced.

Threshold: This control is similar in effect to to that in the Fuzzy Select (Magic Wand) and Colour Select tools. At its initial value of 0, any level of contrast in adjacent cells is taken as a potential edge. Increasing the value of Threshold results in there needing to be an ever greater contrast for the pixel to be tested as an edge.

By increasing the threshold, much of the sky and tree in the lower left hand corner of the preview loses the granular effect induced by the initial excessive amount.

NOTES:  As each image provides a different set of challenges there can be no precise rules on the values to apply to the three elements of the Unsharp Mask dialogue.

What can be said is that relatively minor changes to the values can appear to have a disproportionately large effect. Accordingly, it is often better to avoid using the sliders, which can be difficult to adjust by small amounts and, instead, make fine adjustments by using the spin-wheels.

And remember:
• Always adjust the sharpness only once, and immediately before printing or burning to CD-ROM.
• If dissatisfied with the results, always undo and reapply with different settings. NEVER sharpen a second time.

Go to Top Page updated: 14 December 2009