Unsharp masking

From Wikipedia, the free encyclopedia

Source image, normally sharpened image and oversharpened image
Source image, normally sharpened image and oversharpened image

Unsharp masking is an image manipulation technique now familiar to many users of digital image processing software, but it seems to have been first used in Germany in the 1930s as a way of increasing the acutance, or apparent sharpness, of photographic images. The "unsharp" of the name derives from the fact that the technique uses a blurred, or "unsharp", positive to create a "mask" of the original image. The unsharped mask is then combined with the negative, creating the illusion that the resulting image is sharper than the original. From a signal-processing standpoint, an unsharp mask is generally a linear or nonlinear filter that amplifies high-frequency components.

Contents

[edit] Photographic unsharp masking

In the photographic process, a large-format glass plate negative is contact-copied onto a low contrast film or plate to create a positive. However, the positive copy is made with the copy material in contact with the back of the original, rather than emulsion-to-emulsion, so it is blurred. After processing this blurred positive is replaced in contact with the back of the original negative. When light is passed through both negative and in-register positive (in an enlarger for example), the positive partially cancels some of the information in the negative.

Because the positive has been intentionally blurred, only the low frequency (blurred) information is cancelled. 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 frequency (fine detail) information in the original, without loss of highlight or shadow detail. The resulting print appears sharper than one made without the unsharp mask; the apparent accutance is increased.

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.

In 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.

[edit] Digital unsharp masking

USM applied to lower part of image.
USM applied to lower part of image.

The same differencing principle is used in the unsharp masking tool in many digital imaging software packages (for example, Adobe Photoshop or GIMP). The software applies a blur to a copy of the original image and then compares it to the original. If the difference is greater than a user-specified 'Threshold' setting the images are (in effect) subtracted. The 'Threshold' control constrains sharpening to image elements that differ from each other above a certain size threshold, so that sharpening of small image details such as photographic grain can be suppressed.

Digital unsharp masking is a flexible and powerful way to increase sharpness, especially in scanned images. However, it is easy to create unwanted and conspicuous edge effects. On the other hand these effects can be used creatively, especially if one channel of images in RGB or Lab colour space is selected for unsharp masking. Typically three settings will control digital unsharp masking:

  • Amount: This is listed as a percentage, and controls the magnitude of each overshoot (how much darker and how much lighter the edge borders become). This can also be thought of as how much contrast is added at the edges. It does not affect the width of the edge rims.
  • Radius: This affects the size of the edges to be enhanced or how wide the edge rims become, so a smaller radius enhances smaller-scale detail. Higher Radius values can cause halos at the edges, a detectable faint light rim around objects. Fine detail needs a smaller Radius tiny detail of the same size as the Radius width is lost. Radius and Amount interact; reducing one allows more of the other.
  • Threshold: Which controls the minimum brightness change that will be sharpened or how far apart adjacent tonal values have to be before the filter does anything. This lack of action is important to prevent smooth areas from becoming speckled. The threshold setting can be used to sharpen more pronounced edges, while leaving more subtle edges untouched. Low values should sharpen more because fewer areas are excluded. Higher threshold values exclude areas of lower contrast.

[edit] Comparison with deconvolution

In image processing, deconvolution is the process of approximately inverting the process that caused an image to be blurred. While unsharp masking increases the apparent sharpness of an image in ignorance of the manner in which the image was acquired, deconvolution increases the apparent sharpness of an image, but based on information describing some of the likely origins of the distortions in the light path used in capturing the image; it may therefore sometimes be preferred, where the cost in preparation time and per-image computation time are offset by the increase in image clarity.

With deconvolution, "lost" image detail may be approximately recovered – although it is generally not possible to verify that any recovered detail is accurate. Statistically, some level of correspondence between the sharpened images and the actual scenes being imaged can be attained. If the scenes to be captured in the future are similar enough to validated image scenes, then one can assess the degree to which recovered detail may be accurate. The improvement to image quality is often attractive, since the same validation issues are present even for un-enhanced images.

For deconvolution to be effective, all variables in the image scene and capturing device need to be modelled, including aperture, focal length, distance to subject, lens and media refractive indices and geometries. Therefore applying deconvolution successfully to general-purpose camera images is usually not feasible, since the geometries of the scene are not set. However deconvolution is applied in the real world to both microscopy and astronomical imaging, where the value of gained sharpness is high, imaging devices and the relative subject positions are both well defined, and the imaging devices would cost a great deal more to optimize to physically improve sharpness. In the highly-scientific realms where microscopy and astronomical imaging are engaged, the actuality is often far more important than the aesthetic perception of sharpness, but for general purpose use, methods such as unsharp mask are usually sufficient, and generally cost-effective.

[edit] External links