function Project5(p)

x = imread('cheetah.jpg');
x = double(x);
x = x(81:88,81:88,:);
r = x(:,:,1);g = x(:,:,2);b = x(:,:,3);
Xgray = 0.2126*r + 0.7152*g + 0.0722*b;
Q = p*8./hilb(8);
C = getC();

%Original 496 x 496 image in gray scale 
%imagesc(Xgray);colormap(gray);
%axis square;

% Quantizize
X = Xgray;
Xd = double(X);
Xc = Xd - 128;
Y = dct(dct(Xc')');
Yq = round(Y./Q)

% Dequantizize
Ydq = Yq.*Q;
Xdq = C'*Ydq*C;
Xe = Xdq + 128;
Xf = uint8(Xe);

figure(1); imagesc(uint8(X)); colormap(gray);
axis square;
figure(2); imagesc(Xf); colormap(gray);
axis square;


