Complete by Class 7

**DFT**

- cimg.h -- complex and double precision image structures and function prototypes
- complex.c -- complex and double image manipulation functions
- dft.c -- the DFT itself. THere is a bit of "junk" used during debugging included in this. Note that it takes 4 files names: The input file, a file to write the DFT magnitude, a file to write hte log DFT magnitude, and a file to write the real part of the IDFT of the DFT. This last file should equal the input file (useful for debugging).

**Filtering**

Use your DFT program to perform ideal low-pass filtering.
The ideal low-pass filter is parameterized by a cutoff frequency,
call it
w.
The ideal low-pass filter has a response of 1 when
the input frequency is less than
some input parameter
w.
In particular, we require that
`u`^{2}
+
`v`^{2}
≤
w^{2}.

Compute the Fourier Trannforms of your test images and set to zero
those components outside the passband. Then transform back to spatial
coordinates to view.
As before, you may find it convenient to multiply by
(-1)^{x + y}
to shift the transform to the middle of the image.

Test your program on the moon and (if you have the processing time)
telescope images using various
cutoff frequencies.
There are two versions of the moon
image: `moon1`

is a 256x256 image
and `moon2`

is a 64x64 version. Discrete Fourier Transforms can
be quite computationally intensive so you may find it more convenient to
use the second image.

You can find them here:

moon1.img,
moon1.tif,
moon1.gif

moon2.img,
moon2.tif,
moon2.gif

telescope.img,
telescope.tif,
telescope.gif,

**Noise**

What happens if you try to bandpass filter the noisy image? Try it.

**Convolution**

**What to hand in**

Hand in to class

- Your filtering program, including enough comments so we can understand what you have done, with examples.
- The Gaussian noise program, with examples, and the answer to the question.
- Answer to the convolution problem.

CS/ECE 545 Staff

Contents ©1997 - 2011 Norman Wittels and Michael A. Gennert