annotate Problems/private/imnormalize.m @ 39:8f734534839a

(none)
author idamnjanovic
date Mon, 14 Mar 2011 15:35:01 +0000
parents 207a6ae9a76f
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);