function[IntensitySpeckle]=ImgGenerator(ImgSize,FilterSize)

%Image Intensity Generator function
%Arguments ImageSize

Wavelength=.5e-6;

RandImg=randn(ImgSize);

K=((2*pi)/Wavelength)*RandImg;

PhaseImg=exp(i*K*RandImg);

FFTPhaseImg=fftshift(fft2(fftshift(PhaseImg)));		%Take F Transform

Filter=CircleFilter(ImgSize,FilterSize);

Filtered=Filter.*FFTPhaseImg;
%figure;imagesc(abs(Filtered));colorbar;
IntensitySpeckle=abs(fftshift(ifft2(fftshift(Filtered))));


