DWT, SVD, and DCT for Image Compression: MATLAB Implementation

Resource Overview

This is the MATLAB source code developed for a research paper that implements a hybrid image compression algorithm combining Discrete Wavelet Transform (DWT), Singular Value Decomposition (SVD), and Discrete Cosine Transform (DCT) methodologies.

Detailed Documentation

The following MATLAB implementation demonstrates the hybrid image compression approach presented in the research paper, which integrates three fundamental signal processing techniques: Discrete Wavelet Transform (DWT), Singular Value Decomposition (SVD), and Discrete Cosine Transform (DCT). The study primarily investigates the compression efficiency and image quality preservation capabilities of this combined transform approach. The algorithm begins with image preprocessing where the input image undergoes color-to-grayscale conversion using MATLAB's rgb2gray() function, followed by downsampling to standardize dimensions and normalization to scale pixel values between 0 and 1. This preprocessing ensures consistent input format for subsequent transform operations. Following preprocessing, the 2D Discrete Wavelet Transform is applied using wavelet decomposition functions (e.g., wavedec2() in MATLAB) which separates the image into approximation and detail coefficients. These coefficients undergo quantization to reduce precision, then are partitioned into smaller blocks for efficient processing. The block segmentation facilitates localized transform applications and enables parallel computation opportunities. Each coefficient block then undergoes Singular Value Decomposition using MATLAB's svd() function, which factorizes the matrix into three components: U, S, and V matrices. The algorithm strategically separates the S matrix into two subsets: the dominant singular values (representing most significant image information) and the secondary singular values (containing less critical details). This separation allows for selective compression based on significance thresholds. The final stage applies 2D Discrete Cosine Transform via dct2() function to both singular value subsets. The DCT concentrates energy into fewer coefficients, enabling efficient quantization and encoding. The compression process concludes with inverse transformations (idct2(), inverse SVD reconstruction, and inverse wavelet transform using waverec2()) to reconstruct the compressed image from the processed coefficients. Comparative analysis in the research demonstrated that this DWT-SVD-DCT hybrid approach outperformed established compression standards including JPEG2000 (which uses wavelet transforms) and JPEG-LS (lossless JPEG variant) in terms of both compression ratios and reconstructed image quality metrics such as PSNR and SSIM values across various test images.