load bacteria
load noise

%noise = zeros(256);

figure
subplot(1,3,1)
imagesc(bacteria); axis image
colormap gray

w = window(@gausswin, 256, 50);
w2 = fftshift(w*w');
blurred = ifft2(fft2(double(bacteria)).*fft2(w2)) + 25.*noise;
subplot(1,3,2)
imagesc(blurred); axis image

W2 = fft2(w2);
W2(find(W2<1e-3)) = 1e-3;
recft = (fft2(blurred)./W2);
rec = (ifft2(recft));
subplot(1,3,3);
imagesc(rec); axis image