Math 336: Image Processing - Laboratory #3


1. Warm Up Exercise: Fast Fourier Transforms (FFTs)

Calculate the Fast Fourier Transfort (FFT) of the following images: (1) the vertical Mach band image from Lab 2; (2) the 256 x 256 image defined by the the equation IM(I,J) = 1 + sin(pi*I/128)*cos(pi*J)/256, where 1 <= i,j <= 256; (3) an image of Gaussian random numbers. For each case, display the original image along side the modulus and phase of the FFT.

warmup.m

Similarly, display the modulus and phase of the FFT for the images of Lena and Barbara. Build a new image by taking the modulus of Lena with the phase of Barbara and apply an inverse FFT. Display the resulting image and comment upon it.

lenabarbara.m

Looking at the combined image of Barbara and Lena, we see that the human visual system is more sensitive to the phase information in an image.


2. Image Filtering in Frequency Space

Apply the following edge detection filters to the image TSA.jpg.

h = [0,0,0;0,1,0;0,0,0]
h = [0,0,0;0,1,0;0,0,-1]
h = [1,2,1;0,0,0;-1,-2,-1]
h = [-k/8,-k/8,-k/8;-k/8,1+k,-k/8;-k/8,-k/8,-k/8]; k = 2
k = 4
k = 6
k = 8

tsa.m

Separate the image homomorphic.jpg into its two component images I and R and plot all three.

homomorphic.m


3. Homework: Lena in 'Motion'

There is a special filter "motion" in the MATLAB IP toolbox which simulates the effect of blurring due to motion. Apply the filter to the image of Lena. Try to recover Lena from the motion blur by reversing it's effects. Add some noise to the motion blurred image using the function imnoise and try to recover Lena again.

Inverting the filter.
Inverting the filter.
MATLAB blind deconvolution filter.
MATLAB blind deconvolution filter.

motion.m

Although a direct inverse of the filter appears to elimate the motion blur, recovery of the high frequency components of the image remain elusive. MATLAB's blind deconvolution filter is used as a comparision for what should be possible with regards to recovering the high frequencey componentsof the image.