Vector Quantization

Vector Quantization

Contents
  1. Introduction
  2. Preliminaries
  3. Design Problem
  4. Optimality Criteria
  5. LBG Design Algorithm
  6. Two-Dimensional Animation
  7. Performance
  8. References

I. Introduction
  Vector quantization (VQ) is a lossy data compression method based on the principle of block coding. It is a fixed-to-fixed length algorithm. In the earlier days, the design of a vector quantizer (VQ) is considered to be a challenging problem due to the need for multi-dimensional integration. In 1980, Linde, Buzo, and Gray (LBG) proposed a VQ design algorithm based on a training sequence. The use of a training sequence bypasses the need for multi-dimensional integration. A VQ that is designed using this algorithm are referred to in the literature as an LBG-VQ.

II. Preliminaries
  A VQ is nothing more than an approximator. The idea is similar to that of ``rounding-off'' (say to the nearest integer). An example of a 1-dimensional VQ is shown below:

1-dimensional VQ
Here, every number less than -2 are approximated by -3. Every number between -2 and 0 are approximated by -1. Every number between 0 and 2 are approximated by +1. Every number greater than 2 are approximated by +3. Note that the approximate values are uniquely represented by 2 bits(每个近似值可以被2个比特表示,比如-3,共有2个bits,一个是负号‘-’,一个是数字‘3’). This is a 1-dimensional, 2-bit VQ. It has a rate of 2 bits/dimension.

An example of a 2-dimensional VQ is shown below:

2-D VQ
Here, every pair of numbers falling in a particular region are approximated by a red star associated with that region. Note that there are 16 regions and 16 red stars -- each of which can be uniquely represented by 4 bits. Thus, this is a 2-dimensional, 4-bit VQ. Its rate is also 2 bits/dimension.(每一个红点由一个坐标点——数值对表示,每个数值对由4个bits组成)。

In the above two examples, the red stars are called codevectors and the regions defined by the blue borders are called encoding regions. The set of all codevectors is called the codebook and the set of all encoding regions is called the partition of the space. 红点被叫做codevectors,他们组成codebook;

III. Design Problem
  The VQ design problem can be stated as follows. Given a vector source with its statistical properties known, given a distortion measure, and given the number of codevectors, find a codebook (the set of all red stars) and a partition (the set of blue lines) which result in the smallest average distortion.

We assume that there is a training sequence consisting of source vectors:

This training sequence can be obtained from some large database. For example, if the source is a speech signal, then the training sequence can be obtained by recording several long telephone conversations. is assumed to be sufficiently large so that all the statistical properties of the source are captured by the training sequence. We assume that the source vectors are -dimensional, e.g.,
Let be the number of codevectors and let
represents the codebook. Each codevector is -dimensional, e.g.,
Let be the encoding region associated with codevector and let
denote the partition of the space. If the source vector is in the encoding region , then its approximation (denoted by ) is :
Assuming a squared-error distortion measure, the average distortion is given by:
where . The design problem can be succinctly stated as follows: Given and , find and such that is minimized.

IV. Optimality Criteria
  If and are a solution to the above minimization problem, then it must satisfied the following two criteria.

  • Nearest Neighbor Condition:
    This condition says that the encoding region should consists of all vectors that are closer to than any of the other codevectors. For those vectors lying on the boundary (blue lines), any tie-breaking procedure will do.
  • Centroid Condition:
    This condition says that the codevector should be average of all those training vectors that are in encoding region . In implementation, one should ensure that at least one training vector belongs to each encoding region (so that the denominator in the above equation is never 0).

 

V. LBG Design Algorithm
  The LBG VQ design algorithm is an iterative algorithm which alternatively solves the above two optimality criteria. The algorithm requires an initial codebook . This initial codebook is obtained by the splitting method. In this method, an initial codevector is set as the average of the entire training sequence. This codevector is then split into two. The iterative algorithm is run with these two vectors as the initial codebook. The final two codevectors are splitted into four and the process is repeated until the desired number of codevectors is obtained. The algorithm is summarized below.
 
  LBG Design Algorithm

  1. Given . Fixed to be a ``small'' number.
  2. Let and
    Calculate
  3. Splitting: For , set
    Set .
  4. Iteration: Let . Set the iteration index .
    1. For , find the minimum value of
      over all . Let be the index which achieves the minimum. Set
    2. For , update the codevector
    3. Set .
    4. Calculate
    5. If , go back to Step (i).
    6. Set . For , set
      as the final codevectors.
  5. Repeat Steps 3 and 4 until the desired number of codevectors is obtained.

VI. Two-Dimensional Animation
 

2-D VQ animation
Click on the figure above to begin the animation
  • If the animation appears to be stuck, try moving up or down the page in your browser.
  • The source for the above is a memoryless Gaussian source with zero-mean and unit variance.
  • The tiny green dots are training vectors --- there are 4096 of them.
  • The LBG design algorithm is run with .
  • The algorithm guarantees a locally optimal solution.
  • The size of the training sequence should be sufficiently large. It is recommended that .

VI. Performance
  The performance of VQ are typically given in terms of the signal-to-distortion ratio (SDR):

(in dB),
where is the variance of the source and is the average squared-error distortion. The higher the SDR the better the performance. The following tables show the performance of the LBG-VQ for the memoryless Gaussian source and the first-order Gauss-Markov source with correlation coefficient 0.9. Comparisons are made with the optimal performance theoretically attainable, SDRopt, which is obtained by evaluating the rate-distortion function.
 
RateSDR (in dB)SDRopt
(bits/dimension)
14.44.44.54.74.84.84.95.06.0
29.39.69.910.210.3------------12.0
314.615.315.7--------------------18.1
420.221.1------------------------24.1
526.027.0------------------------30.1
Memoryless Gaussian Source
RateSDR (in dB)SDRopt
(bits/dimension)
14.47.89.410.210.711.011.411.613.2
29.313.615.015.816.2------------19.3
314.619.020.6--------------------25.3
420.224.8------------------------31.3
526.030.7------------------------37.3
First-Order Gauss-Markov Source with Correlation 0.9

VIII. References

  1. A. Gersho and R. M. Gray, Vector Quantization and Signal Compression.
  2. H. Abut, Vector Quantization.
  3. R. M. Gray, ``Vector Quantization,'' IEEE ASSP Magazine, pp. 4--29, April 1984.
  4. Y. Linde, A. Buzo, and R. M. Gray, ``An Algorithm for Vector Quantizer Design,'' IEEE Transactions on Communications, pp. 702--710, January 1980.

 

http://www.data-compression.com/vq.html


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值