Patch-based Image Denoising via Higher Order SVD

Jan 1, 2025 · 2 min read
projects

A near complete implementation of the method in the paper “Image Denoising using the Higher Order Singular Value Decomposition”. This project uses the Python language and vast libraries to apply this algorithm for grayscale images, and evaluates it by applying the method on the dataset “CBSD68” and calculating different image-difference scores.


This project a Python implementation of patch-based image denoising using Higher Order Singular Value Decomposition (HOSVD), based on the method introduced in:

“Image Denoising using the Higher Order Singular Value Decomposition”
Ajit Rajwade, Anand Rangarajan, and Arunava Banerjee.
IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013.

Denoising example


Methodology

The algorithm works by:

  1. Partitioning images into overlapping 8×8 patches
  2. Grouping similar patches using spiral window search
  3. Constructing 3D tensors for each patch group
  4. Applying HOSVD decomposition
  5. Thresholding core tensor values (hard threshold at τ = σ√(s²K))
  6. Reconstructing denoised patches
  7. Aggregating patches with averaging

Note: Implementation is optimized for grayscale images and omits the Wiener filtering step from the original paper

Evaluation Metrics

We used seven metrics to evaluate denoising performance on the CBSD68 dataset:

MetricFormulaDescriptionIdeal Value
MSE$\frac{1}{MN}\sum_{i=0}^{M-1}\sum_{j=0}^{N-1}[I(i,j)-K(i,j)]^2$Mean Squared ErrorLower is better
RMSE$\sqrt{\text{MSE}}$Root Mean Squared ErrorLower is better
MAE$\frac{1}{MN}\sum_{i=0}^{M-1}\sum_{j=0}^{N-1}\|I(i,j)-K(i,j)\|$Mean Absolute ErrorLower is better
PSNR$10 \cdot \log_{10}\left(\frac{L^2_{\max}}{\text{MSE}}\right)$Peak Signal-to-Noise RatioHigher is better
SSIM$\frac{(2\mu_x\mu_y + c_1)(2\sigma_{xy} + c_2)}{(\mu_x^2 + \mu_y^2 + c_1)(\sigma_x^2 + \sigma_y^2 + c_2)}$Structural Similarity IndexCloser to 1
NRMSE$\frac{\sqrt{\frac{1}{N}\sum_{i=1}^N(x_i - y_i)^2}}{\text{median}(\|x\|)}$Normalized RMSELower is better
UQI$\frac{4\sigma_{xy}\bar{x}\bar{y}}{(\sigma_x^2 + \sigma_y^2)(\bar{x}^2 + \bar{y}^2)}$Universal Quality IndexCloser to 1

References

  1. Rajwade, A., Rangarajan, A., & Banerjee, A. (2013). “Image Denoising using the Higher Order Singular Value Decomposition”.
  2. Feschet, F. (2019). “Implementation of a denoising algorithm based on High‑Order Singular Value Decomposition of tensors
  3. Guo, J., Chen, H., Shen, Z., and Wang, Z. (2022). “Image denoising based on global image similar patches searching and HOSVD to patches tensor
  4. Wang, Z., and Bovik, A. C. (2002). “A universal image quality index
  5. Wang, Z., Bovik, A. C., Sheikh, H. R., and Simoncelli, E. P., “Image quality assessment: From error visibility to structural similarity
  6. CBSD68‑dataset: Color BSD68 dataset for image denoising benchmarks. Available at: GitHub
Pedram Esmaeilpour
Authors
B.S. Candidate in Mathematics and Applications
I’m a mathematics undergrad with a growing interest in computer science. I enjoy solving problems, writing code, and helping others untangle tricky concepts—every experience is a chance to learn something new.