MATLAB SVD and image compression for Matlab

AI Thread Summary
Resources for image compression using SVD in MATLAB predominantly focus on converting color images to grayscale first, as the SVD algorithm is designed to work with single-value pixel representations rather than RGB triplets. The rgb2gray function is commonly used to eliminate hue and saturation while retaining luminance during this conversion. While some users seek methods to compress color images directly, the consensus is that the standard approach requires grayscale conversion. Alternatives may involve using software that saves color channels separately, but merging them back into a usable format could pose challenges. Overall, the discussion emphasizes the limitations of applying SVD directly to color images in MATLAB.
matqkks
Messages
280
Reaction score
5
Are there any resources which use Matlab to image compress a colour image using SVD? I can only find information where I need to convert to gray scale first.
 
Physics news on Phys.org
Here's what MATLAB says about the conversion:

https://www.mathworks.com/help/matlab/math/image-compression-with-low-rank-svd.html

In their example, they also do the image to grayscale conversion via rgb2gray() after reading in the image. I'm thinking that has to be done because the SVD algorithm won't work with colors which are represented as triplets as in (R,G,B) formulation whereas a grayscale is a single value for each pixel.

According the MATLAB:
the rgb2gray(RGB) converts the truecolor image RGB to the grayscale image I. The rgb2gray function converts RGB images to grayscale by eliminating the hue and saturation information while retaining the luminance. If you have Parallel Computing Toolbox™ installed, rgb2gray can perform this conversion on a GPU.
 
  • Like
Likes Greg Bernhardt
If you have Image Processing software that can save the colors indiviually to separate files that could be a solution. Merging the compressed color layers back to something usable may not be possible though.
 

Similar threads

Replies
2
Views
3K
Replies
32
Views
4K
Replies
4
Views
2K
Replies
1
Views
2K
Replies
4
Views
2K
Back
Top