javax.media.jai.operator
Class UnsharpMaskDescriptor

java.lang.Object
  |
  +--javax.media.jai.OperationDescriptorImpl
        |
        +--javax.media.jai.operator.UnsharpMaskDescriptor
All Implemented Interfaces:
OperationDescriptor, RegistryElementDescriptor, Serializable

public class UnsharpMaskDescriptor
extends OperationDescriptorImpl

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.

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 NO_PARAMETER_DEFAULT
gain java.lang.Float NO_PARAMETER_DEFAULT

Since:
JAI 1.1
See Also:
OperationDescriptor, KernelJAI, ConvolveDescriptor, Serialized Form

Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Constructor Summary
UnsharpMaskDescriptor()
          Constructor.
 
Method Summary
 PropertyGenerator[] getPropertyGenerators()
          Returns an array of PropertyGenerators implementing property inheritance for the "UnsharpMask" operation.
 
Methods inherited from class javax.media.jai.OperationDescriptorImpl
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnsharpMaskDescriptor

public UnsharpMaskDescriptor()
Constructor.
Method Detail

getPropertyGenerators

public PropertyGenerator[] getPropertyGenerators()
Returns an array of PropertyGenerators implementing property inheritance for the "UnsharpMask" operation.
Overrides:
getPropertyGenerators in class OperationDescriptorImpl
Returns:
An array of property generators.