Tsai, I forgot to mention that Sb should be multiplied by the number of pcitures per class (in this case 2), you are right on that too. Refer to section 2.4 of the following paper to note the error: http://www.face-rec.org/algorithms/LDA/belhumeur96eigenfaces.pdf
If you guys would like to look at another sample Matlab code for fisher faces, look at:
http://dailyburrito.com/projects/facerecog/FaceRecReport.html
Tsai there is a mistake indeed; the order of the eigenvectors is backwars, and you are using the eigenvectors with less relevance.
In line 43 of FisherfaceCore.m, you have to substitute line 43:
"for i = 1 : P-Class_number"
for
"for i = P:-1:Class_number+1"
This will solve the problem. I tested with all the faces in the sample set, and it was 90% accurate.
Everything has been working perfectly, thanks for an excellent and well commented code Amir!
And the PCA, the eigen vectors selected should be corresponding to the largest eigen values but in the source code it is opposite,
my email is: chaizhh@gmail.com
expect to dicuss with u:)
Comment only