Вы находитесь на странице: 1из 2

EE511 Project 1

Problem 1: Image compression using PCA – Strategy 1

- Load ‘mandrill’
- Convert it into a gray scale image
- Treat rows of the image as variables and columns as observations.
- Apply PCA to the data matrix (after appropriate mean-subtraction)
o Use “imagesc” function to visualize Y and V matrices.
o Comment on why the first principal component should be the most important, given the
distribution of intensities in rows of the actual image.
o Comment on whether the “eigen-columns” (i.e. principal component directions) can be
thought of as the ingredients that can be combined to generate individual columns of
the images.
o Comment on whether the principal components can be thought of as the ingredients
that can be combined to generate individual rows of the images.

- Reconstruct the image using different number of principal components.


o What parts of the image are reconstructed with most/least accurately when a small
number of principal components is used for reconstruction?
o Compare the number of parameters needed for each reconstruction with number of
parameters to describe the original image.

Problem 2: Image compression using PCA – Strategy 2

- Load ‘mandrill’
- Convert it into a gray scale image
- Divide the image into blocks with size 10x10
- Treat individual locations within a block as variables. Their values for different blocks are
observations. Create a data matrix according to this scheme.
- Apply PCA to the data matrix (after appropriate mean-subtraction)
o Find a way to visualize principal component directions and principal components
 The principal component directions, i.e. eigenvectors should be reshaped and
displayed as 10x10 blocks. Why is this particular visualization suitable in this
case?
 The principal components should be displayed as mxn matrices (in accordance
with position of the blocks within the images). Why is this particular
visualization suitable in this case?
o Comment on why the first principal component (and principal component direction)
should be important, given the distribution of intensities in the original image.
o Comment on whether the “eigen-blocks” (i.e. principal component directions) can be
thought of as the ingredients of the image.
o Comment on whether the principal components can be thought of as the ingredients of
the image.

- Reconstruct the image using different number of principal components.


o What type of detail is added when individual components are included for
reconstruction? (You’ll need to look at the reconstructions and the “eigen-blocks” to
answer this question).
o Compare the number of parameters needed for each reconstruction with number of
parameters to describe the original image

Repeat for block-sizes 5x5 and 20x20. Which block-size will you prefer for data compression?

Problem 3: (PCA as rotation)

Load p3.mat. “X” contains a binary image of a fingerprint.

Your job is to utilize PCA to “correct” the alignment of the image. Think of the binary image as
“scatter plot” of random variables X and Y. The origin of the scatter plot is pixel (0, 0). X and Y
increase in up-down and left-right directions respectively.

Вам также может понравиться