CS7491 Project 3, Hierarchical Compression

 

Teams of 2 or 3. Deliverables due April 25 at beginning of class.

Short PDF report (printed and posted) with title, authors, course, problem, descriptions of solutions with references and biblio, results for curves in P1 (with images of the curves, of their quadtree, statistics), and conclusions.

Web page with links to report, source code, applet, input and compressed files, conclusions.

For the 3 parts, use all the curves provided in P1. (Include their images and number of vertices in the report/results).

Quantize the vertex coordinates to 16 bits and state that in the report. The coordinates X and Y are in [0..2^16-1].

 

PART 1: Extrapolating Prediction of Geometry

For each quantized curve do the following.

Compute corrections to linear and quadratic predictors (report results for both).

Represent corrections as a sign S, magnitude M, and number B of significant bits in M.

If M=0, then use S=1 (positive).

Report for each curve and for each predictor:

A=average value of B

E=entropy of B stream

T=total number of bits per vertex = A+E+1

S=saving = 16-T

Conclude what is the range of the expected saving per vertex (using the best predictor). Compare these to the results you obtained in the first project. Explain differences.

 

PART 2: Quadtree Encoding of geometry

For each quantized curve do the following.

Build a kD version of the quadtree stopping when leaves contain less than 2 vertices.

Split the cell in 2 by a horizontal line, then split each subcells in 2 using vertical lines.

Show the quadtree using black filling for zero leaf cells, white filling for 1 leaf cells, green borders for all leaf cells, and a red curve drawn over, with small blue disks for vertices. (Note that a leaf cell may be a square or a rectangle).

For each curve, report quadtree statistics: Number V of 1-vertex leaves and number G of empty leaves.

Design, explain, and implement the best encoding of this quadtree (including the leaf-cell labeling as to 1-vertex or empty). Discuss several schemes, report their performance, and specify which is the best, either through a theoretical analysis or experiments on all the curves used in this project. The following are candidate schemes:

At each 1-vertex leaf, encode the number of vertices still required to fully specify the 16-bit quantization of the corresponding vertex. Remember that we need to encode 2x16 bits per vertex and that each level of the k-D tree specifies one bit, so the number of remaining bits (the ÒdetailÓ) is 32-D, where D is the depth of the leaf.

For each curve and for each scheme, report the average number T of bits per vertex: (total cost of encoding the tree + total number of bits needed for the details)/number of vertices. Also report the savings (S=16-T).

Conclude what is the best tree compression scheme (does it depend on the curve statistics), and the range of savings per vertex. Compare this to the results of PART 1.

PART 3: Connectivity encoding

The scheme developed in PART 2 does not capture the connectivity. Start with the vertices at the centers of the 1-vertex leaves of the tree. Draw this approximating curve on top of the quadtree using the colors suggested above.

Merge the leaves hierarchically, by depth level, starting with the deepest leaves. For each layer, draw the approximating curve and indicate how many bits would be needed to encode it using a truncated representation of the tree.

As you merge two cells H and L into a parent cell P, you must simplify the curve. The simplification may move a vertex of one child to the center of the parent node or may merge the vertices of both children there. Draw all possible cases and assign symbols to them. I suggest that you consider each manifold component of the curve that passes through one or both child vertices.

 

 

      A                 V                  M                W                N                U

Are there other cases? Prove that you have all the cases.

Show how non-manifold situations would be produced through simplification and how they can be resolved during decompression.

You will have to encode these symbols in reversal order so as to support reversing the simplification. For each model, compute the frequency of each symbol and the entropy of the stream of symbols. Are these statistics dependent on the curve or are they almost constant? Do they vary in a predictable way with the depth in the tree?

Report the total cost of the quadtree lossless encoding (geometry + connectivity) for each curve using the best encoding of the quadtree and compare it to the best predictive encoding. Conclude. Discuss whether conclusions for a 3D version of this study (triangle meshes) could be different.

 

PART 4: Implement the best of the hierarchical encoding and decoding

Implement the best hierarchical CODEC (coder and decoder) for binary files. Post the source code for both the coder and decoder as well as the files with the original, encoded and decoded curves, and the images with the octrees and curves. Indicate the file sizes for each and the savings per vertex. Explain how you have verified that the whole thing works and that the decoder is lossless. Explain how you have encoded/decoded the tree and the connectivity. Compare to the extrapolating predictor.