% dct2_demo.m
% Frequency domain processing
I = imread('Fig0240(a)(apollo 17_boulder_noisy).tif');
figure; imshow(I,'initialmagnification','fit');

J = dct2(I);
figure; imshow(log(abs(J)),[]);

J1 = zeros(474, 630);
Y = 97; X = 90;
J1(1:Y, 1:X) = J(1:Y, 1:X);

K = idct2(J1);
figure; imshow(uint8(K))
