0% found this document useful (0 votes)
16 views

Part 2 Solution To Exercise On 2DDCT Using Matrix Implementation

Part 2 Solution to Exercise on 2DDCT Using Matrix Implementation

Uploaded by

bwbw49995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Part 2 Solution To Exercise On 2DDCT Using Matrix Implementation

Part 2 Solution to Exercise on 2DDCT Using Matrix Implementation

Uploaded by

bwbw49995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

(a)

N 1 N 1
(2i  1)u (2 j  1)v
Suv   (u ) ( v )  sij cos cos
i  0 j 0 2N 2N
N 1
(2i  1)u  N 1
(2 j  1)v 
  (u ) cos  ( v )  sij cos 
2N  2N
i 0 j 0
 
Fiv
N 1
(2i  1)u
  (u ) Fiv cos
i 0 2N

Hence, 2D-DCT ( Suv ) can be computed using a two-stage 1D-DCT:


N 1
(2 j  1)v
First Stage: Fiv   ( v )  sij cos i, v  0,1,, N  1
j 0 2N
N 1
(2i  1)u
Second Stage: Suv   (u ) Fiv cos u , v  0,1, , N  1
i 0 2N

For 44 2D-DCT:


3
(2 j  1)v
First Stage: Fiv   ( v) sij cos i, v  0,1, 2,3
j 0 8
3
(2i  1)u
Second Stage: Suv   (u ) Fiv cos u , v  0,1, 2,3
i 0 8
Given image:
0 0 0 0 
0 10 10 0 
A 
0 10 10 0 
 
0 0 0 0 

First Stage

The first and fourth row is each equal to zero:


F0 v   0 0 0 0
F3v   0 0 0 0 
Second row:
s1 j   0 10 10 0
 3v 5v 
F1v   (v) 10 cos  10 cos 
 8 8 
1
F10  10  10  10
2
1  3 5 
F11  10 cos  10 cos   0
2 8 8 
1  3 5 
F12  10 cos  10 cos   10
2 4 4 
1  9 15 
F13  10 cos  10 cos 0
2 8 8 
F1v  10 0 10 0
The third row is same as second row.
F2 v  10 0 10 0 

Hence, after the first stage 1D-DCT, we obtain:


 0 0 0 0
10 0 10 0 
Fiv   
10 0 10 0 
 
 0 0 0 0

Second Stage
0  10   0   10 
10   0   10   0 
First column: Fi 0    , Su 0    , Third column: Fi 2    , Su 2   
10   10   10   10 
       
0  0   0   0 
Second and fourth columns are all zeros.

Therefore, the 2D-DCT is

 10 0 10 0 
 0 0 0 0 
Suv  
 10 0 10 0 
 
 0 0 0 0
(b)
 20 20 20 20 
 20 20 20 20  1
B  A
 20 20 20 20  2
 
 20 20 20 20 
Hence
80 0 0 0  10 0 10 0   75 0 5 0
0 0 0 0  1  0
 0 0 0   0 0 0 0 
2-D DCT of B =   
0 0 0 0  2  10 0 10 0  5 0 5 0
     
0 0 0 0  0 0 0 0  0 0 0 0

You might also like