Code covered by the BSD License  

Highlights from
MatLab Solutions: "Introduction to Digital Signal Processing: A Computer Laboratory Textbook".

image thumbnail

MatLab Solutions: "Introduction to Digital Signal Processing: A Computer Laboratory Textbook".

by

 

29 Oct 2012 (Updated )

These files are the MatLab solutions of exercises contained in the above DSP lab textbook.

test_idct2D.m
% Testing the my_DCT.m and my_IDCT.m on an image
% via their 2D corresponding custom functions:

clc; clear; close all;

I = imread('cameraman.tif');
I = im2double(I);

% First transform the image using both functions:
B1 = dct2(I);
B2 = my_DCT_2D(I);

figure(1);
surf(B1-B2)

A1 = idct2(B1);
A2 = my_IDCT_2D(B2);

figure(2);
surf(A1-A2);

Contact us