nlfilter() - Image Processing
B = nlfilter(A, [m n], fun) applies
the function fun to each m-by-n sliding
block of the grayscale image A. fun is
a function that accepts an m-by-n matrix
as input and returns a scalar result.c = fun(x)fun must be a function handle.c is the output value for the center pixel
in the m-by-n block x. nlfilter calls fun for
each pixel in A. nlfilter zero-pads
the m-by-n block at the edges,
if necessary.B = nlfilter(A, 'indexed',...) processes A as
an indexed image, padding with 1's if A is of class single or double and
0's if A is of class logical, uint8,
or uint16.
Syntax
B = nlfilter(A, [m n], fun)B = nlfilter(A, 'indexed',...)
Example
c = fun(x)
Output / Return Value
Limitations
Alternatives / See Also
Reference