f=imread('gambar.bmp');
f=rgb2gray(f);
figure
subplot(1,3,1),imshow(f);
PQ=paddedsize(size(f));
D0=0.05*PQ(1);
H=lpfilter('gaussian',PQ(1),PQ(2),D0);
F=fft2(double(f),size(H,1),size(H,2));
LPF_f=real(ifft2(H.*F));
LPF_f=LPF_f(1:size(f,1),1:size(f,2));
subplot(1,3,2),imshow(LPF_f,[]);
Fc=fftshift(F);
S2=log(1+abs(Fc));
subplot(1,3,3),imshow(S2,[]);