ClassesClassesClassesClasses | | | | Operators

derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss (Operator)

Name

derivate_gaussderivate_gaussDerivateGaussderivate_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)

Herror derivate_gauss(Hobject Image, Hobject* DerivGauss, const HTuple& Sigma, const HTuple& Component)

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

HImageArray HImageArray::DerivateGauss(const HTuple& Sigma, const HTuple& Component) const

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

void HOperatorSetX.DerivateGauss(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*DerivGauss, [in] VARIANT Sigma, [in] VARIANT Component)

IHImageX* HImageX.DerivateGauss(
[in] VARIANT Sigma, [in] BSTR Component)

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_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss convolves an image with the derivatives of a Gaussian and calculates various features derived therefrom. SigmaSigmaSigmaSigmaSigmasigma is the parameter of the Gaussian (i.e., the amount of smoothing). If one value is passed in SigmaSigmaSigmaSigmaSigmasigma the amount of smoothing in the column and row direction is identical. If two values are passed in SigmaSigmaSigmaSigmaSigmasigma 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 ComponentComponentComponentComponentComponentcomponent are:

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

Smoothing only.

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

First derivative along x.

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

First derivative along y.

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

Absolute value of the gradient.

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

Gradient direction in radians.

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

Second derivative along x.

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

Second derivative along y.

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

Second derivative along x and y.

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

Third derivative along x.

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

Third derivative along y.

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

Third derivative along x, x and y.

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

Third derivative along x, y and y.

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

Determinant of the Hessian matrix: DET = g_xx * g_yy - g_xy**2

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

Laplace operator (trace of the Hessian matrix): Laplace = g_xx + g_yy

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

Mean curvature H

a = (1 + g_x * g_x) * g_yy
b = 2 * g_x * g_y * g_xy
c = (1 + g_y * g_y) * g_xx
d = (1 + g_x * g_x + g_y * g_y) ** (3/2)
H = (a - b + c) / d

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

Gaussian curvature K

K = DET / (1 + g_x * g_x + g_y * g_y) ** 2

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

Differential Area A

  A = E*G - F**2
  E = 1 + g_x**2
  F = g_x * g_y
  G = 1 + g_y**2

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

First eigenvalue

a = (g_xx + g_yy) / 2

lambda1 = a + sqrt(a*a - (g_xx * g_yy - g_xy * g_xy))

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

Second eigenvalue

a = (g_xx + g_yy) / 2
lambda2 = a - sqrt(a*a - (g_xx * g_yy - g_xy * g_xy))

'eigenvec_dir'"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""kitchen_rosenfeld":

Second derivative perpendicular to the gradient

k = (g_xx * g_y**2 + g_yy * g_x**2 - 2 * g_xy * g_x * g_y) /
     (g_x**2 + g_y**2)

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

Normalized second derivative perpendicular to the gradient

k = (g_xx * g_y**2 + g_yy * g_x**2 - 2 * g_xy * g_x * g_y) /
     (g_x**2 + g_y**2)**1.5

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

Second derivative along the gradient

k = (g_xx * g_x**2 + 2 * g_y * g_y * g_xy + g_xy * g_y**2) /
     (g_x**2 + g_y**2)

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

Second derivative along and perpendicular to the gradient

k = (g_x * g_y * (g_xx - g_yy) - (g_x**2 - g_y**2) * g_xy) /
     (g_x**2 + g_y**2)

Attention

derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss uses a special implementation that is optimized using SSE2 instructions if the system parameter 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable""sse2_enable" is set to 'true'"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 ComponentComponentComponentComponentComponentcomponent 'none'"none""none""none""none""none", 'x'"x""x""x""x""x", or 'y'"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""sse2_enable" to 'false'"false""false""false""false""false" (using set_systemset_systemSetSystemset_systemSetSystemSetSystem) before you call derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss. This way derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss does not use SSE2 accelerations. Don't forget to set 'sse2_enable'"sse2_enable""sse2_enable""sse2_enable""sse2_enable""sse2_enable" back to 'true'"true""true""true""true""true" afterwards.

derivate_gaussderivate_gaussDerivateGaussderivate_gaussDerivateGaussDerivateGauss is only executed on an OpenCL device if SigmaSigmaSigmaSigmaSigmasigma induces a filter width respectively height of up to 129 pixels. This corresponds to a SigmaSigmaSigmaSigmaSigmasigma of less than 20.7 for ComponentComponentComponentComponentComponentcomponent = 'none'"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.

Parallelization

Parameters

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

Input images.

DerivGaussDerivGaussDerivGaussDerivGaussDerivGaussderivGauss (output_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject * (real)

Filtered result images.

SigmaSigmaSigmaSigmaSigmasigma (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (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 sigma ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Sigma > 0.0

ComponentComponentComponentComponentComponentcomponent (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Derivative or feature to be calculated.

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

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

List of values (for compute devices): 'none'"none""none""none""none""none", 'x'"x""x""x""x""x", 'y'"y""y""y""y""y", 'gradient'"gradient""gradient""gradient""gradient""gradient", 'gradient_dir'"gradient_dir""gradient_dir""gradient_dir""gradient_dir""gradient_dir", 'xx'"xx""xx""xx""xx""xx", 'yy'"yy""yy""yy""yy""yy", 'xy'"xy""xy""xy""xy""xy", 'xxx'"xxx""xxx""xxx""xxx""xxx", 'yyy'"yyy""yyy""yyy""yyy""yyy", 'xxy'"xxy""xxy""xxy""xxy""xxy", 'xyy'"xyy""xyy""xyy""xyy""xyy", 'laplace'"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_crossingZeroCrossingzero_crossingZeroCrossingZeroCrossing, dual_thresholddual_thresholdDualThresholddual_thresholdDualThresholdDualThreshold

Alternatives

laplacelaplaceLaplacelaplaceLaplaceLaplace, laplace_of_gausslaplace_of_gaussLaplaceOfGausslaplace_of_gaussLaplaceOfGaussLaplaceOfGauss, binomial_filterbinomial_filterBinomialFilterbinomial_filterBinomialFilterBinomialFilter, gauss_imagegauss_imageGaussImagegauss_imageGaussImageGaussImage, smooth_imagesmooth_imageSmoothImagesmooth_imageSmoothImageSmoothImage, isotropic_diffusionisotropic_diffusionIsotropicDiffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusion

See also

zero_crossingzero_crossingZeroCrossingzero_crossingZeroCrossingZeroCrossing, dual_thresholddual_thresholdDualThresholddual_thresholdDualThresholdDualThreshold

Module

Foundation


ClassesClassesClassesClasses | | | | Operators