LBG (Linde–Buzo–Gray) Vector quantization compression and decompression implementation for gray-scale images. It was an assignment for the Compression and Information theory course in Cairo University Faculty of Computers and Artificial Intelligence.
To compress an image you can run the program with the following arguments:
java -jar vectorquantization.jar -c [filename] [vector size] [code book bit count]
For decompression, you can use:
java -jar vectorquantization.jar -d [filename]
Using 2x2
vector size and 16 code book size (4 bits)
Compressed file size: 19.6 KB
Compressed file size: 19.6 KB