APP下载

基于Adaboost算法的人脸检测及OpenCV实现

2018-12-18丁业兵

电脑知识与技术 2018年27期

丁业兵

摘要:人脸检测是人脸识别等人脸信息处理系统中的关键问题。基于学习的方法中,Adaboost算法的级联检测器结构计算效率高,可以有效检测图像中的人脸。应用开源计算机视觉库(OpenCV) 开发了人脸检测系统,该系统给出了直观的人机交互界面,先装载人脸检测分类器,再运用Adaboost算法检测图像中出现的人脸,并用椭圆框标示人脸。文中介绍了Adaboost目标检测算法和系统实验结果,实验结果表明,在OpenCV基础上,采用Adaboost算法可以快速、准确的实现人脸检测。

关键词:图像;人脸检测;Adaboost算法;OpenCV;人机交互

中图分类号:TP317.4 文献标识码:A 文章编号:1009-3044(2018)27-0167-03

Face detection Based on Adaboost algorithm and OpenCV

DING Yebing

(Department of Communication Engineering, Anhui Post and Telecommunication College, Hefei 230031, China)

Abstract:Face detection is the key issues in face recognition and other face information processing system. The cascade detector structure of Adaboost algorithm calculation efficiency, it can effectively detect the face in image. Face detection system with Open Source Computer Vision Library (OpenCV) is developed, the system has intuitive human-compute interaction interface, first, load the face detection classifier, and then, using Adaboost algorithm to detect face in images, and ellipses labeled faces. This paper introduced the Adaboost target detection algorithm and experimental results of the system. The experimental results show that the Adaboost algorithm can quickly, accurately realize the face detection using OpenCV.

Key words:Image; face detection; Adaboost algorithm; OpenCV; human-compute interaction interface

人工智能正在深刻改变人类的生活和生产,人脸检测是人工智能领域的发展方向之一。人脸检测是人脸识别,表情、性别识别等人脸信息处理的关键技术。图像人脸检测有基于知识的方法和基于学习的方法两种。基于知识的方法是根据人脸特定的先验知识,如面部器官的位置关系等进行人脸检测,简单易行,但容易漏检和误检;基于学习的方法是通过学习人脸和非人脸样本,获得分类器来进行人脸检测,性能取决于学习算法,能检测复杂环境下的人脸。Adaboost(adaptive boosting)方法[1-3]是基于学习的方法,借助Harr特征[4],将一组弱分类器自适应的提升为强分类器,级联检测效率较高,也可用于其它目标检测中。

Open CV是一种开源计算机视觉库,用C++语言[5]编写,主要应用于计算机视觉和数字图像处理方面,实现了很多通用的算法,接口丰富,为应用开发提供了极大的方便。……

登录APP查看全文