Single Value Decomposition


Is to decompress the image  using SVD (SINGLE VALUE DECOMPOSITION) and study the observation.


Single value decomposition: decompose the bigger matrix into smaller.

Image of size M x N (M cross N) can be consider as bigger matrix and using SVD we can decompose that into further smaller matrix hence decomposing of image is obtained.

Tools used:

Initially I stared with octave (the high-level language primarily intended for numerical computations) and i proceed well but when tried to convert image to double conversion by im2double function I got an error saying unidentified line . This is because octave has a bug in im2double for uint16 images, I found this piece of information from one of community site forum

So now it a time to play with Mat lab instead of octave .

Observation and legends:

I took two type of image for compression. Sizes of the images are 400×400.

1. An image that covers less details of the snap.


2. An image that covers more details of the snap.


I apply svd so as to obtain U,S,V matrix and changed the K values to both of images to study the observation.

when K = 400

80 %

k400 k400
when K = 300

60 %

k300 K300
when K = 250


k250 K250
when k = 150
k150 K150
quality of image changes
when k = 50
k50 K50
when K =25
5 %
quality of image changes
when k = 12.5

2.5 %

k12 5

Mat lab code :

close all






k=10;     // k values will be changed










print -djpeg ‘lenak.jpg’


Although both images are of same size with same K values, It has been observed that image that coves less details of snap can be decompressed to larger extend than the image that cover more details of the snap.


  1. Diding Nuriska wrote
    at 8:22 PM - 19th February 2011 Permalink

    I want to ask you, I have problem here,,,

    what matrices that we call subspace from SVD factorization?
    is it U,,V or T?
    Thank you

  2. shakthydoss wrote
    at 3:52 AM - 20th February 2011 Permalink

    Yes , you are right
    to be more appropriate it is U V S.
    Where U corresponds to rows , V corresponds to columns and S corresponds to diagonals.

  3. Diding Nuriska wrote
    at 7:55 AM - 20th February 2011 Permalink

    yes, that’s U S V,,,

    do you know what matrices that call subspace?
    is it u s or v???

    thank you…

  4. shakthydoss wrote
    at 12:02 PM - 22nd February 2011 Permalink

    Lets say A be matrix of size m X n , then n columns is a linear subspace of n-dimensional Euclidean space. So it can be V.
    I also believe that there are four fundamental subspace, and row space is one among.If that is going to be case there is a possibly for U S also.

    thank you

Post a Comment

Your email is never published nor shared. Required fields are marked *