Image compression using Singular value decomposition (SVD) used in MATLAB which compress images using linear algebra

- Setup Environment
- Open MATLAB.
- Place the image file you want to compress in the current working directory.
- Provide Input
- Enter the name of the image file to be compressed.
- Note: all compressed outputs will be saved in JPEG format.
- Processing Time
- Larger images may take longer to process and compress.
- Compression via PCA
- The program generates multiple compressed versions using Principal Component Analysis (PCA).
- By default, outputs are created with 2, 5, 10, and 20 components.
- After these results are shown, you’ll be prompted to enter additional values.
- Fewer components = higher compression but lower image quality.
- More components = reduced compression but improved clarity.
- Performance Note
- Expect slightly longer runtimes for bigger image files.
- Final Output
- And that’s it — your compressed JPEG images are ready! 🎉