From: ImageAnalyst on
On Jun 12, 5:41 pm, "Ahmad Alkandri" <a_alkan...(a)yahoo.com> wrote:
> how would i normalize the result to be between 0 and 1 ?
------------------------------------------------------------------------------
Doesn't mat2gray do that? I've never used that before, or even knew
about it. I always just use the usual formula (which I'm sure you
intuitively know)

norm = input/ (max of input), or perhaps
norm = (input - min of input) / (max of input - min of input)
From: Matt J on
"Ahmad Alkandri" <a_alkandri(a)yahoo.com> wrote in message <hv0gtd$43l$1(a)fred.mathworks.com>...
> hi all
>
> how to normalize an image from 0 to 1 ?
>
> what i'm doing is as foloows :
>
> BG_img = imread('BG.tiff');
======

Don't forget to pre-convert to doubles

BG_img = double(imread('BG.tiff'));


Otherwise BG_img will be an integer type and MATLAB will round all arithmetic operations that you apply to it, esp. the fft
From: Ahmad Alkandri on
ok

the function mat2gray would not normilize the power spectrum of the image .... it will output a matrix of 1's only ..... an idea how to normilize the PSD output to between [0 1] ... ?