eyemouthfeasibility.m

来自「It is for Face Recognition」· M 代码 · 共 26 行

M
26
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function eyeMouthFeasibility()
%   z.li, 11-10-2003.
%   left-right eyes and mouth triangle feasibility based on
%   1) scale info
%   2) triangle ratio of [a/d, b/d]'s distribution
%   3) area ratio of [tri(le, m, c), tri(re, m, c)]'s distribution
% function dependency:
%   n/a
% input:
%   lEye    - [(1)left/right='L', (2)scale, (3)x, (4)y, (5)w, (6)h] tuples
%   rEye    - [(1)left/right='R', (2)scale, (3)x, (4)y, (5)w, (6)h] tuples
%   mouth   - [(1)reserved,   (2)scale, (3)x, (4)y, (5)w, (6)reserved] tuples
% output:
%   thres   - [0, 1] confidence level.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%function [thres] = eyeMouthFeasibility(lEye, rEye, mouth)
function [thres] = eyeMouthFeasibility(lEye, rEye, mouth)
 %const
 %var
 d = norm(lEye(3:4)-rEye(3:4));
 a = norm(lEye(3:4)-mouth(3:4));
 b = norm(rEye(3:4)-mouth(3:4));
 c = 0.5*(lEye(3:4)-rEye(3:4));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?