Constructor
VipsImagelogmat
Declaration [src]
int
vips_logmat (
VipsImage** out,
double sigma,
double min_ampl,
...
)
Description [src]
Create a circularly symmetric Laplacian of Gaussian mask of radius
sigma
.
The size of the mask is determined by the variable min_ampl
;
if for instance the value .1 is entered this means that the produced mask
is clipped at values within 10 percent of zero, and where the change
between mask elements is less than 10%.
The program uses the following equation: (from Handbook of Pattern Recognition and image processing by Young and Fu, AP 1986 pages 220-221):
H(r) = (1 / (2 * M_PI * s4)) * (2 - (r2 / s2)) * exp(-r2 / (2 * s2))
where:
2 = @sigma * @sigma,
s4 = s2 * s2
r2 = r * r.
The generated mask has odd size and its maximum value is normalised to
1.0, unless precision
is VIPS_PRECISION_INTEGER
.
If separable
is set, only the centre horizontal is generated. This is
useful for separable convolutions.
If precision
is VIPS_PRECISION_INTEGER
, an integer mask is generated.
This is useful for integer convolutions.
“scale” is set to the sum of all the mask elements.
Optional arguments
separable
: %gboolean, generate a separable maskprecision
:VipsPrecision
forout
See also
This constructor is not directly available to language bindings.
Parameters
out
-
Type:
VipsImage
Output image.
The argument will be set by the function. The caller of the function takes ownership of the returned data, and is responsible for freeing it. sigma
-
Type:
double
Standard deviation of mask.
min_ampl
-
Type:
double
Minimum amplitude.
...
-
Type:
NULL
-terminated list of optional named arguments.