# Unsharped mask

Gilles
Caulier

    caulier dot gilles at free.fr

2004-11-07
0.7.0

The digiKam image plugin Unsharped mask is a tool for to enhance the sharpen of an image. It use the Unsharp algorithm taken from the Gimp, and copyrighted by Winston Chang.

KDE
Digikam

# Introduction

Out-of-focus photographs but also most of digitized images need correction of sharpness. This is due to digitizing process that must chop a color continuum up in points with slightly different colors: elements thiner than sampling frequency will be averaged into an uniform color. So sharp borders are rendered a little blurred. The same phenomenon appears when printing color dots on paper.

The Unsharp Mask filter sharpens edges of the elements without increasing noise or blemish. It is the king of the sharpen filters. It works by comparing using the difference of the image and a blurred version of the image. It is commonly used on photographic images, and is provides a much more pleasing result than the standard sharpen filter. In spite of the rather confusing name, which derives from its origins as a technique used by film developers, its result is to make the image sharper, not "Unsharp".

Some scanners apply a sharpen filter while scanning. It's worth to disable it so that you keep control on your image.

## Using the plugin

The image pannel and the original preview help you to pan within the image. The preview window shows the filter output using the current settings.

There are two important parameters, Radius and Amount. The default values often work pretty well, so you should try them first. Increasing either the Radius or the Amount increases the strength of the effect. Don't get carried away, though: if you make the unsharp mask too strong, it will amplify noise in the image and also give rise to visible artifacts where there are sharp edges.

The Radius allow you to set how many pixels on either side of an edge will be affected by sharpening. High resolution images allow higher radius. Y'd better to always sharpen an image at its final resolution.

The Amount control is the percentage of the difference between the original and the blur image that is added back into the original. It allow you to set strength of sharpening.

The Threshold control is a fraction of the maximum RGB value, needed to apply the difference amount. It allow you to set the minimum difference in pixel values that indicates an edge where sharpen must be applied. So you can protect areas of smooth tonal transition from sharpening, and avoid creation of blemishes in face, sky or water surface.

## The plugin in action

This is an example of how the Unsharp Mask can change your life. The original image is (1) and the corrected image is (2). The unsharp mask was applied with Radius = 6.0, Amount = 0.5, Threshold = 0.0.

Unsharped mask filter preview