javax.media.jai.operator
Class GradientMagnitudeDescriptor
java.lang.Object
|
+--javax.media.jai.OperationDescriptorImpl
|
+--javax.media.jai.operator.GradientMagnitudeDescriptor
- All Implemented Interfaces:
- OperationDescriptor, RegistryElementDescriptor, Serializable
- public class GradientMagnitudeDescriptor
- extends OperationDescriptorImpl
An OperationDescriptor
describing the "GradientMagnitude"
operation.
The "GradientMagnitude" operation is an edge detector which computes
the magnitude of the image gradient vector in two orthogonal directions.
The result of the "GradientMagnitude" operation may be defined as:
dst[x][y][b] = ((SH(x,y,b))^2 + (SV(x,y,b))^2 )^0.5
where SH(x,y,b) and SV(x,y,b) are the horizontal and vertical gradient
images generated from band b of the source image by correlating it
with the supplied orthogonal (horizontal and vertical) gradient masks.
Origins set on the kernels will be ignored. The origins are assumed to be
width/2 & height/2.
Resource List
Name | Value |
GlobalName | GradientMagnitude |
LocallName | GradientMagnitude |
Vendor | com.sun.media.jai |
Description | Performs gradient magnitude edge detection
on an image. |
DocURL | http://java.sun.com/products/java-media/jai/forDevelopers/jaiapi/javax.media.jai.operator.GradientMagnitudeDescriptor.html |
Version | 1.0 |
arg0Desc | A gradient mask |
arg1Desc | A gradient mask orthogonal to the first one. |
Parameter List
Name | Class Type |
Default Value |
mask1 | javax.media.jai.KernelJAI |
KernalJAI.GRADIENT_MASK_SOBEL_HORIZONTAL |
mask2 | javax.media.jai.KernelJAI |
KernalJAI.GRADIENT_MASK_SOBEL_VERTICAL |
- See Also:
OperationDescriptor
,
KernelJAI
, Serialized Form
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,
validateRenderableArguments,
validateRenderableSources,
validateSources,
validateSources |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
GradientMagnitudeDescriptor
public GradientMagnitudeDescriptor()
- Constructor for the GradientMagnitudeDescriptor.
validateParameters
protected boolean validateParameters(ParameterBlock args,
StringBuffer msg)
- Validates the input parameters.
In addition to the standard checks performed by the
superclass method, this method checks that "mask1" and "mask2"
have the same dimensions.
- Overrides:
- validateParameters in class OperationDescriptorImpl
- Tags copied from class: OperationDescriptorImpl
- Throws:
- IllegalArgumentException - if
args
is null
.- IllegalArgumentException - if
msg
is null
and the validation fails. - See Also:
OperationDescriptorImpl.validateParameters(java.lang.String, java.awt.image.renderable.ParameterBlock, java.lang.StringBuffer)
getPropertyGenerators
public PropertyGenerator[] getPropertyGenerators()
- Returns an array of
PropertyGenerators
implementing
property inheritance for the "GradientMagnitude" operation.
- Overrides:
- getPropertyGenerators in class OperationDescriptorImpl
- Returns:
- An array of property generators.