function obraz

d=importdata('vecernicek_200.png');
alpha=d.alpha;
d=d.cdata;
hold off;

f=figure;
set(f,'units','centimeters');
s=2*[20 11.5];
set(f,'position',[1.5 1.2 s]);
set(f,'papersize',s);
set(f,'defaultAxesFontSize',12)

subplot(2,3,1)
imagesc(d,'alphadata',alpha);
title('Original')
waitforbuttonpress;


subplot(2,3,4)
d=sum(d,3);d=d/max(max(d));
d(alpha==0)=1;
imagesc(d);
colormap(gray);
title('Grayscale')
waitforbuttonpress;

subplot(2,3,2)
D=fft2(d);
imagesc(log(1+abs(D)));
% colormap(jet)
title('2D Fourierova transformace')

waitforbuttonpress;

c=30;
E=D;
E(c:end-c+1,:)=0;
E(:,c:end-c+1)=0;

imagesc(log(1+abs(E)));
title('2D Four. transof. - pouze nizke frekvence')
% colormap(jet);
waitforbuttonpress;

subplot(2,3,5)
e=ifft2(E);
imagesc(abs(e).^2)
colormap(gray);
title('Rekonstrukce obrazu pomoci nizkych frekvenci')
waitforbuttonpress


subplot(2,3,3)
G=D;
b=5;
G([1:b end-b:end],:)=0;
G(:,[1:b end-b:end])=0;
imagesc(log(1+abs(G)));
title('2D Four. transof. - pouze vysoke frekvence')

% colormap(jet);
g=ifft2(G);
waitforbuttonpress
subplot(2,3,6)
imagesc(real(g));
colormap(gray)
title('Rekonstrukce obrazu pomoci vysokych frekvenci')


