radialKernel

Radial kernel creation.

Creates square kernel of given radius as edge length, with given values.

Slice!(Contiguous, [2], T*)
radialKernel
(
T
)
(
size_t radius
,
T foreground = 1
,
T background = 0
)
in { assert (radius >= 3, "Radial dilation kernel has to be of larger radius than 3."); assert (radius % 2 != 0, "Radial dilation kernel has to be of odd radius."); }

Parameters

radius
Type: size_t

Radius of kernel. Pixels in kernel with distance to center lesser than radius will have value of foreground, other pixels will have value of background.

foreground
Type: T

Foreground kernel values, or in the given radius (circle). Default is 1.

background
Type: T

Background kernel values, or out of the given radius (circle). Default is 0.

Return Value

Type: Slice!(Contiguous, [2], T*)

Kernel of size [radius, radius], filled with given values.

Meta