Homework Project #04:
Vector Quantization
Due Date: 12/14/2014
Vector Quantization of Image
Download the Vector Quantization source code, vq.zip, from the class website
Use trvqsp_img to train a codebook for VQ
Use vqimg_enc and vqimg_dec to encode/decode images using the codebook you generated in the previous step
Use different parameters/images to test the performance of the VQ algorithm
2/4
Usage Example of VQ
There are three images in vq.zip: bookshelf, sinan, and sensin
In general, you should train your codebook using one image and encode a different image for
performance evaluation
As a starting point, try:
C:\> trvqsp_img sinan.raw codebook.dat -b 1024 -t 8 -w 8
The codebook.dat can be used to encode sensin as follows:
C:\> vqimg_enc –i sensin.raw –o data.bit –c codebook.dat
Finally, reconstruct the sensin image by
C:\> vqimg_dec –i data.bit –o sensin.raw
3/4
Hand-in for the Homework
Please write a report including:
Description of the program flow of: trvqsp_img, vqimg_enc, and vqimg_dec
Try different parameters for VQ (e.g., codebook size, vector size)
Try different training images and compare the performance of VQ on different target images
Grading is based on
Your report
4/4