SVD vs DCT: Image compression

PhiWhyyy!?!
4 min readSep 3, 2024

--

An interesting combat of whether to use SVD or DCT in Image Compression❤

Image compression plays a crucial role in the digital storage and transmission of images over the Internet. Different methods are used for encoding and compressing image data, to find a balance between compression efficiency and image fidelity. Singular Value Decomposition and Discrete Cosine Transform are two popular methods used for image compression.

DCT or Discrete Cosine Transform is a popular method for image compression mostly because of its versatility. It is widely used in image compression algorithms such as JPEG, as it provides a high degree of energy compaction. This means that a large amount of the image data can be represented by a smaller number of coefficients, resulting in high-quality compression.

DCT Methodology

DCT methodology involves breaking down an image into small blocks, typically 8x8 pixels, and then applying the DCT transformation to each block.

DCT transforms the image from the spatial domain to the frequency domain. This transformation is done by dividing the image into blocks and applying the DCT to each block. The DCT coefficients are then quantized and encoded using entropy coding to achieve compression.

image compression
Photo by Joshua Hoehne on Unsplash

SVD Methodology

SVD or Singular Value Decomposition is a matrix factorization technique that can be used for image compression. The SVD of an image matrix A is given by A = USV’, where U and V are orthogonal matrices, and S is a diagonal matrix containing the singular values of A .

One of the key advantages of SVD is its flexibility . SVD can be used to obtain a low-rank approximation of an image, which can then be used for image compression. By keeping only the first k singular values and their corresponding singular vectors, we can obtain a rank-k approximation of the image that captures most of the image energy.

The use of SVD for image compression is beneficial as it provides a high degree of energy compaction, similar to DCT. I prefer Singular value decomposition ie SVD for numerous reasons-primarily because

SVD can outperform DCT in certain cases, especially for images with less structure and more complex content. The flexibility of SVD allows it to adapt to the specific characteristics of the image, leading to potentially better compression performance in some scenarios.

Another advantage of SVD is its robustness. SVD-based methods are less sensitive to noise and can provide a more stable representation of the image data.

image compression
Photo by Sam Balye on Unsplash

SVD Methodology SVD, on the other hand, decomposes the image into its constituent parts, namely the singular values and singular vectors. These singular values correspond to the amount of energy contained in each component, with lower singular values representing less important information.

SVD offers several advantages over DCT for image compression such as flexibility, low-rank approximation, high-quality compression, and energy compaction. SVD allows for more flexibility in selecting the desired level of compression by choosing the number of singular values to retain. This flexibility allows for a trade-off between compression ratio and image quality, making SVD a suitable choice for applications where preserving image fidelity is important.

Additionally, SVD provides a low-rank approximation, which means that it can effectively capture and represent the most important features of the image with a reduced number of singular values. This leads to efficient compression without significant loss of information or image quality. By using SVD for image compression, the process involves finding the optimal approximation of the image in terms of the singular values and vectors. This optimal approximation results in high-quality compression, as it retains the most important information and eliminates redundant or less important details.

Overall, while DCT is a widely-used method for image compression, I prefer SVD due to its flexibility, ability to provide high-quality compression with energy compaction and low-rank approximation.

In summary, I choose SVD for image compression because it offers flexibility, allows for low-rank approximation, provides high-quality compression with energy compaction.

Just a few citations of some amazing scientists who helped me realize how womderful the methods are.

https://ieeexplore.ieee.org/document/9232462

https://www.sciencedirect.com/science/article/pii/S1877050916314843?via%3Dihub

Hope to see you soon❤

--

--

PhiWhyyy!?!
PhiWhyyy!?!

Written by PhiWhyyy!?!

Math Grad||Research Enthusiast||Interested in Mathematics & Cosmos<3 |Open to paid gigs >dm https://www.linkedin.com/in/sreyaghosh99/

No responses yet