← All CSED105 labs

Hands-on: MLE and MAP Denoising

Use the same noisy photograph. Change the weight of a smoothness prior and compare the restoration.

Each prior has its own weight range. Equal λ values do not represent equal smoothing strength.

Low (0.03) · Medium (0.10) · High (0.20)
0 · 0.1 · 0.3 · 0.85 · 2 · 5 · 15
Clean reference
Original sunflower photograph
Used for comparison only, not for restoration.
Observed image = MLE
Noisy sunflower observation; unconstrained MLE returns this same image
Without a prior, the estimate is the observation.
Restored image
Restored sunflower photograph

Objective: ‖x − y‖² + λR(x)

Prior belief: neighboring pixels usually have similar values.

  1. Set λ = 0. Is any noise removed?
  2. Increase λ for each prior. Compare noise reduction and lost detail, especially at edges.
  3. Change σ. Would you choose the same λ?
  4. Hide the reference. How would you judge the result without knowing the original?
Experiment details

The images are actual optimization results, not illustrative retouching. Noise is independent Gaussian noise; the same random sample is scaled for the three noise levels. Results are precomputed. Quadratic uses FFT to solve the objective directly; TV uses 700 iterations of a primal-dual optimization algorithm. Both use periodic boundary conditions. TV is isotropic, applied separately to each RGB channel: R(x) = Σ √((Δhorizontal x)² + (Δvertical x)²). Pixel values are clipped only for display. λ absorbs the relative scale of the likelihood and prior. The prior is a designer’s smoothness assumption; it was not learned from this photo. Larger λ does not automatically give a better image.

Photo: existing CSED105 course materials. The clean photograph is used only to simulate noise and evaluate error.