matlab - how to reconstruct the original Image after modification using SVD -


I decompressed my image using svd and modify the singular values ​​by adding the matrix Suppose, a . How do I return this matrix a .

For example:

  m = [1 2 3; 4 5 6; 7 8 9]; [USV] = SVD (M); A = [0 2 1; 3 5 6; 8 9 4]; SW = s + A; New = u * sh * v;  

How can I return the matrix a new from the matrix a

To reconstruct a from your SVD given by < u , s , div class = "text-post" itemprop = " Text ">

v you will use

  m_rec = u * s * v ';  

Then just replace s with sw in your case:

  m_rec = u * Sw * v ';  

That is, you are missing a conjugate transpos ( ') only in your matrix new .

However, the changes you apply to s are too large, and it's also not diagonal, so you're not properly rebuilding m For example if you were small enough to modify:

  & gt; & Gt; Sw = s + diag (.1 * randn (1,3)); & Gt; & Gt; M_rec = u * sw * v 'm_rec = 0.9987 1.9977 3.0348 4.0070 5.0543 6.0256 7.0533 8.0348 9.0543  

Comments