Class SoGradientOperatorProcessing2d

  • 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
    • Introduction to Gradient

    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.

    See Also:
    SoRadialGradientCenteredProcessing2d, SoMorphologicalGradientProcessing File format/default: GradientOperatorProcessing2d { inImage NULL gradientOperator CANNY_DERICHE gradientMode AMPLITUDE_MAX_OF_MAGS standardDeviation 60.0f } Library references: gradient