% Fig. 4.24

I = imread('Fig0424(a)(rectangle).tif');
figure; imshow(I,'initialmagnification','fit');

F = fft2(I);
S = abs(F);
figure; imshow(S, [],'initialmagnification','fit');

Fc = fftshift(F);
figure; imshow(abs(Fc), [], 'initialmagnification','fit');

S2 = log(1 + abs(Fc));
figure; imshow(S2, [], 'initialmagnification','fit');