CS7491 Spring 2004 Project 1: 2D Curve Compression Algorithm, Study Guides, Projects, Research of Computer Science

A project for a university course, cs7491, in which students are required to implement a 2d curve compression and simplification algorithm. The project involves several phases, including normalization, quantization, prediction, statistics, huffman tree construction, encoding, decompression, and experiments. Students must also create a web page to report their results.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/05/2009

koofers-user-lpt
koofers-user-lpt 🇺🇸

5

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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)
pf2

Partial preview of the text

Download CS7491 Spring 2004 Project 1: 2D Curve Compression Algorithm and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

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)
  1. 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.
  2. 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.
  3. 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 log 2 (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)

PHASE B: SIMPLIFICATION AND ERROR

For 2 or 3 of your curves (pick interesting ones), simplify them using B-bit quantization and removing all vertices that are identical to their previous neighbor. Then compress the result. Report the results below for several values of B: 9, 8, 7, 6, 5.

  • Statistics:
    • B and the corresponding half-diagonal error bound
    • Number N' of vertices in the simplified curve
    • Average edge length L' in the simplified curve and the log 2 (L')
    • Total size F' in bits of the compressed file for the simplified curve and also F'/N'
    • Proportion in % of the file size used for the header
    • Computed entropy E' for the simplified curve and the excess (F'-N'E')/(N'E')
    • The Hausdorff error between the original and the simplified curve
    • The Hausdorff error between the original curve and the three curves obtained by subdivision of the simplified curve using (B-spline, 4-point, Jarek).

PHASE C: MINI-PAPER

Write a joint paper of 2 to 4 pages explaining what you have done and showing your results. Put some conclusions about the range of results you get and how they are affected by on the nature of the curve, about how close your encoding is to the entropy, about how the entropy relates to the log of the average edge length. Also discuss the idea of using a drastic quantization before compression and using a subdivision to recover a better approximation of the original curve. Does it really work? If so, which subdivision scheme is best? Finally, suggest improvements to either the compression, or the simplification, or the computation of the Hausdorff distance and discuss results if you have implemented them (how do they improve performance, quality of the curve, or compression ratios). Put a link to the report in PDF format from your team project page and from your PPP.