Home > freetb4matlab > image > blkproc.m

blkproc

PURPOSE ^

% Processes image in blocks using user-supplied function.

SYNOPSIS ^

function B = blkproc(A, varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{B} = } blkproc (@var{A}, [@var{m},@var{n}], @var{fun})
% @deftypefnx {Function File} {@var{B} = } blkproc (@var{A}, [@var{m},@var{n}], @var{fun}, ...)
% @deftypefnx {Function File} {@var{B} = } blkproc (@var{A}, [@var{m},@var{n}], [@var{mborder},@var{nborder}], @var{fun}, @var{...})
% @deftypefnx {Function File} {@var{B} = } blkproc (@var{A}, 'indexed', ...)
% Processes image in blocks using user-supplied function.
%
% @code{B=blkproc(A,[m,n],fun)} divides image @var{A} in
% @var{m}-by-@var{n} blocks, and passes them to user-supplied function
% @var{fun}, which result is concatenated to build returning matrix
% @var{B}. If padding is needed to build @var{m}-by-@var{n}, it is added
% at the bottom and right borders of the image.  0 is used as a padding
% value.
%
% @code{B=blkproc(A,[m,n],fun,...)} behaves as described above but
% passes extra parameters to function @var{fun}.
%
% @code{B=blkproc(A,[m,n],[mborder,nborder],fun,...)} behaves as
% described but uses blocks which overlap with neighbour blocks.
% Overlapping dimensions are @var{mborder} vertically and @var{nborder}
% horizontally. This doesn't change the number of blocks in an image
% (which depends only on size(@var{A}) and [@var{m},@var{n}]). Adding a
% border requires extra padding on all edges of the image. 0 is used as
% a padding value.
%
% @code{B=blkproc(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,inline,bestblk}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003