Code covered by the BSD License  

Highlights from
Study of various Digital Image Processing concepts using MATLAB

image thumbnail

Study of various Digital Image Processing concepts using MATLAB

by

 

Study of various Digital Image Processing concepts using MATLAB. .txt files for C are also included

DCT.m
clc;clear all;close all;
A=imread('cameraman.tif');

B=dct2(A);
C=B;
th=30; %Enter the threshold value below which you want the co-efficients to be reduced 0
C(abs(C)<th)=0;
%Perform IDCT after the co-efficients are reduced to0
 D=idct2(C);   
 D=uint8(D);   
%Inspite of the disappearance of those co-efficients still a reasonable
%clarity in the Image is preserved
% therefore DCT is used in compression :P
figure()
subplot(2,2,1)
imshow(A)
title('Original Image')
subplot(2,2,2)
imshow(B)
title('DCT of Image')
subplot(2,2,3)
imshow(C)
title(sprintf('DCT Coefficients thresholded at %d ',th));
subplot(2,2,4)
imshow(D)
title('IDCT of Image after thresholding smaller co-efficients')

Contact us