分类号
UDC
密级
学 位 论 文
基于FPGA的人体姿态检测与识别系统的设计与实现
作者姓名:
果彬
指导教师:
李景宏副教授
东北大学信息科学与工程学院
申请学位级别: 硕士
学科类别:
工学
学科专业名称: 电路与系统
论文提交日期: 2014年6月论文答辩日期: 2014年6月17日
学位授予日期:2014年7月答辩委员会主席:王旭
评阅人:王骄侯祥林
东 北大 学
2014年6月
˝
•
‰
˚
A Thesis in Circuits and Systems
Des咖and Implementa舶n of Human Body
on卯GA
By Guo Bin
SuperVisor:Associate Professor Li Jinghong
Northeastern UniVersity
June 2014
˝
•
‰
˚
独创性声明
本人声明,所呈交的学位论文是在导师的指导下完成的。论文中
取得的研究成果除加以标注和致谢的地方外,不包含其他人己经发表
或撰写过的研究成果,也不包括本人为获得其他学位而使用过的材料。
与我一同工作的同志对本研究所做的任何贡献均己在论文中作了明确
的说明并表示谢意。
学位论文作者签名: 果鸪
日
期:
30j峰.8、f
学位论文版权使用授权书
本学位论文作者和指导教师完全了解东北大学有关保留、使用学
位论文的规定:即学校有权保留并向国家有关部门或机构送交论文的
复印件和磁盘,允许论文被查阅和借阅。本人同意东北大学可以将学
位论文的全部或部分内容编入有关数据库进行检索、交流。
作者和导师同意网上交流的时间为作者获得学位后:
半年口
一年口
一年半口
两年一
学位论文作者签名: 朱粥 导师签名:
签字日期: 土of昝.占.f
签字日期:
榭≠
3口f4.乡.,
˝
•
‰
˚
东北大学硕士学位论文
摘要
基于FPGA的人体姿态检测与识别系统的设计与实现
摘要
视频监控系统的人体姿态检测与识别的目的是通过分析视频中拍摄到的人体
运动的某些特征来判断人的姿态所蕴含的意义。该研究方向具有非常广阔的前景
和其国有的难点与挑战,因此备受计算机视觉领域的关注。
在查阅大量国内外相关文献与书籍后,决定以FPGA为核心,设计一个可以
识别五种人体姿态的系统。本文主要专注于人体姿态检测与识别的两个问题,并
完成了以下两方面工作。
针对静态背景下的运动目标检沏《问题,背景相减法与帧间差分相结合,来检
测运动人体用于姿态识别。实验表明,该方法能够检测出人体运动姿态图像,并
提取出轮廓。
针对基于样本集的人体姿态识别,本文采用基于人体六星模型的办法来找出
能够代表人体姿态的特征向量。首先使用质心点到六星模型距离、质心与六星模
型的轴线与水平坐标轴夹角、离心率共十三个特征进行描述,然后选取蛙跳、跑
步、弯腰、步行、蹲下五种姿态,合计3000多个样本对BP神经网络进行参数训
练,所得参数用于下一步姿态估计,最终判别出测试样本集的姿态分别属于哪种
姿态类别。
本系统基于Altera公司的Cyclone II EP2C35F672G6 FPGA的DE2硬件平台,
以及摄像头、显示器等其他外设。在FPGA开发平台上设计并实现了静态背景下
人体姿态识别系统。整个系统分为图像采集、图像缓存、图像显示和姿态识别四
个模块。其中前三个模块用verilog硬件描述语言进行编程,后一个模块通过Nios
搭建sOPC,在Nios II IDE环境下采用c语言编程处理实现。经过反复调试与改
进,该系统可以很好地实现静态背景下人体姿态的检测与识别。
关键词:运动目标检测:人体七星模型:特征提取;BP神经网络
II
˝
•
‰
˚
东北大学硕士学位论文
Abstract
Design and Implementation of Human
ydOB
Posture Detection and Recognition System
Based on FPGA
Abstract
The purpose of video monitoring system of human body posture detection and
recognition is analyzing the signincance of human moVement characters by what is
captures by the video. The research has Very broad prospects and its inherent
difnculties and challenges,so it is highly attention in the 6eld of computer Vision.
ARer consulting a la玛e number of domestic and foreign related literature and
books,decided to use the FPGA as the core,designing a system can identify the nVe
kinds of body posture.In this thesis,we f-ocus on the human body posture detection
and recognition of two problems,and do the f01lowing tvvo aspects.
According to the static back铲ound of moVing target detection probldm,this
thesis uses the method of a back铲ound subtraction with the method of three fhme
difference to detect the outline of human movement for gesture recognition
Experimental results show that the method can detect human motion image,then
extract cOntOur
Gesture recognition based on sample s of the human body.In this thesis,use the
six stars model of the human body to 6nd feature Vector to represent the body
posture.First,test the distance from the center of mass to eVery six star coordinates,
the angle between the mass of centre to eVery six star axis and the horizontal axis,
eccentricity,in a total number of l 3 characteristics to be described.Then,select six
kinds of posture such as jumping,running,bending,walking,squatting down.There
are more than 3000 training samples for getting the parameters of BP neural ne觚ork.
The parameters will use for the next step posture estimation.Finally,judge the
postures in the test sampIes belong to which kind of stance category.
This system is based on Altera corporation Cyclone II EP2C35F672G6 FPGA
DE2 hardware platf.onn,cameras,displays and other peripherals.We designed and
III
˝
•
‰
˚
东北大学硕士学位论文
Abstract
implemented a static gesture recognition system under the background of the human
body on this FPGA development platfonn.The whole system is diVided into four
modules, they are image acquisition, image cache, image display and gesture
recognition.The top three modules use Verilog hardware description 1anguage
pro铲amming.The last module builds the Nios SOPC on Nios II IDE enVironment
using C language programming to deal with.After repeated commissioning and
improvement,the system can welI realize stactic posture of detection and recognition
under the background of the human body
Key words:moving object detection;seVen star model;feature extraction;BP neural
network
IV
˝
•
‰
˚
东北大学硕士学位论文
目录
目录
独创性声明……………………………………………………………………I
摘要…………………………………………………………………………II
Abstrad……………………………………………………………………………………………………………………..IIl
第l章绪论………………………………………………………………..1
1.1课题来源及意义…………………………………………………………………l
1.2国内外研究现状与应用………………………………………………………..1
1.2.1人体姿态检测与识别国内外研究现状…………………………………一l
1.2.2人体姿态检测与识别的应用……………………………………………。2
1.3本文的主要工作及架构…………………………………………….………….4
1.3.1研究内容…………………………………………………………………..4
1,3.2论文结构安排……………………………………………………………..4
1.4本章小结………………………………………………………………………..5
第2章相关知识介绍………………………………………………………7
2.1人体姿态图像的采集…………………………………………………………一7
2.2视频关键帧提取………………………………………………………………..7
2-3姿态识别预处理………………………………………………………………..8
2.3.1灰度化……………………………………………………………………..8
2.3.2姿态分割…………………………………………………………………..9
2.3.3二值化……………………………………………………………………11
2.3.4中值滤波…………………………………………………………………11
2.3.5形态学处理………………………………………………………………1l
2.3.6轮廓提取…………………………………………………………………16
2.3.7边缘检测…………………………………………………….……………17
2.4姿态识别………………………………………………………………………19
2.4.1多特征描述算子…………………………………………………………20
2,4.2特征向量的构成…………………………………………………………20
V
˝
•
‰
˚
东北大学硕士学位论文
目录
2.4.3识别方法…………………………………………………………………21
2.5硬件平台介绍…………………………………………………………………24
2.5.1 CycIone ll EP2C35F6低成本FPGA………………………………………………...24
2.5.2 DE2开发板………………………………………………………………24
2.5.3 DC2摄像头………………………………………………………………25
2.6系统软件平台介绍……………………………………………………………26
2.6.1 Quartus II软件开发平台…………………………………………………26
2.6.2 Nios II开发平台…………………………………………………………27
第3章系统总体设计…………………………………………………….29
3.1系统功能概述…………………………………………………………………29
3.2系统模块构建…………………………………………………………………29
3.3系统硬件设计…………………………………………………………………30
3.4系统软件设计…………………………………………………………………3 l
3.5核心控制处理模块……………………………………………………………32
3.6其他模块….……………………………………………………………………32
3.7系统总体架构…………………………………………………………………32
第4章系统各模块的具体设计与实现…………………………………35
4.1图像采集模块…………………………………………………………………35
4.1.1 12c传感器配置模块……………………………………………………一35
4.1.2 CMOS传感器数据采集模块……………………………………………36
4.】.3 Bayer格式转RGB格式模块……………………………………………38
4.2 SDRAM数据缓存模块……………………………………………………….39
4.3图像显示模块…………………………………………………………………40
4.4视频关键帧提取………………………………………………………………43
4.5姿态检测与识别算法…………………………………………………………44
4.5.1灰度化…………………………………………………………………….45
4.5.2图像分割…………………………………………………………………45
4.5.3二值化的阈值选择………………………………………………………47
4.5.4中值滤波…………………………………………………………………48
VI
˝
•
‰
˚