Re: Is it error when use PCA to recognize trained face image. Why?
- From: "Ru Bu" <ruwanb@xxxxxxxxxxx>
- Date: Sat, 10 May 2008 12:48:03 +0000 (UTC)
Bo I am using the same code....for PCA and then trying to
archive the same....to do a face recognition using
that....could you please....let me know whether you were
able to do this.....if so...would you be kind enough to
share it with me? (ruwanb(nospam)@gmail.com)
Thanks in advance.....
"Bo Dai" <db804@xxxxxxx> wrote in message
<fvqu86$q7r$1@xxxxxxxxxxxxxxxxxx>...
Hi, All,
I used the codes in http://www.cs.ait.ac.th/~mdailey to make
pca eigfaces. And the train images are att face database.
[images,w,h]=load_images('AttFace.dat');
[Vecs,Vals,Psi] = pc_evectors(images,30);
Proj = Vecs' * images;
Then I use one of the train image(s1\1.pgm) to calculate the
distance between the eigvectors as follows:
nstr='att_faces\s1\1.pgm';
f=imread(nstr);
f2=reshape(f,m,1);
Vecs=double(Vecs);
f2=double(f2);
Psi=double(Psi);
%get the weights wk of the eigfaces to the new image
npro=Vecs'*(f2-Psi)
%m1 is the size of the image, m2 is the number of the train
%images
[m1,m2]=size(Proj)
for i=1:m2
dist(i)= norm(Proj(:,i)-npro(:));
end;
[dist_min2,index2]=min(dist)
If it's right, index2 should be 1, but the result is 22.
I don't know why.
Can you help me ?
.
- References:
- Prev by Date: Face Recogniton using EigenFaces
- Next by Date: Re: Variable Problem
- Previous by thread: Re: Is it error when use PCA to recognize trained face image. Why?
- Next by thread: Clear all button in gui
- Index(es):
Relevant Pages
|