Home > freetb4matlab > image > bestblk.m

bestblk

PURPOSE ^

% Calculates the best size of block for block processing.

SYNOPSIS ^

function [varargout] = bestblk(ims,k)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{siz} = } bestblk ([@var{m} @var{n}], @var{k})
% @deftypefnx {Function File} {[@var{mb} @var{nb}] = } bestblk ([@var{m} @var{n}], @var{k})
% Calculates the best size of block for block processing.
%
% @code{siz=bestblk([m,n],k)} calculates the optimal block size for block
% processing for a @var{m}-by-@var{n} image. @var{k} is the maximum
% side dimension of the block. Its default value is 100. @var{siz} is a
% row vector which contains row and column dimensions for the block.
%
% @code{[mb,nb]=bestblk([m,n],k)} behaves as described above but
% returns block dimensions to @var{mb} and @var{nb}.
%
% @strong{Algorithm:}
%
% For each dimension (@var{m} and @var{n}), it follows this algorithm:
%
% 1.- If dimension is less or equal than @var{k}, it returns the
% dimension value.
%
% 2.- If not then returns the value between
% @code{round(min(dimension/10,k/2))} which minimizes padding.
%
%
% @seealso{blkproc}
% @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