Mercurial > hg > smallbox
annotate util/ksvd utils/imnormalize.m @ 221:c1efdd5d6250 luisf_dev
added ompbox_fast as sparse approximation solver, which calls the functions in ompbox using the fastest implementation
author | Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk> |
---|---|
date | Wed, 11 Apr 2012 16:13:08 +0100 |
parents | c3eca463202d |
children |
rev | line source |
---|---|
idamnjanovic@70 | 1 function y = imnormalize(x) |
idamnjanovic@70 | 2 %IMNORMALIZE Normalize image values. |
idamnjanovic@70 | 3 % Y = IMNORMALIZE(X) linearly transforms the intensity values of the image |
idamnjanovic@70 | 4 % X to tightly cover the range [0,1]. If X has more than one channel, the |
idamnjanovic@70 | 5 % channels are handled as one and normalized using the same transform. |
idamnjanovic@70 | 6 |
idamnjanovic@70 | 7 |
idamnjanovic@70 | 8 % Ron Rubinstein |
idamnjanovic@70 | 9 % Computer Science Department |
idamnjanovic@70 | 10 % Technion, Haifa 32000 Israel |
idamnjanovic@70 | 11 % ronrubin@cs |
idamnjanovic@70 | 12 % |
idamnjanovic@70 | 13 % May 2004 |
idamnjanovic@70 | 14 |
idamnjanovic@70 | 15 |
idamnjanovic@70 | 16 maxval = max(x(:)); |
idamnjanovic@70 | 17 minval = min(x(:)); |
idamnjanovic@70 | 18 |
idamnjanovic@70 | 19 y = (x-minval) / (maxval-minval); |