Tuesday, September 6, 2011

Activity 13 – Image Compression

A late submission for a topic that I somewhat did not understand much. Anyway. In this activity, Principal Component Analysis (PCA) were implemented.

The image as shown in Figure 1(a) was gray-scaled, cropped and tiled vertically shown in Figure 1(b).

new text
Figure 1. (a)Original Image and (b)cropped 10x10 image

Next in line was to get the Principal Components (PC) of the image using the function pca of scilab. The eigenvalues and correlation circles are seen in Figure 2.

image
Figure 2. (a) Correlation Circle and (b) Eigenvalue of the PCs

For proper visualization of Figure 1(b), it was tiled into a matrix as shown in Figure 3.

eigen images
Figure 3. Eigen-images of the PCs

The next four images shown in Figure 4 are the reconstruction with the use of 1, 2, 3, and 4 eigenvectors in reconstructing the original image in black & white. The file size of the compressed images were obtained and compared to the file size of the gray-scaled original object.

image

In these four images, only the first image was compressed to 17% of the original image using one eigenimage. The rest of the images becomes bigger in file size using large number of eigenimages due to the white reconstruction along the edges of the object in the image.

I will rate myself with 9.5. This activity was kind of tricky at first but when the code was ok, everything follows.

2 down, 4 to go.. Again, sorry for my laziness because this activity should have been blogged way way before I blogged Activity 12. Thank you for your time. Smile

No comments:

Post a Comment