Vous êtes sur la page 1sur 1

DCT/IDCT OF IMAGE USING MATLAB

clc;
clear all;
A=imread('lena512.bmp');
B=dct2(A);
C=B;
th=30;
C(abs(C)<th)=0;
D=idct2(C);
D=uint8(D);
figure()
subplot(2,2,1)
imshow(A)
title('Original Image')
subplot(2,2,2)
imshow(C)
title(sprintf('DCT Coefficient Thresholded at 30' ));
subplot(2,2,3)
imshow(D)
title('IDCT of image afther thresholding smaller coefficient');

Vous aimerez peut-être aussi