% -*- texinfo -*- % @deftypefn {Function File} {@var{B} = } nlfilter (@var{A}, [@var{m},@var{n}], @var{fun}) % @deftypefnx {Function File} {@var{B} = } nlfilter (@var{A}, [@var{m},@var{n}], @var{fun}, ...) % @deftypefnx {Function File} {@var{B} = } nlfilter (@var{A},'indexed', ...) % Processes image in sliding blocks using user-supplied function. % % @code{B=nlfilter(A,[m,n],fun)} passes sliding @var{m}-by-@var{n} % blocks to user-supplied function @var{fun}. A block is build for % every pixel in @var{A}, such as it is centered within the block. % @var{fun} must return a scalar, and it is used to create matrix % @var{B}. @var{nlfilter} pads the @var{m}-by-@var{n} block at the % edges if necessary. % % Center of block is taken at ceil([@var{m},@var{n}]/2). % % @code{B=nlfilter(A,[m,n],fun,...)} behaves as described above but % passes extra parameters to function @var{fun}. % % @code{B=nlfilter(A,'indexed',...)} assumes that @var{A} is an indexed % image, so it pads the image using proper value: 0 for uint8 and % uint16 images and 1 for double images. Keep in mind that if 'indexed' % is not specified padding is always done using 0. % % @seealso{colfilt,blkproc,inline} % @end deftypefn