2023-10-12 23:51:06 +00:00
|
|
|
% 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)
|
2023-10-21 21:42:47 +00:00
|
|
|
imagesc(reshape(faces_data(i,1:end-1),32,30)')
|
2023-10-12 23:51:06 +00:00
|
|
|
|
|
|
|
end % Function end
|