Friday, October 14, 2011

Image Compression


In this activity we will use principal component analysis (PCA) in order to compress an image.

First, we convert the image to grayscale as shown below:

The image is then cut up to 10x10 blocks and concatenated which is then fed to the PCA algorithm.

From this we get the eigenvalues of the image as shown below:


From this we reconstruct the image using different number of principal components:


It can be observed that the less principal components we use, the more the image is degraded. However by increasing the number of used eigenimages, we also increase the size of the image.


This activity was a bit confusing but I was able to do it in the end so I give myself a 9/10

No comments:

Post a Comment