Open Inventor 9.9

• 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.

File format/default:

}

• ### Nested Class Summary

Nested Classes
Modifier and Type Class and 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 and Description
`static int` `AMPLITUDE_AND_ORIENTATION`
Deprecated.
`static int` `AMPLITUDE_EUCLIDEAN`
Deprecated.
`static int` `AMPLITUDE_MAX_OF_MAGS`
Deprecated.
`static int` `CANNY`
Deprecated.
`static int` `CANNY_DERICHE`
Deprecated.
`static int` `GAUSSIAN`
Deprecated.
`SoSFEnum<SoGradientOperatorProcessing2d.GradientModes>` `gradientMode`
Select an output mode.
`SoSFEnum<SoGradientOperatorProcessing2d.GradientOperators>` `gradientOperator`
`SoSFImageDataAdapter` `inImage`
The input image.
`static int` `KERNEL3X3`
Deprecated.
`SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter>` `outAmplitudeImage`
`SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter>` `outGradientXImage`
`SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter>` `outGradientYImage`
`SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter>` `outOrientationImage`
`static int` `PREWITT`
Deprecated.
`static int` `SHEN_CASTAN`
Deprecated.
`static int` `SOBEL`
Deprecated.
`SoSFFloat` `standardDeviation`
The standard deviation.
`static int` `X_AND_Y_GRADIENTS`
Deprecated.
• ### Fields inherited from class com.openinventor.imageviz.engines.SoImageVizEngine

`CONNECTIVITY_18, CONNECTIVITY_26, CONNECTIVITY_6, MODE_2D, MODE_3D, MODE_AUTO, onBegin, onEnd, onProgress`
• ### Fields inherited from class com.openinventor.inventor.Inventor

`VERBOSE_LEVEL, ZeroHandle`
• ### Constructor Summary

Constructors
Constructor and 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, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable, touch`
• ### Methods inherited from class com.openinventor.inventor.Inventor

`getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads`
• ### Methods inherited from class java.lang.Object

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

• #### CANNY_DERICHE

```@Deprecated
public static final int CANNY_DERICHE```
Deprecated.
• #### SHEN_CASTAN

```@Deprecated
public static final int SHEN_CASTAN```
Deprecated.
• #### KERNEL3X3

```@Deprecated
public static final int KERNEL3X3```
Deprecated.
• #### CANNY

```@Deprecated
public static final int CANNY```
Deprecated.
• #### GAUSSIAN

```@Deprecated
public static final int GAUSSIAN```
Deprecated.
• #### SOBEL

```@Deprecated
public static final int SOBEL```
Deprecated.
• #### PREWITT

```@Deprecated
public static final int PREWITT```
Deprecated.
• #### AMPLITUDE_MAX_OF_MAGS

```@Deprecated
public static final int AMPLITUDE_MAX_OF_MAGS```
Deprecated.
• #### AMPLITUDE_EUCLIDEAN

```@Deprecated
public static final int AMPLITUDE_EUCLIDEAN```
Deprecated.
• #### AMPLITUDE_AND_ORIENTATION

```@Deprecated
public static final int AMPLITUDE_AND_ORIENTATION```
Deprecated.

```@Deprecated
Deprecated.
• #### 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()`