idamnjanovic@60: function y = imnormalize(x) idamnjanovic@60: %IMNORMALIZE Normalize image values. idamnjanovic@60: % Y = IMNORMALIZE(X) linearly transforms the intensity values of the image idamnjanovic@60: % X to tightly cover the range [0,1]. If X has more than one channel, the idamnjanovic@60: % channels are handled as one and normalized using the same transform. idamnjanovic@60: idamnjanovic@60: idamnjanovic@60: % Ron Rubinstein idamnjanovic@60: % Computer Science Department idamnjanovic@60: % Technion, Haifa 32000 Israel idamnjanovic@60: % ronrubin@cs idamnjanovic@60: % idamnjanovic@60: % May 2004 idamnjanovic@60: idamnjanovic@60: idamnjanovic@60: maxval = max(x(:)); idamnjanovic@60: minval = min(x(:)); idamnjanovic@60: idamnjanovic@60: y = (x-minval) / (maxval-minval);