⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clean_model.m

📁 基于MATLAB的人脸检测程序
💻 M
字号:
% 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -