Vector quantization of image

Original image, 768x512 pixels, 8 bits/pixel


One-dimensional VQ (scalar quantization), 1 bit/pixel

R=1, L=1
Vectors in the codebook: M=2RL=21=2
Bits required to store codebook: M*L*8=16 (0.000041 extra bits/pixel)


Two-dimensional VQ, 1 bit/pixel

R=1, L=2
Vectors in the codebook: M=2RL=22=4
Bits required to store codebook: M*L*8=64 (0.00016 extra bits/pixel)


Four-dimensional VQ, 1 bit/pixel

R=1, L=4
Vectors in the codebook: M=2RL=24=16
Bits required to store codebook: M*L*8=512 (0.0013 extra bits/pixel)


Six-dimensional VQ, 1 bit/pixel

R=1, L=6
Vectors in the codebook: M=2RL=26=64
Bits required to store codebook: M*L*8=3072 (0.0078 extra bits/pixel)


Eight-dimensional VQ, 1 bit/pixel

R=1, L=8
Vectors in the codebook: M=2RL=28=256
Bits required to store codebook: M*L*8=16384 (0.042 extra bits/pixel)


What if we had tried 12 dimensions?
R=1, L=12
Vectors in the codebook: M=2RL=212=4096
Bits required to store codebook: M*L*8=393216 (1 extra bit/pixel!)

What if we had tried 16 dimensions?
R=1, L=16
Vectors in the codebook: M=2RL=216=65536
Bits required to store codebook: M*L*8=8388608 (21.33 extra bits/pixel!)

As you can see, having a too large dimension is not feasible.



Vector quantization of audio

Original audio: Mono, 16 bits/sample, 44100 sample/s, 705.6 kbps