Docsity

Solved Problems on Multimedia Systems - Assignment 2 | CS T101, Assignments of Computer Science

Toggle sidebar
bg1
1
CS 558 – MULTIMEDIA SYSTEMS
ASSIGNMENT 2
DATE ANNOUNCED: NOV. 16, 2006
DUE DATE: NOV. 30, 2006, 11:59PM (USE SUBMIT COMMAND IF NEED BE)
Q1AA. You are given the following sample 8x8 image block A, and three quantization matrices: 321 ,, QQQ :
A
135 134 137 130 140 145 169 165
134 142 130 137 130 138 157 169
142 145 126 137 143 132 142 162
158 145 156 150 142 145 136 140
163 148 146 149 141 134 137 152
147 167 140 155 155 140 136 152
136 146 123 127 155 134 130 137
145 145 146 150 146 157 137 146
Q1
8 16 19 22 26 27 29 34
16 16 22 24 27 29 34 37
19 22 26 27 39 34 34 38
22 22 26 27 29 34 37 40
22 26 27 29 32 35 40 48
26 27 29 32 35 40 48 48
26 27 29 34 38 46 56 69
27 29 35 38 36 56 69 83
Q2=2Q1; 1
2
1
3QQ =
Describe the steps you will use to compress the given image block to produce a compressed bit stream. Assume that the
linear transform used is the DCT, (you can use the standard DCT transform matrix given in the class, or the dct2() function
available in Matlab). The DC coefficients are to be coded using predictive coding and where necessary, assume the preceding
quantized DC coefficient was 128.
For each quantization matrix:
(i) Determine the quantized coefficient values.
(ii) Using the quantized coefficients, generate your own Huffman codes. Show the Huffman code propagation tree.
(iii) Then code the image using the generated Huffman codes. Show the coded image in matrix form.
(iv) What is the average code length for the symbols?
(v) What is the compression ratio?
(vi) Decompress the compressed image, and show the decompressed image matrix,
A
ˆ.
(vii) What is the mean square error (MSE) resulting from the compression?
(viii) What is the signal-to-noise ratio (SNR)?
From your results, comment on the effect of the quantization matrices on the compression ratio and the introduced error?
Q1BB. Repeat Q1AA but using multiresolution decompositions. For instance, you can use the REDUCE and EXPAND
operators we described in class, or use the Wavelet transform (dwt2(), available in Matlab – use ‘haar’ wavelets). Then,
repeat the calculations for above. Show a table of the new results, and comment on the results obtained.
For this problem, first perform compression with only one level of decomposition.
Then repeat the procedure with two levels, and then three levels.
Use the following formula for quantization of coefficients in band b:
⎥
⎦
⎥
⎢
⎣
⎢
Δ
=
b
b
bb
vuF
vuFsignvuF ),(
)),((),( , where, ⎟
⎠
⎞
⎜
⎝
⎛+=Δ −
11
2
12 b
R
bbb
μ
ε
,
)_min_(maxlog2bValuebValueRb−= , with 512,2
=
=
bb
μ
ε
.
From your results, comment on the effect of the decomposition levels on the compression ratio and the introduced error?
For the wavelet problem, you do not need to show the Huffman trees. You are advised to use available Matlab codes
Huffman coding.
pf2

Partial preview of the text

Download Solved Problems on Multimedia Systems - Assignment 2 | CS T101 and more Assignments Computer Science in PDF only on Docsity!

CS 558 – M ULTIMEDIA S YSTEMS

A SSIGNMENT 2

D ATE A NNOUNCED : N OV. 16, 2006

D UE D ATE : N OV. 30, 2006, 11:59 PM (U SE SUBMIT C OMMAND IF NEED BE )

Q1AA. You are given the following sample 8x8 image block A , and three quantization matrices: Q 1 , Q 2 , Q 3 :

A

Q

Q 2=2 Q 1; Q 3 = 21 Q 1

Describe the steps you will use to compress the given image block to produce a compressed bit stream. Assume that the linear transform used is the DCT, (you can use the standard DCT transform matrix given in the class, or the dct2() function available in Matlab). The DC coefficients are to be coded using predictive coding and where necessary, assume the preceding quantized DC coefficient was 128. For each quantization matrix: (i) Determine the quantized coefficient values. (ii) Using the quantized coefficients, generate your own Huffman codes. Show the Huffman code propagation tree. (iii) Then code the image using the generated Huffman codes. Show the coded image in matrix form.

(iv) What is the average code length for the symbols? (v) What is the compression ratio?

(vi) Decompress the compressed image, and show the decompressed image matrix, A ˆ^.

(vii) What is the mean square error (MSE) resulting from the compression? (viii) What is the signal-to-noise ratio (SNR)?

From your results, comment on the effect of the quantization matrices on the compression ratio and the introduced error?

Q1BB. Repeat Q1AA but using multiresolution decompositions. For instance, you can use the REDUCE and EXPAND operators we described in class, or use the Wavelet transform ( dwt2(), available in Matlab – use ‘haar’ wavelets). Then, repeat the calculations for above. Show a table of the new results, and comment on the results obtained.

For this problem, first perform compression with only one level of decomposition.

Then repeat the procedure with two levels , and then three levels. Use the following formula for quantization of coefficients in band b :

b

b b b

F uv

F uv signF uv

( , ) ( ( , )) , where, ⎟

−

R b b

b ε^ b^ μ ,

Rb = log 2 (max Value _ b −min Value _ b ), with ε b = 2 , μ b = 512.

From your results, comment on the effect of the decomposition levels on the compression ratio and the introduced error?

For the wavelet problem, you do not need to show the Huffman trees. You are advised to use available Matlab codes Huffman coding.

Q2. The coded MPEG stream is usually represented as a sequence of I P B pictures. Practically, the bit stream can be defined in terms of n - the number of frames in a group of pictures GOP, and m - the number of B frames between any two anchor frames (i.e. I or P frames). We assume that given m , n is always chosen such that we always have B frames between anchor frames. E.g. for IBPBPBI, n =6, m =1; for IBBPBBPBBI, n =9, m =2; for IBBPBBPBBPBBPBBI, n =15, m =2.

Let SI , SP and SB be the respective size (in bytes) of the I, P and B frame. We assume for simplicity that for a given picture

type, SI , SP and SB remain constant, and that S I > SP > SB. Also, let SF be the size of the original video frames.

2a. Derive a relation for the compression ratio C R using the above parameters. How does the parameters m and n affect the

compression ratio? Show a plot of C R Vs n ( m constant) and of C R Vs m ( n constant), assume that

SI 10 SF 2 SP 4 S B

2b. In your view, how will the parameters m and n affect the quality of the reconstructed video?

Q3 Paper Critique Write a 3-page critique of the paper: M. Grangetto, E. Magli, and G. Olmo, “Multimedia selective encryption by means of randomized arithmetic coding”, IEEE Transactions on Multimedia, 8(5), 905-917, October 2006. Your critique will be a summary of the paper with information on the basic problem the paper is trying to addres s, the major contributions of the pape r, the new results produced, and the limitations/problems with the pape r. Based on the limitations/problems identified, you should suggest some improvements on the pape r, or new ways of addressing the same problem as the paper. Your critique should be more than 3 pages. Descriptions beyond the 3th page will be ignored.