A filter that accentuates edges (high-frequency components) of an image by attenuating low-frequency components can be obtained by subtracting from the image a smoothed version of the image. A photographic technique for achieving this effect is called unsharp masking. An out-of-focus image is "subtracted," in part, from the original.
where W >= 9. Negative values should either be clipped or eliminated by subtracting the minimum value from the image. The final image should then be scaled to the range 0 to 1.
W = 9 | W = 18 | original image |
Vary the weight of the 4-neighbors relative to the 8-neighbors
where W >= 5 + 4 a. Try a = 2, for example.
Maintained by John Loomis, last updated June 19, 1997