SVD is used for many more purposes than this. In fact, it turns out that SVD is an instrumental step when finding the PCA, and the two are almost equivalent. But, for now, we will look at how we can use SVD for image compression:
- So, we are going to import a bunch of functions, such as NumPy, the linalg module of NumPy, the Image object from PIL, and the pyplot function from matplotlib, as follows:
- So, let's go ahead and look at this image of a frog:
Notice that I've normalized all the RGB entries of this image ...