Understanding Sharpening and the Unsharp Mask – Part II

Mating Julia butterflies

n the previous article I introduced the concept of sharpening an image and why it is necessary. The problem with using the basic approach of the Unsharp Mask (USM) is that it applies the sharpening to the entire image. This means that both areas of detail as well as uniform expanses of colour are affected by the USM. This makes itself noticeable in the form of sharpening artefacts (broad expanses of colour start to look a little noisy).

The easiest way to sharpen only what you want sharpened while leaving the broad areas alone is to create a second layer - on which the sharpening will take place - and mask off the areas that will not be sharpened. In some cases this is in fact sufficient. However if you have interpolated the image to a large degree or intend on enlarging the image in a print, the transition between the sharpened area and the unsharpened lower layer can become evident, particularly in the shadows which are already those most at risk to digital noise. This article therefore looks at a way in which areas of detail can be sharpened while leaving alone areas that lack detail.

For the purpose of illustration I’ve chosen an image that has both detail and large areas that are out of focus. What I’m wanting to do is create an accurate mask that only selects areas of detail while masking off the out of focus portion. The image of two Julia butterflies mating is tricky for conventional masking as areas that require sharpening are very small and intricate.

The Sharpening workflow

Step 1 – Assuming that all other necessary processing has been completed, a new sharpening layer is created above all other layers. The easiest way to do this is to hit SHIFT+Ctrl+Alt+’E’ which merges all the visible layers into a new layer at the top of the layer stack. After this new layer is created rename it ‘sharpening’ and create a new layer copy.

Sharpening layers



The Unsharp Mask

Step 2 – Switch off the eye next to the top layer so that it is no longer visible. Select the first sharpening layer and go to Filter>Other>High Pass. The image will change to almost completely grey with the detail in the image looking a little like embossing. A palette appears that allows you to adjust the strength of this effect.

This filter is used to create highlight the areas of detail so that a mask can be created. The stronger the filter the more area will be included in the mask. If you are only wanting minimal sharpening to areas of high detail keep the High Pass filter’s radius relatively low. I usually find that a radius of around 6 is good for selecting areas of detail but not encroaching significantly on the areas that I don’t want sharpened. It is important to note though that every image is image is different and some images require larger or smaller areas to come through in the filter. The filter only allows areas with detail to come through as having colour. Areas without detail are left grey. Once you are happy with your filter click OK to continue


High Pass Filter
Step 3 – The next step is to change the image into a pure black and white line image. Go through to Image>Adjustments>Theshold. The threshold adjustment converts all shades of grey into either pure black or pure white. By moving the slider on the palette to the left the areas that were highlighted by the High Pass filter show out as black against a white background. Select a value that only shows black on the areas of detail in the image (I often find that a value of 124 or 125 works well). Press Ok when you are happy with the results.



Step 4 – Creating the mask. Go into the channels palette (you can find it under Window>Channels) and Ctrl + left click on the RGB channel. This creates a selection around the black ink in the image, essentially the area that we want to choose to sharpen. Marching ants (indicating the selection) can be seen around the black areas of the image. Go back into the layers palette. Switch the eye back on next to the top sharpening layer. With the top layer selected hold down the Alt button and hit the create mask icon at the bottom of the layers palette. Holding the Alt button down means that the mask will be the inverse of the actual selection (if you were to simply hit the create selection icon you would actually be creating a mask that will hide the areas of detail. The mask will now pop up and only the areas that are to be sharpened will show through against a field of white.

With the mask still selected (there are square brackets around the mask if it is selected) go to Filter>Blur>Gaussian Blur and apply a light blur to the mask (I use a radius of 1.5). this is the same as if you were feathering a selection (blending the edge of a selection with the area around it).


Butterflies with mask Layer palette with mask

You can now switch off the eye on the layer that has had the threshold applied to it (you can even delete it as it is no longer necessary and was only created to assist with creating the mask).
Step 5 – Essentially you now have a sharpening layer at the very top of your layer stack with a mask next to it that will mask off all the areas which you do not want to have sharpening applied to (black in the mask).
Step 6 – Applying the sharpening. While zoomed into 100% view (Ctrl+Alt+’0’) you can continue with the sharpening with the USM as described in the first article. Alternatively you can use the Smart Sharpen Tool which I find is much more accurate and subtle than the USM. Regardless of which sharpening tool you use, only the areas with detail will be sharpened while areas of low detail will be left alone by the USM. The 100% crops below show the difference. Note in particular the slight noise around the hairs in the sharpened image without the mask.  

As with all things to do with Photoshop experimentation is the key to success. Scrutinising the images of this tutorial on the screen is no comparison to actually seeing the full size Tiff image on the screen, or better yet in print, before you. I find that excellent sharpening results can be obtained by using the mask, and moreover that a stronger mask can be applied without affecting the areas of smooth colour.


Without sharpening sharpening without mask
Sharpening with Mask
The crop on the top left is unsharpened. The above image is sharpened without the mask. The right hand image is sharpened with the same settings as the above image but with the mask applied. Note that it is possible to apply a stronger sharpening filter with the mask than would be the case without.





Back to Tutorials