Hello I am doing a face recognition using pca and eigenfaces using a neural network.
this is my code
here m is a 10344x360 matrix columns are images converted in to vectors (360 images) out of 400 images dataset(s1 s10... s40 s5 ss7 s8 s9)
mean_face = mean(m, 2);
shifted_images = m - repmat(mean_face, 1, size(m,2));
[evectors, score, evalues] = pca(m);
featurestraineigen = (evectors * shifted_images')';
The problem is when I am writing this piece of code to see the ghost images or eigenfaces its shwowing somewhat differnt images / images from differnt class
This should show mw a ghost image of no 4 image in the the first class s1(each class has different image).But its showing something else (some other class person i think).Is there any problem in my last line? featurestraineigen?
And moreover kindly tell me how to crate the testing set for this how should I convert a new input image from the testing set for multi class classification using neural net?