Beruflich Dokumente
Kultur Dokumente
In this lab we will apply Discrete Cosine Transform (DCT) analysis on an image.
N
X1 NX1
f (u, v) = T (u, v)h(x, y, u, v) (15.2)
x=0 y=0
Discrete Cosine Transform is symmetric i.e forward and reverse kernels are equal as given in
Eq. 15.3
where
8 q
< 1
, for u = 0;
↵(u) = qN (15.4)
:
N , for u = 1, 2, ..., N 1.
2
63
Lab 15 Discrete Cosine Transform
15.2 Practical
Take an arbitrary 8 x 8 image using magic or round(a ⇤ rand()) functions and take its
2-D DCT by using dct2 function and show the DCT coefficient matrix.Quantize the DCT
coefficient matrix for less than 10 take its inverse DCT using idct2 function.
Extend Act. 15.2.1 for a gray scale image. Set the values less than magnitude 20 in DCT
matrix to zero, and then reconstruct the image using the inverse DCT function idct2.
15.2.3 Questions
2. Comment on the results by increasing the threshold of quantizing the DCT coefficient
matrix.
64