• 大小: 5.39MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-02
  • 语言: Matlab
  • 标签: Face  d  

资源简介

基于AdaBoost算法的人脸检测,包含harr特征的训练和data。经过实测是可以运行起来的代码。需要的可自行下载。

资源截图

代码片段和文件信息

% CSCi 5561 Spring 2015 - Semester Project
% Authors: Stephen Peyton Chee Yi Ong
% Team: Who Is This (WIT)
% calcHaarVal.m - computes intensity differences between white/black region of Haar features 
function val = calcHaarVal(imghaarpixelXpixelYhaarXhaarY)
% img: integral image of an input image
% haar: which Haar feature (1-5)
% pixelX/Y: start point in (XY)
% haarX/Y: Haar feature size in X and Y directions

% getCorners() finds the total of the pixel intensity values in a white/black “box“
moveX = haarX-1;
moveY = haarY-1;
if haar == 1 % top/down white-black
    white = getCorners(imgpixelXpixelYpixelX+moveXpixelY+floor(moveY/2)); 
    black = getCorners(imgpixelXpixelY+ceil(moveY/2)pixelX+moveXpixelY+moveY);
    val = white-black;
elseif haar == 2 % left/right white-black
    white = getCorners(imgpixelXpixelYpixelX+floor(moveX/2)pixelY+moveY);
    black = getCorners(imgpixelX+ceil(moveX/2)pixelYpixelX+moveXpixelY+moveY);
    val = white-black;
elseif haar == 3 % top/mid/bottom white-black-white
    white1 = getCorners(imgpixelXpixelYpixelX+moveXpixelY+floor(moveY/3));
    black = getCorners(imgpixelXpixelY+ceil(moveY/3)pixelX+moveXpixelY+floor((moveY)*(2/3)));
    white2 = getCorners(imgpixelXpixelY+ceil((moveY)*(2/3))pixelX+moveXpixelY+moveY);
    val = white1 + white2 - black;
elseif haar == 4 % left/mid/right white-black-white
    white1 = getCorners(imgpixelXpixelYpixelX+floor(moveX/3)pixelY+moveY);
    black = getCorners(imgpixelX+ceil(moveX/3)pixelYpixelX+floor((moveX)*(2/3))pixelY+moveY);
    white2 = getCorners(imgpixelX+ceil((moveX)*(2/3))pixelYpixelX+moveXpixelY+moveY);
    val = white1 + white2 - black;
elseif haar == 5 % checkerboard-style white-black-white-black
    white1 = getCorners(imgpixelXpixelYpixelX+floor(moveX/2)pixelY+floor(moveY/2));
    black1 = getCorners(imgpixelX+ceil(moveX/2)pixelYpixelX+moveXpixelY+floor(moveY/2));
    black2 = getCorners(imgpixelXpixelY+ceil(moveY/2)pixelX+floor(moveX/2)pixelY+moveY);
    white2 = getCorners(imgpixelX+ceil(moveX/2)pixelY+ceil(moveY/2)pixelX+moveXpixelY+moveY);
    val = white1+white2-(black1+black2);
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-03-21 19:22  AdaBoost算法训练样本\matlab-viola-jones-master\
     文件          86  2019-03-21 19:23  AdaBoost算法训练样本\matlab-viola-jones-master\imread.txt
     目录           0  2019-03-26 20:21  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\
     目录           0  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\
     文件        2211  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\calcHaarVal.m
     文件        1100  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\cascade.m
     文件        5090  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\detectFaces.asv
     文件        5100  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\detectFaces.m
     文件         476  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\getCorners.m
     目录           0  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\
     文件       21946  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\baby.jpg
     文件       30638  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\cy.jpg
     文件       41160  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\cy2.jpg
     文件       30969  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\cy3.jpg
     文件       10475  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\girl.jpg
     文件       28043  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Jie.jpg
     文件       99702  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Jie_checkered.jpg
     文件       23949  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Lenna.jpg
     文件        9581  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Lenna_gamma_corrected.jpg
     文件       30817  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Sourav.jpg
     文件       32951  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Steve.jpg
     文件       23821  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Images\Steve2.jpg
     文件         408  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\integralImg.m
     目录           0  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Preprocessing\
     文件        1081  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Preprocessing\adjust_range.m
     文件        1212  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Preprocessing\gamma_correction.m
     目录           0  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Results\
     文件       10340  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Results\baby.jpg
     文件       15897  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Results\cy.jpg
     文件       11563  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Results\Jie.jpg
     文件       15012  2016-07-19 16:55  AdaBoost算法训练样本\matlab-viola-jones-master\matlab-viola-jones-master\detectFaces\Results\O_expr.jpg
............此处省略6992个文件信息

评论

共有 条评论