Digital Signal Processing Reference
In-Depth Information
EXAMPLE 14.15
Given the following DCT coefficients from a 2 2 image, determine the pixel pð0; 0Þ:
!
" 120 80
30 30
#
F
u; v
¼
Solution:
Applying Equation (14.19) of the inverse 2D-DCT with N ¼ M ¼ 2,
i ¼ 0, and j ¼ 0, it follows that
cðuÞcðvÞF ðu; v cos u p
4
cos v p
4
p 0; 0 ¼ 1
u ¼0
1
v ¼0
!
!
2
!
2
!
p
2
p
2
p
p
F 0; 0 þ
F 0; 1
¼
2
2
!
2
!
þ F 0; 1
!
!
p
2
p
p
2
p
2
F 1; 0
þ
2
30 ¼ 100
¼ 1
2 120 þ 1
2 80 þ 1
2 30 þ 1
2
We apply the MATLAB function idct2() to verify the inverse DCT and get the following pixel values:
>> p ¼ idct2([120 80; 30 30])
p ¼ 100.0000
50.0000
100.0000
10.0000
14.7.2 Two-Dimensional JPEG Grayscale Image Compression Example
To understand JPEG image compression, we examine an 8 8 grayscale subblock. Table 14.5 shows
a subblock of the grayscale image in Figure 14.37 that is to be compressed. Applying 2D-DCT leads to
Table 14.6 .
These DCT coefficients have a big DC component of 1198 but small AC component values. These
coefficients are further normalized (quantized) with a quality factor Q, defined in Table 14.7 .
Table 14.5 8 8 Subblock
150
148
140
132
150
155
155
151
155
152
143
136
152
155
155
153
154
149
141
135
150
150
150
150
156
150
143
139
154
152
152
155
156
151
145
140
154
152
152
155
154
152
146
139
151
149
150
151
156
156
151
142
154
154
154
154
151
154
149
139
151
153
154
153
 
Search WWH ::




Custom Search