Homework 4 - Arizona State University

.
ARIZONA STATE UNIVERSITY
SCHOOL OF ELECTRICAL, COMPUTER, AND ENERGY ENGINEERING
EEE 508
Spring 2015
Problem Set #4
Assigned: 19 March 2015
Due Date: 2 April 2015
Reading: Finish reading Chapters 5 and 7 in the OpenCV book. Read Chapter 13 in the OpenCV
book.
Announcement: The Midterm Exam will be held on Tuesday 24 March 2015 during class time. The
Exam will cover the material and reading assigned in homeworks 1, 2, and 3 in
addition to class lecture notes. The Midterm Exam will be closed book and closed
notes. Only one 8 12 × 11 page of hand-written notes is allowed. No calculators and
no other devices are allowed, except for a pencil, pen, eraser, and ruler.
PROBLEM 4.1:
(3 points) Consider an image intensity x which can be modeled as a sample whose probability
density function is given by:


 5/2, 0 ≤ x < 1/4
1/2, 1/4 ≤ x ≤ 1
fX (x) =

 0,
otherwise
(a) If x is quantized using a scalar quantizer with decision levels {t1 = 0; t2 = 1/2; t3 = 1} and
with reconstruction levels {r1 = 0.3; r2 = 0.75}, determine the resulting MSE distortion.
(b) For the quantizer specified in (a), determine the smallest possible average bit-rate that can
be used to code losslessly the output of the quantizer.
(c) Is the quantizer specified in (a) a Lloyd-Max quantizer? If not, find a new set of decision
and/or reconstruction levels that would result in a MSE distortion that is lower than the
MSE in (a), and give the value of the new resulting MSE distortion.
PROBLEM 4.2:
(3 points) This problem considers blockwise vector quantization for image compression using a
fixed-length code. Let the input image be divided into 2 × 2 blocks.
Consider the following two vector quantizers: 1) a full search VQ with a codebook consisting of 32
entries, and 2) a multistage residual vector quantizer (RVQ) with 4 stages and where each stage
makes use of a codebook with 4 codewords.
(a) Which of the two quantizers results in the smallest bit-rate (bits per pixel)? Justify your
answer.
(b) Which of the two quantizers requires less computations? Justify your answer.
(c) Determine the total number of all distinct quantized blocks that can be produced as the
output of RVQ, and compare it to the total number of distinct quantized blocks that can be
produced using the full search VQ.
PROBLEM 4.3:
(4 points) Consider a three-stage residual vector quantizer (RVQ) with a codebook C1 at Stage 1,
codebook C2 at Stage 2, and codebook C3 at Stage 3 as follows:
C1 :
C2 :
C3 :
3
1
1
1
1
3
2
2
4
1
2
5
0.25
0.75
0.25
-0.5
0.5
-0.75
0.5
0.4
-0.6
0.3
-0.3
-0.25
0.1
0.3
0.2
-0.1
0.15
0.25
0.1
-0.1
-0.1
0
0.3
0.15
(a) Determine the reconstructed quantized subimage at the receiver if the sent RVQ qantization
indices are I1 = 2, I2 = 1, and I3 = 0, for Stages 1, 2, and 3, respectively. Note that the
quantization index of the first (top) entry in a codebook is equal to zero.
(b) Consider a 2 × 2 image block with constant intensity equal to 1. Determine the output of
the second stage of the RVQ at the transmitter so that the mean absolute error (MAE) is
minimized.
(c) Consider fixed-length coding of the quantization indices. Determine the bit-rate (in bits per
pixel) that is achieved using this RVQ.
(d) Determine the total number of all distinct quantization codewords that can be produced as
the output of the RVQ.