摘要
为了实现对人脸检测的目的,本文采用基于MFC框架下使用OpenCV视觉库的方法.文章重点分析了一种人脸检测中使用的特征分类算法:Adaboost算法.文中阐述了该算法的原理,图文并茂地展示了如何在实际中利用人脸库结合Adaboost算法来训练分类器,并生成XML文件.在VC6.0下,搭建了人脸检测的界面,利用OpenCV的函数调用训练所生成的XML文件,实现了在本地选择图片并对其进行人脸检测的功能.此外,系统还支持读取本地AVI格式视频和从摄像头捕捉到的视频,可手动截取一帧图片进行人脸检测.实验结果表明该设计方案具有较高的准确性和稳定性,基本达到预期的效果.
In order to detect human faces, the method of OpenCV vision library based on the MFC frame- work was used. It was focused on analyzing a kind of feature classification algorithm which is used in face detec- tion, named Adaboost algorithm. The principle of the algorithm was described and how to use face database com- bined with Adaboost algorithm to train the classifier in practice was discussed. And then, during the training, some XML documents were generated. Under the environment of Visual c + + 6.0 , a face detection interface was built and the functions of OpenCV were used to call the XML documents. Then users can choose local ima- ges for face detection. In addition, the system also supports to read the AVI format video captured from the cam- era. And users can manually capture a picture for face detection. The results show that the design has a high ac- curacy and stability, essential to achieve the desired effect.
出处
《佳木斯大学学报(自然科学版)》
CAS
2013年第6期895-898,共4页
Journal of Jiamusi University:Natural Science Edition