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.
/cse/courses/cse457/waveletThen 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.
.
+
=
).
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.
Implement an option to perform standard wavelet decomposition
and compression. Does standard or non-standard compression perform
better on the images you tried?
The starting point project includes a slider for RMS error percentage.
While this may be more intuitive for the user, it is certainly slower
for processing. As an alternative, you could allow the user to
specify what percentage of the wavelet coefficients are removed in the
compression step.
Add code to support this alternative scheme. Also extend the user interface
so that there are two sliders, one for RMS error, the other for number of
coefficeints. When the user selects a new value for one of them, update
the corresponding value on the other slider.
Add a button that will display the wavelet decomposition of the image.
NB: Care must be take in dealing with the wavelet coefficients.
These may be negative or greater than 255.
See the sample solution for an example
of what this should look like.
The simplest approach to the wavelet compression routine is to set
many of the wavelet coeffiecients to 0.0, but leave them in the
width by
height array. While this method is simple, it does not take
advantage of the fact that the "array" is typically very sparse.
Design and implement an efficient data structure for handling these sparse
sets.
With an effiecient data structure, it is possible that the wavelet-compressed
image could be updated in real time, i.e., as the user adjusts
the slider, the image would update simultaneously. Add this capability to
your program.
Add a menu to convert between different color spaces when wavelet-compressing
the image. See Hearn & Baker, Chapter 15 for a discussion
about color spaces. In particular, implement at least YIQ or HSV in addition
to RGB (the default).
The human eye does not respond the same to all wavelengths of light. For
example, the eye is less sensitive to blue than it is to red. To take
advantage of this discrepency, allow the user to select seperate detail
levels (i.e., RMS error) for each color channel.
There are many other wavelet bases besides the Haar basis. Implement
another basis, such as Daubechies wavelets, and modify the user interface
accordingly.
Besides conserving disk space by compressing images, wavelets can also be
used to store (and transmit) progressively higher resolutions of an image,
until the full resolution is obtained. This could be very useful on, say,
a slow network, where a user could elect to abort trasmission of an image
when a suitable level of detail had been reached. Modify the user
interface to simulate a slow network, and show the image being displayed
with progressively more and more detail.
The decomposition algorithm described in the primer
evenly distributes the wavelets over the entire image. It is not always
the case that this is the best method -- there may be some region of the
image that should have more detail preserved than other regions. Devise
an extention to the decomposition algorithm (and the subsequent interface)
that would allow the user to specify where more detail should be
included.
One way to diminish the blocky artifacts of the wavelet compression is
to arrange the coefficients in such away that the wavelet analysis does
not always proceed along a scan line. To do this, implement a type of
space-filling curve called a Peano curve. The idea is to define a space-
filling curve that fills the image, but which does not have
period of a power of two. Use this curve to convert the 2D image into
a 1D array, and wavelet compress this array. With luck, the frequency
of the Peano curve will deaden the artifacts caused by wavelet
compression.
Besides static image compression, wavelets can be used to compress video.
Add code to support video compression, where the interface to the video
is the IndyCam. For an additional
, extend your solution to allow
for real-time video conferencing.
There are many other things that can be done to the image after the wavelet
decomposition, besides just compression. Add support for various image
operations, such as blur, sharpen, edge detect, to your program, by
manipulating the image through its wavelet decomposition.
corin@cs.washington.edu