A=imread('D:\cloud','png');
A=rgb2gray(A);
B=double(A);
B=imresize(B,[2000 2000]);
C=B/255;
figure(1)
subplot(2,5,1)
colormap(gray)
D=histeq(C)*0.99;
imagesc(C)
subplot(2,5,6)
hist(reshape(C,1,4000000))
sigma=0.1;
E=sqrt(2*sigma^2*log(1./(1-D)));
%F=cos(rand(size(B,1),size(B,2))*2*pi);
F=cos(D'*2*pi);
G1=E.*F;
G1=G1/(2*max(max(G1)))';
G1R=E;
G1R=G1R/max(max(G1R))';
G1E=log(2./(1-D));
G1E=G1E/max(max(G1E))';

figure(1)
subplot(2,5,2)
colormap(gray)
imagesc(D)
subplot(2,5,7)
hist(reshape(D,1,4000000))

figure(1)
subplot(2,5,3)
colormap(gray)
imagesc(G1R)
subplot(2,5,8)
hist(reshape(G1R,1,4000000))

figure(1)
subplot(2,5,4)
colormap(gray)
imagesc(G1)
subplot(2,5,9)
hist(reshape(G1,1,4000000))


figure(1)
subplot(2,5,5)
colormap(gray)
imagesc(G1E)
subplot(2,5,10)
hist(reshape(G1E,1,4000000))




