Question: Problem 2 : Image compression and SVD Singular Value Decomposition ( SVD ) is a very useful tool in data analysis. In this exercise, you

Problem 2: Image compression and SVD
Singular Value Decomposition (SVD) is a very useful tool in data analysis. In this exercise, you will
use SVD to compress image. Implement the following steps in Matlab.
1. Load the clown image. You can use the following command load clown.mat. Look at what are
loaded in the workspace.
2. Do an SVD decomposition on the X matrix.
3. Find the rank k approximation of X, for k =5,15,25. Denote the rank k approximation of
X as Xk.
4. Generate the image for Xk using the command image(Xk).
If you are using Python, you can use the numpy and matplotlib packages. For example, you
can use X = np.loadtxt("clownImage.txt") to load the matrix of the clown image, and use
plt.gray(), plt.imshow(X), and plt.show() to display the image from the matrix X. Besides, the
package numpy also provides a quick command to do the SVD decomposition of a matrix.
You should submit your code (Matlab or python) and the images.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!