Hi all,
I tried to enhance a gray scale image by using the formula
E(i,j) = round( I(i,j)^3/ f * M^2)
where
M = max gray level of the image f = 0.8
The output should be a gray scale image, but I get a binary Image.
Thanks for your help in advance.
Code :
[x,y] = size(I);I1 = repmat(uint8(0),x,y) M = max(I(:));for i = 1:x for j = 1:y if I(i,j) ~= 0 v = double(I(i,j)); I1(i,j) = round( v^3 / f * M^2 ); % disp(I1(i,j)); ' all manipulated pixels has value 255
end endend
Best Answer