13 lines
No EOL
368 B
Matlab
13 lines
No EOL
368 B
Matlab
% implements Eigenfaces, returns nothings but displays a plot of the first
|
|
% 5 eigenvectors
|
|
function [] = Eigenfaces(training_data, test_data)
|
|
|
|
% stack data
|
|
data = vertcat(training_data, test_data);
|
|
|
|
% TODO: perform PCA
|
|
|
|
% TODO: show the first 5 eigenvectors (see homework for example)
|
|
imagesc(reshape(faces_data(i,1:end-1),32,30)')
|
|
|
|
end % Function end |