Home > freetb4matlab > image > colfilt.m

colfilt

PURPOSE ^

% Apply filter to matrix blocks

SYNOPSIS ^

function B = colfilt(A,filtsize,blksize,blktype,f,varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} colfilt(@var{A}, [@var{r}, @var{c}], [@var{m}, @var{n}], 'sliding', @var{f},...)
% Apply filter to matrix blocks
%
%   For each @var{r} x @var{c} overlapping subblock of @var{A}, add a column in matrix @var{C}
%   @var{f}(@var{C},...) should return a row vector which is then reshaped into a
%   a matrix of size @var{A} and returned. @var{A} is processed in chunks of size @var{m} x @var{n}.
% @deftypefnx{Function File} colfilt(@var{A}, [@var{r}, @var{c}], [@var{m}, @var{n}], 'distinct', @var{f},...)
%   For each @var{r} x @var{c} non-overlapping subblock of @var{A}, add a column in matrix @var{C}
%   @var{f}(@var{C},...) should return a matrix of size @var{C} each column of which is
%   placed back into the subblock from whence it came. @var{A} is processed
%   in chunks of size @var{m} x @var{n}.
%
% The present version requires that [@var{m}, @var{n}] divide size(@var{A}), but for
% compatibility it should work even if [@var{m}, @var{n}] does not divide @var{A}. Use
% the following instead:
% @example
% [r, c] = size(A);
% padA = zeros (m*ceil(r/m),n*ceil(c/n));
% padA(1:r,1:c) = A;
% B = colfilt(padA,...);
% B = B(1:r,1:c);
% @end example
%
% The present version does not handle 'distinct'
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003