CS7491, Spring 2004, Project 1
Due date: Feb 03, 2004
PHASE A: CODEC
1) Compression
Implement the following compression stages for a 2D curve
* Normalization (write min-max box into header)
* Quantization to B bits (make B an external parameter)
* Prediction (use quadratic formula for Gi)
* Statistics (frequencies, histogram, entropy)
* Computation of the Huffman tree and codes
* Encoding of the codebook (binary tree + coordinates or something better)
* Encoding of the residues (Di)
* Creation of compressed file (header, codebook, residues)
2) Decompression
Implement the reverse process, which would read the compressed file and reconstruct the original curve (except for the
quantization part). Display both curves in different colors one on top of the other to show that they are nearly identical.
Ensure that your compression/decompression (codec) works.
3) Experiments
Create a few curves with integer coordinates in [0,1023]. You may create one using Jarek (or some other) subdivision. You
may create another curve using a series of random moves with a biased statistics towards moving straight. You may use a
mathematical formulation… Some curves should be reasonably smooth and evenly spacing (maybe subdivision will achieve
this), some should be less smooth and have some short and some long edges.
4) Report on the web page
A single web page per team of 2. Each member of the team should include a link to this web page from his PPP and state in
the PPP next to that link, who was the partner and how much time the member has spent on the project individually and how
much with the team partner. (This time statistics will not affect your grade but may help adjust my teaching.)
On the web page for this project, put the
CS7491 Spring 2004 Project 1
Name of the two team members
Their picture Ids
A very short description of the project's objectives
A list of the modules that you implemented (normalization, quantization…)
For each module, write a sentence or two explaining how you have iml0emented it and when appropriate provide
Pseudocode (for example for building the Huffman tree) or formula (for example for the quadratic predictor). Include very
brief explanations when appropriate.
Include a link to your source code and explain what language, system… you used to implemented it and list all sources of
inspiration. It is OK to say that you found code on the web or in a book to implement this or that and to explain how you
modified it and used it. In the source files, you should have a header with the project title, team names, and references to
where the code originated if it is not entirely yours.
You also should provide a brief description of your binary format (what is the header and how is it encoded (how many
bits…), how is the codebook encoded…).
Then include a RESULTS section with one subsection per curve you worked on.
For each curve provide:
- A small picture.
- A link to the input file, which should be in ASCII format and should contain the number of points in the first line and then
two integer coordinates in [0,1023] per line.
- A link to the compressed binary file using 10-bit quantization
- Statistics:
* Number N of vertices
* Average edge length L and the log2(L)
* Total size F in bits of the compressed file and also F/N (bits per vertex)
* Proportion in % of the file size used for the header
* Computed entropy E and the excess of your code (F-NE)/(NE)