annotate Problems/private/imnormalize.m @ 10:207a6ae9a76f version1.0

(none)
author idamnjanovic
date Mon, 22 Mar 2010 15:06:25 +0000
parents
children
rev   line source
idamnjanovic@10 1 function y = imnormalize(x)
idamnjanovic@10 2 %IMNORMALIZE Normalize image values.
idamnjanovic@10 3 % Y = IMNORMALIZE(X) linearly transforms the intensity values of the image
idamnjanovic@10 4 % X to tightly cover the range [0,1]. If X has more than one channel, the
idamnjanovic@10 5 % channels are handled as one and normalized using the same transform.
idamnjanovic@10 6
idamnjanovic@10 7
idamnjanovic@10 8 % Ron Rubinstein
idamnjanovic@10 9 % Computer Science Department
idamnjanovic@10 10 % Technion, Haifa 32000 Israel
idamnjanovic@10 11 % ronrubin@cs
idamnjanovic@10 12 %
idamnjanovic@10 13 % May 2004
idamnjanovic@10 14
idamnjanovic@10 15
idamnjanovic@10 16 maxval = max(x(:));
idamnjanovic@10 17 minval = min(x(:));
idamnjanovic@10 18
idamnjanovic@10 19 y = (x-minval) / (maxval-minval);