-3

正如我们在向量量化中所知道的那样,我在 matlab 中进行向量量化,如果我们提供一组代码字作为输入,我们就会得到代码向量,所以我做了什么,我使用 LPG 和 Loyed 算法来做到这一点:-

          training set=randn(2,100) == code word 
             distortion=0.001
         [code book]=Vector-Quantization (training set,distortion)

结果是现在代码字的一些位置,我想将代码簿的位置作为代码向量位置的子集?阿里

4

1 回答 1

0

A codebook can be thought of as a 2D array.
A codeword is one row in that 2D array.

If you are given a codeword you cannot reconstruct a codebook as the codeword only contains the information held within that row.

If you know the size of the codebook is 256, and you have 256 codewords then you just have to place all the codewords in order to "reconstruct" the codebook.
Alternatively, if you know the codebook was sorted by distortion values (very common) then you can calculate the distortion of each row and sort accordingly.

I hope this answer is of help to you as I'm not sure I fully understand your question.

于 2015-09-06T20:28:22.087 回答