Unsharp masking

Unsharp masking (USM) is an image sharpening technique, first implemented in darkroom photography, but now commonly used in digital image processing software.

After processing this blurred positive is replaced in contact with the back of the original negative.

In addition, the mask effectively reduces the dynamic range of the original negative.

Thus, if the resulting enlarged image is recorded on contrasty photographic paper, the partial cancellation emphasizes the high-spatial-frequency information (fine detail) in the original, without loss of highlight or shadow detail.

In the photographic procedure, the amount of blurring can be controlled by changing the "softness" or "hardness" (from point source to fully diffuse) of the light source used for the initial unsharp mask exposure, while the strength of the effect can be controlled by changing the contrast and density (i.e., exposure and development) of the unsharp mask.

For traditional photography, unsharp masking is usually used on monochrome materials; special panchromatic soft-working black-and-white films have been available for masking photographic colour transparencies.

This has been especially useful to control the density range of a transparency intended for photomechanical reproduction.

The same differencing principle is used in the unsharp-masking tool in many digital-imaging software packages, such as Adobe Photoshop and GIMP.

If the difference is greater than a user-specified threshold setting, the images are (in effect) subtracted.

Digital unsharp masking is a flexible and powerful way to increase sharpness, especially in scanned images.

Unfortunately, it may create unwanted conspicuous edge effects or increase image noise.

However, these effects can be used creatively, especially if a single channel of an RGB or Lab image is sharpened.

Typically, digital unsharp masking is controlled via the amount, radius and threshold: Various recommendations exist for starting values of these parameters,[2] and the meaning may differ between implementations.

The typical blending formula for unsharp masking is Unsharp masking may also be used with a large radius and a small amount (such as 30–100 pixel radius and 5–20% amount[3]), which yields increased local contrast, a technique termed local contrast enhancement.

More powerful techniques for improving tonality are referred to as tone mapping.

Specifically, unsharp masking is a simple linear image operation—a convolution by a kernel that is the Dirac delta minus a gaussian blur kernel.

Deconvolution, on the other hand, is generally considered an ill-posed inverse problem that is best solved by nonlinear approaches.

For deconvolution to be effective, all variables in the image scene and capturing device need to be modeled, including aperture, focal length, distance to subject, lens, and media refractive indices and geometries.

Applying deconvolution successfully to general-purpose camera images is usually not feasible, because the geometries of the scene are not set.

However, deconvolution is applied in reality to microscopy and astronomical imaging, where the value of gained sharpness is high, imaging devices and the relative subject positions are both well defined, and optimization of the imaging devices to improve sharpness physically would cost significantly more.

In cases where a stable, well-defined aberration is present, such as the lens defect in early Hubble Space Telescope images, deconvolution is an especially effective technique.

This matrix is obtained using the equation shown above under #Digital unsharp masking, using a uniform kernel with 5 pixels for the "blurred" image, and 5 for the "amount" multiplier:

Unsharp masking applied to lower part of image
Simplified principle of unsharp masking
Source image (top),
sharpened image (middle),
highly sharpened image (bottom)