?? isface.m
字號:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function isFace()
% z.li, 05-25-2004
% face prob based on multiple local SVM classification
% function dependency:
% - n/a
% input:
% fmj, nfmj, Rj - model j: nxd.
% x1, x2, x3 - unknown image: 1xd
% output:
% p - prob of face
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%function [p]=isFace(fm1, nfm1, R1, fm2, nfm2, R2, fm3, nfm3, R3, x1, x2, x3)
function [p]=isFace(fm1, nfm1, R1, fm2, nfm2, R2, fm3, nfm3, R3, x1, x2, x3)
% const
method = 'quadratic';
% build 3 local models
[X1, Y1, err1, m11, m12]=buildLocalModel(x1, R1, fm1, nfm1, method);
[X2, Y2, err2, m21, m22]=buildLocalModel(x2, R2, fm2, nfm2, method);
[X3, Y3, err3, m31, m32]=buildLocalModel(x3, R3, fm3, nfm3, method);
% boosting the classification
c1=classify(x1, X1, Y1, method);
c2=classify(x2, X2, Y2, method);
c3=classify(x3, X3, Y3, method);
C=[c1, c2, c3];
% simple min err classify
[minErr, indx]=min([err1, err2, err3]);
if C(indx(1))== 1
p = 1.0;
else
p = 0;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -