• All Implemented Interfaces:
`SafeDisposable`

```public class SoGradientOperatorProcessing2d
extends SoImageVizEngine```
`SoGradientOperatorProcessing2d` engine provides different algorithms to extract the edges of a 2D image. For an introduction, see:

• section Images Filters
• section Edge Detection

The `SoGradientOperatorProcessing2d` engine provides different algorithms to extract the edges of an image.

Note: You may normalize the filtered image, i.e. divide the output gray levels by the sum of absolute values of the kernel coefficients. If not, be aware that overflow may occur.

• Canny-Deriche: It performs a recursive gradient computation to get the gradient in X and Y directions. It is an FIR (finite impulse response) filter. To minimize the effect of noise, it smooths the image before computing the gradient. A smoothing scale parameter determines the smoothing intensity. If the value is large, noise will be reduced but edges will be less sharp and only the most significant edges will survive. It is important to select the right coefficient to lower the noise just enough without defocusing the edges. Then it gets the maximum of these images with a gradient magnitude operation. For color images it calculates the maximum of intensity or the euclidian mean.
• Shen-Castan: It calculates the gradient of Shen and Castan. It is a recursive and exponential filter that smooths an object and then extracts its edges. It is based on the Shen operator :

The highest is, the more edges we get. For color images it calculates the maximum of intensity or the euclidian mean.

• Canny: It performs an approximation to get the Canny-Deriche in X and Y directions using a convolution kernel 7x5 for X and 5x7 for Y. Result is nearly the same than Canny Deriche but process is much faster.
• Gaussian: It performs a convolution with the derivatives of a Gaussian function along each image axis.
• Sobel: It performs a convolution with the Sobel Kernel.
• Prewitt: It performs a convolution with the Prewitt Kernel.

`SoRadialGradientCenteredProcessing2d`, ```SoMorphologicalGradientProcessing File format/default: GradientOperatorProcessing2d { inImage NULL gradientOperator CANNY_DERICHE gradientMode AMPLITUDE_MAX_OF_MAGS standardDeviation 60.0f } Library references: gradient```
• Nested Class Summary

Nested Classes
Modifier and Type Class Description
`static class ` `SoGradientOperatorProcessing2d.GradientModes`
`static class ` `SoGradientOperatorProcessing2d.GradientOperators`
• Nested classes/interfaces inherited from class com.openinventor.imageviz.engines.SoImageVizEngine

`SoImageVizEngine.ComputeModes, SoImageVizEngine.EventArg, SoImageVizEngine.Neighborhood3ds`
• Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor

`Inventor.ConstructorCommand`
• Field Summary

Fields
Modifier and Type Field Description
`SoSFEnum<SoGradientOperatorProcessing2d.GradientModes>` `gradientMode`
Select an output mode.
`SoSFEnum<SoGradientOperatorProcessing2d.GradientOperators>` `gradientOperator`
`SoSFImageDataAdapter` `inImage`
The input image.
`SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter>` `outAmplitudeImage`
`SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter>` `outGradientXImage`
`SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter>` `outGradientYImage`
`SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter>` `outOrientationImage`
`SoSFFloat` `standardDeviation`
The standard deviation.
• Fields inherited from class com.openinventor.imageviz.engines.SoImageVizEngine

`onBegin, onEnd, onProgress`
• Fields inherited from class com.openinventor.inventor.Inventor

`VERBOSE_LEVEL, ZeroHandle`
• Constructor Summary

Constructors
Constructor Description
`SoGradientOperatorProcessing2d()`
Constructor.

• Methods inherited from class com.openinventor.imageviz.engines.SoImageVizEngine

`abortEvaluate, isEvaluating, startEvaluate, waitEvaluate`
• Methods inherited from class com.openinventor.inventor.engines.SoEngine

`copy, getByName, getOutput, getOutputName`
• Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer

`copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults`
• Methods inherited from class com.openinventor.inventor.misc.SoBase

`dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch`
• Methods inherited from class com.openinventor.inventor.Inventor

`getNativeResourceHandle`
• Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• Field Detail

• inImage

`public final SoSFImageDataAdapter inImage`
The input image. Default value is NULL. Supported types include: grayscale binary label color image.

`public final SoSFEnum<SoGradientOperatorProcessing2d.GradientOperators> gradientOperator`
Select the gradient operator. . Default is CANNY_DERICHE

`public final SoSFEnum<SoGradientOperatorProcessing2d.GradientModes> gradientMode`
Select an output mode. . Default is AMPLITUDE_MAX_OF_MAGS
• standardDeviation

`public final SoSFFloat standardDeviation`
The standard deviation. Default value is 60.0f.

`public final SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter> outGradientXImage`
The output X-gradient image. Default value is NULL. Supported types include: grayscale binary label color image.

`public final SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter> outGradientYImage`
The output Y-gradient image. Default value is NULL. Supported types include: grayscale binary label color image.
• outAmplitudeImage

`public final SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter> outAmplitudeImage`
The output gradient amplitude image. Default value is NULL. Supported types include: grayscale binary label color image.
• outOrientationImage

`public final SoImageVizEngineOutput<SoSFImageDataAdapter,​SoImageDataAdapter> outOrientationImage`
The output gradient orientation image. Default value is NULL. Supported types include: grayscale binary label color image.
• Constructor Detail

`public SoGradientOperatorProcessing2d()`