Due Date - 3/27/2009, 11:59 pm

The goal of this homework assignment is to learn about image filtering in the frequency domain, and to compare this to spatial domain filtering. Your first task is to implement a low pass filter of the form sinc(A*u) = sin(A*u)/(A*u) where A is a constant, and u is the index in the frequency domain. As you learned in class, the Fourier transform of the sinc function is the rect function, so filtering in the frequency domain with a sinc, is the same as convolution in the spatial domain with a rect.

Once you have your low pass filter working, your second task is to compare it smoothing with a rect. You can do this by calling the "Average" method. First of all, see if you can figure out the relationship between neighborhood size in "Average", and the A parameter in your "SincLP" filter. Which pair of values result in the same amount of smoothing? Next, use the "time" command in Linux to calculate the computation times for spatial domain versus frequency domain filtering. When is it faster to use "Average", and when is it faster to use "SincLP"?

The filter above is in 1D. There are two obvious options for making a 2D version of this filter. The first is to make H(u,v) = sinc(A*u) * sinc(B*v). By varying A and B, you can control the filter size in u and v directions. The second option is to calculate H(u,v) = sinc(A*d) where d = sqrt(u*u + v*v). This will be circularly symmetric like Butterworth and Gauss which is nice. Pick one and see what you get.

You are welcome and encouraged to look at the implementation of the other filters in im_complex for inspiration when developing your "SincLP" method. Remember, the (u,v) indices wrap around, so an image with indices [0..199] really represents frequencies [0..99,-100..-1]. You will get some funny looking images if you get this wrong. One other minor thing to worry about. What should you use for H(0,0)? Using the formula above this is 0/0, which will fail on most computers. Two possible choices are H(0,0)=0 and H(0,0)=1. If you try them both, you will see there is a fairly big difference in the result depending on which you choose.

Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Save your testing output in text files for submission on the program due date.

When you have completed your program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.

In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "submit" your documentation, program, and testing files.

The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit (50% off if less than 24 hours late, no credit if more than 24 hours late), so hand in your best effort on the due date.

You should also PRINT a copy of these files and hand them into your instructor in the department office. Include a title page which has your name and uaid, and attach your hand written design notes from above.