Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 37

Vector Quantization

• A generalization of scalar quantization is vector


quantization.

• In vector quantization we group the source output


into blocks or vectors. For example, we can treat L
consecutive samples of a signal as the components of
an L- dimensional vector. This vector of source
outputs forms the input to the vector quantizer.

• At both the encoder and decoder of the vector


quantizer, we have a set of L- dimensional vectors
called codebook of the vector quantizer.
• The vectors in this codebook known as code- vectors, are
selected to be the representative of the vectors we generate
from the source output.
• Each code- vector is assigned a binary index. At the encoder,
the input vector is compared to each code- vector in order to
find the code- vector closest to the input vector. The elements
of this code- vector are the quantized values of the source
input.
• In order to inform the decoder about which the code- vector
was found to be the closest to the input vector, we transmit or
store the binary index of the code- vector.
• Because the decoder has exactly the same codebook, it can
retrieve the code- vector given its binary index
Encoder Decoder

Source
output

Reconstruction

Group into Final closest Table lookup


vectors code vector

Unblock

Code book Index Index Code book


Generalized Lloyd Algorithm
K-Means Algorithm for VQ
(Linde -Buzo –Gray (LBG algo.)
(Same as GLA(Scalar & VQ))
Problem
Training Samples
4,6,5,10,9,6,8,9,3,9,10,10,2,8,8,4,5,1,4,2
Dimension of VQ = 2
Size of the code book = 3
Initial Code Vectors :
c1 = [ 5 3 ], c2 =[6, 9], c3 = [10,7]
Use Squared Error Distortion
Design the codebook such that average distortion
is less than 4.5.
Solution
• Using Squared error distortion, three clusters
are obtained as :

• K1 ={[4,2], [4,6], [5,1],[8,4]}


• K2 = {[2,8],[3,9],[5,10],[8,9]}
• K3 = {[9,6],[10,10]}
D1 = 1/10(((4-5)2 + (2-3)2) + ((4-5)2+(6-3)2)+
((5-5)2+(1-3)2) + ((8-5)2+(4-3)2)+((2-6)2+
(8-9)2)+((3-6)2+(9-9)2)+((5-6)2 +(10-9)2)+
((8-6)2 +(9-9)2) +((9-10)2) + (6-7)2)+((10-10)2 +
(10-7)2)) = 6.9

Centroids of clusters – c1’, c2’, c3’, calculate D2 &


continue until D becomes less than 4.5.

Obtain the final code book


Initial set of Vectors
Splitting Method
Codebook Searching
1. Final Code words distributed symmetrically
Quadrant Approach
(less symmetrical)
To reduce Searching time – Tree structure
Design of Tree Structured VQ
Instead of imposing the tree structure after the design of the
code book, we can design the code book within the frame
work of the tree structure.

Identical to splitting technique discussed earlier.

Mean of all training vectors – First vector


Perturb it to obtain a second vector
Test Vector 0 & Test Vector 1

Obtain Group 0 and Group 1


• Use the training set vectors in Group 0 alone to
design 2 –level VQ with output points 00 & 01
• Group 1 training set to design 2 –level VQ with
0utput points 10 &11
• Vectors in Group 0 split into Group 00 & Group 01
• Vectors in Group 1 split into Group 10 & 11.
• Now vectors 00,01,10 & 11 form 4 level VQ.
• Continue this until we get the required number of
output points(code vectors)
Differential Encoding
(Self Study)
• DPCM
• ADPCM
• DM
• ADM

• Chapter 10 – Sayood’s Text

You might also like