clear all

width=512;	%Image Width

img=ImgGenerator(width);		%Setup Image using Normal Random Dist

figure;		%Display Original Image
imagesc(img);
colorbar;
title('Original Image');

fimg=fftshift(fft2(fftshift(img)));		%Take F Transform

%Displace Image
deltax=1e-3;	%Sampling Interval
shift=5;			%Shift Amount
ffdisimg=Displace(fimg,width,deltax,shift);


unffdisimg=fftshift(ifft2(fftshift(ffdisimg)));

figure;	%Display Shifted Image
imagesc(real(unffdisimg));
colorbar;
title('Displaced Image');

%FILTER SECTION******************************************
Filter=CircleFilter(width,8);

Filtered=Filter.*fimg;

unFiltered=fftshift(ifft2(fftshift(Filtered)));

figure;
imagesc(real(unFiltered));
colorbar;
title('Filtered');


%Scaling*****
unFiltered=Scale(unFiltered,1e5);

figure;
imagesc(real(unFiltered));
colorbar;
title('Filtered and Normalised');





%NOISE SECTION*******************************************
Noise=randn(width);
NoiseImage=unFiltered+(Noise.*sqrt(unFiltered));

figure;
imagesc(real(NoiseImage));
colorbar;
title('Image with Noise');
