## Exercise 2, Problem 3

Moderator: Computer Vision

tanne
Endlosschleifenbastler
Beiträge: 162
Registriert: 30. Sep 2008 16:05

### Exercise 2, Problem 3

Load all face images from the yale faces/ subdirectory of the ZIP file, and perform PCA on them. Each face image has over 8000 pixels and there are many fewer training images than this. Consequently, you want to use SVD as we discussed in class; in particular you want to use the “economy mode” ([U,S,V] = SVD(X,0) in Matlab).
so we shouldn't create the covariance matrix (8064x8064) and do pca/svd on it, instead applay pca/svd directly on our images (760x8064)? so not the 'normal' way for eigenfaces?

qgao
Moderator
Beiträge: 33
Registriert: 7. Apr 2009 11:38

### Re: Exercise 2, Problem 3

I think your understanding is right.

tanne
Endlosschleifenbastler
Beiträge: 162
Registriert: 30. Sep 2008 16:05

### Re: Exercise 2, Problem 3

okay, thanks.

tanne
Endlosschleifenbastler
Beiträge: 162
Registriert: 30. Sep 2008 16:05

### Re: Exercise 2, Problem 3

another question, Problem 4.

for calculating the likelihood as it is described in the task, we now need the 'real' covariance matrix, 8064x8064.
and we need the eigenvalues and eigenfaces of it, but the matrix is too big to use svd. and also we cant use our
20 dimension subspace of problem3, which we should use there too.
in problem3 we should use svd on our images, as asked before. but this image matrix isn't squard, so we can't compute 'det' of it,
which we have to do for the likelihood.
so, which matrix should we use for the input of the likelihood function?

qgao
Moderator
Beiträge: 33
Registriert: 7. Apr 2009 11:38

### Re: Exercise 2, Problem 3

tanne hat geschrieben:another question, Problem 4.

for calculating the likelihood as it is described in the task, we now need the 'real' covariance matrix, 8064x8064.
and we need the eigenvalues and eigenfaces of it, but the matrix is too big to use svd. and also we cant use our
20 dimension subspace of problem3, which we should use there too.
You CAN use svd in the same way as in problem 3. These exists direct relation between svd and eigenvalues.

tanne hat geschrieben:in problem3 we should use svd on our images, as asked before. but this image matrix isn't squard, so we can't compute 'det' of it,
which we have to do for the likelihood.
so, which matrix should we use for the input of the likelihood function?
As mentioned in the problem, you may ignore computing det(\Sigma) as it is in the normalization term.

Stumpf.Alex
Nerd
Beiträge: 643
Registriert: 1. Okt 2007 12:40
Kontaktdaten:

### Re: Exercise 2, Problem 3

Just another basic question:

How to get these 72960 single files loaded properly in matlab? I can just "open" a single file and I will get the face as image. But i can't use the "open" command in matlab code, because it opens everytime (=72960 times) the "Import Wizard".

tanne
Endlosschleifenbastler
Beiträge: 162
Registriert: 30. Sep 2008 16:05

### Re: Exercise 2, Problem 3

Stumpf.Alex hat geschrieben:Just another basic question:
How to get these 72960 single files loaded properly in matlab? I can just "open" a single file and I will get the face as image. But i can't use the "open" command in matlab code, because it opens everytime (=72960 times) the "Import Wizard".
72960 files? i have 760 image files..