bilateralFilter

Bilateral filtering implementation.

Non-linear, edge-preserving and noise-reducing smoothing filtering algorithm.

Slice!(Contiguous, packs, OutputType*)
bilateralFilter
(
OutputType
SliceKind kind
size_t[] packs
Iterator
)
(
Slice!(kind, packs, Iterator) input
,
float sigmaCol
,,
size_t kernelSize
,
Slice!(Contiguous, packs, OutputType*) prealloc = emptySlice!(packs, OutputType)
,
TaskPool pool = taskPool
)
in { static assert (isBoundaryCondition!bc, "Invalid boundary condition test function."); assert (!input.empty); assert (kernelSize % 2); }

Parameters

bc

Boundary condition test used to index the image slice.

input
Type: Slice!(kind, packs, Iterator)

Slice of the input image.

sigmaCol
Type: float

Color sigma value.

sigmaSpace
Type: float

Spatial sigma value.

kernelSize
Type: size_t

Size of convolution kernel. Must be odd number.

prealloc
Type: Slice!(Contiguous, packs, OutputType*)

Optional pre-allocated result image buffer. If not of same shape as input slice, its allocated anew.

pool
Type: TaskPool

Optional TaskPool instance used to parallelize computation.

Return Value

Type: Slice!(Contiguous, packs, OutputType*)

Slice of filtered image.

Meta