Skip to content

ninfueng/lloyd-max-quantizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lloyd-Max Quantizer:

This is a Python implementation of Lloyd-Max Quantizer. Currently, this repository only supports for quantization of the Gaussian distribution signal.

Requirements:

  1. numpy
  2. matplotlib
  3. scipy

Usage:

To quantization with 8-bit for 1,000,000 iterations, please use a command as follows:

python3 main.py -b 8 -i 1000000

Result of quantization with 8-bit:

From the figure, the upper-figure shows an input signal or a Gaussian noise with zero mean and a unit variance. The middle-figure shows optimized quantization locations given the input signal. The bottom-figure shows a result signal or an quantized Gaussian noise.

From this implementation, mean square error of 8-bit quantization of Gaussian noise is 3.595888887954022e-05.

License:

MIT license.

About

Python implementation of Lloyd-Max quantizer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages