| Table of Contents / Filters / Edges | Operators |
derivate_gauss — Convolve an image with derivatives of the Gaussian.
derivate_gauss(Image : DerivGauss : Sigma, Component : )
derivate_gauss convolves an image with the derivatives of a Gaussian and calculates various features derived therefrom. Sigma is the parameter of the Gaussian (i.e., the amount of smoothing). If one value is passed in Sigma the amount of smoothing in the column and row direction is identical. If two values are passed in Sigma 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 Component are:
Smoothing only.
First derivative along x.
First derivative along y.
Absolute value of the gradient.
Gradient direction in radians.
Second derivative along x.
Second derivative along y.
Second derivative along x and y.
Third derivative along x.
Third derivative along y.
Third derivative along x, x and y.
Third derivative along x, y and y.
Determinant of the Hessian matrix: DET = g_xx * g_yy - g_xy**2
Laplace operator (trace of the Hessian matrix): Laplace = g_xx + g_yy
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
Gaussian curvature K
K = DET / (1 + g_x * g_x + g_y * g_y) ** 2
Differential Area A
A = E*G - F**2 E = 1 + g_x**2 F = g_x * g_y G = 1 + g_y**2
First eigenvalue
a = (g_xx + g_yy) / 2 lambda1 = a + sqrt(a*a - (g_xx * g_yy - g_xy * g_xy))
Second eigenvalue
a = (g_xx + g_yy) / 2 lambda2 = a - sqrt(a*a - (g_xx * g_yy - g_xy * g_xy))
Direction of the eigenvector corresponding to the first eigenvalue in radians
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)
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
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)
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)
derivate_gauss uses a special implementation that is optimized using SSE2 instructions if the system parameter 'sse2_enable' is set to '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 Component 'none', 'x', or 'y' the difference is in order of magnitude of 1.0e-5). If you prefer accuracy over performance you can set 'sse2_enable' to 'false' (using set_system) before you call derivate_gauss. This way derivate_gauss does not use SSE2 accelerations. Don't forget to set 'sse2_enable' back to 'true' afterwards.
derivate_gauss is only executed on an OpenCL device if Sigma induces a filter width respectively height of up to 129 pixels. This corresponds to a Sigma of less than 20.7 for Component = 'none'. Further as the SSE2 version the OpenCL implementation is slightly inaccurate compared to the pure C version due to numerical issues.
Input images.
Filtered result images.
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 ≤ 50.0
Minimum increment: 0.01
Recommended increment: 0.1
Restriction: Sigma > 0.0
Derivative or feature to be calculated.
Default value: 'x'
List of values: 'none', 'x', 'y', 'gradient', 'xx', 'yy', 'xy', 'xxx', 'yyy', 'xxy', 'xyy', 'det', 'mean_curvature', 'gauss_curvature', 'eigenvalue1', 'eigenvalue2', 'main1_curvature', 'main2_curvature', 'kitchen_rosenfeld', 'zuniga_haralick', '2nd_ddg', 'de_saint_venant', 'area', 'laplace', 'gradient_dir', 'eigenvec_dir'
List of values (for compute devices): 'none', 'x', 'y', 'gradient', 'gradient_dir', 'xx', 'yy', 'xy', 'xxx', 'yyy', 'xxy', 'xyy', 'laplace'
read_image(&Image,"mreut"); derivate_gauss(Image,&Gauss,3.0,"x"); zero_crossing(Gauss,&ZeroCrossings);
laplace, laplace_of_gauss, binomial_filter, gauss_image, smooth_image, isotropic_diffusion
Foundation
| Table of Contents / Filters / Edges | Operators |
| HALCON Reference Manual 10.0.2 | Copyright © 1996-2011 MVTec Software GmbH |