An OperationDescriptor describing the "UnsharpMask" operation.
Unsharp masking is derived from a photographic technique for
improving the sharpness of images. In its digital form it is implemented
using convolution to create a low-pass filtered version of a source image.
The low-pass image is then subtracted from the original image,
creating a high-pass image. The high pass image is then added back
to the original image, creating enhanced edge contrast. By adjusting
a scaling factor, the degree of high pass add-back can be controlled.
The operation is implemented algorithmically as follows. At each
original pixel location x,y:
result = original + (original - lowpass) * gainFactor
where
original = value at position x,y of source image
lowpass = result of convolution with lowpass filter
centered at pixel x,y
gain = controlling parameter for degree of sharpness
gain = 0 : no effect
gain > 0 : sharpening
-1 < gain < 0 : smoothing
In general gain factors should be restricted to a range of
[-1, 2], as higher magnitude values are likely to cause
overflows or underflows which must be clamped to the image
data type's range.
The default gain factor is set to 1,0F .
This operation is widely applied to scanned image enhancement.
The typical gain factor for scanned images takes values in the range
of [1/4, 2] (page 278 in Digital Image Processing by William
K. Pratt, 3rd).
Resource List
Name | Value |
GlobalName | UnsharpMask |
LocalName | UnsharpMask |
Vendor | com.sun.media.jai |
Description | Performs unsharp masking to sharpen or smooth
an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/UnsharpMaskDescriptor.html |
Version | 1.1 |
arg0Desc | The convolution kernel. |
arg1Desc | The gain factor. |
Parameter List
Name | Class Type |
Default Value |
kernel | javax.media.jai.KernelJAI |
3 X 3 average |
gain | java.lang.Float |
1.0F |
See Also: javax.media.jai.OperationDescriptor See Also: javax.media.jai.KernelJAI See Also: javax.media.jai.operator.ConvolveDescriptor since: JAI 1.1 |