Vector Quantization
VQ is a lossy image compression technique
A code book is constructed on training set
Use 256 entries to map 2x2 bytes to byte
Declarations ...
config var n : integer = 512;
region R = [1..n, 1..n];
type block = array [1..2, 1..2] of ubyte;
var CB : array [0..255] of block;
Im : [R] block;
Coding : [R] ubyte;
Disto, Distn : [R] float;