📄 pcafea.m
字号:
%this function is used to obtain PCA feature of a single image
%feature: obtained pca feature of the immat as return value (m*1 vector)
%immat: the image wati to be processed (n*1 vector)
%averface: average face as parameter (n*1 vector)
%eigenface: eigenface as parameter (n*m matrix)
function feature=pcafea(immat,averface,eigenface)
[idim,iline] = size(immat);
[adim,aline] = size(averface);
[edim,eline] = size(eigenface);
if ( idim~=adim | edim~=adim | idim~=edim )
fprintf(1,'Input parameter error when calculating pca feature!');
pause
end
differ = immat - averface;
feature = eigenface'*differ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -