Computing Eigenvalues and Eigenvectors of images set
Encoding Face Images with a Linear Combination Key (KL decomposition)
Decoding a Key into an Image (reconstruction)
Comparing images using key, searching for similar images.
Easy to grasp, straightforward, with nice visualization.
24 Aug 2008
troy rainmaker
Works fine. Short and efficient.
20 May 2008
Anton Kylling
Just what i needed to debug my own code
22 Dec 2007
mahmoud sayed
08 Nov 2007
ma ng
it's ok
29 Sep 2007
christian cabrera
Ithink it would work i just have found it and i think i need the database you have in the link but ist is broken i Would like to know if you can send me the files or xplain somewhere hhow do we have to choose the data base... Thanks ...
02 Aug 2007
swathi reddy
The MATLAB script is excellent. It helped me a lot for my class project. ThankYou so much Alex chirokov. nice job :)
22 Feb 2007
chat sang
it ok
26 Dec 2006
venki raj
nice to work with
16 Jun 2006
wei zhang
The codes are effective in detecting human
faces
18 Apr 2006
l l
Error in ==>\KarhunenLoeve.m
On line 19 ==> x = double(x)/255;
%convert to double and normalize
can not work! anyone help me?
21 Mar 2006
K GOPAL
Quite Appreciable Work.....
13 Mar 2006
Jerome Bahans
Very clear, interesting, perfect !
06 Jan 2006
Agu Osoka
Just skimmed through and it works fine. Good stuff!!!
31 Oct 2005
Mutaz Shukair
Really very great function, I liked it specially it is easy to follow up and to understand.
07 Apr 2005
Alexandre Chirokov
Dear Paul Silvanovich
this line needed to normalize vectors
V = x*V*(abs(D))^-0.5;
[V,D] = eig(cov_mat);
returns unit eigen vectors.
V = x*V; !this line will produce non-unit vectors
one way to normalize them is to do this
V = x*V*(abs(D))^-0.5;
(but this is not the only way)
check it with: norm(V);
06 Apr 2005
Alex Chirokov
Dear Paul Silvanovich
The algorithm to transform images into eigenfaces is described well in Turk and Pentland [1], but I will describe it briefly here. Each image could be represented as a matrix of MxN pixels, with each element an 8-bit grayscale value. If all images are represented as such, they can each be turned into a vector of length MN. Next, the average face can be found, and each image can then be represented as a difference from the average. The difference vectors can then all be used as columns in a matrix A (matrix x in the code). The eigenfaces are then the eigenvectors of the covariance matrix C = A*A' (A' - is the transpose of A). However, since images are very high dimensional, the covariance matrix is likely quite large (if images are 92x112, C will be huge 10304x10304 ), thus a straightforward eigenvector computation is prohibitively expensive.
This problem can be solved by noticing that in the equation
A*A'*A*vi = u*A*vi,
the eigenvectors of C are A*vi, where vi are the eigenvectors of A'*A, which is a square matrix with dimension equal to the number of images in the data set. Since the number of images in the data set is usually much less than the size of an image, this computation is likely to be tractable.
[1] M. Turk, and A. Pentland, ?Eigenfaces for Recognition,? Journal of Cognitive
Neuroscience, vol. 3, no. 1, pp. 71-86, 1991.
31 Mar 2005
Paul Silvanovich
What for in KarhunenLoeve.m
V = x*V*(abs(D))^-0.5; ?
29 Mar 2005
low weiwei
i like it!
27 Feb 2005
Anas Qutieshat
very intersting :)
but found it hard to go through the code
Updates
07 Nov 2005
Code was updated to find the most similar and the most different faces. Also distance map of face database is now computed and shown.