[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107527357A - Face datection positioning and method for real time tracking in Violent scene - Google Patents

Face datection positioning and method for real time tracking in Violent scene Download PDF

Info

Publication number
CN107527357A
CN107527357A CN201710718630.6A CN201710718630A CN107527357A CN 107527357 A CN107527357 A CN 107527357A CN 201710718630 A CN201710718630 A CN 201710718630A CN 107527357 A CN107527357 A CN 107527357A
Authority
CN
China
Prior art keywords
mrow
mfrac
video frame
msup
violent scene
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.)
Granted
Application number
CN201710718630.6A
Other languages
Chinese (zh)
Other versions
CN107527357B (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.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN201710718630.6A priority Critical patent/CN107527357B/en
Publication of CN107527357A publication Critical patent/CN107527357A/en
Application granted granted Critical
Publication of CN107527357B publication Critical patent/CN107527357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/269Analysis of motion using gradient-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • 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
    • G06V40/162Detection; Localisation; Normalisation using pixel segmentation or colour matching
    • 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/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/44Event detection

Landscapes

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

Abstract

The present invention provides Face datection positioning and method for real time tracking in a kind of Violent scene, and this method includes the light stream vector amplitude for obtaining a pixel in monitoring video frame;Judge whether monitoring video frame is Violent scene according to light stream vector amplitude.The center O in face tracking region in initial Violent scene monitoring video frame is calculated according to the colour of skin average in YCbCr space and colour of skin variance0.According to the center O in face tracking region in initial Violent scene monitoring video frame0The center O in face tracking region in calculated for subsequent Violent scene monitoring video framem+1, finally according to the center O in face tracking regionm+1To obtain the face tracking region of m+1 frame Violent scene frame of video, detection positioning and the real-time tracking of face in Violent scene are realized.

Description

暴力场景中人脸检测定位与实时跟踪方法Face detection positioning and real-time tracking method in violent scenes

技术领域technical field

本发明涉及视频与图像处理领域,其特别涉及一种暴力场景中人脸检测定位与实时跟踪方法。The invention relates to the field of video and image processing, in particular to a face detection, positioning and real-time tracking method in a violent scene.

背景技术Background technique

暴力场景中人脸检测定位与实时跟踪在小区门禁系统、商场视频系统等犯罪监控场合具有重要应用。目前,在较理想条件下,正面人脸检测已取得了令人满意的效果。然而在复杂背景下,由于受多姿态、遮挡、光照等因素影响,人脸检测与实时跟踪成功率较低。Face detection, positioning and real-time tracking in violent scenes have important applications in criminal monitoring occasions such as community access control systems and shopping mall video systems. At present, under ideal conditions, frontal face detection has achieved satisfactory results. However, in complex backgrounds, due to factors such as multi-pose, occlusion, and illumination, the success rate of face detection and real-time tracking is low.

当前主流识别方法(例如LGBP、神经网络、PCA),都是基于静态图像进行人脸识别,不能应用到视频监控中暴力场景中人脸检测定位与跟踪,也缺乏实时跟踪多个对象的机制,其实用性受到限制。人体在运动(例如推搡、扭打)过程中,脸部会发生较大幅度的震动而造成人脸姿态特征发生变化,这会造成检测跟踪精确度降低。Current mainstream recognition methods (such as LGBP, neural network, PCA) are all based on static images for face recognition, which cannot be applied to face detection, positioning and tracking in violent scenes in video surveillance, and lack a mechanism for real-time tracking of multiple objects. Its usefulness is limited. During the movement of the human body (such as pushing and wrestling), the face will vibrate greatly, which will cause changes in the posture characteristics of the face, which will reduce the accuracy of detection and tracking.

发明内容Contents of the invention

本发明为了克服现有技术无法对暴力场景中的人脸进行识别的问题,提供一种能够精确地进行暴力场景下人脸检测定位与跟踪且实时性强的暴力场景中人脸检测定位与实时跟踪方法。In order to overcome the problem that the existing technology cannot recognize faces in violent scenes, the present invention provides a face detection, positioning and real-time face recognition in violent scenes that can accurately detect, locate and track faces in violent scenes and has strong real-time performance. tracking method.

为了实现上述目的,本发明提供一种暴力场景中人脸检测定位与实时跟踪方法,该方法包括:In order to achieve the above object, the present invention provides a face detection positioning and real-time tracking method in a violent scene, the method comprising:

步骤一,获取监控视频帧内每个像素的光流矢量幅度:Step 1, obtain the optical flow vector magnitude of each pixel in the surveillance video frame:

其中,(ui,j,t,vi,j,t)为像素p(i,j,t)的光流量,其中(i,j)为监控视频帧内像素的位置,t为视频帧序列索引;Among them, (u i,j,t ,v i,j,t ) is the optical flow of pixel p(i,j,t), where (i,j) is the position of the pixel in the surveillance video frame, and t is the video frame sequence index;

步骤二,暴力场景判断,当满足以下条件时,表征监控视频帧为暴力场景监控视频帧:Step 2, judging the violent scene, when the following conditions are met, the surveillance video frame is characterized as a violent scene surveillance video frame:

其中,Th为光流量判断阈值,N为一帧图像内像素的个数;Wherein, Th is the optical flow judgment threshold, and N is the number of pixels in one frame of image;

步骤三,将暴力场景监控视频帧从RGB空间转换到YCbCr颜色空间并建立图像颜色直方图;Step 3, converting the violent scene monitoring video frame from RGB space to YCbCr color space and establishing an image color histogram;

步骤四,根据YCbCr空间内的肤色均值与肤色方差计算初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0Step 4, calculate the center position O 0 of the face tracking area in the initial violent scene monitoring video frame according to the skin color mean value and skin color variance in the YCbCr space;

步骤五,根据初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0利用以下公式获得后续暴力场景监控视频帧内人脸跟踪区域的中心位置Om+1Step 5 , according to the center position O of the face tracking area in the initial violent scene monitoring video frame, use the following formula to obtain the center position O m+1 of the face tracking area in the follow-up violent scene monitoring video frame:

其中,k=1…L,m≡0…t,L为直方图段数索引,t为视频帧序列索引,Om为当前暴力场景监控视频帧内人脸跟踪区域的中心位置,Om+1为下一帧暴力场景监控视频帧内人脸跟踪区域的中心位置,I'(i,j)暴力场景监控视频帧内其它像素的Cb亮度,δ为狄拉克函数,c(i,j)为像素p(i,j,t)所在直方图段数,N1为图像垂直方向的像素个数,N2为图像水平方向的像素个数;Wherein, k=1...L, m≡0...t, L is the histogram segment index, t is the video frame sequence index, O m is the center position of the face tracking area in the current violent scene monitoring video frame, O m+1 is the center position of the face tracking area in the next violent scene monitoring video frame, I'(i, j) is the Cb brightness of other pixels in the violent scene monitoring video frame, δ is a Dirac function, and c(i, j) is The number of histogram segments where the pixel p(i, j, t) is located, N1 is the number of pixels in the vertical direction of the image, and N2 is the number of pixels in the horizontal direction of the image;

步骤六,以Om+1为中心利用边缘检测算子来获得人脸跟踪区域的临界像素,并对临界像素进行曲线拟合来形成第m+1帧暴力场景视频帧的人脸跟踪区域直至不再满足暴力场景的判断条件。Step 6, use the edge detection operator to obtain the critical pixels of the face tracking area centered on O m+1 , and carry out curve fitting to the critical pixels to form the face tracking area of the m+1th violent scene video frame until The judgment conditions for violent scenes are no longer met.

根据本发明的一实施例,光流量(ui,j,t,vi,j,t)采用差分的方式进行计算,计算公式如下:According to an embodiment of the present invention, the optical flux (u i,j,t ,v i,j,t ) is calculated in a differential manner, and the calculation formula is as follows:

其中I为像素p(i,j,t)的图像亮度,为横向亮度梯度,为纵向亮度梯度,为时间轴上亮度梯度。where I is the image brightness of pixel p(i,j,t), is the horizontal brightness gradient, is the longitudinal brightness gradient, is the brightness gradient on the time axis.

根据本发明的一实施例,初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0的确定采用如下步骤:According to an embodiment of the present invention, the determination of the center position O of the face tracking area in the initial violent scene monitoring video frame adopts the following steps :

首先,计算初始暴力场景监控视频帧内每一像素的Cb亮度与肤色的差异S(I(i,j)):First, calculate the difference S(I(i,j)) between the Cb brightness and skin color of each pixel in the initial violent scene monitoring video frame:

其中,μ肤色均值,σ为肤色方差;Among them, μ is the mean value of skin color, and σ is the variance of skin color;

其次,人脸区域判断,当S(I(i,j))>Th_skin时则表征像素p(i,j,t)属于人脸区域,其中Th_skin为肤色的差异阈值;Secondly, judge the face area. When S(I(i,j))>Th_skin, the representative pixel p(i,j,t) belongs to the face area, where Th_skin is the difference threshold of skin color;

最后,人脸区域提取,根据S(I(i,j))和Th_skin的关系提取临界像素并进行曲线拟合,形成初始暴力场景监控视频帧内人脸跟踪区域并获得初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0Finally, extract the face area, extract critical pixels according to the relationship between S(I(i,j)) and Th_skin and perform curve fitting to form the face tracking area in the initial violent scene monitoring video frame and obtain the initial violent scene monitoring video frame The center position O 0 of the inner face tracking area.

根据本发明的一实施例,采用以下公式将监控视频帧从RGB空间转换到YCbCr颜色空间:According to an embodiment of the present invention, adopt following formula to convert monitoring video frame from RGB space to YCbCr color space:

Y=0.257*R+0.564*G+0.098*B+16 (7)Y=0.257*R+0.564*G+0.098*B+16 (7)

Cb=-0.148*R-0.291*G+0.439*B+128 (8)Cb=-0.148*R-0.291*G+0.439*B+128 (8)

Cr=0.439*R-0.368*G-0.071*B+128 (9)Cr=0.439*R-0.368*G-0.071*B+128 (9)

其中,Y表示亮度,Cb反映的是RGB输入的蓝色分量与亮度的差异,Cr反映的是RGB输入的红色分量与亮度的差异.Among them, Y represents the brightness, Cb reflects the difference between the blue component and the brightness of the RGB input, and Cr reflects the difference between the red component and the brightness of the RGB input.

根据本发明的一实施例,采用椭圆曲线拟合的方式对临界像素进行曲线拟合从而形成人脸跟踪区域。According to an embodiment of the present invention, an elliptic curve fitting method is used to perform curve fitting on critical pixels so as to form a face tracking area.

根据本发明的一实施例,在步骤六中边缘检测算子为局部差分算子、Sobel算子或Canny算子中的任一种。According to an embodiment of the present invention, in step six, the edge detection operator is any one of local difference operator, Sobel operator or Canny operator.

综上所述,本发明提供的暴力场景中人脸检测定位与实时跟踪方法采用改进的光流法与曲线拟合进行人脸检测定位与跟踪方法,能够克服由于人体运动所造成的人脸难以准确定位以及跟踪困难的问题。进一步的,本发明提供的暴力场景中人脸检测定位与实时跟踪方法在满足检测定位与跟踪人脸精度的基础上,尽量简化算法。该算法大大提高了定位跟踪的实时性,对人脸形变具有一定的鲁棒性;且方便在ARM微控制器或单片机等嵌入式系统中实现,能很好的兼容现有的门禁监控系统。In summary, the face detection, positioning and real-time tracking method in the violent scene provided by the present invention adopts the improved optical flow method and curve fitting to carry out the face detection, positioning and tracking method, which can overcome the difficulty of face detection caused by human body movement. Pinpoint and track difficult issues. Further, the method for face detection, positioning and real-time tracking in violent scenes provided by the present invention simplifies the algorithm as much as possible on the basis of satisfying the accuracy of detection, positioning and tracking of faces. This algorithm greatly improves the real-time performance of location tracking and has certain robustness to face deformation; it is convenient to implement in embedded systems such as ARM microcontrollers or single-chip microcomputers, and can be well compatible with existing access control monitoring systems.

为让本发明的上述和其它目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合附图,作详细说明如下。In order to make the above and other objects, features and advantages of the present invention more comprehensible, preferred embodiments are described below in detail with accompanying drawings.

附图说明Description of drawings

图1所示为本发明一实施例提供的暴力场景中人脸检测定位与实时跟踪方法的流程图。FIG. 1 is a flow chart of a face detection, positioning and real-time tracking method in a violent scene provided by an embodiment of the present invention.

具体实施方式detailed description

如图1所示,本实施例提供的暴力场景中人脸检测定位与实时跟踪方法采用改进的光流法来检测暴力场景中的人脸,该方法始于步骤S10、获取监控视频帧内每个像素的光流矢量幅度mi,j,tAs shown in Figure 1, the face detection and positioning and real-time tracking method in the violent scene provided by this embodiment adopts the improved optical flow method to detect the face in the violent scene. The optical flow vector magnitude m i,j,t of pixels.

其中,(ui,j,t,vi,j,t)为像素p(i,j,t)的光流量,其中(i,j)为监控视频帧内像素的位置,t为视频帧序列索引。Among them, (u i,j,t ,v i,j,t ) is the optical flow of pixel p(i,j,t), where (i,j) is the position of the pixel in the surveillance video frame, and t is the video frame sequence index.

光流量(ui,j,t,vi,j,t)光流量(ui,j,t,vi,j,t)采用差分的方式进行计算,计算公式如下:The optical flow (u i,j,t ,v i,j,t ) optical flow (u i,j,t ,v i,j,t ) is calculated by difference, and the calculation formula is as follows:

其中I为像素p(i,j,t)的图像亮度,为横向亮度梯度,为纵向亮度梯度,为时间轴上亮度梯度。where I is the image brightness of pixel p(i,j,t), is the horizontal brightness gradient, is the longitudinal brightness gradient, is the brightness gradient on the time axis.

传统的光流法才用微分的方式进行计算,利用光流的基本方程并附加一定的约束条件来得到致密的光流场,这种方式计算量非常的大,实时性很差,很难用于跟踪暴力场景中的快速移动或晃动的人脸,无法用于人脸的识别与跟踪。本实施例首先采用差分的方式替代传统光流法中的微分,接着采用计算方式简单的光流矢量幅度mi,j,t来作为暴力场景的判断参数,具有很高的检测精度且计算方式简单,对门禁系统内的微处理器的要求较低,可与小区或办公楼内的门禁系统相兼容。进一步的,通过大量的实验表明采用光流矢量幅度进行暴力场景的检测具有很好的鲁棒性。The traditional optical flow method is calculated in a differential way, using the basic equation of optical flow and adding certain constraints to obtain a dense optical flow field. This method has a very large amount of calculation, poor real-time performance, and is difficult to use. For tracking fast-moving or shaking faces in violent scenes, it cannot be used for face recognition and tracking. This embodiment first adopts the difference method to replace the differential in the traditional optical flow method, and then uses the optical flow vector magnitude m i,j,t with a simple calculation method as the judgment parameter of the violent scene, which has high detection accuracy and the calculation method Simple, low requirements on the microprocessor in the access control system, compatible with the access control system in the community or office building. Furthermore, a large number of experiments show that the detection of violent scenes using optical flow vector magnitude has good robustness.

当获得光流矢量幅度mi,j,t后执行步骤S20,根据光流矢量幅度mi,j,t来判断当前的监控视频帧是否为暴力场景。Step S20 is executed after the optical flow vector magnitude m i ,j,t is obtained, and whether the current surveillance video frame is a violent scene is judged according to the optical flow vector magnitude mi,j,t.

当监控视频帧的光流矢量幅度满足公式(2)时则表征监控视频帧为暴力场景监控视频帧。When the magnitude of the optical flow vector of the surveillance video frame satisfies formula (2), it indicates that the surveillance video frame is a violent scene surveillance video frame.

其中,Th为光流量判断阈值,N为一帧图像内像素的个数。Wherein, Th is the optical flow judgment threshold, and N is the number of pixels in one frame of image.

当判断当前视频帧为暴力场景监控视频帧后,需要对暴力场景内的人脸进行识别。执行步骤S30,将暴力场景监控视频帧从RGB空间转换到YCbCr颜色空间并建立图像颜色直方图。After judging that the current video frame is a violent scene surveillance video frame, it is necessary to recognize faces in the violent scene. Step S30 is executed to convert the violent scene monitoring video frame from RGB space to YCbCr color space and establish an image color histogram.

RGB空间转换到YCbCr颜色空间的公式如下:The formula for converting RGB space to YCbCr color space is as follows:

Y=0.257*R+0.564*G+0.098*B+16 (7)Y=0.257*R+0.564*G+0.098*B+16 (7)

Cb=-0.148*R-0.291*G+0.439*B+128 (8)Cb=-0.148*R-0.291*G+0.439*B+128 (8)

Cr=0.439*R-0.368*G-0.071*B+128 (9)。Cr=0.439*R-0.368*G-0.071*B+128 (9).

Y表示亮度,Cb反映的是RGB输入的蓝色分量与亮度的差异,Cr反映的是RGB输入的红色分量与亮度的差异。Y represents brightness, Cb reflects the difference between the blue component and brightness of RGB input, and Cr reflects the difference between the red component and brightness of RGB input.

执行步骤S40、根据YCbCr空间内的肤色均值与肤色方差计算初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0,具体计算方式如下:Execute step S40, calculate the center position O 0 of the face tracking area in the initial violent scene monitoring video frame according to the skin color mean value and skin color variance in the YCbCr space, and the specific calculation method is as follows:

首先,计算初始暴力场景视频帧内每一像素的Cb亮度与肤色的差异S(I(i,j)):First, calculate the difference S(I(i,j)) between the Cb brightness and skin color of each pixel in the initial violent scene video frame:

其中,μ肤色均值,σ为肤色方差;Among them, μ is the mean value of skin color, and σ is the variance of skin color;

其次,人脸区域判断,当S(I(i,j))>Th_skin时则表征像素p(i,j,t)属于人脸区域,其中Th_skin为肤色的差异阈值;Secondly, judge the face area. When S(I(i,j))>Th_skin, the representative pixel p(i,j,t) belongs to the face area, where Th_skin is the difference threshold of skin color;

最后,人脸区域提取,根据S(I(i,j))和Th_skin的关系提取临界像素并进行曲线拟合,形成初始暴力场景视频帧内人脸跟踪区域并获得初始暴力场景视频帧内人脸跟踪区域的中心位置O0Finally, extract the face area, extract the critical pixels according to the relationship between S(I(i,j)) and Th_skin and perform curve fitting to form the face tracking area in the initial violent scene video frame and obtain the human face in the initial violent scene video frame The center position O 0 of the face tracking area.

在获得初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0后执行步骤S50、根据初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0利用以下公式获得后续暴力场景监控视频帧内人脸跟踪区域的中心位置Om+1Execute step S50 after obtaining the center position O of the face tracking area in the initial violent scene monitoring video frame, use the following formula to obtain the follow-up violent scene monitoring video frame according to the center position O of the face tracking area in the initial violent scene monitoring video frame The center position O m+1 of the inner face tracking area:

其中,k=1…L,m≡0…t,L为直方图段数索引,t为视频帧序列索引,Om为当前暴力场景监控视频帧内人脸跟踪区域的中心位置,Om+1为下一帧暴力场景监控视频帧内人脸跟踪区域的中心位置,I'(i,j)为暴力场景监控视频帧内其它像素的Cb亮度,δ为狄拉克函数,c(i,j)为像素p(i,j,t)所在直方图段数,N1为图像垂直方向的像素个数,N2为图像水平方向的像素个数。Wherein, k=1...L, m≡0...t, L is the histogram segment index, t is the video frame sequence index, O m is the center position of the face tracking area in the current violent scene monitoring video frame, O m+1 is the center position of the face tracking area in the next violent scene monitoring video frame, I'(i,j) is the Cb brightness of other pixels in the violent scene monitoring video frame, δ is the Dirac function, c(i,j) is the number of histogram segments where the pixel p(i, j, t) is located, N1 is the number of pixels in the vertical direction of the image, and N2 is the number of pixels in the horizontal direction of the image.

步骤S60、以Om+1为中心利用边缘检测算子来获得人脸跟踪区域的临界像素,并对临界像素进行曲线拟合来形成第m+1帧暴力场景视频帧的人脸跟踪区域,直至不再满足暴力场景的判断条件,即满足完成所有暴力场景监控视频帧内的人脸的识别。Step S60, take Om +1 as the center and use the edge detection operator to obtain the critical pixels of the face tracking area, and carry out curve fitting to the critical pixels to form the face tracking area of the m+1th violent scene video frame, Until the judging conditions for violent scenes are no longer met, that is, Complete face recognition in surveillance video frames of all violent scenes.

本实施例提供的暴力场景中人脸检测定位与实时跟踪方法利用前一暴力场景监控视频帧内人脸跟踪区域的中心位置来获得后一暴力场景监控视频帧内人脸跟踪区域的中心位置,点对点的计算方式计算量小,故可大幅度提高人脸跟踪的实时性,之后再根据人脸的肤色(肤色是人脸的重要特征)利用边缘检测算子来形成人脸跟中区域,具有很好的检测精度。The face detection and positioning and real-time tracking method in the violent scene provided by the present embodiment utilizes the center position of the face tracking area in the previous violent scene monitoring video frame to obtain the center position of the face tracking area in the latter violent scene monitoring video frame, The point-to-point calculation method has a small amount of calculation, so it can greatly improve the real-time performance of face tracking, and then use the edge detection operator to form the center area of the face according to the skin color of the face (skin color is an important feature of the face). Very good detection accuracy.

于本实施例中,边缘检测算子为局部差分算子。然而,本发明对此不作任何限定。于其它实施例中,可采用Sobel算子或Canny算子等其它边缘检测算子。In this embodiment, the edge detection operator is a local difference operator. However, the present invention does not make any limitation thereto. In other embodiments, other edge detection operators such as Sobel operator or Canny operator can be used.

人脸基本成椭圆形且椭圆拟合的参数相对比较简单,故于本实施例中,在暴力场景监控视频帧内形成人脸跟踪区域时采用椭圆曲线拟合的方式。然而,本发明对此不作任何限定。于其它实施例中,可采用其它与人脸轮廓匹配精度更高的曲线进行拟合。曲线拟合的精度越高,相对应的其所需要的计算量也会增加,本实施例采用椭圆拟合的方式来平衡拟合精度和计算量,使其能更好的应用在计算能力有限的门禁系统内。The face is basically elliptical and the parameters of ellipse fitting are relatively simple. Therefore, in this embodiment, an elliptic curve fitting method is used when forming a face tracking area in a violent scene monitoring video frame. However, the present invention does not make any limitation thereto. In other embodiments, other curves with higher matching accuracy to the contour of the human face can be used for fitting. The higher the accuracy of curve fitting, the corresponding amount of calculation it needs will also increase. This embodiment adopts the method of ellipse fitting to balance the fitting accuracy and the amount of calculation, so that it can be better applied to applications with limited computing power. in the access control system.

综上所述,本发明提供的暴力场景中人脸检测定位与实时跟踪方法采用改进的光流法与曲线拟合进行人脸检测定位与跟踪方法,能够克服由于人体运动所造成的人脸难以准确定位以及跟踪困难的问题。进一步的,本发明提供的暴力场景中人脸检测定位与实时跟踪方法在满足检测定位与跟踪人脸精度的基础上,尽量简化算法。该算法大大提高了定位跟踪的实时性,对人脸形变具有一定的鲁棒性;且方便在ARM微控制器或单片机等嵌入式系统中实现,能很好的兼容现有的门禁监控系统。In summary, the face detection, positioning and real-time tracking method in the violent scene provided by the present invention adopts the improved optical flow method and curve fitting to carry out the face detection, positioning and tracking method, which can overcome the difficulty of face detection caused by human body movement. Pinpoint and track difficult issues. Further, the method for face detection, positioning and real-time tracking in violent scenes provided by the present invention simplifies the algorithm as much as possible on the basis of satisfying the accuracy of detection, positioning and tracking of faces. This algorithm greatly improves the real-time performance of location tracking and has certain robustness to face deformation; it is convenient to implement in embedded systems such as ARM microcontrollers or single-chip microcomputers, and can be well compatible with existing access control monitoring systems.

虽然本发明已由较佳实施例揭露如上,然而并非用以限定本发明,任何熟知此技艺者,在不脱离本发明的精神和范围内,可作些许的更动与润饰,因此本发明的保护范围当视权利要求书所要求保护的范围为准。Although the present invention has been disclosed above by preferred embodiments, it is not intended to limit the present invention. Any skilled person can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection shall be subject to the scope of protection required by the claims.

Claims (6)

1.一种暴力场景中人脸检测定位与实时跟踪方法,其特征在于,包括:1. A face detection positioning and real-time tracking method in a violent scene, characterized in that it comprises: 步骤一,获取监控视频帧内每个像素的光流矢量幅度:Step 1, obtain the optical flow vector magnitude of each pixel in the surveillance video frame: <mrow> <msub> <mi>m</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>t</mi> </mrow> </msub> <mo>=</mo> <msqrt> <mrow> <msubsup> <mi>u</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>t</mi> </mrow> <mn>2</mn> </msubsup> <mo>+</mo> <msubsup> <mi>v</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>i</mi> <mo>,</mo> <mi>t</mi> </mrow> <mn>2</mn> </msubsup> </mrow> </msqrt> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow> <mrow><msub><mi>m</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi><mo>,</mo><mi>t</mi></mrow></msub><mo>=</mo><msqrt><mrow><msubsup><mi>u</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi><mo>,</mo><mi>t</mi></mrow><mn>2</mn></msubsup><mo>+</mo><msubsup><mi>v</mi><mrow><mi>i</mi><mo>,</mo><mi>i</mi><mo>,</mo><mi>t</mi></mrow><mn>2</mn></msubsup></mrow></msqrt><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>1</mn><mo>)</mo></mrow></mrow> 其中,(ui,j,t,vi,j,t)为像素p(i,j,t)的光流量,其中(i,j)为监控视频帧内像素的位置,t为视频帧序列索引;Among them, (u i,j,t ,v i,j,t ) is the optical flow of pixel p(i,j,t), where (i,j) is the position of the pixel in the surveillance video frame, and t is the video frame sequence index; 步骤二,暴力场景判断,当满足以下条件时,表征监控视频帧为暴力场景监控视频帧:Step 2, judging the violent scene, when the following conditions are met, the surveillance video frame is characterized as a violent scene surveillance video frame: <mrow> <mfrac> <mrow> <munder> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> </mrow> </munder> <msup> <mrow> <mo>(</mo> <msub> <mi>m</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>t</mi> <mo>+</mo> <mn>1</mn> </mrow> </msub> <mo>-</mo> <msub> <mi>m</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>t</mi> </mrow> </msub> <mo>)</mo> </mrow> <mn>2</mn> </msup> </mrow> <mi>N</mi> </mfrac> <mo>&gt;</mo> <mo>=</mo> <mi>T</mi> <mi>h</mi> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>2</mn> <mo>)</mo> </mrow> </mrow> <mrow><mfrac><mrow><munder><mo>&amp;Sigma;</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow></munder><msup><mrow><mo>(</mo><msub><mi>m</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi><mo>,</mo><mi>t</mi><mo>+</mo><mn>1</mn></mrow></msub><mo>-</mo><msub><mi>m</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi><mo>,</mo><mi>t</mi></mrow></msub><mo>)</mo></mrow><mn>2</mn></msup></mrow><mi>N</mi></mfrac><mo>&gt;</mo><mo>=</mo><mi>T</mi><mi>h</mi><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>2</mn><mo>)</mo></mrow></mrow> 其中,Th为光流量判断阈值,N为一帧图像内像素的个数;Wherein, Th is the optical flow judgment threshold, and N is the number of pixels in one frame of image; 步骤三,将暴力场景监控视频帧从RGB空间转换到YCbCr颜色空间并建立图像颜色直方图;Step 3, converting the violent scene monitoring video frame from RGB space to YCbCr color space and establishing an image color histogram; 步骤四,根据YCbCr空间内的肤色均值与肤色方差计算初始暴力场景监控视频帧内人脸跟踪区域的中心位置O°;Step 4, calculate the center position 0° of the face tracking area in the initial violent scene monitoring video frame according to the skin color mean value and the skin color variance in the YCbCr space; 步骤五,根据初始暴力场景监控视频帧内人脸跟踪区域的中心位置O°利用以下公式获得后续暴力场景监控视频帧内人脸跟踪区域的中心位置Om+1Step 5, according to the center position O° of the face tracking area in the initial violent scene monitoring video frame, use the following formula to obtain the center position O m+1 of the face tracking area in the follow-up violent scene monitoring video frame: <mrow> <msup> <mi>O</mi> <mrow> <mi>m</mi> <mo>+</mo> <mn>1</mn> </mrow> </msup> <mo>=</mo> <mfrac> <mrow> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mn>1</mn> </mrow> </munderover> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mn>2</mn> </mrow> </munderover> <mo>|</mo> <msup> <mi>I</mi> <mo>&amp;prime;</mo> </msup> <mrow> <mo>(</mo> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> </mrow> <mo>)</mo> </mrow> <mo>-</mo> <mi>I</mi> <mrow> <mo>(</mo> <msup> <mi>O</mi> <mi>m</mi> </msup> <mo>)</mo> </mrow> <mo>|</mo> <msub> <mi>Q</mi> <mi>k</mi> </msub> </mrow> <mrow> <munderover> <mi>&amp;Sigma;</mi> <mrow> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>L</mi> </munderover> <msub> <mi>Q</mi> <mi>k</mi> </msub> </mrow> </mfrac> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> <mrow><msup><mi>O</mi><mrow><mi>m</mi><mo>+</mo><mn>1</mn></mrow></msup><mo>=</mo><mfrac><mrow><munderover><mi>&amp;Sigma;</mi><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>N</mi><mn>1</mn></mrow></munderover><munderover><mi>&amp;Sigma;</mi><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>N</mi><mn>2</mn></mrow></munderover><mo>|</mo><msup><mi>I</mi><mo>&amp;prime;</mo></msup><mrow><mo>(</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow><mo>)</mo></mrow><mo>-</mo><mi>I</mi><mrow><mo>(</mo><msup><mi>O</mi><mi>m</mi></msup><mo>)</mo></mrow><mo>|</mo><msub><mi>Q</mi><mi>k</mi></msub></mrow><mrow><munderover><mi>&amp;Sigma;</mi><mrow><mi>k</mi><mo>=</mo><mn>1</mn></mrow><mi>L</mi></munderover><msub><mi>Q</mi><mi>k</mi></msub></mrow></mfrac><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>3</mn><mo>)</mo></mrow></mrow> <mrow> <msub> <mi>Q</mi> <mi>k</mi> </msub> <mo>=</mo> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mn>1</mn> </mrow> </munderover> <munderover> <mo>&amp;Sigma;</mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>N</mi> <mn>2</mn> </mrow> </munderover> <mi>exp</mi> <mrow> <mo>(</mo> <mo>-</mo> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> <mo>|</mo> <mi>I</mi> <mo>(</mo> <msup> <mi>O</mi> <mi>m</mi> </msup> <mo>)</mo> <mo>-</mo> <msup> <mi>I</mi> <mo>&amp;prime;</mo> </msup> <mo>(</mo> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> </mrow> <mo>)</mo> <msup> <mo>|</mo> <mn>2</mn> </msup> <mo>)</mo> </mrow> <mi>&amp;delta;</mi> <mrow> <mo>(</mo> <mi>c</mi> <mo>(</mo> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> </mrow> <mo>)</mo> <mo>-</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>4</mn> <mo>)</mo> </mrow> </mrow> <mrow><msub><mi>Q</mi><mi>k</mi></msub><mo>=</mo><munderover><mo>&amp;Sigma;</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>N</mi><mn>1</mn></mrow></munderover><munderover><mo>&amp;Sigma;</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mrow><mi>N</mi><mn>2</mn></mrow></munderover><mi>exp</mi><mrow><mo>(</mo><mo>-</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>|</mo><mi>I</mi><mo>(</mo><msup><mi>O</mi><mi>m</mi></msup><mo>)</mo><mo>-</mo><msup><mi>I</mi><mo>&amp;prime;</mo></msup><mo>(</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow><mo>)</mo><msup><mo>|</mo><mn>2</mn></msup><mo>)</mo></mrow><mi>&amp;delta;</mi><mrow><mo>(</mo><mi>c</mi><mo>(</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow><mo>)</mo><mo>-</mo><mi>k</mi><mo>)</mo></mrow><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>4</mn><mo>)</mo></mrow></mrow> 其中,k=1…L,m≡0…t,L为直方图段数索引,t为视频帧序列索引,Om为当前暴力场景监控视频帧内人脸跟踪区域的中心位置,Om+1为下一帧监控视频帧内人脸跟踪区域的中心位置,I'(i,j)为暴力场景监控视频帧内其它像素的Cb亮度,δ为狄拉克函数,c(i,j)为像素p(i,j,t)所在直方图段数,N1为图像垂直方向的像素个数,N2为图像水平方向的像素个数;Wherein, k=1...L, m≡0...t, L is the histogram segment index, t is the video frame sequence index, O m is the center position of the face tracking area in the current violent scene monitoring video frame, O m+1 is the center position of the face tracking area in the next surveillance video frame, I'(i,j) is the Cb brightness of other pixels in the violent scene surveillance video frame, δ is the Dirac function, and c(i,j) is the pixel The number of histogram segments where p(i, j, t) is located, N1 is the number of pixels in the vertical direction of the image, and N2 is the number of pixels in the horizontal direction of the image; 步骤六,以Om+1为中心利用边缘检测算子来获得人脸跟踪区域的临界像素,并对临界像素进行曲线拟合来形成第m+1帧暴力场景视频帧的人脸跟踪区域直至不再满足暴力场景的判断条件。Step 6, use the edge detection operator to obtain the critical pixels of the face tracking area centered on O m+1 , and carry out curve fitting to the critical pixels to form the face tracking area of the m+1th violent scene video frame until The judgment conditions for violent scenes are no longer met. 2.根据权利要求1所述的暴力场景中人脸检测定位与实时跟踪方法,其特征在于,光流量(ui,j,t,vi,j,t)采用差分的方式进行计算,计算公式如下:2. The face detection and positioning and real-time tracking method in the violent scene according to claim 1, wherein the optical flow (u i, j, t , v i, j, t ) is calculated in a differential manner, and the calculation The formula is as follows: <mrow> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <msub> <mi>u</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>t</mi> </mrow> </msub> </mtd> </mtr> <mtr> <mtd> <msub> <mi>v</mi> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>t</mi> </mrow> </msub> </mtd> </mtr> </mtable> </mfenced> <mo>=</mo> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <msup> <mrow> <mo>(</mo> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>x</mi> </mrow> </mfrac> <mo>)</mo> </mrow> <mn>2</mn> </msup> </mtd> <mtd> <mrow> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>x</mi> </mrow> </mfrac> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>y</mi> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>x</mi> </mrow> </mfrac> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>y</mi> </mrow> </mfrac> </mrow> </mtd> <mtd> <msup> <mrow> <mo>(</mo> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>y</mi> </mrow> </mfrac> <mo>)</mo> </mrow> <mn>2</mn> </msup> </mtd> </mtr> </mtable> </mfenced> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mrow> <mo>-</mo> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>x</mi> </mrow> </mfrac> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>t</mi> </mrow> </mfrac> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mo>-</mo> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>y</mi> </mrow> </mfrac> <mfrac> <mrow> <mo>&amp;part;</mo> <mi>I</mi> </mrow> <mrow> <mo>&amp;part;</mo> <mi>t</mi> </mrow> </mfrac> </mrow> </mtd> </mtr> </mtable> </mfenced> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>5</mn> <mo>)</mo> </mrow> </mrow> <mrow><mfenced open = "[" close = "]"><mtable><mtr><mtd><msub><mi>u</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi><mo>,</mo><mi>t</mi></mrow></msub></mtd></mtr><mtr><mtd><msub><mi>v</mi><mrow><mi>i</mi><mo>,</mo><mi>j</mi><mo>,</mo><mi>t</mi></mrow></msub></mtd></mtr></mtable></mfenced><mo>=</mo><mfenced open = "[" close = "]"><mtable><mtr><mtd><msup><mrow><mo>(</mo><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>x</mi></mrow></mfrac><mo>)</mo></mrow><mn>2</mn></msup></mtd><mtd><mrow><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>x</mi></mrow></mfrac><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>y</mi></mrow></mfrac></mrow></mtd></mtr><mtr><mtd><mrow><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>x</mi></mrow></mfrac><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>y</mi></mrow></mfrac></mrow></mtd><mtd><msup><mrow><mo>(</mo><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>y</mi></mrow></mfrac><mo>)</mo></mrow><mn>2</mn></msup></mtd></mtr></mtable></mfenced><mfenced open = "[" close = "]"><mtable><mtr><mtd><mrow><mo>-</mo><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>x</mi></mrow></mfrac><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>t</mi></mrow></mrow></mrow>mfrac></mrow></mtd></mtr><mtr><mtd><mrow><mo>-</mo><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>y</mi></mrow></mfrac><mfrac><mrow><mo>&amp;part;</mo><mi>I</mi></mrow><mrow><mo>&amp;part;</mo><mi>t</mi></mrow></mfrac></mrow></mtd></mtr></mtable></mfenced><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>5</mn><mo>)</mo></mrow></mrow> 其中I为像素p(i,j,t)的图像亮度,为横向亮度梯度,为纵向亮度梯度,为时间轴上亮度梯度。where I is the image brightness of pixel p(i,j,t), is the horizontal brightness gradient, is the longitudinal brightness gradient, is the brightness gradient on the time axis. 3.根据权利要求1所述的暴力场景中人脸检测定位与实时跟踪方法,其特征在于,初始暴力场景监控视频帧内人脸跟踪区域的中心位置O0的确定采用如下步骤:3. face detection positioning and real-time tracking method in the violent scene according to claim 1, it is characterized in that, the determination of the central position O of the face tracking area in the initial violent scene monitoring video frame adopts the following steps : 首先,计算初始暴力场景监控视频帧内每一像素的Cb亮度与肤色的差异S(I(i,j)):First, calculate the difference S(I(i,j)) between the Cb brightness and skin color of each pixel in the initial violent scene monitoring video frame: <mrow> <mi>S</mi> <mrow> <mo>(</mo> <mi>I</mi> <mo>(</mo> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> </mrow> <mo>)</mo> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mrow> <msqrt> <mrow> <mn>2</mn> <mi>&amp;pi;</mi> </mrow> </msqrt> <mi>&amp;sigma;</mi> </mrow> </mfrac> <msup> <mi>e</mi> <mrow> <mo>-</mo> <mfrac> <msup> <mrow> <mo>(</mo> <mi>I</mi> <mo>(</mo> <mrow> <mi>i</mi> <mo>,</mo> <mi>j</mi> </mrow> <mo>)</mo> <mo>-</mo> <mi>&amp;mu;</mi> <mo>)</mo> </mrow> <mn>2</mn> </msup> <mrow> <mn>2</mn> <msup> <mi>&amp;sigma;</mi> <mn>2</mn> </msup> </mrow> </mfrac> </mrow> </msup> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>6</mn> <mo>)</mo> </mrow> </mrow> <mrow><mi>S</mi><mrow><mo>(</mo><mi>I</mi><mo>(</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow><mo>)</mo><mo>)</mo></mrow><mo>=</mo><mfrac><mn>1</mn><mrow><msqrt><mrow><mn>2</mn><mi>&amp;pi;</mi></mrow></msqrt><mi>&amp;sigma;</mi></mrow></mfrac><msup><mi>e</mi><mrow><mo>-</mo><mfrac><msup><mrow><mo>(</mo><mi>I</mi><mo>(</mo><mrow><mi>i</mi><mo>,</mo><mi>j</mi></mrow><mo>)</mo><mo>-</mo><mi>&amp;mu;</mi><mo>)</mo></mrow><mn>2</mn></msup><mrow><mn>2</mn><msup><mi>&amp;sigma;</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup><mo>-</mo><mo>-</mo><mo>-</mo><mrow><mo>(</mo><mn>6</mn><mo>)</mo></mrow></mrow> 其中,μ肤色均值,σ为肤色方差;Among them, μ is the mean value of skin color, and σ is the variance of skin color; 其次,人脸区域判断,当S(I(i,j))>Th_skin时则表征像素p(i,j,t)属于人脸区域,其中Th_skin为肤色的差异阈值;Secondly, judge the face area. When S(I(i,j))>Th_skin, the representative pixel p(i,j,t) belongs to the face area, where Th_skin is the difference threshold of skin color; 最后,人脸区域提取,根据S(I(i,j))和Th_skin的关系提取临界像素并进行曲线拟合,形成初始暴力场景监控视频帧内人脸跟踪区域并获得初始暴力场景监控视频帧内人脸跟踪区域的中心位置O°。Finally, extract the face area, extract critical pixels according to the relationship between S(I(i,j)) and Th_skin and perform curve fitting to form the face tracking area in the initial violent scene monitoring video frame and obtain the initial violent scene monitoring video frame The center position O° of the inner face tracking area. 4.根据权利要求1所述的暴力场景中人脸检测定位与实时跟踪方法,其特征在于,采用以下公式将监控视频帧从RGB空间转换到YCbCr颜色空间:4. face detection location and real-time tracking method in the violent scene according to claim 1, it is characterized in that, adopt following formula to convert monitoring video frame to YCbCr color space from RGB space: Y=0.257*R+0.564*G+0.098*B+16 (7)Y=0.257*R+0.564*G+0.098*B+16 (7) Cb=-0.148*R-0.291*G+0.439*B+128 (8)Cb=-0.148*R-0.291*G+0.439*B+128 (8) Cr=0.439*R-0.368*G-0.071*B+128 (9)Cr=0.439*R-0.368*G-0.071*B+128 (9) 其中,Y表示亮度,Cb反映的是RGB输入的蓝色分量与亮度的差异,Cr反映的是RGB输入的红色分量与亮度的差异。Among them, Y represents the brightness, Cb reflects the difference between the blue component and the brightness of the RGB input, and Cr reflects the difference between the red component and the brightness of the RGB input. 5.根据权利要求1或3所述的暴力场景中人脸检测定位与实时跟踪方法,其特征在于,采用椭圆曲线拟合的方式对临界像素进行曲线拟合从而形成人脸跟踪区域。5. The face detection, positioning and real-time tracking method in a violent scene according to claim 1 or 3, characterized in that, the critical pixels are curve-fitted by means of elliptic curve fitting to form a face tracking area. 6.根据权利要求1所述的暴力场景中人脸检测定位与实时跟踪方法,其特征在于,在步骤六中所述边缘检测算子为局部差分算子、Sobel算子或Canny算子中的任一种。6. face detection location and real-time tracking method in the violent scene according to claim 1, it is characterized in that, in step 6, described edge detection operator is local difference operator, Sobel operator or Canny operator any kind.
CN201710718630.6A 2017-08-21 2017-08-21 Face detection positioning and real-time tracking method in violent scenes Active CN107527357B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710718630.6A CN107527357B (en) 2017-08-21 2017-08-21 Face detection positioning and real-time tracking method in violent scenes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710718630.6A CN107527357B (en) 2017-08-21 2017-08-21 Face detection positioning and real-time tracking method in violent scenes

Publications (2)

Publication Number Publication Date
CN107527357A true CN107527357A (en) 2017-12-29
CN107527357B CN107527357B (en) 2019-11-22

Family

ID=60681585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710718630.6A Active CN107527357B (en) 2017-08-21 2017-08-21 Face detection positioning and real-time tracking method in violent scenes

Country Status (1)

Country Link
CN (1) CN107527357B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359551A (en) * 2018-09-21 2019-02-19 深圳市璇玑实验室有限公司 A kind of nude picture detection method and system based on machine learning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750527A (en) * 2012-06-26 2012-10-24 浙江捷尚视觉科技有限公司 Long-time stable human face detection and tracking method in bank scene and long-time stable human face detection and tracking device in bank scene
US20150003686A1 (en) * 2013-06-28 2015-01-01 Hulu, LLC Local Binary Pattern-based Optical Flow

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750527A (en) * 2012-06-26 2012-10-24 浙江捷尚视觉科技有限公司 Long-time stable human face detection and tracking method in bank scene and long-time stable human face detection and tracking device in bank scene
US20150003686A1 (en) * 2013-06-28 2015-01-01 Hulu, LLC Local Binary Pattern-based Optical Flow

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
REN C. LUO ET AL: "Alignment and tracking of facial features with component-based active appearance models and optical flow", 《2011 IEEE/ASME INTERNATIONAL CONFERENCE ON ADVANCED INTELLIGENT MECHATRONICS (AIM)》 *
程远航: "基于光流法的视频人脸特征点跟踪方法", 《计算机与现代化》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359551A (en) * 2018-09-21 2019-02-19 深圳市璇玑实验室有限公司 A kind of nude picture detection method and system based on machine learning

Also Published As

Publication number Publication date
CN107527357B (en) 2019-11-22

Similar Documents

Publication Publication Date Title
CN102750708B (en) Affine motion target tracing algorithm based on fast robust feature matching
CN111178161B (en) Vehicle tracking method and system based on FCOS
US20110299774A1 (en) Method and system for detecting and tracking hands in an image
CN103942539B (en) A kind of oval accurate high efficiency extraction of head part and masking method for detecting human face
CN105138987B (en) A kind of vehicle checking method based on converging channels feature and estimation
CN103955918A (en) Full-automatic fine image matting device and method
CN109523551B (en) A method and system for obtaining the walking posture of a robot
CN104715244A (en) Multi-viewing-angle face detection method based on skin color segmentation and machine learning
JP6157165B2 (en) Gaze detection device and imaging device
CN104899881B (en) Moving vehicle shadow detection method in a kind of video image
CN103400142B (en) A kind of pedestrian counting method
CN106909884B (en) Hand region detection method and device based on layered structure and deformable part model
CN105868735A (en) Human face-tracking preprocessing method and video-based intelligent health monitoring system
CN102236785B (en) Method for pedestrian matching between viewpoints of non-overlapped cameras
CN105469431A (en) Tracking method based on sparse subspace
CN109410235B (en) Target tracking method fusing edge features
CN110222647A (en) A kind of human face in-vivo detection method based on convolutional neural networks
CN109948570B (en) Real-time detection method for unmanned aerial vehicle in dynamic environment
CN114037087B (en) Model training method and device, depth prediction method and device, equipment and medium
KR20190105273A (en) Preprocessing method for color filtering robust against illumination environment and the system thereof
CN107527357B (en) Face detection positioning and real-time tracking method in violent scenes
CN108647605A (en) A kind of combination global color and the human eye of partial structurtes feature stare point extracting method
CN104637062A (en) Target tracking method based on particle filter integrating color and SURF (speeded up robust feature)
CN109033969B (en) Infrared target detection method based on Bayesian saliency map calculation model
Low et al. Experimental study on multiple face detection with depth and skin color

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
GR01 Patent grant
GR01 Patent grant