Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vector Quantization. 2 outline Introduction Two measurement : quality of image and bit rate Advantages of Vector Quantization over Scalar Quantization.

Similar presentations


Presentation on theme: "Vector Quantization. 2 outline Introduction Two measurement : quality of image and bit rate Advantages of Vector Quantization over Scalar Quantization."— Presentation transcript:

1 Vector Quantization

2 2 outline Introduction Two measurement : quality of image and bit rate Advantages of Vector Quantization over Scalar Quantization The Linde-Buzo-Gray Algorithm Cell-split algorithm Standard VQ encoding Summary

3 3 Two measurement Quality of image

4 4 Two measurement (conti) The amount of compression will be described in terms of the rate, which will be measured in bits per sample. Suppose we have a codebook of size k, and the input vector is of dimension L. We need to use bits to specify which of the code-vectors was selected. The rate for an L-dimensional vector quantizer with a codebook of size K is.

5 5 VQ Introduction EncoderDecoderReconstruction Find closest code-vector Table lookup Source output Unblock Group into vectors

6 6 Vector Quantization encoding VQ was first proposed by Gray in 1984. First, construct codebook which is composed of codevector. For one vector being encoding, find the nearest vector in codebook. (determined by Euclidean distance) Replace the vector by the index in codebook. When decoding, find the vector corresponding by the index in codebook.

7 7 Two important issue Codevectors in codebook need representative. It affect the quality of de- compressed image a lot. So, how to build a good codebook is an important issue. Euclidean distance is time-consuming. How to fasten to search for the nearest vector is also an important issue.

8 8 LBG Algorithm Proposed by Linde, Buzo, Gray The basic idea is to divide a group of vector. To find a most representative vector from one group. Then gather the vectors to form a codebook.

9 9 LBG Algorithm 1. Divide image into blocks. Then we can view one block as k-dimension vector. Ex: block: 4x4, consider 512x512 image, which can be divided into blocks. Each block can be viewed 16 dimension vector. 2. Arbitrarily choose initial codebook. 3. Set these initial codebook as centroids. Other vectors are grouped. Vectors are in the same group when they have the same nearest centroid. 4. Again, to find new centroids for every group. Get a new codebooks. Repeat 2,3 steps until the centroids of every group converge.

10 10 Standard VQ encoding For one vector to be encoding, compute the Euclidean distance with every codevectors in codebook, and find the codevector with smallest Euclidean distance. To encode Codebook i codewords

11 11 Cell split method ( 細胞分裂法 ) For Y, after grouping, find new centorid For Z, after grouping, find new centorid

12 12 algorithm 1. Divide image into blocks. Choose a block (k- dimension) X=(x 1, x 1,…,x 1 ) as initial vector. 2. Spit X vector into two vector Y=(y 1, y 1,…,y 1 ) and Z=(z 1, z 1,…,z 1 ) y i =x i - ,z i =x i +  3. Y and Z are centroids. For all blocks, find the nearest centroid. Re-compute the centroid of blocks and get new centroid Y’ and Z’. 4. Recursively, do Y’ and Z’. Repeat 2,3 step. Until find enough number of codevector.

13 13

14 14 experience Image 512*512 LBG codebook Cell spit method  =6 Cell spit method  =8 Cell spit method  =10 PSNRPSNR Gain Girl Gold Lena Pepper Toys Tiffancy average 31.167 29.337 29.080 29.942 28.618 28.268 29.402 31.872 0.705 30.203 0.866 29.927 0.847 30.905 0.963 30.061 1.443 30.669 2.401 30.610 1.204 30.495 0.800 29.456 1.142 28.957 0.621 29.789 1.068 27.861 0.539 30.012 2.338 29.428 1.085 30.562 0.867 29.529 1.218 29.045 0.712 29.828 1.107 28.205 0.873 30.171 2.197 29.557 1.214


Download ppt "Vector Quantization. 2 outline Introduction Two measurement : quality of image and bit rate Advantages of Vector Quantization over Scalar Quantization."

Similar presentations


Ads by Google