Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Restoration filters: Wiener and Lucy–Richardson

Restoration filters (Wiener and Lucy–Richardson) recover images degraded by a known blur and noise: Wiener is an optimal linear (MSE) filter for additive Gaussian noise with known signal/noise spectra, Lucy–Richardson is an iterative maximum-likelihood method for Poisson noise (photon-limited) that

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Image restoration is used when a camera or imaging system produces blurred and noisy images (for example due to motion blur, defocus, atmospheric turbulence, or low-light photon noise). An engineer uses restoration filters to recover a close estimate of the original image before further processing (edge detection, segmentation, recognition) or for visual inspection in machine vision and medical imaging.

Key ideas

Start from the degradation model (define before use): a model describing how the true image becomes the observed image. For a linear, shift-invariant imaging system with additive noise, the model is

  • Observed image g(x,y) = h(x,y) * f(x,y) + n(x,y), where * denotes spatial convolution. Define each term before use:
    • f(x,y): the unknown original (true) image (intensity field). Units: intensity (arbitrary units); assume finite-energy.
    • h(x,y): the point spread function (PSF) — the impulse response of the imaging system (units: dimensionless in the discrete case when normalized; in continuous 2D, units of 1/area), normalized so sum/integral = 1 to preserve total intensity (flux). PSF models blur.
    • n(x,y): additive noise (statistical process). Specify model: Gaussian (additive white Gaussian noise, AWGN) or Poisson (photon-limited) according to sensor physics.
    • g(x,y): observed degraded image.

Assumptions used by filters here:

  • Linear shift-invariant (LSI): h depends only on relative coordinates, so convolution applies.
  • For Wiener: noise is additive and uncorrelated with signal; second-order statistics (power spectra) of signal and noise are known or estimated.
  • For Lucy–Richardson: noise follows a Poisson distribution and the imaging process conserves flux (sums), and intensities are non-negative.

Wiener filter (define): Wiener filter is the linear filter W(u,v) in frequency domain that minimizes the mean squared error E[|F_est(u,v) - F(u,v)|^2] between the estimated and true Fourier spectra, where F, G, H are the Fourier transforms of f, g, h.

Derive Wiener filter (step-by-step the common university derivation):

  1. Take the degradation model in frequency domain: G = H·F + N (omitting (u,v) for brevity).
  2. Let the linear estimate be F̂ = W·G. We want W minimizing E[|F̂ - F|^2] = E[|W·G - F|^2].
  3. Expand and use orthogonality and definitions of power spectral densities: let S_f = E[|F|^2], S_n = E[|N|^2], assume cross-terms E[F·N*] = 0.
  4. Differentiate the MSE with respect to W* (complex conjugate) and set derivative to zero. Solve to get the Wiener formula (shown in Formulas).

Common practical simplification: if the ratio S_n/S_f is approximately constant K, we get a simple regularized inverse filter W = H* / (|H|^2 + K). This is often used when full PSDs are unknown. In practice, K is often chosen as the noise-to-signal power ratio (NSR), e.g., K ≈ var(n)/var(f), estimated from background or calibration data.

Lucy–Richardson (define): Lucy–Richardson is an iterative maximum-likelihood (Expectation-Maximization) algorithm derived for Poisson noise. It enforces non-negativity and, with a normalized PSF and consistent boundary handling, conserves total intensity. The multiplicative update is:

  • f_{k+1} = f_k · [ h_rev * ( g / (h * f_k) ) ], where h_rev is the PSF flipped 180° and * denotes convolution; divisions and multiplications are elementwise.

Sketch derivation (EM style):

  1. For Poisson noise, the likelihood of observing g given blurred f is product of Poisson probabilities with mean (h*f).
  2. Take log-likelihood, form EM surrogate, derive multiplicative update that increases likelihood each iteration. The update given above is the result; it keeps f_k non-negative and tends to deblur while amplifying noise if iterated too long.

Diagrams to draw for exams:

  • Draw a block diagram labeled: f(x,y) → [PSF h(x,y) (block: linear, shift-invariant)] → add noise n(x,y) (adder) → g(x,y) observed. Also show arrows to frequency domain labeled F(u,v), H(u,v), N(u,v), G(u,v).
  • For Wiener derivation: draw spectrum magnitudes S_f(u,v) and S_n(u,v) and label the trade-off between inverse amplification of H and noise amplification.

Formulas

g(x,y) = h(x,y) * f(x,y) + n(x,y) — g: observed image (intensity), h: PSF (1/pixel), f: true image (intensity), n: noise (intensity). Applies under LSI degradation.

G(u,v) = H(u,v)·F(u,v) + N(u,v) — Fourier-domain form; symbols are Fourier transforms of spatial-domain variables. Units: same as above in spectral domain.

W(u,v) = (H*(u,v)·S_f(u,v)) / (|H(u,v)|^2·S_f(u,v) + S_n(u,v)) — Wiener filter. H*: complex conjugate of H; S_f: power spectral density of the true image (units intensity^2), S_n: PSD of noise (intensity^2). Applies when second-order statistics are known and noise additive and uncorrelated with signal.

W(u,v) ≈ H*(u,v) / (|H(u,v)|^2 + K) — simplified Wiener (Tikhonov-like) with constant K = S_n/S_f (unitless ratio); used when PSDs approximated by constant ratio.

f_{k+1}(x,y) = f_k(x,y) · [ h_rev(x,y) * ( g(x,y) / (h(x,y) * f_k(x,y)) ) ] — Lucy–Richardson update. All operations elementwise except the convolutions. h_rev(x,y) is the PSF rotated by 180°; applies when noise is Poisson and h normalized (sum = 1).

Worked examples

Example 1 — Wiener (single-frequency scalar example) Given a single Fourier frequency component with H = 0.80 (real), observed G = 1.20 (intensity units), signal power S_f = 1.00 (intensity^2), noise power S_n = 0.01 (intensity^2). Estimate true component F using Wiener.

  1. Formula: W = H*·S_f / (|H|^2·S_f + S_n).
  2. Substitute: numerator = 0.80·1.00 = 0.80. Denominator = (0.80^2)·1.00 + 0.01 = 0.64 + 0.01 = 0.65.
  3. W = 0.80 / 0.65 = 1.230769... (unitless).
  4. Estimate: F̂ = W·G = 1.230769·1.20 = 1.476923 (intensity). Final answer: F̂ = 1.4769 (intensity units).

Example 2 — Lucy–Richardson (small 1D numerical iteration) Let true discrete signal f_true = [2, 5, 3] (intensity units). PSF h = [0.25, 0.5, 0.25] (normalized, sum = 1). Assume zero outside boundaries (edge-padding with zeros). Compute observed g = h * f_true (no additional noise) and run two Lucy–Richardson iterations starting from uniform initial estimate f0 with same total flux.

  1. Compute g:
    • g1 = 0.5·2 + 0.25·5 = 1.00 + 1.25 = 2.25
    • g2 = 0.25·2 + 0.5·5 + 0.25·3 = 0.5 + 2.5 + 0.75 = 3.75
    • g3 = 0.25·5 + 0.5·3 = 1.25 + 1.5 = 2.75 So g = [2.25, 3.75, 2.75].
  2. Initial f0: use uniform values with same total flux: sum g = 8.75, so f0 = [2.916667, 2.916667, 2.916667].
  3. Iteration 1:
    • Compute h * f0 = [2.187500, 2.916667, 2.187500].
    • Compute ratio r = g / (h * f0) = [1.0286, 1.2857, 1.2571].
    • Convolve with h_rev (same as h here): correction = [0.835714, 1.214286, 0.950000].
    • f1 = f0 · correction = [2.4375, 3.5417, 2.7708].
  4. Iteration 2:
    • h * f1 = [2.104167, 3.072917, 2.270833].
    • r = g / (h * f1) = [1.0693, 1.2203, 1.2110].
    • correction = [0.8396, 1.1802, 0.9106].
    • f2 = f1 · correction = [2.0465, 4.1792, 2.5235]. After two iterations the estimate f2 = [2.0465, 4.1792, 2.5235] (intensity). The estimate moves toward the true [2,5,3]; more iterations improve fit but magnify noise if present. Final answers to two iterations: f1 = [2.4375, 3.5417, 2.7708], f2 = [2.0465, 4.1792, 2.5235].

Example 3 — simplified Wiener regularized inversion (numerical) Given H(u,v) = 0.5 (real), observed G = 2.0, and choose K = 0.1. Then W = H / (H^2 + K) = 0.5 / (0.25 + 0.1) = 0.5 / 0.35 = 1.428571; F̂ = 1.428571·2.0 = 2.857142. F̂ = 2.8571.

Common mistakes

  • Assuming Wiener requires Gaussian noise. In fact, Wiener filtering is the linear MMSE solution given second-order statistics (PSDs) and additive noise uncorrelated with the signal; results may be poor when the PSDs are unknown or badly estimated.
  • For Lucy–Richardson: applying it directly when noise is Gaussian (it assumes Poisson); also iterating too many times (overfitting noise) or failing to handle zero denominators (h*f_k = 0) — use small epsilon.
  • Mistreating boundaries: convolution padding choice (zero, reflect, periodic) changes results; state your boundary handling in answers.

For your exam

Types of questions you will be asked:

  • Definitions: give precise definitions of PSF, convolution, Wiener filter, Lucy–Richardson, LSI.
  • Derivations: derive the Wiener filter formula by minimizing MSE in the frequency domain; derive the Lucy–Richardson update from Poisson likelihood (outline the EM steps).
  • Numericals: compute a Wiener estimate for a scalar or single-frequency component; perform 1–3 iterations of Lucy–Richardson on a small discrete example (3×1 or 3×3) and show arithmetic.
  • Diagrams: draw block diagrams of degradation and restoration, label transforms and spectra. A full-marks answer includes: clear model statement (assumptions), correct formula derivation, explanation of each symbol and assumptions, and a worked numeric example with units and intermediate steps.

Quick check

  1. What is the main statistical assumption behind the Wiener filter?
  2. What noise model is Lucy–Richardson specifically derived for?
  3. Write the multiplicative update formula of Lucy–Richardson (describe operations). Answers: Wiener assumes additive noise uncorrelated with signal and known second-order statistics (PSD).; Lucy–Richardson assumes Poisson (photon) noise.; f_{k+1} = f_k · [ h_rev * ( g / (h * f_k) ) ] (elementwise division and multiplication, * is convolution).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?