Saturday, October 5, 2013

Activity 13 - Image Compression using Principal Components Analysis

This activity aims to compressed an image using a method called Principal Component Analysis.

Like we previously discussed in Activity 4, image sizes is one of the property of an image that is always looked into. Consequently, a much more detailed image produced a much bigger file sizes. 

In this activity we will try to compressed the image using a particular method without the expense of degrading the quality of the image as well as its dimensions. We will also look into how the image is compressed.

What is PCA?

For a sample image compression, I used the following image taken from [2]
Figure 1. Candies image [2]

This jpeg image has a 700x438 dimensions which consists of a wide variety of colors. This image is converted to the following gray-scaled image using the function rgb2gray()
Figure 2. Gray-scaled image of Figure 1.

With the same dimensions, this gray-scaled image has a file size = 77.6 KB

Using the PCA we obtained reconstructed images with varying PC,


Figure 3. PC =5, 60.4KB

Figure 4. PC = 10, 68.7KB
Figure 5. PC = 25, 75 KB
Figure 6. PC = 50 77.5 KB



Figure 7. Comparison of Gray-scaled(left) image(77.6KB) and PC =100 reconstructed (right) image (76.3KB)

The results showed a slightly lower file size. See that there almost no visible difference unlike the previous samples. I think the objective of this activity is sufficed. Maybe next time i could try a much bigger image, so we can really see a significant change in the size due to compression. I guess a 77.6KB image is maybe a small file for the grayscale of a very colorful object.


References:
[1]AP 186 Handouts. Activity 13 - Image Compression using Principal Components Analysis. Maricor Soriano 2013
[2]http://good-wallpapers.com/misc/12162
------------------------------------------------------------------------------------------------------
Even though I understand the methods, I really dont know how to explain it here, sorry for the poor discussion. I think i can have a grade of  6 or 7 for producing the desired output. I guess I'll go back to this activity next time to improve the discussion.

No comments:

Post a Comment