SoGradientOperatorProcessing2d engine provides different algorithms to extract the edges of a 2D image. More...
#include <ImageViz/Engines/EdgeDetection/Gradient/SoGradientOperatorProcessing2d.h>
Public Types | |
enum | GradientOperator { CANNY_DERICHE = 0, SHEN_CASTAN = 1, CANNY = 3, GAUSSIAN = 4, SOBEL = 5, PREWITT = 6 } |
enum | GradientMode { AMPLITUDE_MAX_OF_MAGS = 0, AMPLITUDE_EUCLIDEAN = 1, AMPLITUDE_AND_ORIENTATION = 2, X_AND_Y_GRADIENTS = 3 } |
Public Member Functions | |
SoGradientOperatorProcessing2d () | |
Public Attributes | |
SoSFImageDataAdapter | inImage |
SoSFEnum | gradientOperator |
SoSFEnum | gradientMode |
SoSFFloat | standardDeviation |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outGradientXImage |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outGradientYImage |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outAmplitudeImage |
SoImageVizEngineOutput < SoSFImageDataAdapter, SoImageDataAdapter * > | outOrientationImage |
For an introduction, see:
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.
The highest is, the more edges we get. For color images it calculates the maximum of intensity or the euclidian mean.
SoRadialGradientCenteredProcessing2d, SoMorphologicalGradientProcessing.
inImage | NULL |
gradientOperator | CANNY_DERICHE |
gradientMode | AMPLITUDE_MAX_OF_MAGS |
standardDeviation | 60.0f |
AMPLITUDE_MAX_OF_MAGS |
This option computes the gradient maximal amplitude. Only the outAmplitudeImage output is set using this mode. |
AMPLITUDE_EUCLIDEAN |
This option computes the gradient euclidean amplitude. Only the outAmplitudeImage output is set using this mode. |
AMPLITUDE_AND_ORIENTATION |
This option computes euclidean amplitude and the orientation (between -128 and +128 degrees). Both outAmplitudeImage and outOrientationImage outputs are set using this mode. |
X_AND_Y_GRADIENTS |
This option computes gradient in X and Y directions. Both outGradientXImage and outGradientYImage outputs are set using this mode. |
SoGradientOperatorProcessing2d::SoGradientOperatorProcessing2d | ( | ) |
Constructor.
Select an output mode.
Use enum GradientMode. Default is AMPLITUDE_MAX_OF_MAGS
Select the gradient operator.
Use enum GradientOperator. Default is CANNY_DERICHE
The input image.
Default value is NULL. Supported types include: grayscale binary label color image.
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter*> SoGradientOperatorProcessing2d::outAmplitudeImage |
The output gradient amplitude image.
Default value is NULL. Supported types include: grayscale binary label color image.
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter*> SoGradientOperatorProcessing2d::outGradientXImage |
The output X-gradient image.
Default value is NULL. Supported types include: grayscale binary label color image.
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter*> SoGradientOperatorProcessing2d::outGradientYImage |
The output Y-gradient image.
Default value is NULL. Supported types include: grayscale binary label color image.
SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter*> SoGradientOperatorProcessing2d::outOrientationImage |
The output gradient orientation image.
Default value is NULL. Supported types include: grayscale binary label color image.
The standard deviation.
Default value is 60.0f.