📄 facelocation.m
字号:
function [pos,s] = facelocation(p,s)
s=s(:,find(p(:,3)>0.2));
p=p(find(p(:,3)>0.2),:);
p=[p s'];% attaching samples to every face positive-p
p=sortrows(p,3);
p=p(size(p,1):-1:1,:);
%optional: if there are other "facelike" in the area of the face -> delete them
for i=1:size(p,1)-1
oldsize=size(p,1);
tmp=p(1,:);
p=[tmp;p(find((abs(p(:,1)-tmp(1,1))>10)|abs((p(:,2)-tmp(1,2)))>10),:)];
if (size(p,1) == oldsize)
break
end
end
pos=p(:,1:2);%pos=[posy,posx]
s=p(:,4:size(p,2));
s=s';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -