derivate_gaussderivate_gaussDerivateGaussDerivateGauss (Operator)

Name

derivate_gaussderivate_gaussDerivateGaussDerivateGauss — Convolve an image with derivatives of the Gaussian.

Signature

derivate_gauss(Image : DerivGauss : Sigma, Component : )

Herror derivate_gauss(const Hobject Image, Hobject* DerivGauss, double Sigma, const char* Component)

Herror T_derivate_gauss(const Hobject Image, Hobject* DerivGauss, const Htuple Sigma, const Htuple Component)

void DerivateGauss(const HObject& Image, HObject* DerivGauss, const HTuple& Sigma, const HTuple& Component)

HImage HImage::DerivateGauss(const HTuple& Sigma, const HString& Component) const

HImage HImage::DerivateGauss(double Sigma, const HString& Component) const

HImage HImage::DerivateGauss(double Sigma, const char* Component) const

HImage HImage::DerivateGauss(double Sigma, const wchar_t* Component) const   (Windows only)

static void HOperatorSet.DerivateGauss(HObject image, out HObject derivGauss, HTuple sigma, HTuple component)

HImage HImage.DerivateGauss(HTuple sigma, string component)

HImage HImage.DerivateGauss(double sigma, string component)

Description

derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGauss convolves an image with the derivatives of a Gaussian and calculates various features derived therefrom. SigmaSigmaSigmaSigmasigma is the parameter of the Gaussian (i.e., the amount of smoothing). If one value is passed in SigmaSigmaSigmaSigmasigma the amount of smoothing in the column and row direction is identical. If two values are passed in SigmaSigmaSigmaSigmasigma the first value specifies the amount of smoothing in the column direction, while the second value specifies the amount of smoothing in the row direction. The possible values for ComponentComponentComponentComponentcomponent are:

'none'"none""none""none""none":

Smoothing only.

'x'"x""x""x""x":

First derivative along x.

'y'"y""y""y""y":

First derivative along y.

'gradient'"gradient""gradient""gradient""gradient":

Absolute value of the gradient.

'gradient_dir'"gradient_dir""gradient_dir""gradient_dir""gradient_dir":

Gradient direction in radians.

'xx'"xx""xx""xx""xx":

Second derivative along x.

'yy'"yy""yy""yy""yy":

Second derivative along y.

'xy'"xy""xy""xy""xy":

Second derivative along x and y.

'xxx'"xxx""xxx""xxx""xxx":

Third derivative along x.

'yyy'"yyy""yyy""yyy""yyy":

Third derivative along y.

'xxy'"xxy""xxy""xxy""xxy":

Third derivative along x, x and y.

'xyy'"xyy""xyy""xyy""xyy":

Third derivative along x, y and y.

'det'"det""det""det""det":

Determinant of the Hessian matrix:

'laplace'"laplace""laplace""laplace""laplace":

Laplace operator (trace of the Hessian matrix):

'mean_curvature'"mean_curvature""mean_curvature""mean_curvature""mean_curvature":

Mean curvature H

'gauss_curvature'"gauss_curvature""gauss_curvature""gauss_curvature""gauss_curvature":

Gaussian curvature K

'area'"area""area""area""area":

Differential Area A

'eigenvalue1'"eigenvalue1""eigenvalue1""eigenvalue1""eigenvalue1":

First eigenvalue

'eigenvalue2'"eigenvalue2""eigenvalue2""eigenvalue2""eigenvalue2":

Second eigenvalue

'eigenvec_dir'"eigenvec_dir""eigenvec_dir""eigenvec_dir""eigenvec_dir":

Direction of the eigenvector corresponding to the first eigenvalue in radians

'kitchen_rosenfeld'"kitchen_rosenfeld""kitchen_rosenfeld""kitchen_rosenfeld""kitchen_rosenfeld":

Second derivative perpendicular to the gradient

'zuniga_haralick'"zuniga_haralick""zuniga_haralick""zuniga_haralick""zuniga_haralick":

Normalized second derivative perpendicular to the gradient

'2nd_ddg'"2nd_ddg""2nd_ddg""2nd_ddg""2nd_ddg":

Second derivative along the gradient

'de_saint_venant'"de_saint_venant""de_saint_venant""de_saint_venant""de_saint_venant":

Second derivative along and perpendicular to the gradient

Attention

derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGauss uses a special implementation that is optimized using SSE2 instructions if the system parameter 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable" is set to 'true'"true""true""true""true" (which is default if SSE2 is available on your machine). This implementation is slightly inaccurate compared to the pure C version due to numerical issues (for 'byte' images and ComponentComponentComponentComponentcomponent 'none'"none""none""none""none", 'x'"x""x""x""x", or 'y'"y""y""y""y" the difference is in order of magnitude of 1.0e-5). If you prefer accuracy over performance you can set 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable" to 'false'"false""false""false""false" (using set_systemset_systemSetSystemSetSystemSetSystem) before you call derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGauss. This way derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGauss does not use SSE2 accelerations. Don't forget to set 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable" back to 'true'"true""true""true""true" afterwards.

derivate_gaussderivate_gaussDerivateGaussDerivateGaussDerivateGauss is only executed on an OpenCL device if SigmaSigmaSigmaSigmasigma induces a filter width respectively height of up to 129 pixels. This corresponds to a SigmaSigmaSigmaSigmasigma of less than 20.7 for ComponentComponentComponentComponentcomponent = 'none'"none""none""none""none". Further as the SSE2 version the OpenCL implementation is slightly inaccurate compared to the pure C version due to numerical issues.

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution Information

Parameters

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / real*) *allowed for compute devices

Input images.

DerivGaussDerivGaussDerivGaussDerivGaussderivGauss (output_object)  (multichannel-)image(-array) objectHImageHImageHobject * (real)

Filtered result images.

SigmaSigmaSigmaSigmasigma (input_control)  real(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Sigma of the Gaussian.

Default value: 1.0

Suggested values: 0.7, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0

Typical range of values: 0.2 ≤ Sigma Sigma Sigma Sigma sigma ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: 0.01 <= Sigma <= 50.0

ComponentComponentComponentComponentcomponent (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Derivative or feature to be calculated.

Default value: 'x' "x" "x" "x" "x"

List of values: '2nd_ddg'"2nd_ddg""2nd_ddg""2nd_ddg""2nd_ddg", 'area'"area""area""area""area", 'de_saint_venant'"de_saint_venant""de_saint_venant""de_saint_venant""de_saint_venant", 'det'"det""det""det""det", 'eigenvalue1'"eigenvalue1""eigenvalue1""eigenvalue1""eigenvalue1", 'eigenvalue2'"eigenvalue2""eigenvalue2""eigenvalue2""eigenvalue2", 'eigenvec_dir'"eigenvec_dir""eigenvec_dir""eigenvec_dir""eigenvec_dir", 'gauss_curvature'"gauss_curvature""gauss_curvature""gauss_curvature""gauss_curvature", 'gradient'"gradient""gradient""gradient""gradient", 'gradient_dir'"gradient_dir""gradient_dir""gradient_dir""gradient_dir", 'kitchen_rosenfeld'"kitchen_rosenfeld""kitchen_rosenfeld""kitchen_rosenfeld""kitchen_rosenfeld", 'laplace'"laplace""laplace""laplace""laplace", 'main1_curvature'"main1_curvature""main1_curvature""main1_curvature""main1_curvature", 'main2_curvature'"main2_curvature""main2_curvature""main2_curvature""main2_curvature", 'mean_curvature'"mean_curvature""mean_curvature""mean_curvature""mean_curvature", 'none'"none""none""none""none", 'x'"x""x""x""x", 'xx'"xx""xx""xx""xx", 'xxx'"xxx""xxx""xxx""xxx", 'xxy'"xxy""xxy""xxy""xxy", 'xy'"xy""xy""xy""xy", 'xyy'"xyy""xyy""xyy""xyy", 'y'"y""y""y""y", 'yy'"yy""yy""yy""yy", 'yyy'"yyy""yyy""yyy""yyy", 'zuniga_haralick'"zuniga_haralick""zuniga_haralick""zuniga_haralick""zuniga_haralick"

List of values (for compute devices): 'none'"none""none""none""none", 'x'"x""x""x""x", 'y'"y""y""y""y", 'gradient'"gradient""gradient""gradient""gradient", 'gradient_dir'"gradient_dir""gradient_dir""gradient_dir""gradient_dir", 'xx'"xx""xx""xx""xx", 'yy'"yy""yy""yy""yy", 'xy'"xy""xy""xy""xy", 'xxx'"xxx""xxx""xxx""xxx", 'yyy'"yyy""yyy""yyy""yyy", 'xxy'"xxy""xxy""xxy""xxy", 'xyy'"xyy""xyy""xyy""xyy", 'laplace'"laplace""laplace""laplace""laplace"

Example (C)

read_image(&Image,"mreut");
derivate_gauss(Image,&Gauss,3.0,"x");
zero_crossing(Gauss,&ZeroCrossings);

Possible Successors

zero_crossingzero_crossingZeroCrossingZeroCrossingZeroCrossing, dual_thresholddual_thresholdDualThresholdDualThresholdDualThreshold

Alternatives

laplacelaplaceLaplaceLaplaceLaplace, laplace_of_gausslaplace_of_gaussLaplaceOfGaussLaplaceOfGaussLaplaceOfGauss, binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilter, gauss_filtergauss_filterGaussFilterGaussFilterGaussFilter, smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImage, isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionIsotropicDiffusion

See also

zero_crossingzero_crossingZeroCrossingZeroCrossingZeroCrossing, dual_thresholddual_thresholdDualThresholdDualThresholdDualThreshold

Module

Foundation