登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 理工学类 > 自动化 > 正文

基于Android与opencv的手机端人脸检测毕业论文

 2021-04-26 09:04  

摘 要

基于当今移动互联网的大环境,Android 手机操作系统的发展也愈加迅猛,手机端的Android系统则从77.1%市场占有率上升到86.4%。该系统早已成为目前全球最受欢迎的操作系统.手机照相功能逐渐为大家熟悉并普遍使用,本文希望通过基于人脸统计的方式来检测人脸。

本文首先对国内外人脸检测的发展现状做了详细的说明与分析,并对基于统计特征的Adaboost算法进行深入研究。该算法的中心想法:以大基数互不相同的正负样品通过Haar特征来训练弱分类器、进而形成强分类器。错误率低的弱分类器所占权重较大,因此在后期投票中重要性也越重要。而误差大的弱分类器所占权重较小。除此之外,还需要将强分类器进行级联,形成级联分类器。由于一张图片只有经过这多层验证、才可能最后被认定为人脸样本。因此、该分类器检测率相对可以达到很高。

该系统主要分成两部分:其一是在电脑端上训练出强分类器,其二则是在android上实现人脸检测。前者重点在于通过createsamples.exe和Haartraining.exe两个可执行文件训练正样本和负样本(正负样本面部特征需尽可能多且包括大量不同背景)。在训练之后,就可以得到级联分类器XML文件,而该XML文件主要记录训练的结果。后者则是Java 代码利用 JNI 接口传输图像等信息到C 代码层。C 代码层以加载XML文件,并在图片流中检测人脸同时将人脸几何位置反馈到Java层,当然在检测前、还有一些对图片的预处理过程,比如直方图均衡化,转化为灰度图像等,这些功能是在 OpenCV实现。

关键词:OpenCV android Adaboost算法 人脸检测

Abstract

Based on the Mobile Internet environment nowadays,the operating system of Android mobile phone is also growing rapidly, and its market share has risen from 77.1% to 86.4%. This system has already become the world's most popular operating system. Cameras on mobile phones are gradually familiar and widely used to us. we hope to detect faces by means of face-based statistics.

In this paper, the development of face-detection at home and abroad is described and analyzed in detail firstly, and we studied the Adaboost algorithm which based on statistical feature deeply. The main idea of this algorithm is to focus on the rich face expression samples to train the weak classifiers, and then through layers of screening to form a strong classifier. The best weak classifier with small error occupies a larger weight, so it takes a more important role in the final vote. While the weak classifier with big error occupies less weight. In addition, it is necessary to cascade the strong classifier to form a cascade classifier. Since a picture can only be identified as a face sample by passing this multi-level validation, the detection rate of the classifier can be relatively high.

One is to train a strong classifier on the computer side, while the other is to achieve the face-detection in the android. Whose focus of the former is through two executable files createsamples.exe and Haartraining.exe to train positive samples and negative samples (positive and negative samples need to be as rich as possible and contains a variety of background),and you can get cascade classification XML file to achieve Adaboost algorithm after training. The latter is the Java code using JNI interface to transfer images and other information to the c code layer. C code layer to load the cascading classifier XML file, and then detect the face in the picture stream and feedback the face geometric position of human to the Java layer.There are some image preprocessing process before the detection by all means, such as histogram equalization and the gray images' inversion. These features are implemented in the OpenCV.

Key Words: OpenCV android Adaboost algorithm face-detection

目 录

摘 要 I

Abstract II

第1章 绪论 1

1.1背景与意义 1

1.1.1发展 2

1.1.2国外现状 2

1.1.3国内的研究 2

1.2解题思路 3

1.3文章结构介绍 3

第2章 图形预处理以及Adaboost算法 4

2.1人脸检测及其图像处理技术介绍 4

2.2OpenCV简介 4

2.3灰度化处理 4

2.4直方图均衡化 5

2.5人脸检测 6

2.6 Adaboost 6

2.6.1算法理论基础 6

2.6.2Haar特征构造级联分布器 7

2.7积分图求矩形和 9

2.8 XML文件 10

2.9 检测人脸位置 11

第3章 C 代码在android平台的实现 12

3.1 Android平台 12

3.1.1 Linux kernel: 12

3.1.2Android Runtime: 12

3.1.3 Library: 13

3.1.4 Application Framework 13

3.1.6 Applications 13

3.2 NDK介绍 13

3.3 Jni介绍 14

3.4搭建android编程环境 14

3.5通过ndk jni实现C 程序植入工程 14

第4章 人脸检测训练XML文件 17

4.1训练XML文件步骤 17

4.2 实验结果记录 22

4.2.1实验效果图记录 22

4.2.2实验结果分析 25

总结与展望 26

参考文献 27

附 录 28

附录A JNI编程源文件 28

附录A1 Android.mk文件 28

附录A2 Application.mk文件 28

致 谢 29

第1章 绪论

1.1背景与意义

当前,计算机技术和网络信息的飞速发展,安全的重要性显而易见。身份识别是保证系统安全一个必要保证,财政部、司法安全、国家安全、电子商务等领域,需要找出确切身份。目前,个人认证大部分是ID(身份证、工作证、智能卡、电脑卡和借记卡的标志)和密码等方式,然而这些装置并不方便,易于丢失、使用过多导致无法读取,密码容易破解等其他许多问题。因此,以证件、个人检测密码、口令等方式来确定个人身份识别的技术并不适合于现代科学技术和社会发展进展。“9·11”对于生物特征识别技术来说是一个转折点,它让政府更加了解生物识别技术的重要性,促使各国开始对生物识别技术的研究和应用进行大规模投资[1]

传统的识别是基于具体的物件(如身份证)或者某种特殊特殊序列(如密码)进行的。比如说:通过信用卡和密码在ATM上进行取款。传统方法的坏处也清晰可见:容易丢失,被盗,遗忘。而特殊序列则有记忆上问题。密码太复杂,易于忘记,简单的密码(如出生日期、手机号码等等),很容易猜测和破解。

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图