Starting from:

$24.99

EE5537 Homework 2 Solution

Remarks:
• Do not use built-in functions.
• Please turn in Python Notebooks with the following notation for the file name: your-roll-number-hw2.ipynb.
1 2D-DFT
Recall the definition of the 2D-DFT from class. Assume that you are working with square images. Write a program that implements the DFT/IDFT pair using the following techniques.
1. From first principles i.e., as a summation over two dimensions. (5)
2. Matrix multiplication using the complex exponential matrix. (5)
Now do the following using three of your favorite images from the above set:
1. Display the image, its DFT magnitude, phase, DFT magnitude subject to the logarithmic transformation. (1)
2. Generate the centered DFT using (−1)i+jI and display its magnitude. (1)
3. Verify that IDFT[DFT[I]] = I. (1)
4. Show the importance of phase by transposing the phase matrix and then synthesizing the image. Repeat by
a) setting the phase to 0, and b) by adding noise. (2)
2 Periodic Convolution
Write a program to do the following:
1. Circulary convolve two images. Test your program by using an image and an averaging filter of size 5 × 5. (5)
2. Linearly convolve the same image and filter using the circular convolution function above after appropriatezero padding. (2)
3. Now, verify that you can perform linear covolution using the DFT of zero padded images. (3)
3 Image Denoising using Linear Filters
In this problem you will denoise images using the linear filtering techniques discussed in class. Use additive white Gaussian noise (AWGN) with zero mean and variance σ2 = 25. Write a program to denoise the image using the following techniques:
1. Average filter of size M×M. Vary M from 3 to 15 in increments of 2 and observe the tradeoff between denoising and smoothing. What could be an appropriate window size for this noise level? (5)
2. Gaussian filter of size 5 × 5. Experiment with the standard deviation σh of the filter from 0.5 to 5 in steps of 0.5 and observe its effect on denoising. (5)

More products