This project provides an interactive desktop application for comparing different image denoising algorithms on grayscale images corrupted by various types of noise. The primary goal is to demonstrate the strengths and limitations of each denoising technique across different noise scenarios.
Image denoising is a fundamental problem in digital image processing with applications in:
- Medical imaging (MRI, CT scans)
- Satellite and astronomical imagery
- Photography and video enhancement
- Computer vision preprocessing
Key Questions This Project Addresses:
- Which denoising algorithm performs best for each type of noise?
- How do classical spatial filters compare to frequency-domain methods?
- When does wavelet-based denoising excel, and when does it fall short?
- What are the trade-offs between processing time and quality?
Through hands-on experimentation, this project reveals that:
- Wavelet transform excels on additive Gaussian noise (AWGN) with superior edge preservation
- Gaussian/Median filters work better on salt-and-pepper and speckle noise
- No single algorithm is universally optimal โ the choice depends on noise characteristics
- Median Filter โ Non-linear filter, excellent for salt-and-pepper noise
- Gaussian Blur โ Spatial smoothing filter
- Fourier Transform โ Frequency-domain low-pass filtering
- Wavelet Transform (DWT) โ Multi-resolution analysis with BayesShrink/VisuShrink thresholding
- AWGN (Additive White Gaussian Noise) โ Constant variance across the image
- Salt-and-Pepper โ Random black/white pixel corruption
- Speckle โ Multiplicative noise (signal-dependent)
- Poisson โ Shot noise (common in low-light conditions)
- Real-time algorithm parameter tuning
- Side-by-side comparison (Clean | Noisy | Denoised)
- Auto-tune feature to find optimal parameters
- Capture and report generation for documentation
- Instant PSNR and SSIM metrics
ImageDenoising-Discrete-Wavelet-Transform/
โโโ denoisers/
โ โโโ median.py # Median filter implementation
โ โโโ gaussian.py # Gaussian blur denoiser
โ โโโ fourier.py # Fourier frequency-domain denoiser
โ โโโ wavelet.py # Wavelet DWT denoiser (BayesShrink)
โ โโโ noise_transforms.py # Log/Anscombe transforms
โโโ ui/
โ โโโ desktop_app.py # Main Tkinter GUI application
โ โโโ backend.py # Denoiser execution wrapper
โ โโโ reporting.py # Report generation (images + JSON)
โโโ scripts/
โ โโโ data_gen.py # Synthetic dataset generation
โ โโโ utils.py # Metrics (PSNR, SSIM, MSE)
โโโ data/ # Generated noisy test images
โโโ results/ # Denoised outputs and reports
โโโ requirements.txt # Python dependencies
python -m pip install -r requirements.txt# Make sure to set PYTHONPATH for imports
$env:PYTHONPATH="B:/Academia/Projects/Image Denoising"
python -m ui.desktop_apppython scripts/data_gen.pyThis creates noisy versions of test images in the data/ folder with all four noise types.
- Select an image from the dropdown (e.g.,
astronaut_awgn,bars_saltpepper) - Choose an algorithm (median, gaussian, fourier, wavelet)
- Adjust parameters using the sliders/dropdowns
- Click "Run" to denoise and view results
- Use "Auto-tune" to find optimal parameters automatically
- Click "Capture" to save the current result
- Click "Report" to generate a comparison report with all captured frames
Excels on AWGN:
- PSNR: 28-35 dB (vs 25-30 dB for Gaussian)
- SSIM: 0.85-0.95 (excellent structural preservation)
- Superior edge preservation compared to spatial filters
Poor on Speckle/Multiplicative Noise:
- PSNR: 20-26 dB (worse than Gaussian/Median)
- SSIM: 0.55-0.68 (significant quality degradation)
- Reason: Wavelet assumes constant noise variance (additive model), but speckle is signal-dependent (multiplicative)
| Noise Type | Best Algorithm | Runner-up |
|---|---|---|
| AWGN | Wavelet | Gaussian |
| Salt-and-Pepper | Median | Wavelet |
| Speckle | Gaussian | Median |
| Poisson | Gaussian | Wavelet |
- Basis Functions: db1 (Haar), db4, sym4, sym8
- Decomposition Levels: 3-6 levels
- Thresholding Methods:
- BayesShrink: Adaptive threshold based on subband statistics
- VisuShrink: Universal threshold (more aggressive)
- Noise Estimation: MAD (Median Absolute Deviation) on finest detail coefficients
- PSNR (Peak Signal-to-Noise Ratio): Higher is better, measured in dB
- SSIM (Structural Similarity Index): 0-1 scale, closer to 1 is better
- MSE (Mean Squared Error): Lower is better
The application generates reports containing:
- Side-by-side comparison images (Clean | Noisy | Denoised)
- Denoised metrics: PSNR, SSIM, MSE of denoised vs clean
- Noisy metrics: PSNR, SSIM, MSE of noisy vs clean (baseline)
- Algorithm parameters used
- Processing time
- JSON metadata for further analysis
Reports are saved in results/reports/<report_name>/
This project demonstrates:
- Multi-resolution analysis with wavelet decomposition
- Frequency vs spatial domain processing trade-offs
- Adaptive vs fixed thresholding strategies
- Impact of noise characteristics on algorithm performance
- Empirical validation through auto-tune experimentation
- Python 3.13
- PyWavelets โ Wavelet transform library
- NumPy โ Numerical computing
- SciPy โ Signal processing
- scikit-image โ Image metrics and processing
- Tkinter โ Desktop GUI framework
- Matplotlib โ Visualization
- Pillow โ Image I/O
- D. L. Donoho and I. M. Johnstone, "Ideal spatial adaptation by wavelet shrinkage," Biometrika, 1994
- S. G. Chang, B. Yu, and M. Vetterli, "Adaptive wavelet thresholding for image denoising," IEEE Trans. Image Processing, 2000
- PyWavelets Documentation: https://pywavelets.readthedocs.io/
Test images sourced from scikit-image data collection.
Note: This project focuses on grayscale image processing for clarity in comparison and educational demonstration.