Download this file
1 2 3 4 5 6 7 8 9 10 11 12 13 14
"""Low-rank approximations for images""" import scipy as S import pylab as P from scipy.plt import lena # Set grayscale colormap P.gray() # load lena into array lena = lena() U,s,Vh = S.linalg.svd(lena) P.plot(s) P.show()