Home > freetb4matlab > image > entropyfilt.m

entropyfilt

PURPOSE ^

% Computes the local entropy in a neighbourhood around each pixel in an image.

SYNOPSIS ^

function retval = entropyfilt (I, domain = true (9), padding = 'symmetric', varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{E} =} entropyfilt (@var{im})
% @deftypefnx{Function File} {@var{E} =} entropyfilt (@var{im}, @var{domain})
% @deftypefnx{Function File} {@var{E} =} entropyfilt (@var{im}, @var{domain}, @var{padding}, ...)
% Computes the local entropy in a neighbourhood around each pixel in an image.
%
% The entropy of the elements of the neighbourhood is computed as
%
% @example
% @var{E} = -sum (@var{P} .* log2 (@var{P})
% @end example
%
% where @var{P} is the distribution of the elements of @var{im}. The distribution
% is approximated using a histogram with @var{nbins} cells. If @var{im} is
% @code{logical} then two cells are used. For other classes 256 cells
% are used.
%
% When the entropy is computed, zero-valued cells of the histogram are ignored.
%
% The neighbourhood is defined by the @var{domain} binary mask. Elements of the
% mask with a non-zero value are considered part of the neighbourhood. By default
% a 9 by 9 matrix containing only non-zero values is used.
%
% At the border of the image, extrapolation is used. By default symmetric
% extrapolation is used, but any method supported by the @code{padarray} function
% can be used. Since extrapolation is used, one can expect a lower entropy near
% the image border.
%
% @seealso{entropy, paddarray, stdfilt}
% @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