CSS Prepare

optional · CSS study notes

Image Restoration and Noise Models

CSS Optional — Paper-II, Section-B · P-II.V.VIII · Syllabus: Image Restoration; Noise Models. The classic short question is "Enhancement vs Restoration"; the numerical side is noise filters (median, contraharmonic, alpha-trimmed) and the inverse/Wiener idea.

1. What Is Restoration?

Restoration tries to recover the original image f(x, y) from a degraded observation g(x, y), using prior knowledge of how the degradation happened (blur, noise). It is objective — success is measured against the true image.

PointEnhancementRestoration
GoalMake the image look better / more usefulUndo a known degradation, recover the original
NatureSubjective (viewer's judgement)Objective (mathematical model, error criteria)
Needs a degradation model?NoYes — H (blur) and noise statistics
Typical toolsHistogram equalization, gamma, sharpeningInverse filter, Wiener filter, noise-specific filters
ExampleBoosting contrast of a dull photoRemoving motion blur from a number-plate image

2. The Degradation / Restoration Model

  • Spatial domain: g(x,y) = h(x,y) ⋆ f(x,y) + η(x,y) — ⋆ = convolution, h = point-spread function (PSF), η = additive noise.
  • Frequency domain: G(u,v) = H(u,v)·F(u,v) + N(u,v) — convolution becomes multiplication.
  • Restoration produces an estimate f̂ that is as close to f as possible.
graph LR
    F["Original f(x,y)"] --> H["Degradation H (blur)"]
    H --> P(("+"))
    N["Noise η(x,y)"] --> P
    P --> G["Degraded g(x,y)"]
    G --> R["Restoration filter"]
    R --> FH["Estimate f̂(x,y)"]

3. Noise Models (Probability Density Functions)

Noise is treated as a random variable z with a PDF. It comes from acquisition (sensor heat, low light) and transmission (channel interference).

NoiseKey parametersTypical sourceBest filter
Gaussian (normal)mean μ, std. dev. σ; ≈70% of values within μ ± σ, ≈95% within μ ± 2σSensor electronics, poor lighting, high temperatureArithmetic / Gaussian mean, Wiener
RayleighSkewed to the right; starts at aRange imaging (radar, ultrasound)Mean-type filters
Erlang (Gamma)a, bLaser imagingMean-type filters
ExponentialSpecial case of Erlang (b = 1)Laser imagingMean-type filters
UniformFlat between a and b; mean (a+b)/2, variance (b−a)²/12Models quantization error; simulationMidpoint, mean
Impulse (salt-and-pepper)Probabilities Pa (pepper, 0) and Pb (salt, 255)Faulty switching, transmission bit errors, dead sensor pixelsMedian, adaptive median
PeriodicFrequency of the interferenceElectrical / electromechanical interferenceFrequency-domain notch / band-reject

Estimating noise parameters: crop a small flat (uniform) patch of the image, plot its histogram — the shape reveals the noise type, and its mean and variance estimate μ and σ².

4. Restoration When Noise Is the Only Degradation (Spatial Filters)

Mean filters (window Sxy of mn pixels):

FilterFormula (in words)Behaviour
Arithmetic meanAverage of the windowReduces Gaussian/uniform noise; blurs
Geometric mean(product of pixels)^(1/mn)Smoothing like arithmetic but loses less detail
Harmonic meanmn / Σ(1/g)Good for salt noise and Gaussian; fails on pepper
Contraharmonic (order Q)Σ g^(Q+1) / Σ g^QQ positive removes pepper; Q negative removes salt; Q = 0 → arithmetic; Q = −1 → harmonic

Order-statistic filters (sort the window first):

  • Median — best for impulse noise; edges preserved.
  • Max — removes pepper (dark dots); Min — removes salt (bright dots).
  • Midpoint = (max + min)/2 — good for Gaussian and uniform noise.
  • Alpha-trimmed mean — drop the d/2 lowest and d/2 highest values, average the rest; ideal for mixed noise (Gaussian + salt-and-pepper). d = 0 → arithmetic mean; d = mn − 1 → median.

Adaptive filters change behaviour with local statistics:

  • Adaptive local noise reduction: f̂ = g − (σ²η / σ²L)·(g − mL) — smooths flat areas strongly, leaves edges (high local variance σ²L) almost untouched.
  • Adaptive median filter: grows the window until the median is not an impulse; handles dense salt-and-pepper and keeps fine detail better than a fixed median.

5. Periodic Noise — Frequency-Domain Filtering

Periodic noise shows up as bright spikes (pairs of points) in the Fourier spectrum.

  • Band-reject filter: removes a ring of frequencies.
  • Band-pass filter: keeps only that ring (used to isolate the noise pattern).
  • Notch filter: removes small neighbourhoods around specific spikes — most precise.
  • Optimum notch filtering: subtracts a weighted estimate of the interference pattern (used on satellite and space-probe images).

6. Estimating the Degradation Function H

  1. Observation — study a small, clear part of the degraded image (e.g. a sharp edge) to infer the blur.
  2. Experimentation — image a bright point (impulse) with the same equipment; the result is the PSF.
  3. Mathematical modelling — e.g. atmospheric turbulence H = e^(−k(u²+v²)^(5/6)); uniform linear motion blur derived from exposure time and velocity.

If H is unknown and must be estimated at the same time as f → blind deconvolution.

7. Restoration Filters for Blur + Noise

FilterFormulaStrength / weakness
Inverse filterF̂ = G / HPerfect with no noise; but F̂ = F + N/H, so where H ≈ 0 the noise term explodes. Fix: apply only within a cutoff radius
Wiener (minimum mean-square error)F̂ = [ (1/H) ·H
Constrained least squaresUses a smoothness (Laplacian) constraint and parameter γNeeds only noise mean and variance, not the full power spectra

8. Applications

  • Hubble Space Telescope (1990): a flawed mirror blurred images; deconvolution restored them until the optics were corrected in 1993.
  • De-blurring motion in CCTV / traffic images (number plates).
  • Removing scan lines and interference from satellite imagery.
  • Restoring old or damaged photographs and films.
  • Low-dose medical imaging (CT, MRI) where noise is high.

📐 Worked Numericals

N1 — Contraharmonic removes pepper: window {100, 100, 100, 100, 0, 100, 100, 100, 100}, Q = 1.

  • Σg² = 8 × 10,000 + 0 = 80,000; Σg = 800
  • f̂ = 80,000 / 800 = 100 → pepper removed completely
  • Arithmetic mean = 800/9 ≈ 88.9 → darkened by the pepper

N2 — Harmonic softens salt: window {100 ×8, 255}.

  • Harmonic = 9 / (8/100 + 1/255) = 9 / (0.08 + 0.00392) = 9 / 0.08392 ≈ 107.2
  • Arithmetic = (800 + 255)/9 ≈ 117.2 → harmonic is closer to the true 100

N3 — Alpha-trimmed mean (mixed noise), window {10, 12, 11, 255, 13, 12, 0, 11, 12}, d = 2.

  1. Sort: 0, 10, 11, 11, 12, 12, 12, 13, 255
  2. Drop the lowest (0) and highest (255)
  3. Mean of the remaining 7 = 81/7 ≈ 11.6 (median = 12; arithmetic mean ≈ 37.3)

N4 — Midpoint filter: window {48, 52, 50, 49, 51, 53, 47, 50, 50} → (53 + 47)/2 = 50

N5 — Uniform noise: a = 0, b = 12 → mean = 6, variance = 144/12 = 12. Gaussian noise with σ = 10 → about 95% of noise values lie within ±20.

N6 — Why the inverse filter fails: at one frequency H = 0.01, G = 5, N = 0.5.

  • Inverse filter: F̂ = G/H = 500, but the true F = (G − N)/H = 450 → the noise term N/H = 50 is amplified 100×.
  • Wiener with K = 0.01: |H|²/(|H|² + K) = 0.0001/0.0101 ≈ 0.0099 → F̂ = (1/0.01) × 0.0099 × 5 ≈ 4.95 → the unreliable frequency is suppressed instead of blown up.

N7 — Blur as a degradation: 1-D signal f = [10, 10, 50, 10, 10] blurred by h = [⅓ ⅓ ⅓]. Centre output = (10 + 50 + 10)/3 ≈ 23.3 → the peak of 50 is flattened; restoration tries to reverse exactly this.


🎯 CSS Exam Angle

  • "Differentiate enhancement and restoration": the 5-row table in §1 + the degradation equation g = h ⋆ f + η — that equation is what separates a model answer from an average one.
  • "Explain noise models": table of noise types with source and best filter; sketch the Gaussian bell curve and the two spikes of salt-and-pepper.
  • Long answer: model diagram → noise types → spatial filters → inverse vs Wiener → one application (Hubble).

📌 Past CSS Paper Frequency

YearQuestion
2018Mean vs median filter (asked under smoothing — the same filters are restoration tools for noise; see Image Histogram and Enhancement)
SyllabusRestoration and noise models named explicitly; no verified standalone question in reviewed papers — expect short notes or "enhancement vs restoration"

⚠️ MCQ Traps

  • Restoration is objective; enhancement is subjective.
  • Contraharmonic: Q positive → removes pepper, Q negative → removes salt. Wrong sign makes the noise worse.
  • Harmonic mean works on salt, fails on pepper.
  • Max filter removes pepper; min filter removes salt.
  • Periodic noise is removed in the frequency domain (notch filter), not with a median.
  • Wiener with K = 0 reduces to the inverse filter.
  • Inverse filtering fails because of division by near-zero H, not because of blur itself.

Self-Check

  1. Write the degradation model in both domains.
  2. Which filter would you use for an image with Gaussian noise plus a few salt-and-pepper pixels? Why?
  3. Why does the inverse filter amplify noise, and how does Wiener fix it?

✅ Self-Check (with Answers)

Q1. Write the degradation model in spatial and frequency domains.

Ans: g(x, y) = h(x, y) ⋆ f(x, y) + η(x, y) and G(u, v) = H(u, v)·F(u, v) + N(u, v), where h/H is the degradation (point spread) function and η/N is additive noise.

Q2. How can you identify the type of noise in an image?

Ans: Select a small flat (constant-intensity) region and plot its histogram. The shape shows the noise PDF — bell-shaped = Gaussian, flat = uniform, two spikes at the extremes = salt-and-pepper — and its mean and variance can be estimated from that patch.

Q3. Which filter would you use for (a) Gaussian noise, (b) salt-and-pepper, (c) periodic noise?

Ans: (a) Arithmetic/geometric mean or Gaussian filter (Wiener if blur is also present). (b) Median or adaptive median filter. (c) Notch or band-reject filter in the frequency domain.

Q4. Why does inverse filtering fail in the presence of noise, and how does Wiener filtering fix it?

Ans: F̂ = G/H = F + N/H; where H(u, v) ≈ 0 the term N/H becomes huge and swamps the image. The Wiener filter adds the noise-to-signal ratio to the denominator, H*/(|H|² + Sη/Sf), so those frequencies are attenuated instead of amplified — minimizing mean-square error.

Q5. Uniform noise lies between −20 and +20. Find its mean and standard deviation.

Ans: Mean = (−20 + 20)/2 = 0. Variance = 40²/12 = 133.3 → σ ≈ 11.55.

Q6. Contraharmonic filter: which sign of Q removes pepper noise?

Ans: Q > 0 removes pepper (dark) noise; Q < 0 removes salt (bright) noise. Q = 0 gives the arithmetic mean, and Q = −1 gives the harmonic mean.

📜 Past-Paper Questions & MCQs (CSS 2016–2026)

2019 · Paper-II · Q6(a) · 8 marks

Q. Analyse the following noise models in the context of digital image processing: (i) Gaussian noise model (ii) Uniform noise model.

Ans.

  • Noise is an unwanted random variation in pixel values. It is modelled by a probability density function (PDF) of the noise values z, and is usually additive: g(x, y) = f(x, y) + η(x, y).
  • (i) Gaussian noise:
    • PDF: p(z) = (1 / (σ√(2π))) · e^(−(z − μ)² / 2σ²), a bell curve with mean μ and standard deviation σ.
    • Source: electronic circuit and sensor noise (thermal noise), poor illumination and high temperature.
    • Effect: every pixel is slightly disturbed, giving a grainy look.
    • Removal: mean or Gaussian filters, Wiener filtering.
  • (ii) Uniform noise:
    • PDF: p(z) = 1 / (b − a) for a ≤ z ≤ b, and 0 elsewhere. Mean = (a + b)/2 and variance = (b − a)² / 12. All noise values in the range are equally likely.
    • Source: quantisation noise and a useful model for simulating random errors.
    • Effect: random, evenly spread disturbance.
    • Removal: averaging and similar filters.
  • Other models: salt-and-pepper (impulse), Rayleigh, gamma and exponential noise. The estimating of the noise parameters from a flat region of the image is a key step in restoration.