clean_model.m
来自「一种基于肤色和模板的人脸检测源代码算法。」· M 代码 · 共 21 行
M
21 行
% cleans the edges of the model image after it has been rotated.function model = clean_model(model)[m n] = size(model);% cleans from left to right for i=1:m, nfound = 0; for j=1:n, if (model(i,j) < 95 & nfound == 0) model(i,j) = 0; end; if (model(i,j) >=95 & nfound == 0) nfound=1; end; end; end; % cleans from right to left for i=1:m, nfound = 0; for j=n:-1:1, if (model(i,j) < 80 & nfound == 0) model(i,j) = 0; end; if (model(i,j) >=80 & nfound == 0) nfound=1; end; end; end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?