Mercurial > hg > smallbox
comparison util/ksvd utils/imnormalize.m @ 70:c3eca463202d
(none)
author | idamnjanovic |
---|---|
date | Wed, 16 Mar 2011 14:16:57 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
69:5f1f436057ca | 70:c3eca463202d |
---|---|
1 function y = imnormalize(x) | |
2 %IMNORMALIZE Normalize image values. | |
3 % Y = IMNORMALIZE(X) linearly transforms the intensity values of the image | |
4 % X to tightly cover the range [0,1]. If X has more than one channel, the | |
5 % channels are handled as one and normalized using the same transform. | |
6 | |
7 | |
8 % Ron Rubinstein | |
9 % Computer Science Department | |
10 % Technion, Haifa 32000 Israel | |
11 % ronrubin@cs | |
12 % | |
13 % May 2004 | |
14 | |
15 | |
16 maxval = max(x(:)); | |
17 minval = min(x(:)); | |
18 | |
19 y = (x-minval) / (maxval-minval); |