CENG466 Fall 2000, Assignment 1

Write C programs and a report on your work to solve the following problems:

1. Fourier-domain filtering

Take the fourier transform of the entire image. Process the image so that (1) resolution is reduced (i.e. blurred) and (2) the image is sharpened. Your code must conform.

What to put into the report

Sketch your filters (you can use Microsoft Excel or gnuplot) and state the design considerations (in designing your filter; i.e. which band(s) to pass) in your report.

2. Wavelet-domain filtering

Perform the tasks (1) and (2) in wavelet domain (instead of fourier domain). Use Haar wavelets, for simplicity. The things to put into the report are the same things, plus a short description of your implementation of DWT. The invocation of your program will be similar. (see: Implementation Issues) (Hint: You can find links to useful tutorials athttp://www.wavelet.org/)

3. Fourier-domain quantization

Divide the image into 8x8 blocks and quantize the (fourier) transformed blocks. Output the quantized blockwise fourier transform as described in section "Implementation Issues". The aim of this part is to achieve better compression after quantization.

What to put into the report

Explain your quantization strategy. Measure the compression improvment and degradation in fidelity by including size of actual image, size of quantized image and RMS (root mean square) error in your report for the given samples.

Sample Images

Images are in two classes; natural scenes and artificially generated shapes. All images are 8-bit grayscale PNG, no limitation in size. Two other images will be used for evaluation, which you won't see before I evaluate your assignments.

The given sample images is the common subset of evaluation images. Other two images may (or may not) be common, but they will certainly conform to the specification above.

Report

Your report should be less than three pages, with no limitation in number of figures and tables, but it must not get oversized (to make things easy, no cover pages). The reports should be either in PostScript (ps.gz and ps.Z are also OK) or PDF (preferred) formats, which means there's no need for a hardcopy. Remember, there's a strict bound -the weight in grading- on your gain from the report; a perfect homework with a weak report worths much more than a weak homework with a perfect-looking report.

Submission

The assignment is due 08/11/2000 midnight and to be submitted with submit466. Late submissions will be evaluated over 100 - 10d2 points where d is the number of days passed over due date. The following items are required to be submitted in a .tar file: The tar file should not extract in a directory, i.e. you should
cd myHomework; tar cvf ../submission.tar src1.c src2.c src3.c Makefile report.pdf
rather thantar cvf submission.tar myHomework/

Evaluation

Your programs has to output some image, otherwise it'll make a zero! You'll be requested a demo in case your program(s) fail to output an image. Your performance will be determined by the (of course) quality of your output and to be measured qualitatively. Three of the five test images are provided in this page; the `hidden' two others are chosen to be similar to the public ones in characteristics.

For the transform-domain quantization part, the weights of the three important factors that affect your grade (RMS error, perceptual quality, size ratio) will be announced later.

Your programs will be executed on a RedHat 6.x linux machine, one of the ineks, exactly speaking.

Implementation Issues

For all three parts,

You're free to use ISO C 9X "complex" functions, as long as it runs nicely with GNU libc. (See GNU libc texinfo documentation (by info libc) on a GNU libc 2.1.x machine, e.g. RedHat 6.2 or Slackware 7) You may also use FFTW library available in ineks (or you'll have to implement your own discrete fourier transform, speed does not matter much.). Those seeking for FFTW to install can find at rpmfind.net or http://theory.lcs.mit.edu/~fftw.

Fourier-domain filtering

Your program will get 8-bit grayscale images and output in the same format. For (1), your code must be invoked as

./main input.png output.png plugin1.so --blur
and for (2), your code must be invoked as
./main input.png output.png plugin1.so --sharpen

For the wavelet section, invocation is the same as above, just change plugin1s with plugin2

Fourier-domain quantization

Your program will get a grayscale 8-bit image and output a 16-bit image, where every 16-bit value is the quantized value (which is real) transformed (into 16 bit world), you must define a transformation from reals to 16-bit (unsigned) integers so that you won't need any description of a quantization table. By mapping your complex double or float coefficients, you may lose a lot, you at least do the 64/128 --> 16 bit transformation.

You may use a fixed quantization table, which will get more points given the quality is the same, or generate your quantization scheme for each image you are given. The difference in size will affect your grades, i.e. the smaller you encode, the more you get. On the other hand, you'll probably lose some details by quantizing the image, which means you'll get less.

To view the image, you must also write the decoder. Encoder and decoder must be the same plug-in. To encode a picture, the plugin must be invoked as

./main input.png output.png plugin3.so --encode
and to decode the image, it must suffice to enter
./main input.png output.png plugin3.so --decode
Hosted by www.Geocities.ws

1