Operator Reference
derivate_gauss (Operator)
derivate_gauss
— Convolve an image with derivatives of the Gaussian.
Signature
derivate_gauss(Image : DerivGauss : Sigma, Component : )
Description
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:
- 'none' :
-
Smoothing only.
- 'x' :
First derivative along x.
- 'y' :
-
First derivative along y.
- 'gradient' :
-
Absolute value of the gradient.
- 'gradient_dir' :
-
Gradient direction in radians.
- 'xx' :
-
Second derivative along x.
- 'yy' :
-
Second derivative along y.
- 'xy' :
-
Second derivative along x and y.
- 'xxx' :
-
Third derivative along x.
- 'yyy' :
-
Third derivative along y.
- 'xxy' :
-
Third derivative along x, x and y.
- 'xyy' :
-
Third derivative along x, y and y.
- 'det' :
-
Determinant of the Hessian matrix:
- 'laplace' :
-
Laplace operator (trace of the Hessian matrix):
- 'mean_curvature' :
Mean curvature H
- 'gauss_curvature' :
Gaussian curvature K
- 'area' :
Differential Area A
- 'eigenvalue1' :
First eigenvalue
- 'eigenvalue2' :
Second eigenvalue
- 'eigenvec_dir' :
Direction of the eigenvector corresponding to the first eigenvalue in radians
- 'main1_curvature'
First main curvature
- 'main2_curvature'
-
Second main curvature
- 'kitchen_rosenfeld' :
Second derivative perpendicular to the gradient
- 'zuniga_haralick' :
Normalized second derivative perpendicular to the gradient
- '2nd_ddg' :
Second derivative along the gradient
- 'de_saint_venant' :
Second derivative along and perpendicular to the gradient
Attention
Besides the pure C version there are specific implementations of
derivate_gauss
for speed up.
Such an optimization is applied in case it is supported by the system and
the respective system parameter *_enable
is set to
'true' , see set_system
.
The following optimizations are supported (listed according to their
priority):
-
using AVX512f instructions ('avx512f_enable' )
-
using AVX instructions ('avx_enable' )
-
using SSE2 instructions ('sse2_enable' )
These implementations are slightly inaccurate compared to the pure C
version due to numerical issues.
For example, using SSE2 instructions the inaccuracy is in order of magnitude
of 1.0e-5 for 'byte' images and Component
set to 'none' ,
'x' , or 'y' .
In case accuracy is preferred over performance, set all corresponding system
parameter to 'false' (using set_system
) before calling
derivate_gauss
.
This way derivate_gauss
does not use the accelerations.
Do not forget to set the parameter 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' .
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
- Supports OpenCL compute devices.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
- Automatically parallelized on channel level.
- Automatically parallelized on domain level.
Parameters
Image
(input_object) (multichannel-)image(-array) →
object (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / real*) *allowed for compute devices
Input images.
DerivGauss
(output_object) (multichannel-)image(-array) →
object (real)
Filtered result images.
Sigma
(input_control) real(-array) →
(real)
Sigma of the Gaussian.
Default: 1.0
Suggested values: 0.7, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0
Value range:
0.01
≤
Sigma
≤
50.0
Minimum increment: 0.01
Recommended increment: 0.1
Component
(input_control) string →
(string)
Derivative or feature to be calculated.
Default: 'x'
List of values: '2nd_ddg' , 'area' , 'de_saint_venant' , 'det' , 'eigenvalue1' , 'eigenvalue2' , 'eigenvec_dir' , 'gauss_curvature' , 'gradient' , 'gradient_dir' , 'kitchen_rosenfeld' , 'laplace' , 'main1_curvature' , 'main2_curvature' , 'mean_curvature' , 'none' , 'x' , 'xx' , 'xxx' , 'xxy' , 'xy' , 'xyy' , 'y' , 'yy' , 'yyy' , 'zuniga_haralick'
List of values (for compute devices): 'none' , 'x' , 'y' , 'gradient' , 'gradient_dir' , 'xx' , 'yy' , 'xy' , 'xxx' , 'yyy' , 'xxy' , 'xyy' , 'laplace'
Example (C)
read_image(&Image,"mreut"); derivate_gauss(Image,&Gauss,3.0,"x"); zero_crossing(Gauss,&ZeroCrossings);
Possible Successors
Alternatives
laplace
,
laplace_of_gauss
,
binomial_filter
,
gauss_filter
,
smooth_image
,
isotropic_diffusion
See also
Module
Foundation