CSE 457: Introduction to Computer Graphics


Project 1: Wavelet

Date Assigned: Wednesday, April 5, 1995
Date Due: Wednesday, April 19, 1995

Project description

Wavelet is an interactive image compressor that uses wavelets for lossy compression.

The project is based on the paper "Wavelets for Computer Graphics: A Primer Part I", by Eric Stollnitz, Tony DeRose, and David Salesin. A copy of the primer is/will be available in the Indy lab.

Project objectives

The purpose of this assignment is to give you experience working with basic raster image manipulation and user-interface design using libui, the user interface library. This project also exposes you to a really cool research area, namely wavelets. To get started, run the install program OR make a copy of the files located in
	/cse/courses/cse457/wavelet
Then compile and link to create the starting point version of the program. You may also run the starting point project and a partial solution online.

Using the sample solution program

Left mouse drag
Rubberband a zoom rectangle.
Right mouse drag
Rubberband a zoom square.
Show decomposition
Display the scaling function and wavelet coefficients.
Show compressed
Display the wavelet-compressed image.
Zoom In
Zoom in on the rubberbanded rectangle such that the contents of the rectangle will completely fill the window.
Zoom Out
Zoom out of the image in such a way that the current contents of the window will just fill the rubberbanded image. If this would zoom out beyond the edge of the image, then clamp to the image.
Load RGB
Load an RGB image into the left hand window. The image will be loaded in at the current zoom level.
Load Compressed
Load a compressed image into the right hand window. The image will be loaded in at the current zoom level.
Save RGB
Save the contents of the right hand window as an RGB image. The saved image will reflect the current zoom level.
Save Compressed
Save the wavelet-compressed image using run length encoding. The saved image will not reflect the current zoom level.
Quit
Quit.

The starting point program

The starting point program has most of the user interface already present, but the following features have been disabled:

Required extensions

Each project team must make the following extensions to the starting point:
  1. Add code to perform non-standard wavelet compression.

  2. Add the capability to zoom in on portions of the image in both windows. Already implemented is code to perform the rubberbanding, and storing of the coordinates of the rubberband box.

  3. Add code to allow the user to save the right hand window / image as an RGB file. Pseudocode for doing this appears in the file wavelet_ui.c.
  4. Implement a scheme for storing the wavelet-compressed image to disk. Two such schemes -- run length encoding and Huffman coding -- were discussed in lecture. Especially clever strategies (as judged by the TAs and/or professor) will be awarded an extra bell.
There isn't much starting point code to understand in this project. In some ways this is good, in that you aren't spending a lot of time just understanding someone else's code. But in other ways, it is bad because there is a fair bit of code to be written. But don't let this discourage you! Once you get the hang of wavelets in general, much of the code "writes itself". Also, additional information covered in the help session is available as well.

Bells and whistles

Each project team must implement at least three ``approved'' bells from the following list (remember: WHISTLE + WHISTLE = BELL ). You can add items to this list by obtaining approval from the professor or one of the TAs.

You are also encouraged to go beyond the minimum number of bells and whistles by implementing more than three from the approved list, or by thinking up your own unapproved extensions.

Approved bells and whistles

Further readings

There is a large body of papers available about wavelets in this department. A few of them that might be of interest are:

And finally...

When you are finished with this assignment, type "make clean" to clean up unnecessary disk space.

corin@cs.washington.edu