You should use the same eigenspace obtained with the training data.
Here you have a tutorial that explains it very well. These are the main steps:
Training:
% step: 1: find the mean image
mean_face = mean(images, 2);
% step 3 : calculate the eigenvectors and eigenvalues
[evectors, score, evalues] = princomp(images');
Testing:
% calculate the feture vector
feature_vec = evectors' * (input_image(:) - mean_face);
As you can see evectors
and mean_face
were coputed during the training stage.