Full DCT Transform Compressor and Evaluation (100 points)
Using the code
from the DCT coding worksheet as a starting point, write a complete
image compression and decompression command line tool in Python.
$ mycompress image.png image.myf
$ mycompress -d image.myf image.png
There are two pieces of functionality missing:
need to apply the DCT coding to each patch. That also means that you
need to figure out how to combine the coefficients for each patch into a
- You need to deal with coding the color.
Convert the original image to the YCbCr color space. Code the Y channel
at full resolution, and code each of the color channels at half linear
The major piece of functionality missing is
applying the transformation to patches (e.g., 8x8 patches or 16x16
patches) and combining all the compressed patches into a single
Evaluate the performance of your image
compression tool relative to that of JPEG. For the evaluation, compute,
for different compression settings, the sum of absolute differences
between the result of compressing and decompressing an image and the
original image. Record both the file size and the quality and plot them
as curves for both your compressor and the standard JPEG compressor.
As test images, use the attached ZIP file of Kodak test images.