f = imread('image1.tif');
f = im2double(f);

F = fft2(f);
Freal = real(F);
Fimg = imag(F);
Fmag = abs(F);
Fphase = atan2(Fimg, Freal);

fid = figure();
subplot(2, 2, 1); imshow(log(1 + Freal), []); title('real(F)');
subplot(2, 2, 3); imshow(log(1 + Fmag), []); title('|F|');
subplot(2, 2, 4); imshow(Fphase, []); title('Phase');

subplot(2, 2, 2); 
title('img(F)');
imshow(log(1 + Fimg), []);    % Choke!

lo = min(min(Fimg))
hi = max(max(Fimg))
imshow(log(1 + Fimg), [lo, hi]);   % Doesn't choke, but doesn't show much either
