E186 Project 5 (due April 10)


This project is on image restoration. There is an image called cat_blurred.pgm in /e186/imagedata. This image is supposedly blurred by a uniform linear motion in horizontal direction and contaminated by random noise (while it is actually blurred and contaminated by a program I wrote). You are asked to restore this image using the two methods discussed in class, namely, the inverse filtering in frequency domain using either 1DFT (as the motion is in the horizontal direction only) or 2DFT, and the differentiation method in spatial domain. (I think there is some error in the derivation given in the book. So use my notes to program the second method.) Also Note that the image "cat_blurred" has a uniform background (black), so the term f(x-L) required by the differentiation method is known (zero). The code for numerical derivative computation is given in the sample program /e186/programs/derivative.c.

To make your task easier, I can tell you that the image is blurred by a motion of approximately 1/8 of the image width. (In reality, you need to find this from the blurred images.) So you are advised to find the optimal estimate of this parameter by try-and-error method in order to achieve the best restoration result.

First apply the two methods to the image and submit the results as images 1 and 2. Then you will realize that as the image is noisy, direct application of the two restoration methods will not produce any useful result. So you have to do some pre-processing to clean up the noise as much as you can and then reapply the restoration methods. The resultant output image may need to be further post-processed to remove any artifacts caused by the restoration process, and to stretch the histogram (linear stretching, equalization, etc.). Try your very best to make your final image free of noise and/or artifacts and look good. Submit your final results as images 3 and 4.