filters: Apply a filter to an array

meanFilterR Documentation

Apply a filter to an array

Description

These functions apply mean, median or Sobel filters to an array.

Usage

meanFilter(x, kernel)

medianFilter(x, kernel)

sobelFilter(x, dim, axis = 0)

Arguments

x

An object that can be coerced to an array, or for which a morph method exists.

kernel

A kernel array, indicating the scope of the filter.

dim

For sobelFilter, the dimensionality of the kernel. If missing, this defaults to the dimensionality of x.

axis

For sobelFilter, the axis along which to apply the operator, or 0 to apply it along all directions and generate a magnitude image. See also sobelKernel.

Value

A morphed array with the same dimensions as the original array.

Author(s)

Jon Clayden <code@clayden.org>

See Also

morph for the function underlying these operations, and kernels for kernel-generating functions.


mmand documentation built on Feb. 16, 2023, 9:22 p.m.