CN111815662A - 一种基于人脸检测的行为识别实现方法 - Google Patents

一种基于人脸检测的行为识别实现方法 Download PDF

Info

Publication number
CN111815662A
CN111815662A CN201910290964.7A CN201910290964A CN111815662A CN 111815662 A CN111815662 A CN 111815662A CN 201910290964 A CN201910290964 A CN 201910290964A CN 111815662 A CN111815662 A CN 111815662A
Authority
CN
China
Prior art keywords
image
background
face detection
area
gray
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910290964.7A
Other languages
English (en)
Inventor
马利宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jisen Electric Appliances Co ltd
Original Assignee
Shanghai Jisen Electric Appliances Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jisen Electric Appliances Co ltd filed Critical Shanghai Jisen Electric Appliances Co ltd
Priority to CN201910290964.7A priority Critical patent/CN111815662A/zh
Publication of CN111815662A publication Critical patent/CN111815662A/zh
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Image Analysis (AREA)

Abstract

本发明涉及行为识别技术领域,尤其为一种基于人脸检测的行为识别实现方法,包括有以下步骤:S1,根据肤色识别原理识别人体肤色,再根据裸露皮肤最大的区域进行人脸检测;S2,将数字图像彩色图像进行灰度化;S3,将当前的图像与背景图像进行差分,得到目标区域,从而进行运动目标识别;S4,运用阈值法进行图像分割;S5,通过长宽判断人体行为。本发明用肤色识别技术判断人和非人的区别,再通过背景图片与图片做差,通过背景差阈值分割法进行提取,通过连通区域的长宽比来判断何种行为。

Description

一种基于人脸检测的行为识别实现方法
技术领域
本发明涉及行为识别技术领域,尤其涉及一种基于人脸检测的行为识别实现方法。
背景技术
人体行为检测与识别技术除了在智能监控***中具有有广泛的应用前景和潜力,在计算机视觉中是一个极具有吸引力及挑战性的问题。人体运动的视觉分析是一个新兴前沿的研究领域,涉及模式识别,图像处理,计算机视觉,人工智能等多门学科。它可以广泛应用于许多领域,如:运动捕捉,人机交互,监控和安全,环境控制和监测,体育及娱乐分析等,特别是在视频监控方面可广泛应用于银行、邮电、教育、交通、公安、监狱、法庭、大型公共设施、公共场所(银行、医院、停车场、商店、等公共场所甚至家庭庭院内)、大型仓库及军事基地等场所,在国防与公共安全领域起着日益重要的作用。综上所述,因此,人体动作的视觉分析具有极大的商业价值与现实意义。
发明内容
本发明的目的是为了解决现有技术中存在的缺点,而提出的一种基于人脸检测的行为识别实现方法。
为了实现上述目的,本发明采用了如下技术方案:
一种基于人脸检测的行为识别实现方法,包括有以下步骤:
S1,根据肤色识别原理识别人体肤色,再根据裸露皮肤最大的区域进行人脸检测;
S2,将数字图像彩色图像进行灰度化;
S3,将当前的图像与背景图像进行差分,得到目标区域,从而进行运动目标识别;
S4,运用阈值法进行图像分割;
S5,通过长宽判断人体行为。
优选的,所述S1中,假设输入像素的颜色落入RCr=[140;170]和RCb=[80;120]限定的矩形区域是属于皮肤颜色像素,每个像素的灰度对应该点与皮肤颜色的相似度,相似度的计算公式如下:
P(CbCr)=exp[-0.5(x-m)TC-1(x-m)],其中m为均值,m=E(x),C为协方差矩阵,x=(CbCr)T,C=E(x-m)(x-mT)。。
优选的,所述S2中,设定彩色分量值R、G、B,使R=G=B=max(R,G,B)形成高亮度灰度图像。
优选的,所述S3中,设定视频帧图像I(x,y,t)看作是由背景图像b(x,y,t)和运动目标m(x,y,t)组成,即I(x,y,t)=b(x,y,t)+m(x,y,t)。
优选的,背景差分法实现步骤:
步骤一:进行图像的预处理:主要包括对图像进行灰度化以及滤波;
步骤二:背景建模,根据前N帧图像的灰度值进行区间统计从而得到一个具有统计意义的初始背景;
步骤三:前景提取,将图像与背景做差,即可求得背景差图,然后根据一定的方法对改图进行二值化,最终获得运动前景区域,即实现图像分割。
优选的,所述S4中,将图像中每个像素中的灰度值与阈值相对比,灰度值大于阈值的算一种,灰度值小于阈值的为另一种,如果图像中存在多个检测目标或无关目标,那么就选多个阈值将每个目标及背景区分开。
优选的,所述S5中,手臂在身体的上半部分,脚在身体的下半部分,如果在某个区域内白点数比较多,则说明有肢体出现在该区域,如果事先能够定义好所有可能的姿态集合,并根据每一个姿态确定其区域组合,即可事先对姿态的判断。
与现有技术相比,本发明提出了一种基于人脸检测的行为识别实现方法,具有以下有益效果:
本发明,用肤色识别技术判断人和非人的区别,再通过背景图片与图片做差,通过背景差阈值分割法进行提取,通过连通区域的长宽比来判断何种行为。
附图说明
图1为本发明提出的一种基于人脸检测的行为识别实现方法的整体示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本发明的描述中,需要理解的是,术语“上”、“下”、“前”、“后”、“左”、“右”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。
请参照图1,一种基于人脸检测的行为识别实现方法,包括有以下步骤:
S1,根据肤色识别原理识别人体肤色,再根据裸露皮肤最大的区域进行人脸检测;
S2,将数字图像彩色图像进行灰度化;
S3,将当前的图像与背景图像进行差分,得到目标区域,从而进行运动目标识别;
S4,运用阈值法进行图像分割;
S5,通过长宽判断人体行为。
所述S1中,假设输入像素的颜色落入RCr=[140;170]和RCb=[80;120]限定的矩形区域是属于皮肤颜色像素,每个像素的灰度对应该点与皮肤颜色的相似度,相似度的计算公式如下:
P(CbCr)=exp[-0.5(x-m)TC-1(x-m)],其中m为均值,m=E(x),C为协方差矩阵,x=(CbCr)T,C=E(x-m)(x-mT)。
优选的,所述S2中,设定彩色分量值R、G、B,使R=G=B=max(R,G,B)形成高亮度灰度图像。
所述S3中,设定视频帧图像I(x,y,t)看作是由背景图像b(x,y,t)和运动目标m(x,y,t)组成,即I(x,y,t)=b(x,y,t)+m(x,y,t)。
背景差分法实现步骤:
步骤一:进行图像的预处理:主要包括对图像进行灰度化以及滤波;
步骤二:背景建模,根据前N帧图像的灰度值进行区间统计从而得到一个具有统计意义的初始背景;
步骤三:前景提取,将图像与背景做差,即可求得背景差图,然后根据一定的方法对改图进行二值化,最终获得运动前景区域,即实现图像分割。
所述S4中,将图像中每个像素中的灰度值与阈值相对比,灰度值大于阈值的算一种,灰度值小于阈值的为另一种,如果图像中存在多个检测目标或无关目标,那么就选多个阈值将每个目标及背景区分开。
所述S5中,手臂在身体的上半部分,脚在身体的下半部分,如果在某个区域内白点数比较多,则说明有肢体出现在该区域,如果事先能够定义好所有可能的姿态集合,并根据每一个姿态确定其区域组合,即可事先对姿态的判断。
本发明中,使用时,包括有以下步骤:
S1,根据肤色识别原理识别人体肤色,再根据裸露皮肤最大的区域进行人脸检测;
S2,将数字图像彩色图像进行灰度化;
S3,将当前的图像与背景图像进行差分,得到目标区域,从而进行运动目标识别;
S4,运用阈值法进行图像分割;
S5,通过长宽判断人体行为。
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。

Claims (7)

1.一种基于人脸检测的行为识别实现方法,其特征在于,包括有以下步骤:
S1,根据肤色识别原理识别人体肤色,再根据裸露皮肤最大的区域进行人脸检测;
S2,将数字图像彩色图像进行灰度化;
S3,将当前的图像与背景图像进行差分,得到目标区域,从而进行运动目标识别;
S4,运用阈值法进行图像分割;
S5,通过长宽判断人体行为。
2.根据权利要求1所述的一种基于人脸检测的行为识别实现方法,其特征在于,所述S1中,假设输入像素的颜色落入RCr=[140;170]和RCb=[80;120]限定的矩形区域是属于皮肤颜色像素,每个像素的灰度对应该点与皮肤颜色的相似度,相似度的计算公式如下:
P(CbCr)=exp[-0.5(x-m)TC-1(x-m)],其中m为均值,m=E(x),C为协方差矩阵,x=(CbCr)T,C=E(x-m)(x-mT)。
3.根据权利要求1所述的一种基于人脸检测的行为识别实现方法,其特征在于,所述S2中,设定彩色分量值R、G、B,使R=G=B=max(R,G,B)形成高亮度灰度图像。
4.根据权利要求1所述的一种基于人脸检测的行为识别实现方法,其特征在于,所述S3中,设定视频帧图像I(x,y,t)看作是由背景图像b(x,y,t)和运动目标m(x,y,t)组成,即I(x,y,t)=b(x,y,t)+m(x,y,t)。
5.根据权利要求1所述的一种基于人脸检测的行为识别实现方法,其特征在于,背景差分法实现步骤:
步骤一:进行图像的预处理:主要包括对图像进行灰度化以及滤波;
步骤二:背景建模,根据前N帧图像的灰度值进行区间统计从而得到一个具有统计意义的初始背景;
步骤三:前景提取,将图像与背景做差,即可求得背景差图,然后根据一定的方法对改图进行二值化,最终获得运动前景区域,即实现图像分割。
6.根据权利要求1所述的一种基于人脸检测的行为识别实现方法,其特征在于,所述S4中,将图像中每个像素中的灰度值与阈值相对比,灰度值大于阈值的算一种,灰度值小于阈值的为另一种,如果图像中存在多个检测目标或无关目标,那么就选多个阈值将每个目标及背景区分开。
7.根据权利要求1所述的一种基于人脸检测的行为识别实现方法,其特征在于,所述S5中,手臂在身体的上半部分,脚在身体的下半部分,如果在某个区域内白点数比较多,则说明有肢体出现在该区域,如果事先能够定义好所有可能的姿态集合,并根据每一个姿态确定其区域组合,即可事先对姿态的判断。
CN201910290964.7A 2019-04-11 2019-04-11 一种基于人脸检测的行为识别实现方法 Pending CN111815662A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910290964.7A CN111815662A (zh) 2019-04-11 2019-04-11 一种基于人脸检测的行为识别实现方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910290964.7A CN111815662A (zh) 2019-04-11 2019-04-11 一种基于人脸检测的行为识别实现方法

Publications (1)

Publication Number Publication Date
CN111815662A true CN111815662A (zh) 2020-10-23

Family

ID=72843621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910290964.7A Pending CN111815662A (zh) 2019-04-11 2019-04-11 一种基于人脸检测的行为识别实现方法

Country Status (1)

Country Link
CN (1) CN111815662A (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111699A (zh) * 2021-02-23 2021-07-13 福建星网锐捷通讯股份有限公司 一种基于红外摄像头的人体运动检测方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216885A (zh) * 2008-01-04 2008-07-09 中山大学 一种基于视频的行人人脸检测与跟踪算法
CN102324025A (zh) * 2011-09-06 2012-01-18 北京航空航天大学 基于高斯肤色模型和特征分析的人脸检测与跟踪方法
JP2012133666A (ja) * 2010-12-22 2012-07-12 Sogo Keibi Hosho Co Ltd 部位認識装置、部位認識方法、及び部位認識プログラム
CN103279750A (zh) * 2013-06-14 2013-09-04 清华大学 基于肤色范围的驾驶员手持电话行为检测方法
US20140062862A1 (en) * 2012-08-31 2014-03-06 Omron Corporation Gesture recognition apparatus, control method thereof, display instrument, and computer readable medium
CN108133204A (zh) * 2018-01-23 2018-06-08 歌尔科技有限公司 一种手体识别方法、装置、设备及计算机可读存储介质
CN108614988A (zh) * 2016-12-09 2018-10-02 广东技术师范学院 一种复杂背景下的运动手势自动识别***

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216885A (zh) * 2008-01-04 2008-07-09 中山大学 一种基于视频的行人人脸检测与跟踪算法
JP2012133666A (ja) * 2010-12-22 2012-07-12 Sogo Keibi Hosho Co Ltd 部位認識装置、部位認識方法、及び部位認識プログラム
CN102324025A (zh) * 2011-09-06 2012-01-18 北京航空航天大学 基于高斯肤色模型和特征分析的人脸检测与跟踪方法
US20140062862A1 (en) * 2012-08-31 2014-03-06 Omron Corporation Gesture recognition apparatus, control method thereof, display instrument, and computer readable medium
CN103279750A (zh) * 2013-06-14 2013-09-04 清华大学 基于肤色范围的驾驶员手持电话行为检测方法
CN108614988A (zh) * 2016-12-09 2018-10-02 广东技术师范学院 一种复杂背景下的运动手势自动识别***
CN108133204A (zh) * 2018-01-23 2018-06-08 歌尔科技有限公司 一种手体识别方法、装置、设备及计算机可读存储介质

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SUN HONGXING; WANG JIAYI; SUN PENG; ZOU XIAOYANG: "Facial area forecast and occluded face detection based on the YCbCr elliptical model", PROCEEDINGS 2013 INTERNATIONAL CONFERENCE ON MECHATRONIC SCIENCES, ELECTRIC ENGINEERING AND COMPUTER (MEC) *
宋世军;石来德;乔彩风;张建斌;: "运动人体图像分割算法研究", 中国工程机械学报, no. 01 *
李伟: "视频图像中人体运动目标检测与跟踪算法研究", 中国优秀硕士学位论文全文数据库信息科技, pages 2 - 3 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111699A (zh) * 2021-02-23 2021-07-13 福建星网锐捷通讯股份有限公司 一种基于红外摄像头的人体运动检测方法
CN113111699B (zh) * 2021-02-23 2023-11-14 福建星网锐捷通讯股份有限公司 一种基于红外摄像头的人体运动检测方法

Similar Documents

Publication Publication Date Title
CN103279737B (zh) 一种基于时空兴趣点的打架行为检测方法
Cheng et al. Scene analysis for object detection in advanced surveillance systems using Laplacian distribution model
Karpagavalli et al. Estimating the density of the people and counting the number of people in a crowd environment for human safety
Rohit et al. A review on abnormal crowd behavior detection
Kim et al. Robust foreground extraction technique using Gaussian family model and multiple thresholds
Murali et al. Segmentation of motion objects from surveillance video sequences using temporal differencing combined with multiple correlation
Singh et al. Motion detection for video surveillance
KR20200060868A (ko) 객체 탐지 및 자동 추적이 가능한 다시점 영상 감시 시스템
Ekinci et al. Background estimation based people detection and tracking for video surveillance
Hernández et al. People counting with re-identification using depth cameras
CN111815662A (zh) 一种基于人脸检测的行为识别实现方法
Dey et al. Moving object detection using genetic algorithm for traffic surveillance
Patel et al. Human tracking in video surveillance
Zarka et al. Real-time human motion detection and tracking
Ming et al. Background Modeling and Subtraction Using a Local-linear-dependence-based Cauchy Statistical Model.
Nam et al. Learning spatio-temporal topology of a multi-camera network by tracking multiple people
Kim et al. Robust silhouette extraction technique using background subtraction
Choi et al. A view-based real-time human action recognition system as an interface for human computer interaction
Moro et al. Auto-adaptive threshold and shadow detection approaches for pedestrians detection
Ibrahim et al. Human identification system based on moment invariant features
Goswami et al. Unusual event detection in low resolution video for enhancing ATM security
Huimin et al. A new thresholding method applied to motion detection
Ishitobi et al. Detection of a specific moving object from head-mounted camera images
Sato et al. Tracking soccer players using broadcast TV images
Frejlichowski et al. The removal of false detections from foreground regions extracted using adaptive background modelling for a visual surveillance system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination