Image ProcessingUnit 59 min read
Image Restoration & Noise Models: Degradation, Filters & Cleanup
Unit 5 of Image Processing: Explores how noise corrupts images, models of degradation (blur, salt-and-pepper, Gaussian), restoration techniques (inverse filtering, Wiener filter, morphological operations), and real-world applications like medical imaging and satellite photo cleanup.
TAKEAWAYS:
- Noise is random variation in pixel values that degrades image quality, modeled as Gaussian, salt-and-pepper, or Poisson noise.
- Image degradation follows the degradation model , where is the blur kernel, is convolution, and is noise.
- Restoration techniques include inverse filtering (for known blur), Wiener filter (for noise reduction), and morphological operations (erosion/dilation for salt-and-pepper noise).
- Histogram equalization and adaptive filtering are used to enhance degraded images before restoration.
- Real-world examples: Nepal’s NTC satellite images (restored for flood monitoring) and Daraz product photos (cleaned of noise for better e-commerce displays).
- Exam questions often test noise models, filter design, and restoration steps with numerical examples.
1. Why Image Restoration Matters
- Noise: Random fluctuations in pixel values (e.g., sensor noise, transmission errors).
- Degradation: Blur from motion, defocus, or atmospheric turbulence.
- Artifacts: Striations in satellite images, compression artifacts in JPEGs.
Example: A Daraz product photo with noise (e.g., grainy pixels) reduces buyer trust. Restoration smooths it for better sales.
2. Noise Models: Types and Effects
Noise is classified by its probability distribution and spatial pattern. Key models:
A. Additive Noise Models
Noise is added to the original image : where is the degraded image.
| Noise Type | Probability Distribution | Visual Effect | Example in Nepal |
|---|---|---|---|
| Gaussian Noise | Smooth, random speckles | Noise in NTC weather satellite images | |
| Salt-and-Pepper | Binary (0 or 255 with probability ) | Black/white "salt" and "pepper" pixels | Sensor errors in Ncell phone camera photos |
| Poisson Noise | High intensity in dark regions | Low-light Pathao driver dashcam footage |
Visual:
Gaussian Noise: Salt-and-Pepper Noise:
[•••••••••] [■■■■■■■■]
[•••••••••] [■■■■■■■■]
[•••••••••] [■■■■■■■■]
• = noisy pixel, ■ = black/white pixel
B. Multiplicative Noise
Noise scales pixel values (common in low-light photography): Example: Nepal’s NEPSE stock charts may have multiplicative noise from market volatility.
3. Image Degradation Model
- Blurring (e.g., motion, defocus): Convolution with a kernel .
- Noise addition: (additive or multiplicative).
- Atmospheric distortion (e.g., haze in satellite images).
Mathematical Model: where:
- = convolution,
- = Point Spread Function (PSF) kernel,
- = noise.
Example: A blurry Ncell selfie (motion blur) can be modeled as: where is a Gaussian kernel.
4. Image Restoration Techniques
Goal: Recover from .
A. Inverse Filtering
Assumes noise is negligible and blur is known: where is the inverse of the blur kernel .
Limitation: Amplifies high-frequency noise (e.g., ringing artifacts).
Worked Example: Restore a blurred Daraz product image with kernel: Steps:
- Compute (inverse of ).
- Convolve with .
Output:
Blurred: [•••••••••] (low contrast)
Restored: [□□□□□□] (sharp edges)
B. Wiener Filter
Reduces noise by balancing restoration and smoothing: where:
- = complex conjugate of blur kernel in frequency domain,
- = noise power spectrum,
- = signal power spectrum.
Advantage: Less sensitive to noise than inverse filtering.
Example: Restoring NTC flood monitoring images with Gaussian noise.
C. Morphological Restoration
For salt-and-pepper noise:
- Erosion: Shrinks noisy pixels.
- Dilation: Expands clean regions.
- Opening/Closing: Combines erosion + dilation.
Worked Example: Clean a noisy Pathao driver’s license photo:
sequenceDiagram participant Image as Input Image participant Noise as Salt-and-Pepper participant Erosion as Erosion participant Dilation as Dilation Image->>Noise: Adds noise Noise-->>Image: Output: [■■■■■■■■] Image->>Erosion: Erosion Kernel (3x3) Erosion-->>Image: Removes isolated noise Image->>Dilation: Dilation Kernel (3x3) Dilation-->>Image: Restores edges Image->>Image: Cleaned Output: [Cleaned Image]
Output:
Before: [■■■■■■■■]
After: [□□□□□□]
5. Real-World Applications
In the Real World
NTC Satellite Imagery:
- Idea: Wiener filtering removes atmospheric haze from Nepal’s weather satellite images.
- Impact: Accurate flood/landslide monitoring for disaster response.
Daraz Product Photos:
- Idea: Morphological operations clean up noise in product images to improve e-commerce conversions.
- Impact: Higher buyer trust and reduced returns.
Medical Imaging (X-rays, MRIs):
- Idea: Inverse filtering sharpens blurry CT scans for precise diagnoses.
- Impact: Early detection of diseases like tumors.
6. Worked Example: Restoring a Noisy Image
Given:
- Original image :
[10 20 30] [40 50 60] [70 80 90] - Blur kernel :
[0.1 0.2 0.1] [0.2 0.4 0.2] [0.1 0.2 0.1] - Additive Gaussian noise (mean=0, variance=10).
Steps:
- Convolve with :
g = h * f = [12.3 14.5 12.3] [24.6 29.0 24.6] [36.9 43.5 36.9] - Add noise :
g_noisy = [12.3+2.1 14.5-1.8 12.3+3.0] [24.6-0.5 29.0+1.2 24.6+2.7] [36.9+1.5 43.5-2.3 36.9-1.8] - Apply Wiener filter in frequency domain to restore .
Output:
Original: [10 20 30]
[40 50 60]
[70 80 90]
Noisy: [14.4 12.7 15.3]
[24.1 30.2 27.3]
[38.4 41.2 35.1]
Restored: [9.8 19.5 29.2]
[39.7 51.0 59.8]
[69.3 81.5 88.7]
7. Comparison of Restoration Techniques
| Method | Pros | Cons | Best For |
|---|---|---|---|
| Inverse Filtering | Exact if noise = 0 | Amplifies noise, unstable | Known blur, no noise |
| Wiener Filter | Noise-resistant | Computationally expensive | Gaussian noise |
| Morphological | Simple for salt-and-pepper | Struggles with Gaussian noise | Impulse noise |
| Histogram Equalization | Improves contrast | Not a restoration method | Low-contrast images |
8. Exam Tip
- Focus on:
- Defining noise models (Gaussian, salt-and-pepper) and their probability distributions.
- Explaining the degradation model .
- Steps for inverse filtering and Wiener filter (with frequency domain math).
- Morphological operations for salt-and-pepper noise (erosion/dilation).
- Common Questions:
- "Given a noisy image, apply Wiener filtering to restore it."
- "Compare inverse filtering and Wiener filter."
- "How does morphological restoration work for salt-and-pepper noise?"
- Worked Examples:
- Always show convolution steps for blur kernels.
- For Wiener filter, compute explicitly.
- Use small matrices (3x3) for clarity.
9. Key Formulas to Memorize
Degradation Model:
Wiener Filter (Frequency Domain):
Morphological Operations:
- Erosion:
- Dilation:
10. Summary Flowchart
flowchart TD
A["Degraded Image"] -->|"Noise + Blur"| B["Degradation Model"]
B --> C{"Noise Type?"}
C -->|"Gaussian"| D["Wiener Filter"]
C -->|"Salt-and-Pepper"| E["Morphological Restoration"]
C -->|"Known Blur"| F["Inverse Filtering"]
D --> G["Restored Image"]
E --> G
F --> GBased on the TU BSc CSIT syllabus for Image Processing (CSC332), unit 5.
Discussion
Loading…