[go: up one dir, main page]

CN106446837A - Hand waving detection method based on motion historical images - Google Patents

Hand waving detection method based on motion historical images Download PDF

Info

Publication number
CN106446837A
CN106446837A CN201610859376.7A CN201610859376A CN106446837A CN 106446837 A CN106446837 A CN 106446837A CN 201610859376 A CN201610859376 A CN 201610859376A CN 106446837 A CN106446837 A CN 106446837A
Authority
CN
China
Prior art keywords
waving
pedestrian
detection
image
motion
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
CN201610859376.7A
Other languages
Chinese (zh)
Other versions
CN106446837B (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.)
Beijing Baixing Puhui Technology Co.,Ltd.
Original Assignee
Hunan Youxiang Technology 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 Hunan Youxiang Technology Co Ltd filed Critical Hunan Youxiang Technology Co Ltd
Priority to CN201610859376.7A priority Critical patent/CN106446837B/en
Publication of CN106446837A publication Critical patent/CN106446837A/en
Application granted granted Critical
Publication of CN106446837B publication Critical patent/CN106446837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06V40/28Recognition of hand or arm movements, e.g. recognition of deaf sign language
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/107Static hand or arm
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis

Landscapes

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

Abstract

本发明提出了一种基于运动历史图像的挥手检测方法,首先通过行人检测间接确定挥手检测的区域,然后通过运动历史图像计算该区域的运动主方向,最后判断序列图像中有无挥手运动的发生。本发明提出的方法复杂度小,检测准确度高,适宜用于无人机目标跟拍前的目标确认阶段。

The present invention proposes a hand-waving detection method based on motion history images. Firstly, the area of hand-waving detection is determined indirectly through pedestrian detection, then the main motion direction of the area is calculated through motion history images, and finally whether there is waving motion in sequence images is judged. . The method proposed by the invention has low complexity and high detection accuracy, and is suitable for the target confirmation stage before the drone target tracking.

Description

一种基于运动历史图像的挥手检测方法A Hand Waving Detection Method Based on Motion History Images

技术领域technical field

本发明涉及图像处理、计算机视觉处理技术领域,特别涉及一种基于运动历史图像的挥手检测方法。The invention relates to the technical fields of image processing and computer vision processing, in particular to a hand-waving detection method based on motion history images.

背景技术Background technique

随着自动化技术的飞速发展,无人机的功能越来越强大,自动跟踪拍摄目标成为无人机应用的一个重要组成部分。无人机跟拍前需要选定跟踪的人或物体。在传统的目标选取中,通常采用手动画框的方法选定目标。这种方法原理简单,比较容易实现,但是也有明显的缺陷:1,手动画框不精确,依赖于操作者对设备以及软件使用的熟练程度;2,画框往往在手持设备如手机上实现,在脱离手机的情况下不能自动识别。With the rapid development of automation technology, the functions of drones are becoming more and more powerful, and automatic tracking and shooting of targets has become an important part of drone applications. The person or object to be tracked needs to be selected before the UAV is followed. In the traditional target selection, the method of manual frame selection is usually used to select the target. This method is simple in principle and relatively easy to implement, but it also has obvious defects: 1. The manual animation frame is inaccurate and depends on the operator's proficiency in the use of equipment and software; 2. The frame is often implemented on handheld devices such as mobile phones. It cannot be automatically recognized when it is separated from the mobile phone.

为了实现自动跟踪行人的目标选取,一个新的思路是让跟踪的对象进行某种行为比如挥手,然后通过行为(如挥手)检测来判定跟踪目标。In order to realize the target selection of automatic tracking of pedestrians, a new idea is to let the tracked object perform certain behaviors such as waving, and then determine the tracking target through behavior (such as waving) detection.

行为检测是计算机应用的一个重要课题,在人机交互、虚拟现实等方面有着广泛的应用前景。其发展历程在早期主要以硬件设备为前端,获得初始的运动信息,如用于手部运动检测系统的数据手套。这类方法所需的硬件设备往往价格比较昂贵,且需要佩戴使得用户的舒适度不高。Behavior detection is an important topic in computer applications, and has broad application prospects in human-computer interaction and virtual reality. In the early stage of its development, it mainly used hardware equipment as the front end to obtain initial motion information, such as data gloves used in hand motion detection systems. The hardware equipment required by this type of method is often relatively expensive, and needs to be worn so that the user's comfort is not high.

随着计算机视觉技术的发展,基于软件的手部运动检测技术也开始发展。目前手部运动检测系统处理流程主要分为两部分,第一部分是从视频序列帧中提取所需信息,这里所需信息主要指运动物体在视频帧上的相对位置,目前方法主要有肤色划分,前景划分,几何体划分等。而第二部分是通过计算模型,如隐含马尔卡夫链、小波变换、BP神经网络等方法,来对前面获得图像特征进行处理。With the development of computer vision technology, software-based hand movement detection technology has also begun to develop. At present, the processing flow of the hand motion detection system is mainly divided into two parts. The first part is to extract the required information from the video sequence frame. The required information here mainly refers to the relative position of the moving object on the video frame. The current method mainly includes skin color division, Foreground division, geometry division, etc. The second part is to process the previously obtained image features through computational models, such as hidden Markav chain, wavelet transform, BP neural network and other methods.

目前手部运动检测主要为多种算法的结合,一般需要手部特征提取算法与运动检测算法结合。对于识别要求较高的应用,需要提取更多的特征和复杂的检测算法。而无人机跟拍的目标挥手检测算法需要在手机上运行,无法提供更高的计算能力,因此现有的方法不适合用于无人机跟拍的目标挥手检测。At present, hand motion detection is mainly a combination of multiple algorithms, and generally requires the combination of hand feature extraction algorithms and motion detection algorithms. For applications with higher recognition requirements, more features and complex detection algorithms need to be extracted. However, the target waving detection algorithm for drone tracking needs to run on the mobile phone, which cannot provide higher computing power. Therefore, the existing methods are not suitable for target waving detection for drone tracking.

发明内容Contents of the invention

针对现有挥手检测方法的不足,本发明提出一种基于运动历史图像的挥手检测方法。Aiming at the deficiencies of the existing hand-waving detection methods, the present invention proposes a hand-waving detection method based on motion history images.

本发明采用的技术方案是:The technical scheme adopted in the present invention is:

一种基于运动历史图像的挥手检测方法,包括以下步骤:A hand-waving detection method based on motion history images, comprising the following steps:

S1训练一个行人检测器;S1 trains a pedestrian detector;

S2在无人机进行目标跟拍时,对拍摄到的视频图像进行行人检测,按照分类器得分高低对行人候选框进行排序,选取其中得分最高的行人候选框作为初次挥手检测的对象;S2 When the UAV is tracking the target, detect pedestrians on the captured video images, sort the pedestrian candidate frames according to the score of the classifier, and select the pedestrian candidate frame with the highest score as the object of the initial waving detection;

S3对当前得分最高的行人候选框进行挥手检测区域确定,然后在挥手检测区域通过运动历史图像进行挥手检测;S3 determines the waving detection area for the currently highest-scoring pedestrian candidate frame, and then performs waving detection in the waving detection area through motion history images;

S4当检测到挥手运动时,整体流程结束;如果得分最高的行人候选框没有检测到挥手行为,则对S2中行人检测的分类器得分高低排序结果中得分第二的行人候选框进行挥手检测,挥手检测方法和初次挥手检测对象的挥手检测方法相同;依此规律,一直到检测出某个行人候选框存在挥手行为或是所有的行人候选框均进行完挥手检测但是均没有挥手行为为止。S4 When the waving movement is detected, the overall process ends; if the waving behavior is not detected in the pedestrian candidate frame with the highest score, the pedestrian candidate frame with the second score in the ranking results of the pedestrian detection classifier in S2 is detected for waving, The waving detection method is the same as the waving detection method for the initial waving detection object; according to this rule, until the waving behavior is detected in a certain pedestrian candidate frame or all the pedestrian candidate frames have completed the waving detection but there is no waving behavior.

本发明的S1中,行人检测器的训练方法是:通过无人机上的摄像头对不同行人进行拍摄,一共采集不少于500幅的行人图像作为正样板,参与采集的行人人数不少于100人。然后从网上或者其他各种数据库收集各种不包括行人的200幅以上的图像作为负样本。将采集到的行人图像归一化到大小为108*36的图像,选择经典的方向梯度直方图(HOG)特征提取方法对正负样本进行特征提取,使用svm进行训练,得到一个行人检测器。(在此说明:HOG+SVM是法国研究人员Dalal在2005的CVPR上提出的,用于行人检测,本发明完全使用这个方法。)In S1 of the present invention, the training method of the pedestrian detector is: shoot different pedestrians through the camera on the drone, collect a total of no less than 500 pedestrian images as positive samples, and the number of pedestrians participating in the collection is no less than 100 . Then collect more than 200 images that do not include pedestrians from the Internet or various other databases as negative samples. Normalize the collected pedestrian images to an image with a size of 108*36, select the classic histogram of oriented gradient (HOG) feature extraction method to extract features from positive and negative samples, use svm for training, and obtain a pedestrian detector. (Note here: HOG+SVM was proposed by French researcher Dalal on the CVPR in 2005 for pedestrian detection, and the present invention uses this method completely.)

本发明S2的方法为:在无人机进行目标跟拍时,首先对拍摄的视频图像进行行人检测,行人检测过程采用滑动窗口(窗口大小为108*36)的方式进行,提取待检框中图像的HOG特征,通过行人检测器进行分类,得到一个是否为行人的分数,若该得分大于0.7,则以此待检测框为候选框。当存在多个候选框时,按照分类器得分高低对行人候选框进行排序,选取其中得分最高的行人候选框作为初次挥手检测的对象。The method of S2 of the present invention is: when the unmanned aerial vehicle carries out target follow-up shooting, firstly carry out pedestrian detection to the photographed video image, the pedestrian detection process adopts the mode of sliding window (window size is 108*36) to carry out, extract the frame in the frame to be detected The HOG feature of the image is classified by the pedestrian detector to obtain a score of whether it is a pedestrian. If the score is greater than 0.7, the frame to be detected is used as the candidate frame. When there are multiple candidate frames, the pedestrian candidate frames are sorted according to the score of the classifier, and the pedestrian candidate frame with the highest score is selected as the object of the initial waving detection.

本发明S3的方法为:The method of S3 of the present invention is:

首先根据当前得分最高的行人候选框也即行人检测的窗口来确定一个挥手检测的窗口,挥手检测的窗口大小为36*36,位于行人检测窗口的左上方。两个窗口即挥手检测窗口和行人检测窗口的左顶点分别在x、y轴上相差12个像素。Firstly, a window for waving detection is determined according to the currently highest-scoring pedestrian candidate frame, that is, the window for pedestrian detection. The size of the window for waving detection is 36*36, and it is located at the upper left of the pedestrian detection window. The left vertices of the two windows, ie, the waving detection window and the pedestrian detection window, differ by 12 pixels on the x and y axes respectively.

记无人机拍摄的视频图像为{Pn(x,y)|n=1,2,…N}。无人机拍摄的视频图像是按时间排列的,这里的视频图像中的各幅图像表示的是第一帧、第二帧...第N帧图像。Note that the video image taken by the drone is {P n (x, y)|n=1, 2,...N}. The video images shot by the drone are arranged in time, and each image in the video image here represents the first frame, the second frame...the Nth frame image.

对视频图像中的各幅图像,都只保留挥手检测窗口区域内的像素值,即令挥手检测窗口外区域的所有像素值均置为0。For each image in the video image, only the pixel values in the hand-waving detection window area are reserved, that is, all pixel values in the area outside the hand-waving detection window are set to 0.

从第n(n≥2)帧图像开始,采用3帧差分进行第n(n≥2)帧图像的运动检测,计算公式如下:Starting from the nth (n≥2) frame image, the motion detection of the nth (n≥2) frame image is performed using 3-frame difference, and the calculation formula is as follows:

Dn(x,y)=Pn-1(x,y)-2Pn(x,y)+Pn+1(x,y) (1)D n (x,y)=P n-1 (x,y)-2P n (x,y)+P n+1 (x,y) (1)

其中Pn(x,y)、Pn-1(x,y)、Pn+1(x,y)分别表示第n帧图像、第n-1帧图像、第n+1帧图像。Among them, P n (x, y), P n-1 (x, y), and P n+1 (x, y) represent the nth frame image, the n-1th frame image, and the n+1th frame image, respectively.

然后使用经典的大律法(otsu)将Dn(x,y)二值化,获得二值运动信息An(x,y)。Then D n (x, y) is binarized using the classic otsu to obtain binary motion information A n (x, y).

接下来在挥手检测区域通过运动历史图像进行挥手检测。本发明提出一种运动历史图像的计算方法,使之更好的表征运动的方向信息,方法如下:Next, waving detection is performed in the waving detection area through motion history images. The present invention proposes a calculation method of motion history images to better represent the direction information of motion, the method is as follows:

a.定义运动历史图像Hn(x,y),运动历史图像Hn(x,y)是一种关于运动的全局描述方法,其中每个像素点的取值是该像素点的运动时间信息,具体定义如下:a. Define the motion history image H n (x, y), the motion history image H n (x, y) is a global description method about motion, where the value of each pixel is the motion time information of the pixel , the specific definition is as follows:

由上式可以看出,运动历史图像的像素灰度变化信息体现出行为运动的方向,最近运动的像素亮度值最大,而运动较久的像素则被清除。所以运动历史图像很好地体现了运动的空间特征和时间信息。It can be seen from the above formula that the pixel gray level change information of the motion history image reflects the direction of the behavioral motion, the pixel brightness value of the recent motion is the largest, and the pixel of the long motion is cleared. Therefore, the motion history image well reflects the spatial characteristics and temporal information of the motion.

b.边界像素上可能得到错误的方向向量,因此,在使用公式3计算前,首先判断运动历史图像上的每个像素点是否为边界像素,具体做法为:在运动历史图像上,以任一像素点(x0,y0)为中心,大小为3×3的领域中一共有9个像素点,当9个像素点均不为零时,才认为像素点(x0,y0)不是边界像素;否则认为该像素点(x0,y0)为边界像素;b. The wrong direction vector may be obtained on the boundary pixel. Therefore, before using formula 3 to calculate, first judge whether each pixel on the motion history image is a boundary pixel. The specific method is: on the motion history image, any The pixel point (x 0 , y 0 ) is the center, and there are 9 pixel points in the field with a size of 3×3. When all 9 pixel points are not zero, the pixel point (x 0 , y 0 ) is considered not Boundary pixel; otherwise, the pixel point (x 0 , y 0 ) is considered to be a boundary pixel;

在计算梯度方向时,若像素点是边界像素,则直接将其梯度方向置为0;若像素点不是边界像素,则采用sobel算子计算其梯度方向,也即角度矩阵θn(x,y),如下:When calculating the gradient direction, if the pixel is a boundary pixel, its gradient direction is directly set to 0; if the pixel is not a boundary pixel, the sobel operator is used to calculate its gradient direction, that is, the angle matrix θ n (x,y ),as follows:

其中 是卷积运算。in is the convolution operation.

采用上述方式可以避免边界像素带来的错误影响。The above method can avoid the erroneous influence brought by the boundary pixels.

c.计算得到的角度矩阵的范围是0到359,为了简化计算,采用大小为36的直方图。依次对角度矩阵θn(x,y)每个像素进行遍历,统计直方图。然后将直方图的最大值所对应的角度作为该图像的运动主方向ωnc. The range of the calculated angle matrix is 0 to 359. In order to simplify the calculation, a histogram with a size of 36 is used. Each pixel of the angle matrix θ n (x, y) is traversed in turn, and the histogram is counted. Then the angle corresponding to the maximum value of the histogram is taken as the main motion direction ω n of the image.

d.从视频端传过来的图像{Pn(x,y)|n=1,2,…N}中的第二帧图像开始,按照上述方法依次计算每幅图像的运动主方向{ωn|n=2,…,N}。N一般取30。然后计算一个方向索引值:d. Starting from the second frame image in the image {P n (x, y)|n=1,2,…N} transmitted from the video end, calculate the main direction of motion {ω n of each image sequentially according to the above method |n=2,...,N}. N generally takes 30. Then calculate a direction index value:

其中运动主方向在46度和134度之间,判断为右挥手;运动主方向在226度和314度之间,判断为左挥手。Where the main direction of motion is between 46 degrees and 134 degrees, it is judged to be waving right; if the main direction of motion is between 226 degrees and 314 degrees, it is judged to be waving left.

当前30幅图像中非0取值达到15个时,本发明判定存在挥手运动,否则,判定为没有挥手运动。When the number of non-zero values in the first 30 images reaches 15, the present invention determines that there is a hand-waving movement; otherwise, it is determined that there is no hand-waving movement.

本发明提出了一种基于运动历史图像的挥手检测方法,首先通过行人检测间接确定挥手检测的区域,然后通过运动历史图像计算该区域的运动主方向,最后判断序列图像中有无挥手运动的发生。本发明提出的方法复杂度小,检测准确度高,适宜用于无人机目标跟拍前的目标确认阶段。The present invention proposes a hand-waving detection method based on motion history images. Firstly, the area of hand-waving detection is determined indirectly through pedestrian detection, then the main motion direction of the area is calculated through motion history images, and finally whether there is waving motion in sequence images is judged. . The method proposed by the invention has low complexity and high detection accuracy, and is suitable for the target confirmation stage before the drone target tracking.

附图说明Description of drawings

图1是本发明的流程示意图;Fig. 1 is a schematic flow sheet of the present invention;

图2是基于运动历史图像的挥手检测方法示意图;Fig. 2 is a schematic diagram of a hand-waving detection method based on motion history images;

图3是根据行人检测窗口确定挥手检测窗口的示意图。Fig. 3 is a schematic diagram of determining the waving detection window according to the pedestrian detection window.

具体实施方式detailed description

下面结合附图和具体实施方式对本发明作进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

通过无人机拍摄的区域较大,跟拍对象的挥手区域只占整个画面的一小部分,因此为了准确判断有无挥手动作,首先需要确定一个大概的区域。由于手部区域太小,直接进行手部检测不可行。考虑到挥手动作一般发生于目标的右上方,本发明提出了一种基于运动历史图像的挥手检测方法。The area captured by the drone is relatively large, and the waving area of the following object only takes up a small part of the entire picture. Therefore, in order to accurately determine whether there is a waving action, it is first necessary to determine an approximate area. Since the hand region is too small, direct hand detection is not feasible. Considering that the waving action generally occurs at the upper right of the target, the present invention proposes a hand waving detection method based on motion history images.

首先训练一个行人检测器,通过无人机上的摄像头对不同行人进行拍摄,一共采集不少于500幅的行人图像作为正样板,参与采集的行人人数不少于100人。然后从网上或者其他各种数据库收集各种不包括行人的200幅以上的图像作为负样本。将采集到的集不少于500幅的行人图像归一化到大小为108*36的图像,选择经典的方向梯度直方图(HOG)特征提取方法对正负样本进行特征提取,使用svm进行训练,得到一个行人检测器。Firstly, train a pedestrian detector, and shoot different pedestrians through the camera on the drone. A total of no less than 500 pedestrian images are collected as positive samples, and the number of pedestrians participating in the collection is no less than 100. Then collect more than 200 images that do not include pedestrians from the Internet or various other databases as negative samples. Normalize the collected images of no less than 500 pedestrians to an image with a size of 108*36, select the classic histogram of oriented gradient (HOG) feature extraction method to extract the positive and negative samples, and use svm for training , to get a pedestrian detector.

在无人机进行目标跟拍时,首先对拍摄的视频图像进行行人检测,行人检测过程采用滑动窗口(窗口大小为108*36)的方式进行,提取待检框中图像的HOG特征,通过行人检测器进行分类,得到一个是否为行人的分数,若该得分大于0.7,则以此待检测框为候选框。当存在多个候选框时,按照分类器得分高低对行人候选框进行排序。首先选取其中得分最高的行人候选框作为初次挥手检测的对象,对其挥手区域通过运动历史图像进行挥手检测,如果检测存在挥手行为,则整个挥手检测流程结束,启动后续跟踪程序;如果得分最高的行人候选框没有检测到挥手行为,则对得分第二的行人候选框进行挥手检测,挥手检测方法和初次挥手检测对象的挥手检测方法相同;依此规律,一直到检测出某个行人候选框存在挥手行为或是所有的行人候选框均进行完挥手检测但是均没有挥手行为为止。When the UAV performs target tracking, firstly, pedestrian detection is performed on the captured video images. The pedestrian detection process is carried out by sliding window (window size is 108*36), and the HOG features of the image in the frame to be detected are extracted. The detector classifies and obtains a score of whether it is a pedestrian. If the score is greater than 0.7, the frame to be detected is used as a candidate frame. When there are multiple candidate boxes, the pedestrian candidate boxes are sorted according to the score of the classifier. First, select the pedestrian candidate frame with the highest score as the object of the initial waving detection, and perform waving detection on the waving area through the motion history image. If there is a waving behavior detected, the entire waving detection process ends and the follow-up tracking program is started; If the waving behavior is not detected in the pedestrian candidate frame, the waving detection method is performed on the pedestrian candidate frame with the second score. Waving behavior or all pedestrian candidate boxes have been detected for waving but there is no waving behavior.

接下来介绍本发明提出的挥手检测的具体步骤:Next, introduce the specific steps of the hand-waving detection proposed by the present invention:

首先根据行人检测的窗口来确定挥手检测的窗口,如图3所示,挥手检测的窗口大小为36*36,位于行人检测窗口的左上方。两个窗口即挥手检测窗口和行人检测窗口的左顶点分别在x、y轴上相差12个像素。First, the window for waving detection is determined according to the window for pedestrian detection. As shown in Figure 3, the size of the window for waving detection is 36*36, which is located at the upper left of the pedestrian detection window. The left vertices of the two windows, ie, the waving detection window and the pedestrian detection window, differ by 12 pixels on the x and y axes respectively.

记无人机拍摄的视频图像为{Pn(x,y)|n=1,2,…N}。无人机拍摄的视频图像是按时间排列的,这里的视频图像中的各幅图像表示的是第一帧、第二帧...第N帧图像。Note that the video image taken by the drone is {P n (x, y)|n=1, 2,...N}. The video images shot by the drone are arranged in time, and each image in the video image here represents the first frame, the second frame...the Nth frame image.

对视频图像中的各幅图像,都只保留挥手检测窗口区域内的像素值,即令挥手检测窗口外区域的所有像素值均置为0。For each image in the video image, only the pixel values in the hand-waving detection window area are reserved, that is, all pixel values in the area outside the hand-waving detection window are set to 0.

从第n(n≥2)帧图像开始,采用3帧差分进行运动检测,计算公式如下:Starting from the nth (n≥2) frame image, the motion detection is performed using 3-frame difference, and the calculation formula is as follows:

Dn(x,y)=Pn-1(x,y)-2Pn(x,y)+Pn+1(x,y) (1)D n (x,y)=P n-1 (x,y)-2P n (x,y)+P n+1 (x,y) (1)

然后使用经典的大律法(otsu)将Dn(x,y)二值化,获得二值运动信息An(x,y)。Then D n (x, y) is binarized using the classic otsu to obtain binary motion information A n (x, y).

接下来本发明提出一种运动历史图像的计算方法,使之更好的表征运动的方向信息。运动历史图像Hn(x,y)是一种关于运动的全局描述方法,其中每个像素点的取值是该像素点的运动时间信息,具体定义如下:Next, the present invention proposes a calculation method of motion history images to better represent motion direction information. The motion history image H n (x, y) is a global description method about motion, in which the value of each pixel is the motion time information of the pixel, which is specifically defined as follows:

由上式可以看出,运动历史图像的像素灰度变化信息体现出行为运动的方向,最近运动的像素亮度值最大,而运动较久的像素则被清除。所以运动历史图像很好地体现了运动的空间特征和时间信息。It can be seen from the above formula that the pixel gray level change information of the motion history image reflects the direction of the behavioral motion, the pixel brightness value of the recent motion is the largest, and the pixel of the long motion is cleared. Therefore, the motion history image well reflects the spatial characteristics and temporal information of the motion.

采用sobel算子计算运动历史图像每个像素的梯度方向,也即角度矩阵θn(x,y):Use the sobel operator to calculate the gradient direction of each pixel of the motion history image, that is, the angle matrix θ n (x, y):

其中 是卷积运算。in is the convolution operation.

边界像素上可能得到错误的方向向量,因此,在使用公式3计算前,首先判断运动历史图像上的每个像素点是否为边界像素,具体做法为:在运动历史图像上,以任一像素(x0,y0)为中心,大小为3×3的领域中一共有9个像素,只有当9个像素均不为零时,才认为像素(x0,y0)不是边界像素;否则认为该点为边界像素。在计算梯度方向时,若像素点是边界像素,则不用计算直接将其梯度方向置为0;若像素点不是边界像素,则采用公式3进行计算。采用这种方式可以避免边界像素带来的错误影响。The wrong direction vector may be obtained on the boundary pixel. Therefore, before using formula 3 to calculate, first judge whether each pixel on the motion history image is a boundary pixel. The specific method is: on the motion history image, take any pixel ( x 0 , y 0 ) as the center, there are 9 pixels in the field of size 3×3, only when the 9 pixels are not zero, the pixel (x 0 , y 0 ) is considered not to be a boundary pixel; otherwise, it is considered This point is the boundary pixel. When calculating the gradient direction, if the pixel is a boundary pixel, its gradient direction is directly set to 0 without calculation; if the pixel is not a boundary pixel, formula 3 is used for calculation. In this way, erroneous effects caused by boundary pixels can be avoided.

计算得到的角度矩阵的范围是0到359,为了简化计算,采用大小为36的直方图。依次对角度矩阵θn(x,y)每个像素进行遍历,统计直方图。然后将直方图的最大值所对应的角度作为该图像的运动主方向ωnThe calculated angle matrix ranges from 0 to 359. To simplify the calculation, a histogram with a size of 36 is used. Each pixel of the angle matrix θ n (x, y) is traversed in turn, and the histogram is counted. Then the angle corresponding to the maximum value of the histogram is taken as the main motion direction ω n of the image.

从视频端传过来的图像{Pn(x,y)|n=1,2,…N}中的第二帧图像开始,按照上述方法依次计算每幅图像的运动主方向{ωn|n=2,…,N}。N一般取30。然后计算一个方向索引值:Starting from the second frame image in the image {P n (x,y)|n=1,2,…N} transmitted from the video end, calculate the main direction of motion {ω n |n of each image sequentially according to the above method =2,...,N}. N generally takes 30. Then calculate a direction index value:

其中运动主方向在46度和134度之间,判断为右挥手;运动主方向在226度和314度之间,判断为左挥手。Where the main direction of motion is between 46 degrees and 134 degrees, it is judged to be waving right; if the main direction of motion is between 226 degrees and 314 degrees, it is judged to be waving left.

当前30幅图像中非0取值达到15个时,本发明判定存在挥手运动,整体流程结束。如果当前行人被判定没有发生挥手运动,则按照行人检测的得分对下一个行人进行挥手检测,一直到检测出挥手运动为止或全部行人均没有挥手。When the number of non-zero values in the first 30 images reaches 15, the present invention determines that there is a hand-waving movement, and the overall process ends. If the current pedestrian is judged to have no waving movement, then the next pedestrian is waved according to the pedestrian detection score until the waving movement is detected or all pedestrians do not wave.

Claims (5)

1. a kind of detection method of waving based on motion history image is it is characterised in that comprise the following steps:
S1 trains a pedestrian detector;
S2, when unmanned plane carries out target with clapping, carries out pedestrian detection to the video image photographing, high according to grader score The low object as detection of waving for the first time for pedestrian candidate frame pedestrian candidate frame being ranked up, choosing wherein highest scoring;
S3 carries out detection zone determination of waving to present score highest pedestrian candidate frame, then passes through fortune in detection zone of waving Dynamic history image carries out waving to detect;
When waving motion is detected, overall flow terminates S4;If the pedestrian candidate frame of highest scoring is not detected by waving Behavior, then carry out to the pedestrian candidate frame of score second in the grader score height ranking results of pedestrian detection in S2 waving to examine Survey, detection method of waving is identical with the detection method of waving of detection object of waving for the first time;Rule according to this, until detect certain There is behavior of waving in pedestrian candidate frame or all of pedestrian candidate frame has all carried out waving to detect behavior of still all not waving Till.
2. the detection method of waving based on motion history image according to claim 1 is it is characterised in that in S1, pedestrian The training method of detector is:By the camera on unmanned plane, different pedestrians are shot, collection altogether is no less than 500 width Pedestrian image as positive model, the pedestrian's number participating in collection is no less than 100 people;
Then from network or other various databases collect the image of more than various 200 width not including pedestrian as negative sample This;
The pedestrian image collecting is normalized to the image that size is 108*36, choice direction histogram of gradients feature extraction side Method aligns negative sample and carries out feature extraction, is trained using svm, obtains a pedestrian detector.
3. the detection method of waving based on motion history image according to claim 1 and 2 is it is characterised in that in S2, When unmanned plane carries out target with clapping, first pedestrian detection is carried out to the video image shooting, pedestrian detection process adopts sliding window Mouthful mode carry out, window size is 108*36, extracts the HOG feature of image in frame to be checked, is carried out point by pedestrian detector Class, obtain one be whether pedestrian fraction, if this score is more than 0.7, with this frame to be detected as candidate frame;Multiple when existing During candidate frame, according to grader score height, pedestrian candidate frame is ranked up, chooses the pedestrian candidate frame of wherein highest scoring The object detecting as waving for the first time.
4. the detection method of waving based on motion history image according to claim 3 is it is characterised in that the method for S3 For:
First a detection window of waving is determined as the window of pedestrian detection according to present score highest pedestrian candidate frame, Detection window size of waving is 36*36, positioned at the upper left side of pedestrian detection window;Wave detection window and pedestrian detection window Left summit differs 12 pixels respectively in x, y-axis;
The video image that note unmanned plane shoots is { Pn(x, y) | n=1,2 ... N }, to each width image in video image, all only protect Stay the pixel value waved in detection window region, even all pixels value of detection window exterior domain of waving all is set to 0;
From the beginning of n-th (n >=2) two field picture, carry out the motion detection of n-th (n >=2) two field picture using 3 frame differences, computing formula is such as Under:
Dn(x, y)=Pn-1(x,y)-2Pn(x,y)+Pn+1(x,y) (1)
Wherein Pn(x,y)、Pn-1(x,y)、Pn+1(x, y) represents n-th frame image, the (n-1)th two field picture, the (n+1)th two field picture respectively;
Then using classical big law by Dn(x, y) binaryzation, obtains two-value movable information An(x,y);
Next carry out waving to detect, method is as follows by motion history image in detection zone of waving:
A. define motion history image HnThe value of (x, y), wherein each pixel is the move time information of this pixel, fixed Justice is as follows:
H n ( x , y ) = 255 , i f A n ( x , y ) = 1 m a x ( 0 , H n - 1 ( x , y ) - 100 ) , e l s e - - - ( 2 )
B. on motion history image, with any pixel point (x0,y0) centered on, in the field for 3 × 3 for the size, one has 9 pictures Vegetarian refreshments, when 9 pixels are all not zero, just thinks pixel (x0,y0) it is not boundary pixel;Otherwise it is assumed that this pixel (x0,y0) it is boundary pixel;
When calculating gradient direction, if pixel is boundary pixel, directly its gradient direction is set to 0;If pixel is not Boundary pixel, then calculate its gradient direction using sobel operator, namely angle matrix θn(x, y), as follows:
θ n ( x , y ) = a r c t a n ( S y ( x , y ) S x ( x , y ) ) - - - ( 3 )
Wherein It is convolution fortune Calculate;
C. the scope of calculated angle matrix is 0 to 359, the histogram being 36 using size, successively to angle matrix θn (x, y) each pixel is traveled through, statistic histogram.Then using the angle corresponding to histogrammic maximum as this image Motion principal direction ωn,
D. it is transmitted through image { the P coming from video endn(x, y) | n=1,2 ... N in the second two field picture start, according to the method described above Calculate the motion principal direction { ω of each image successivelyn| n=2 ..., N }, then calculate a direction index value:
f ( &omega; n ) = 1 , i f 46 < &omega; n < 134 - 1 , i f 226 < &omega; n < 314 0 , o t h e r w i s e - - - ( 4 )
Wherein motion principal direction, between 46 degree and 134 degree, is judged as waving in the right side;Motion principal direction 226 degree and 314 degree it Between, it is judged as waving in a left side;
When non-zero value reaches N/2 in current N width image, then judge there is waving motion, otherwise, it is determined that being not wave to transport Dynamic.
5. the detection method of waving based on motion history image according to claim 4 is it is characterised in that in step S3, N Value is more than or equal to 30.
CN201610859376.7A 2016-09-28 2016-09-28 A Hand Wave Detection Method Based on Motion History Image Active CN106446837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610859376.7A CN106446837B (en) 2016-09-28 2016-09-28 A Hand Wave Detection Method Based on Motion History Image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610859376.7A CN106446837B (en) 2016-09-28 2016-09-28 A Hand Wave Detection Method Based on Motion History Image

Publications (2)

Publication Number Publication Date
CN106446837A true CN106446837A (en) 2017-02-22
CN106446837B CN106446837B (en) 2019-05-07

Family

ID=58170765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610859376.7A Active CN106446837B (en) 2016-09-28 2016-09-28 A Hand Wave Detection Method Based on Motion History Image

Country Status (1)

Country Link
CN (1) CN106446837B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018176426A1 (en) * 2017-03-31 2018-10-04 深圳市大疆创新科技有限公司 Flight control method for unmanned aerial vehicle, and unmanned aerial vehicle
CN109344899A (en) * 2018-09-30 2019-02-15 百度在线网络技术(北京)有限公司 Multi-target detection method, device and electronic equipment
CN116363753A (en) * 2023-03-12 2023-06-30 天翼云科技有限公司 Tumble detection method and device based on motion history image and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609720A (en) * 2012-01-31 2012-07-25 中国科学院自动化研究所 Pedestrian detection method based on position correction model
CN102789568A (en) * 2012-07-13 2012-11-21 浙江捷尚视觉科技有限公司 Gesture identification method based on depth information
CN102799855A (en) * 2012-06-14 2012-11-28 华南理工大学 Video-streaming-based hand positioning method
US20160259037A1 (en) * 2015-03-03 2016-09-08 Nvidia Corporation Radar based user interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609720A (en) * 2012-01-31 2012-07-25 中国科学院自动化研究所 Pedestrian detection method based on position correction model
CN102799855A (en) * 2012-06-14 2012-11-28 华南理工大学 Video-streaming-based hand positioning method
CN102789568A (en) * 2012-07-13 2012-11-21 浙江捷尚视觉科技有限公司 Gesture identification method based on depth information
US20160259037A1 (en) * 2015-03-03 2016-09-08 Nvidia Corporation Radar based user interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HOSSEINSALIMI,SAIEDFAZLI: "A Novel Palm Line Extraction and Matching For Personal Identification", 《INTERNATIONAL JOURNAL OF SCIENCE, ENGINEERING AND TECHNOLOGY RESEARCH 》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018176426A1 (en) * 2017-03-31 2018-10-04 深圳市大疆创新科技有限公司 Flight control method for unmanned aerial vehicle, and unmanned aerial vehicle
CN109690440A (en) * 2017-03-31 2019-04-26 深圳市大疆创新科技有限公司 A kind of flight control method and unmanned plane of unmanned plane
CN109690440B (en) * 2017-03-31 2022-03-08 深圳市大疆创新科技有限公司 A flight control method of an unmanned aerial vehicle and the unmanned aerial vehicle
CN109344899A (en) * 2018-09-30 2019-02-15 百度在线网络技术(北京)有限公司 Multi-target detection method, device and electronic equipment
CN116363753A (en) * 2023-03-12 2023-06-30 天翼云科技有限公司 Tumble detection method and device based on motion history image and electronic equipment

Also Published As

Publication number Publication date
CN106446837B (en) 2019-05-07

Similar Documents

Publication Publication Date Title
Fernandez-Sanjurjo et al. Real-time visual detection and tracking system for traffic monitoring
TWI677825B (en) Method of video object tracking and apparatus thereof and non-volatile computer readable storage medium
CN108470332B (en) Multi-target tracking method and device
CN107767405B (en) Nuclear correlation filtering target tracking method fusing convolutional neural network
CN108520226B (en) A pedestrian re-identification method based on body decomposition and saliency detection
Portmann et al. People detection and tracking from aerial thermal views
CN104615986B (en) The method that pedestrian detection is carried out to the video image of scene changes using multi-detector
CN105930822A (en) Human face snapshot method and system
CN105160310A (en) 3D (three-dimensional) convolutional neural network based human body behavior recognition method
CN107067413A (en) A kind of moving target detecting method of time-space domain statistical match local feature
CN104601964A (en) Non-overlap vision field trans-camera indoor pedestrian target tracking method and non-overlap vision field trans-camera indoor pedestrian target tracking system
Xing et al. Traffic sign recognition using guided image filtering
CN114743045A (en) A Small-Sample Object Detection Method Based on Dual-branch Region Proposal Network
Ruiz-Santaquiteria et al. Improving handgun detection through a combination of visual features and body pose-based data
Guan et al. Unsupervised domain adaptation for multispectral pedestrian detection
CN105184229A (en) Online learning based real-time pedestrian detection method in dynamic scene
CN103761747B (en) Target tracking method based on weighted distribution field
Varnima et al. Real-time Gender Identification from Face Images using you only look once (yolo)
CN114155475A (en) Method, device and medium for recognizing end-to-end personnel actions under view angle of unmanned aerial vehicle
Yao et al. Coupled multivehicle detection and classification with prior objectness measure
CN104850857A (en) Trans-camera pedestrian target matching method based on visual space significant constraints
CN104599291A (en) Structural similarity and significance analysis based infrared motion target detection method
Fan et al. Covered vehicle detection in autonomous driving based on faster RCNN
Mao et al. Training a scene-specific pedestrian detector using tracklets
Jiang et al. A unified tree-based framework for joint action localization, recognition and segmentation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250522

Address after: 101300 Beijing City Shunyi District Zhao Quanying Town Banqiao Village Niu Ban Road 16

Patentee after: Beijing Dejiyuan Culture and Art Co.,Ltd.

Country or region after: China

Address before: 410000 A658, room 39, Changsha central software park headquarters, No. 39, Jian Shan Road, hi tech Development Zone, Hunan.

Patentee before: HUNAN UPIXELS TECHNOLOGY CO.,LTD.

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250626

Address after: 100071 Beijing City Fengtai District Xisanhuan Nan Road 55 A523-1

Patentee after: Beijing Baixing Puhui Technology Co.,Ltd.

Country or region after: China

Address before: 101300 Beijing City Shunyi District Zhao Quanying Town Banqiao Village Niu Ban Road 16

Patentee before: Beijing Dejiyuan Culture and Art Co.,Ltd.

Country or region before: China