## Description

1. (30 marks) Denoising a Phantom Magnetic Resonance Image.

Get the 2D noiseless image and the 2D noisy image in the “data” folder.

Implement a maximum-a-posteriori Bayesian image-denoising algorithm that uses a suitable

noise model (i.i.d. Gaussian or independent Rician) coupled with a MRF prior that uses a 4-

neighbor neighborhood system (each pixel has 4 neighbors: left, right, up, down; the neighborhood wraps around at image boundaries) that has cliques of size no more than 2.

Use gradient ascent (or descent) optimization with dynamic step size; implementing a fixed step

size isn’t acceptable. Ensure that the value of the objective function (i.e., the log posterior or

its negative) at each iteration increases (or decreases if using gradient descent). Use the noisy

image as the initial solution.

Use 3 different MRF priors where the potential functions V (xi

, xj ) := g(xi − xj ) underlying the

MRF penalize the difference between the neighboring voxel values xi

, xj as follows (see class

notes for details). You may rely on the circshift() function in Matlab when computing differences

between every pixel in the image and its neighbors.

Introduce a parameter α ∈ [0, 1] to control the weighting between the prior (weight α) and the

likelihood (weight 1 − α).

Specifically, implement the following functionality as part of the denoising algorithm:

(a) (2 marks) A suitable noise model. You don’t need the noise level because that parameter

can be absorbed in 1 − α that you’ll tune manually (Tuning α essentially manipulates the

noise level, in case of the likelihood. So we can ignore the noise level σ when tuning α

manually. Use σ = 1).

(b) (2 marks) MRF prior: Quadratic function: g1(u) := |u|

2

.

(c) (2 marks) MRF prior: Discontinuity-adaptive Huber function: g2(u) := 0.5|u|

2

, when |u| ≤ γ

and g(u) := γ|u| − 0.5γ

2

, when |u| > γ, where 0 < γ < ∞ is a constant.
(d) (2 marks) MRF prior: Discontinuity-adaptive function: g3(u) := γ|u| − γ
2
log(1 + |u|/γ),
where 0 < γ < ∞ is a constant.
For each MRF prior, manually tune the parameters α and γ (where applicable) to denoising the
noisy image in order to achieve the least possible relative root-mean-squared error (RRMSE).
The RRMSE for 2 images A and B is defined as :
RRMSE(A, B) = qP
p
(|A(p)| − |B(p)|)
2/
qP
p
|A(p)|
2, where the summation is over all pixels
p. Always use the noiseless image as A.
Report the following:
1
(a) (0 point) Report the RRMSE between the noisy and noiseless images.
(b) (9 marks) Report the optimal values of the parameters and the corresponding RRMSEs
for each of the 3 denoising algorithms. For each optimal parameter value reported (for
each of the 3 denoising algorithms), give evidence of the optimality of the reported values
by reporting the RRMSE values for two nearby parameter values (around the optimal) at
plus/minus 20% of the optimal value. That is, if a
∗
, b∗ are the optimal parameter values, then
report:
a
∗
, b∗
, RRMSE(a
∗
, b∗
),
RRMSE(1.2a
∗
, b∗
), RRMSE(0.8a
∗
, b∗
),
RRMSE(a
∗
, 1.2b
∗
), RRMSE(a
∗
, 0.8b
∗
).
(Tip: the optimal values for α might be very close to extreme limits of the allowed range. Be
aware of that possibility.) .
(c) (10 marks) Show the following 5 images (at each pixel, show the magnitude of the pixel
value; use a jet colormap) in the report using exactly the same colormap (i) Noiseless image, (ii) Noisy image, (iii) Image denoised using quadratic prior g1(·) and optimal parameter
tuning, (iv) Image denoised using Huber prior g1(·) and optimal parameter tuning, (v) Image
denoised using discontinuity-adaptive prior g3(·) and optimal parameter tuning.
(d) (3 marks) Show the plots of the objective-function values (vertical axis) versus iteration
(horizontal axis) corresponding to each of the 3 denoised results in (iii), (iv), and (v) above.
2. (22 marks) Denoising a Magnetic Resonance Image of the Brain.
Repeat the same task for the brain MRI image in the ’data’ folder.
3. (20 marks) Designing a Bayesian Denoising Formulation for a RGB Microscopy Image.
(a) (10 point) Design a suitable MRF prior model, assuming statistical dependencies within a
spatial neighborhood as well as across the three colors channels, i.e., red, green, and blue.
(b) (5 point) Design a suitable noise model.
(c) (5 point) Design a suitable Bayesian denoising formulation.
2