资源简介
1)、完整的人脸表情识别程序;
2)、包括完整的训练库代码及图片;
3)、包括完整的测试代码以及图片;
代码片段和文件信息
% Tolga Birdal‘s original code is heavily modified by Md. Iftekhar Tanveer
% (go2chayan@gmail.com)
% Modifications by Md. Iftekhar Tanveer:
% code optimized for the following assumptions:
% 1. Only one face in scene and it is the primary object
% 2. Faster noise reducion and face detection
% Originaly by Tolga Birdal
% Implementation of the paper:
% “A simple and accurate face detection algorithm in complex background“
% by Yu-Tang Pai Shanq-Jang Ruan Mon-Chau Shie Yi-Chi Liu
% Additions by Tolga Birdal:
% Minimum face size constraint
% Adaptive theta thresholding (Theta is thresholded by mean2(theata)/4
% Parameters are modified by to detect better. Please check the paper for
% parameters they propose.
% Check the paper for more details.
% usage:
% I=double(imread(‘c:\Data\girl1.jpg‘));
% detect_face(I);
% The function will display the bounding box if a face is found.
function [aaSN_fillFaceDat]=detect_face(I)
close all;
% No faces at the beginning
Faces=[];
numFaceFound=0;
I=double(I);
H=size(I1);
W=size(I2);
%%%%%%%%%%%%%%%%%% LIGHTING COMPENSATION %%%%%%%%%%%%%%%
C=255*imadjust(I/255[0.3;1][0;1]);
% figureimshow(C/255);
% title(‘Lighting compensation‘);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% EXTRACT SKIN %%%%%%%%%%%%%%%%%%%%%%
YCbCr=rgb2ycbcr(C);
Cr=YCbCr(::3);
S=zeros(HW);
[SkinIndexRowSkinIndexCol] =find(10 for i=1:length(SkinIndexRow)
S(SkinIndexRow(i)SkinIndexCol(i))=1;
end
m_S = size(S);
S(m_S(1)-7:m_S(1):) = 0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% REMOVE NOISE %%%%
% figure;imshow(S);
SN=zeros(HW);
for i=1:H-5
for j=1:W-5
localSum=sum(sum(S(i:i+4 j:j+4)));
SN(i:i+5 j:j+5)=(localSum>20);
end
end
% figure;imshow(SN);
Iedge=edge(uint8(SN));
% figure;imshow(Iedge);
SE = strel(‘square‘9);
SN_edge = (imdilate(IedgeSE));
%
% SN_edge = SN_edge1.*SN;
% figure;imshow(SN_edge);
SN_fill = imfill(SN_edge‘holes‘);
% figure;imshow(SN_fill);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% FIND SKIN COLOR BLOCKS %%%%
[LlenRegions] = bwlabel(SN_fill4);
AllDat = regionprops(L‘BoundingBox‘‘FilledArea‘);
AreaDat = cat(1 AllDat.FilledArea);
[maxArea maxAreaInd] = max(AreaDat);
FaceDat = AllDat(maxAreaInd);
FaceBB = [FaceDat.BoundingBox(1)FaceDat.BoundingBox(2)...
FaceDat.BoundingBox(3)-1FaceDat.BoundingBox(4)-1];
aa=imcrop(rgb2gray(uint8(I)).*uint8(SN_fill)FaceBB);
% figureimshow(aa);
% title(‘Identified Face‘);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-05-31 17:09 EigenFace1\
文件 1033707 2009-04-21 03:11 EigenFace1\EigenFace.ctf
文件 5763 2009-04-21 02:43 EigenFace1\EigenFace.m
文件 11524 2009-04-21 03:11 EigenFace1\EigenFace.xex
文件 33261 2009-04-23 11:08 EigenFace1\ex
文件 1018 2009-04-21 01:49 EigenFace1\LabelFile.txt
文件 1818 2009-04-21 04:25 EigenFace1\README- How to Run.txt
目录 0 2013-05-31 17:02 EigenFace1\Test\
文件 56944 2009-04-18 22:17 EigenFace1\Test\Image001.jpg
文件 57198 2009-04-18 22:17 EigenFace1\Test\Image002.jpg
文件 57554 2009-04-18 22:17 EigenFace1\Test\Image003.jpg
文件 56881 2009-04-18 22:17 EigenFace1\Test\Image004.jpg
文件 56004 2009-04-18 22:17 EigenFace1\Test\Image005.jpg
文件 48005 2009-04-18 22:17 EigenFace1\Test\Image006.jpg
文件 56704 2009-04-18 22:17 EigenFace1\Test\Image007.jpg
文件 57739 2009-04-18 22:17 EigenFace1\Test\Image008.jpg
文件 56293 2009-04-18 22:17 EigenFace1\Test\Image009.jpg
文件 57995 2009-04-18 22:17 EigenFace1\Test\Image010.jpg
文件 57025 2009-04-18 22:17 EigenFace1\Test\Image011.jpg
文件 58108 2009-04-18 22:17 EigenFace1\Test\Image012.jpg
文件 56482 2009-04-18 22:17 EigenFace1\Test\Image013.jpg
文件 54871 2009-04-18 22:17 EigenFace1\Test\Image014.jpg
文件 56865 2009-04-18 22:17 EigenFace1\Test\Image015.jpg
文件 57803 2009-04-18 22:17 EigenFace1\Test\Image016.jpg
文件 56164 2009-04-18 22:17 EigenFace1\Test\Image017.jpg
文件 55699 2009-04-18 22:17 EigenFace1\Test\Image018.jpg
文件 57196 2009-04-18 22:17 EigenFace1\Test\Image019.jpg
文件 57335 2009-04-18 22:17 EigenFace1\Test\Image020.jpg
文件 58031 2009-04-18 22:17 EigenFace1\Test\Image021.jpg
文件 57715 2009-04-18 22:17 EigenFace1\Test\Image022.jpg
文件 56409 2009-04-18 22:17 EigenFace1\Test\Image023.jpg
............此处省略63个文件信息
- 上一篇:vfp 课程设计-仓库管理系统
- 下一篇:数据采集卡应用与编程
相关资源
- 热血江湖V2.0源代码
- 英国剑桥大学的ORL人脸数据库,pgm格
- 数字时钟设计内含原理图、源代码、
- 基于单片机的火灾报警系统的设计与
- 中科院山世光老师开源的Seetaface人脸
- zigbee协议在ns2下的仿真源代码
- 黑鹰远控之H2O完整源代码
- 软件工程作业项目银行账户系统完整
- nvp6134 datasheet and driver
- 基于AdaBoost算法的人脸检测(北京大学
- netbeans 导入源代码
- 异步fifo设计verilog源代码
- 豆瓣网安卓源代码
- minix3源代码
- 实验9X stm32F407zgt6_PWM控制SG90输出实验
- AES算法实现源代码
- 音乐播放器含源代码
- 人脸识别离线SDK配合博客使用
- Cocos Creator重力小游戏《给我滚》开源
- DirectX地月系+高度图地形源代码
- LabVIEW 2012 Simon 小游戏 编程 源代码
- 串口精灵源代码 串口精灵源代码
- SIFT\\PCA-SIFT\\SURF论文源代码
- 树莓派人脸识别USB摄像头
- [单片微机原理与接口技术——基于
- openCV图像检测资源包
- Opencv 下Cascade Classifier实现人脸识别的
- 线程池实现蚁群算法的简单并行
- 跨域请求解决方案源代码JSONPCORS
- jfreechartDEMO官网demo与源代码
评论
共有 条评论