资源简介
利用opencv,在arm板上做人脸识别。
代码片段和文件信息
#include
#include “facedetect.h“
FaceDetect::FaceDetect()
{
cascadeFile = “haarcascade_frontalface_alt2.xml“;
cascade = (CvHaarClassifierCascade *) cvLoad(cascadeFile.toUtf8());
flags = CV_HAAR_FIND_BIGGEST_object|CV_HAAR_DO_ROUGH_SEARCH;
// Storage for the rectangles detected
storage = cvCreateMemStorage(0);
CvSize size;
size.width = 70;
size.height = 80;
faceImage = cvCreateImage(sizeIPL_DEPTH_8UCV_8UC1);
}
FaceDetect::~FaceDetect() {
if(cascade) cvReleaseHaarClassifierCascade(&cascade);
}
// Load a new classifier cascade we unload first the previous classifier
void FaceDetect::setCascadeFile(QString cascadeFrom) {
cascadeFile = cascadeFrom;
if(cascade) cvReleaseHaarClassifierCascade(&cascade);
cascade = (CvHaarClassifierCascade *) cvLoad(cascadeFile.toUtf8());
}
QString FaceDetect::cascadeName() const {
return cascadeFile;
}
/* Possible values for flags on cvHaarDetectobjects. It can be a combination of zero or more of the following values:
* CV_HAAR_SCALE_IMAGE- for each scale factor used the function will downscale the image rather than “zoom“
the feature coordinates in the classifier cascade. Currently the option can only be used alone
i.e. the flag can not be set together with the others.
* CV_HAAR_DO_CANNY_PRUNING- If it is set the function uses Canny edge detector to reject some image regions
that contain too few or too much edges and thus can not contain the searched object. The particular
threshold values are tuned for face detection and in this case the pruning speeds up the processing.
* CV_HAAR_FIND_BIGGEST_object- If it is set the function finds the largest object (if any) in the image.
That is the output sequence will contain one (or zero) element(s).
* CV_HAAR_DO_ROUGH_SEARCH- It should be used only when CV_HAAR_FIND_BIGGEST_object is set and min_neighbors > 0.
If the flag is set the function does not look for candidates of a smaller size as soon as it has found the
object (with enough neighbor candidates) at the current scale. Typically when min_neighbors is fixed the
mode yields less accurate (a bit larger) object rectangle than the regular single-object mode
(CV_HAAR_FIND_BIGGEST_object) but it is much faster up to an order of magnitude. A greater value of
min_neighbors may be specified to improve the accuracy.
Note that in single-object mode CV_HAAR_DO_CANNY_PRUNING does not improve performance much and can even slow down the
processing. */
void FaceDetect::setFlags(int flagsFrom) {
flags = flagsFrom;
}
QVector FaceDetect::detectFaces(IplImage *cvImage) {
QVector listRect;
CvRect *rect = NULL;
double scale = 1.2;
// Create a gray scale image (1 channel) to turn it into a small image that we send to cvHaarDetectobjects to process
IplImage *grayImage
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\
文件 540 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\QTFaceRec.pro
文件 24328 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\QTFaceRec.pro.user
文件 0 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\README
文件 5355 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\facedetect.cpp
文件 652 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\facedetect.h
文件 10917 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\facerecognize.cpp
文件 2357 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\facerecognize.h
文件 405 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\main.cpp
文件 9770 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\mainwindow.cpp
文件 960 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\mainwindow.h
文件 12523 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\mainwindow.ui
文件 38210 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\posix_qextserialport.cpp
文件 1934 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\posix_qextserialport.h
文件 9677 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\processImage.cpp
文件 1810 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\processImage.h
文件 6528 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\qextserialba
文件 6873 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\qextserialba
文件 233 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\thread.cpp
文件 245 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\thread.h
文件 7173 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\videodevice.cpp
文件 1002 2011-10-15 22:18 sun11-QTFaceRec-7e5de14\videodevice.h
相关资源
- 基于 springboot2.0 实现的人脸识别登陆
- 人脸识别毕业设计
- 活体检测H5文档及--人脸识别
- OpenCV人脸识别包含数据集的txt文件
- AdaBoost人脸识别完整实现(含特征提取
- 带GUI的人脸识别软件系统
- 人脸识别完整代码包括PCA_LDA算法
- 人脸检测英文文献 人脸识别最新英文
- 人脸识别技术综述和应用
- OpenCV人脸识别训练集
- opencv3.4.1人脸识别小程序
- OpenCVForUnity2.2.4
- TensorFlow实现人脸识别(5)-------利用
- TensorFlow实现人脸识别(1)------Linux下
- 关于人脸识别的相关论文
- 人脸识别文献综述
- ARM上利用opencv实现人脸识别
- 基于SSM框架的百度人脸识别
- 基于KCCA的特种融合方法
- CASIA-WebFace.txt
- 利用百度人脸识别API和pyqt5实现基于人
- shibie.zip
- 人脸识别需要的haarcascade_frontalface_d
- FER2013数据集
- AR开发实战项目之人脸识别实现换脸、
- 人脸识别(Web人脸检测数据采集部分
- 基于深度学习的人脸识别
- opencv人脸识别源码
- qt下人脸识别
- DCT人脸识别毕业论文
评论
共有 条评论