资源简介
linux下人脸识别算法,完整个的软件,基于QT,可以识别人脸,需要先训练,然后再识别,识别率虽然不是太高,但是完全是可以用的,功能强大。
代码片段和文件信息
/** @file */
/*
Detector Class - Inherits FACE DETECTOR AND EYE DETECTOR CLASS
Copyright (C) 2009 Rohan Anil (rohan.anil@gmail.com) -BITS Pilani Goa Campus
http://code.google.com/p/pam-face-authentication/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 3 of the License.
This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not see .
*/
#include “detector.h“
#include “cv.h“
#include
#include
#include “utils.h“
#include “qtUtils.h“
#define eyeSidePad 30
#define eyeTopPad 30
#define eyeBottomPad 120
IplImage * preprocess(IplImage * imgCvPoint plefteyeCvPoint prighteye)
{
IplImage * face= cvCreateImage( cvSize(140150)83);
IplImage* imgDest = cvCreateImage( cvSize(img->widthimg->height)83);
cvZero(face);
double yvalue=prighteye.y-plefteye.y;
double xvalue=prighteye.x-plefteye.x;
double ang= atan(yvalue/xvalue)*(180/CV_PI);
double width= sqrt(pow(xvalue2)+pow(yvalue2));
double ratio=sqrt(pow(xvalue2)+pow(yvalue2))/80;
double sidePad=eyeSidePad*ratio;
double topPad=eyeTopPad*ratio;
double bottomPad=eyeBottomPad*ratio;
CvPoint p1LeftTopp1RightBottom;
p1LeftTop.x=plefteye.x-sidePad;
p1LeftTop.y=(plefteye.y)-topPad;
p1RightBottom.x=plefteye.x+width+sidePad;
p1RightBottom.y=(plefteye.y) +bottomPad;
rotate(angplefteye.x plefteye.yimgimgDest);
cvSetImageROI(imgDestcvRect(p1LeftTop.xp1LeftTop.yp1RightBottom.x-p1LeftTop.xp1RightBottom.y-p1LeftTop.y));
cvResize(imgDestfaceCV_INTER_LINEAR);
cvResetImageROI(imgDest);
return face;
}
detector::detector()
{
messageIndex=-1;
clippedFace=0;
boolClipFace=0;
totalFaceClipNum=0;
clipFaceCounter=0;
prevlengthEye=0;
inAngle=0;
lengthEye=0;
widthEyeWindow=0;
heightEyeWindow=0;
}
IplImage * detector::clipFace(IplImage * inputImage)
{
if (inputImage==0)
return 0;
if (eyesInformation.LE.x>0 && eyesInformation.LE.y>0 &&eyesInformation.RE.x>0 && eyesInformation.RE.y>0 )
{
IplImage *face=preprocess(inputImageeyesInformation.LEeyesInformation.RE);
return face;
}
else
return 0;
}
int detector::runDetector(IplImage * input)
{
messageIndex=-1;
static int flag;
if (input==0)
return -1;
runFaceDetector(input);
if (checkFaceDetected()==1)
{
if (faceInformation.Width<120 || faceInformation.Height<120)
{
messageIndex=0;
}
else if (faceInformation.Wi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 274 2009-08-09 05:51 pam-face-authentication-0.3\pam-face-authentication-0.3\AUTHORS
文件 41 2009-08-09 05:09 pam-face-authentication-0.3\pam-face-authentication-0.3\ChangeLog
文件 7881 2009-07-13 05:15 pam-face-authentication-0.3\pam-face-authentication-0.3\cmake\modules\FindOpenCV.cmake
文件 1883 2009-07-13 05:15 pam-face-authentication-0.3\pam-face-authentication-0.3\cmake\modules\FindPAM.cmake
文件 4757 2009-08-10 00:41 pam-face-authentication-0.3\pam-face-authentication-0.3\CMakeLists.txt
文件 18002 2009-07-13 06:04 pam-face-authentication-0.3\pam-face-authentication-0.3\COPYING
文件 919871 2009-07-13 07:31 pam-face-authentication-0.3\pam-face-authentication-0.3\data\haarcascades\haarcascade.xm
文件 504200 2009-07-13 07:31 pam-face-authentication-0.3\pam-face-authentication-0.3\data\haarcascades\haarcascade_eye.xm
文件 1095035 2009-07-13 07:31 pam-face-authentication-0.3\pam-face-authentication-0.3\data\haarcascades\haarcascade_eye_tree_eyeglasses.xm
文件 1633787 2009-07-13 07:31 pam-face-authentication-0.3\pam-face-authentication-0.3\data\haarcascades\haarcascade_nose.xm
文件 23511 2009-06-18 03:23 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\about.png
文件 23103 2009-06-29 08:22 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\bkg.png
文件 30128 2009-07-09 01:50 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\cnc.png
文件 28544 2009-06-29 06:25 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\intro.png
文件 118269 2009-06-18 03:23 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\magnifying-glass.jpg
文件 794 2009-08-07 08:47 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\message1.png
文件 110520 2009-08-06 12:01 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\pfa-logo.png
文件 14608 2009-06-18 03:23 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\record.png
文件 7552 2009-06-29 05:48 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\images\webcam.png
文件 20696 2009-08-09 00:11 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\uifiles\aboutDialog.ui
文件 23781 2009-06-29 08:21 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\uifiles\faceAuth.ui
文件 23796 2009-08-09 00:20 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\uifiles\faceTrainer.ui
文件 8954 2009-08-09 00:54 pam-face-authentication-0.3\pam-face-authentication-0.3\data\ui\uifiles\faceTrainerAdvSettings.ui
文件 380 2009-08-09 00:48 pam-face-authentication-0.3\pam-face-authentication-0.3\graphics.qrc
文件 385 2009-08-07 10:52 pam-face-authentication-0.3\pam-face-authentication-0.3\include\aboutBox.h
文件 3185 2009-08-07 10:53 pam-face-authentication-0.3\pam-face-authentication-0.3\include\detector.h
文件 1474 2009-08-07 10:53 pam-face-authentication-0.3\pam-face-authentication-0.3\include\eyesDetector.h
文件 1467 2009-08-07 10:55 pam-face-authentication-0.3\pam-face-authentication-0.3\include\faceDetector.h
文件 2163 2009-08-07 10:53 pam-face-authentication-0.3\pam-face-authentication-0.3\include\faceTrainer.h
文件 1950 2009-08-07 10:53 pam-face-authentication-0.3\pam-face-authentication-0.3\include\faceTrainerAdvSettings.h
............此处省略42个文件信息
- 上一篇:stdint.h.rar
- 下一篇:office工具栏图标ico
相关资源
- 基于遗传算法的飞机滑行路径优化
- k-shell分解算法
- elasticsearch-6.4.3-全套ela+源码+ik分词器
- 白光干涉信号包络拟合算法
- 一种基于蜂窝网格的传感器节点部署
- 无线传感器网络路由算法,采用最短
- 韦东山嵌入式linux应用开发完全手册视
- 分水岭分割算法程序
- Tomasuluo算法实验报告i,通过模拟器完
- 聚类实验 K均值和C均值
- 空间插值算法在GIS专业中的应用
- linux下LaTex配置完全指南
- 8点算法计算基础矩阵计算机视觉Ope
- libpcap-1.9.0
- linux平台 DHT11驱动程序
- 基于不规则三角网TIN的追踪等值线算
- sm4国密算法最详细讲解
- 基于OpenGL的贝塞尔曲线算法的实现
- ZigBee 协议在Linux上的实现
- 三次B样条反算的一种简便算法
- 经典定位算法仿真代码
- 新版正方教务系统rsa加密算法
- 使用Linux的V4L2读取摄像头数据+Opencv图
- 嵌入式Linux系统移植开发-1基于Yocto构
- linux下的QT串口通信
- 图像分割算法研究综述
- linux的外文文献
- 老段带你学-鸟哥的Linux私房菜基础+服
- 4.9线性调频-z变换(CZT)算法.rar
- 3.24 基于蚁群算法的图像边缘检测.r
评论
共有 条评论