f=imread('Figurer.bmp');
f=im2double(f);
imshow(f,[ ]);pause


[M N]=size(f)
P=2*M; Q=2*N;
F=fft2(f,P,Q);                  % Transform image
% Define filter
h=fspecial('gaussian',7,3)  % 7x7 with standard deviation 3
H=freqz2(h,P,Q);                % Create sentered transform function

H1=ifftshift(H);                % Shift to non-senter version

% Perform filtering
G=H1.*F;
g=real(ifft2(G));
% Change to original size
%g=g(1:M,1:N);

imshow(g,[ ]);pause

close all