CIS 725
Homework 5
Due 10/29 at the beginning of class. I'm not terribly picky about
formatting -- handwritten, typed, whatever. As long as it's legible
and reasonably well organized.
In this assignment you'll experiment with some DCT code to get a sense of
how the encoding works. First, you will need source and data files; go here to do that.
Once you have that running, do some exploration. I'll leave the details
of this up to you; you should turn in a little report describing what you
looked at and what you found (your grade will be based on how much you do
and the quality of your analysis). Some questions you might consider are:
- At what quality level do you begin to notice significant degradation?
Does that level differ among the sample images provided? If so, how do
you explain it?
- The image files are simply sequences of byte values (read the comments
for details), so you can create your own image files just using putc().
(You may need to change some constant values in the dct code if you do
this.) Generate some simple image files (e.g. all the same color, simple
stripes, other easy-to-generate patterns; study how well they compress
compared to "real" images like the ones provided.
- For more advanced fun, study the format of compressed dct files (note
that it's slightly different from the format we talked about in class) and
"manually" create your own simple files -- you can use the bitio module to
help.
- In tandem with the above, you could hack the dct code to output the
dct matrix before it gets compressed, so you can get a sense of what the
dct algoirthm does with various kinds of patterns.
If you write/modify any significant pieces of code, turn in the source
along with your report.
(by the way, this is intended to be a little bit fun.)