资源简介
ViolaJones是人脸识别中效率最高的,在OpenCV中对应的库文件为cvHaarDetectObjects, 本文件为自己写的识别代码,调用该库函数
配置好OpenCV之后可以使用
代码片段和文件信息
// opencvtest.cpp : entrnce of the program
#include “stdafx.h“
#include
#include
using namespace std;
using namespace cv;
int main(int argc char** argv)
{
// Declarations
IplImage * pInpImg =0; //picture that waiting for detecting
CvHaarClassifierCascade * pCascade = 0; //face detector
CvMemStorage * pStorage = 0; // expandable memory buffer
CvSeq * pFaceRectSeq; // list of detected faces
// initializations
pInpImg = cvLoadImage(“zhangxiaokang.jpg“); //loading picture
pStorage = cvCreateMemStorage(0);
pCascade = (CvHaarClassifierCascade *)cvLoad
(“D:\\opencv\\data\\haarcascades\\haarcascade_frontalface_alt2.xml“ //classifier provided by OpenCV
0 0 0 );
// validate that everything initialized properly
if( !pInpImg || !pStorage || !pCascade )
{
printf(“Initialization failed: %s\n“
(!pInpImg)? “can‘t load image file“ :
(!pCascade)? “can‘t load haar-cascade -- “
“make sure path is correct“ :
“unable to allocate memory for data storage“ argv[1]);
exit(-1);
}
//to have some pre-process of the picture
IplImage* gray=cvCreateImage(cvSize(pInpImg->widthpInpImg->height)81); //creat an image as big as the loaded one
IplImage* small_img=cvCreateImage(cvSize(cvRound(pInpImg->width/1.3)cvRound(pInpImg->height/1.3))81); //creat
相关资源
- 人脸识别(opencv_facedetect_v4l2)
- VC++ 人脸识别定位、眼睛、嘴巴和鼻识
- 基于特征脸的人脸识别MFC+OpenCV
- OPENCV人脸检测加角点检测并输出坐标
- BP神经网络实现人脸识别包含软件源码
- Visual C++利用OpenCV对图像进行人脸识别
- c++开发的人工神经网络做人脸识别
- opencv+c++实现人脸识别
- opencv MFC 摄像头 人脸识别
- deep learning卷积神经网络CNN在C++环境下
- 自己动手制作人脸分类器+人脸识别标
- 人脸识别C语言程序
- 用于人脸识别的lbp算法C++源码
- FaceMFC.part3
- 基于PCA和SVM的人脸识别系统
- C++ 人脸识别程序 简单demo 基于虹软
- 人脸识别C++源码
- c++ 用opencv比较两张人脸照片是否相似
- 基于OpenCV的人脸验证和人脸识别MFC程
- 使用c++开发的人脸识别 demo
- C++实现的人脸识别系统
- OpenCV人脸识别实例源码142702
- 基于深度学习的人脸识别系统
- 基于深度学习的人脸识别签到系统
- seetaface开源人脸识别
- 人脸识别MFC程序
- 人脸检测、人脸对齐MTCNN方法
- 基于opencv的人脸识别程序-代码详解
- 用C++语言写的完整的人脸识别程序源
- 基于Gabor特征的人脸识别
评论
共有 条评论