imnormalize

PURPOSE ^

Various ways to normalize a (multidimensional) image.

SYNOPSIS ^

function X = imnormalize( X, flag )

DESCRIPTION ^

 Various ways to normalize a (multidimensional) image.

 Sets image X to have zero mean and unit variance (if flag==1). 
 Sets image X to range in [0,1] (if flag==2). 
 Sets image X to have zero mean (if flag==3). 
 Sets image X to have zero mean and unit magnitude (if flag==4). 
 Sets image X to have zero mean and unit variance, furthermore throws out 
   extreme values and normalized to [0,1] (if flag==5)

 X may have arbitrary dimension (ie an image or video, etc).  X is treated as a vector of
 pixel values.  Hence, the mean of X is the average pixel value, and likewise the
 standard deviation is the std of the pixels from the mean pixel.

 INPUTS
   X       - n dimensional array to standardize
   flag    - [optional] determines normalization procedure

 OUTPUTS
   X       - X after normalization.

 DATESTAMP
   18-Jan-2006  5:15pm

 EXAMPLE
   I = double(imread('cameraman.tif'));
   N = imnormalize(I,1);
   mean(I(:)), std(I(:)), mean(N(:)), std(N(:))

 See also FEVAL_ARRAYS

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-May-2006 23:48:50 by m2html © 2003