Lecture 19
Lecture 19
Compressed
f (m, n) + e(m, n) e(m, n)
Σ
Symbol Image
Quantizer
Encoder
Input
−
Image
+
fˆ (m, n) f (m, n)
Predictor Σ
+
Source Encoder
f ( m, n )
Symbol
Decoder Σ
Compressed + Decompressed
Image Image
fˆ ( m, n )
Predictor
Source Decoder
Lossy Compression: Delta Modulation
• The design of a lossy predictive coding scheme involves two main
steps: (a) Predictor and (b) Quantizer.
• Delta Modulation is a very simple scheme in which (we look at a
1-D case for simplicity):
• Predictor: fˆ (n) = αf (n − 1)
fˆ (n) = f (n − 1)
e(n) = f (n) − fˆ (n)
6.5 for e(n) > 0
e( n ) =
− 6.5 otherwise
f (n) = e(n) + fˆ (n)
Input Encoder Decoder Error
fˆ fˆ f −f
n f e e f f
0 14 - - - 14 - 14 0
1 15 14 1 6.5 20.5 14 20.5 -5.5
2 14 20.5 -6.5 -6.5 14 20.5 14 0
3
15
14
1
6.5
20.5
14
20.5 -5.5
i =1
• The actual choice of the parameters {α i } obtained by minimizing
the MSE would depend on the image statistics.
• Some common choices that are used in practice are:
where ∆h = f (m − 1, n) − f (m − 1, n − 1) , and
∆v = f (m, n − 1) − f (m − 1, n − 1) , denote the horizontal and vertical
gradients at point (m, n).
Example:
Original Image
(Lenna)
σ = 0.062 σ = 0.046
σ = 0.046 σ = 0.048
Prediction error images e(m, n) and their standard deviations for the
four different predictors.
Optimal Quantization: Lloyd-Max
quantizer
• A quantizer is a “staircase function” t = q (s ) that maps continuous
input values into a discrete and finite set of out values.
• Note that the input in our case is the prediction error pixel values,
since we are quantizing the prediction error.
∫ (s − t ) p(s)ds = 0,
si
L Reconstruction levels ti are
i i = 1,2,
(s , s
0 i=0
ti + ti +1 L
si = i = 1,2, −1
∞ i= levels ti and ti +1
2
s −i = − si and t −i = − t i
Decision levels si and reconstruction
levels ti are symmetric about 0.
• The set of values si , ti that satisfy the above conditions give the
optimal quantizer --- called the Lloyd-Max quantizer.
• These equations for si and ti are coupled and cannot be solved
analytically.
• Tables of numerical solutions for different probability
distributions p(s), and quantization levels L are available.
• See Table 8.10 in text for L = 2,4,8 level quantizers. The values in
the table correspond to a unit variance ( σ = 1 ) Laplacian density
function:
1
2s
p( s) = exp −
2σ σ
s t
(−∞,−0.068] − 0.11
(−0.068,0] − 0.024
(0,0.068] 0.024
(0.068, ∞] 0.11
1-bit
quantizer
2-bit
quantizer
3-bit
quantizer