7491 Spring 2006: Project 2 (individual)

The input is an image with only a small set of colors. Make a few examples with a paint or image editing program that have between 5 and 200 regions (connected components of uniform color).
Each vertical or horizontal grid-edge between two consecutive pixels of a different color is a stick. Put a vertex in the middle of each stick.
A square is the intersetice between a 2x2 arrangement of consecutive corner pixels. The valence of a square is the number of different colors that its 4 vertices have. Put a vertex in the middle of each square of valence larger than 1 and connect it to the vertices on the sticks bounding the square.
You have a set of edges that decompose the image into homogeneous regions.
Produce a picture showing the original image and the edges drawn on top of it as thick lines.

As an option, apply a limited amount of laplace smoothing to produce nicer curves.

Write the edges to a file as a list of vertices and an edge/vertex index list (2 vertex indices per edge).

Read the file. Devise a compact representation for storing this arrangement so that one can access and colorcode each cell of the arrangement. Your representation should let you quickly (connstant time) find out the number of bounding loops and the neighbors for each cell. Develop and debug efficient code for computing this representation from the information available in the file (vertices and edges). Demonstrate that it works by coloring each cell in a different (random) color and when the user clicks in a cell by coloring its neighbors black.

Design a compressed file format and develop an efficient compression and decompression algorithm for transmitting your representatino of this arrangements.

Produce a web page with the Images, Explanation, Source code for the construction, traversal, compression, and decompression Algorithms, and the compression ratio Results for the differnt datasets that you have used.