Normalizing by means of zero-mean

1 visualización (últimos 30 días)
Valeska Pearson
Valeska Pearson el 18 de Jul. de 2013
Hello friends,
I am working on retinal images and need to make them standard before processing, because some images are dark others are very light. So before processing I am doing the following:
gemiddeld=mean2(DOG)
standaard_afwyking=std2(DOG)
NormalizedArray = (DOG-gemiddeld) ./ standaard_afwyking;
NormalizedArray =((NormalizedArray + 3)./ 6).*255
figure,imshow(NormalizedArray);
This is not working, because the output is just a blank white image.How can I fix this?
  1 comentario
Valeska Pearson
Valeska Pearson el 18 de Jul. de 2013
DOG, is my difference of Gaussian image in the green channel.

Iniciar sesión para comentar.

Respuestas (2)

Jos (10584)
Jos (10584) el 18 de Jul. de 2013
The problem is with the values you pass to IMSHOW. So, first read the help of imshow carefully
doc imshow
To fix this in your case, make sure NormalizedArray is, for instance, a true grayscale image
NormalizedArray = magic(50) ;
subplot(2,2,1) ; imshow(NormalizedArray)
GS = NormalizedArray ./ max(NormalizedArray(:)) ;
subplot(2,2,2) ; imshow(GS)

Jan
Jan el 18 de Jul. de 2013
What is the type of DOG? Notice, that if NormalizedArray is a double array, all values greater than 1.0 are saturated. The multiplication by 255 looks like you want the image stored as UINT8 array. Then perhaps this helps:
NormArrayU8 = uint8(((NormalizedArray + 3) ./ 6) .* 255);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by