%% dft2demo2
% show image and log of shifted |DFT|

% S. Allen Broughton

%% get image
  load mandrill
% load clown
% X = zeros(128,128); X(61:80,41:80)=1;

%% get and shift DFT of image
FX = fft2(X); 
sFX = fftshift(FX);

%% display results 
figure(1)
imagesc(X), colormap(gray)
title('original image');

figure(2)
imagesc(log(1+abs(FX))), colormap(gray)
title('log(1+|dft|)');

figure(3)
imagesc(log(1+abs(sFX))), colormap(gray)
title('shifted log(1+|dft|)');