PGEE11108 Digital Signal Processing Labs
Digital Signal Processing Labs
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
PGEE11108 1
Digital Signal Processing Labs (PGEE11108)
Marked Assignment 2
Image Denoising & Deconvolution
Submission Deadline: 4pm 13th April 2022
ALL SUBMISSIONS MUST BE THE STUDENTS OWN INDIVIDUAL WORK. SUBMISSIONS WILL BE CHECKED
USING ANTI-PLAGARISM SOFTWARE. PLAGARISM AND COPYING WILL BE SUBJECT TO PENALTY.
Instructions
This assignment forms the second part of the marked assessment process for Digital Signal Processing Labs course PGEE11108.
The completed solution for this assignment must be submitted via Learn by the deadline above. Submissions should be made up of
two elements:
1. A report of no more than 3 pages (excluding appendix) describing your understanding of the problem and provide a
detailed description of your proposed solutions. All figures included should be fully and correctly labelled. If the assignment
asks for comments on issues then these should be made in this section. MATLAB code should be included as an
appendix.
2. MATLAB code for the exercise should be fully commented and submitted in the appendix. The code will be lightly checked
for its functionality, but it will be thoroughly similarity checked. No other material may be included in the appendix.
Marks will be awarded for the following components of the work: Overall presentation 10%, Problem understanding 50%, and
Results and Conclusions 40%.
Background
Image denoising is an important image processing task, both as a process itself, and as a component in other processes. There are
many ways to denoise an image and you should have already seen a few in the lab sessions. The simplest way to denoise an image
is to use a low pass filter. This is based on the assumption that it is the high frequency components of the image that have been
most damaged by the addition of noise. However a low pass filter does not really take into account the frequency content of the
image or of the noise process. A more sophisticated approach, based on linear estimation theory, is to use a Wiener filter. The
Wiener filter can most easily be implemented in frequency domain (as in the SimpleFiltering function in lab session 3 we
will ignore circular convolution effects and simply perform filtering by multiplication in the 2D fft domain).
Wiener Filter Theory
A Wiener filter is an instance of a linear Minimum Mean Squared Error (MMSE) estimator for a stochastic signal. If we observe a
scalar value y that is the sum of a random variable x plus a scalar random noise e:
= +
then the best linear estimator in a MSE sense for x given y can be written as:
̂ = (
2
2 + 2
)
where
2 is the variance of x and
2 is the variance of e. Note that this assumes prior knowledge of the variances for x and e.
PGEE11108 2
Frequency Domain Weiner Filtering
Now consider a noise corrupted image = + . If we treat the clean image, , as a stochastic signal we can write its 2D power
spectrum as: (, ). Similarly suppose we know the power spectrum of the additive noise, , which we denote by (, ) .
The frequency domain Wiener filter then uses a linear MMSE estimator to estimate each frequency component separately:
(
,
) = (
(, )
(, ) + (, )
) ∙ (
,
)
Applying the inverse Fourier transform then gives an estimate of the original clean image.
Generally we will not know the power spectrum of the clean image, although we may know the noise power spectrum. In this case a
simple approach is to approximate the power spectrum of the noisy image, , by its 2D periodogram:
(1, 2) ≈
1
|fft2()|2
where is the number of pixels in the image. This can then be used to construct the frequency domain Wiener filter.
Image Deconvolution
Wiener filtering can also be used to stably invert a filter process, a process known as deconvolution. Consider a blurred image, =
∗ , where is some blurring filter. Conceptually deconvolution is a simple process in the Fourier domain:
(
,
) =
(
,
)
(
,
)
However this procedure is inherently unstable as there will always be some noise present in the filtered image, = ∗ + ,
where is some additive noise as before. Wiener filtering can be used to stabilise this deconvolution process.
Assignment
This assignment will investigate the denoising and deconvolution capabilities of the Wiener filter.
1. Wiener Filter function: write a function to perform frequency domain Wiener filtering, taking as an input an image corrupted
with white noise of known variance and outputting an estimate of the clean image.
The syntax and functionality of the FD_Wiener_Filter function should be as follows:
function [I_mmse] = FD_Wiener_Filter(I_noisy,n_var)
%
% This function takes two variables as its input:
%
% I_noisy: a noise-corrupted Image:
%
% I_noisy = I_clean + Noise
%
% n_var: an estimate of the noise variance. The noise
% is assumed to have a white power spectrum.
%
% The function returns the variable:
%
% I_mmse: the Wiener filtered image
%
% The output image is a linear Minimum Mean Squared Estimate of the clean
% image constructed using a frequency domain Wiener filter based on the
% known noise variance and a periodogram estimate of the power spectrum of
% the noisy image.
You report should contain details of your filter design and explain all your design choices.
DO NOT USE MATLAB’S OWN WIENER FILTER FUNCTION (THIS IS NOT A FREQUENCY DOMAIN IMPLEMENTATION)
2. Generate test images using the Cameraman image from the resources directory corrupted with zero mean additive Gaussian
noise. Consider noise levels so that the PSNR of the noisy image ranges from approximately 10 - 30 dB. Evaluate how well you
can denoise the image using your FD_Wiener_Filter function. Compare this to the best result you can achieve with a
PGEE11108 3
low pass filter using the SimpleFiltering function from lab session 3. Your report should quantify your results in term of
PSNR.
3. Suppose that you are now given a noisy blurred image, = ∗ + , where H is the known blurring filter, fmean5, that
you used in lab session 5. Explain how you could modify your function from part 1 to implement a Wiener deconvolution filter.
Your report should indicate the key steps that would be necessary in creating such a filter. You are not expected to
implement this function in Matlab.