0
$\begingroup$

I am studying about scalar vs vector quantization, and I have an assignment to implement (in MATLAB) a scalar quantizer , using the Lloyd-Max algorithm, and a vector quantizer via k-means clustering.

The vector quantizer works in the R2 vector space, so its input is a tuple of samples (input vector) and its output is also a two dimensional vector, corresponding to the centroid vector of the quantization region.

I am told that in order for the comparisons between the two quantizers to be accurate, I need to keep the number of bits per sample, constant. For example, in a n-bit scalar quantizer, there are 2n quantization regions, in one of which, a sample will get quantized into.

The equivalent vector quantizer, will have 2n bits per input tuple, so that each sample is still represented by n bits. So, with that logic, I think that the vector quantizer should have 22n quantization/Voronoi regions.

I have to quantize an equal number of samples from a Gaussian source (source A), and from an AR(5) Random process (source B). From what I've studied, I think that the scalar quantizer is expected to perform a better quantization of source A (in the MSE-sense) and the vector quantizer should perform better in the AR process (source B), where the samples are correlated with each other.

However, when I quantize both of the forementioned sources, and compute the MSE between the original and the quantized signal, the vector quantizer gives a smaller MSE for both sources. So the vector quantizer, is more efficient (in the MSE-sense) for both the sources, which I think is wrong, as it should be more efficient only for the Autoregressive Random process and not for the Gaussian source, as well.

(I calculate the MSE as :mse(input_signal - quantized_signal), so there's nothing wrong there.)

So my questions are:

  1. Should (theoretically) the vector quantizer be more efficient in quantizing both the sources or only in the case of the AR process?
  2. The vector quantizer equivalent of a n-bit scalar quantizer, should have 2n or 22n quantization/Voronoi regions (second argument/cluster number of kmeans() ).

If needed I will post the MATLAB code, as well.

Any help will be greatly appreciated, as I am stuck on this for some days.

Thanks in advance .

$\endgroup$
14
  • $\begingroup$ The Lloyd-Max-Algorithm should yield a uniform quantizer (i.e. a linear quantization function) with a Gaussian source. Have you checked if it really does? $\endgroup$
    – Max
    Commented Jan 6, 2022 at 12:53
  • $\begingroup$ @Max I am asked to design a non-uniform scalar quantizer. I do this by selecting random values for the centroids of each region, in a given range . After the random selection of centroids, I run the Lloyd-Max algorithm. $\endgroup$ Commented Jan 6, 2022 at 13:44
  • $\begingroup$ Could you also provide the MSE that you currently get for both cases? $\endgroup$ Commented Jan 6, 2022 at 13:46
  • $\begingroup$ I have a N-bit scalar quantizer, where N=[2 3 4] , so i am running the vector quantizer for k=[16 64 256] (k is the argument of kmeans, ie. the number of quantization regions/clusters) $\endgroup$ Commented Jan 6, 2022 at 13:52
  • $\begingroup$ Source A : For the scalar case: MSE = [0.1126 0.0333 0.0134] , for the vector case : MSE = [0.1023 0.0275 0.0061] . $\endgroup$ Commented Jan 6, 2022 at 13:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.