CN114998788A - A smoke detection method based on video analysis - Google Patents

A smoke detection method based on video analysis Download PDF

Info

Publication number
CN114998788A
CN114998788A CN202210583081.7A CN202210583081A CN114998788A CN 114998788 A CN114998788 A CN 114998788A CN 202210583081 A CN202210583081 A CN 202210583081A CN 114998788 A CN114998788 A CN 114998788A
Authority
CN
China
Prior art keywords
image
smoke
coordinate
value
images
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
CN202210583081.7A
Other languages
Chinese (zh)
Other versions
CN114998788B (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202210583081.7A priority Critical patent/CN114998788B/en
Publication of CN114998788A publication Critical patent/CN114998788A/en
Application granted granted Critical
Publication of CN114998788B publication Critical patent/CN114998788B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • 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
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computational Linguistics (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the field of smoke detection, and discloses a smoke judgment method based on video analysis, in particular to a method for filtering HSV threshold values of video images and analyzing the change rate of the video images to determine whether smoke exists.

Description

一种基于视频分析的烟雾判定方法A smoke detection method based on video analysis

技术领域technical field

本发明涉及烟雾检测领域,具体是一种对视频图像进行HSV阈值过滤并分析视频图像变化率进而确定是否存在烟雾的方法。The invention relates to the field of smoke detection, in particular to a method for performing HSV threshold filtering on a video image and analyzing the change rate of the video image to determine whether there is smoke.

背景技术Background technique

视频烟雾检测是检测并发现早期火灾的重要方式,目标检测网络,如YOLO、Faster-RCNN经过烟雾数据集的训练可以得到较高的准确率与较快的检测速度。但是由于烟雾数据集非常少,且烟雾本身没有固定的形态,目标检测网络往往存在一定的漏检率与误检率,这对消防安全来说是难以接受的。Video smoke detection is an important way to detect and discover early fires. Target detection networks, such as YOLO and Faster-RCNN, can obtain higher accuracy and faster detection speed after being trained on smoke datasets. However, since there are very few smoke datasets and the smoke itself has no fixed shape, the target detection network often has a certain missed detection rate and false detection rate, which is unacceptable for fire safety.

在目标检测网络应用于烟雾检测之前,基于手工制作的特征的烟雾检测系统被广泛使用,根据烟雾的纹理、颜色及动态特征对图像进行过滤、筛选,能够有效降低误检率,虽然目标检测网络在目前的图像检测领域占据主流,但是较少的烟雾数据集和烟雾不规则的形态特征使得单一的目标检测网络无法取得令人满意的效果,同时也难以有效利用连续的视频图片信息。Before the target detection network was applied to smoke detection, smoke detection systems based on hand-crafted features were widely used. Filtering and filtering images according to the texture, color and dynamic characteristics of smoke can effectively reduce the false detection rate. Although the target detection network It occupies the mainstream in the current image detection field, but few smoke datasets and irregular morphological features of smoke make it impossible for a single target detection network to achieve satisfactory results, and it is also difficult to effectively utilize continuous video image information.

为此,结合神经网络与传统图像处理方法,提出了一种基于视频分析的烟雾判定方法。To this end, a method for smoke determination based on video analysis is proposed by combining neural network and traditional image processing methods.

发明内容SUMMARY OF THE INVENTION

本发明的目的是利用HSV颜色空间过滤视频图像中部分非烟雾的区域,持续统计过滤后相邻帧视频图像像素变化,再利用YOLOv5神经网络检测图像并找到疑似烟区后,对找到疑似烟区前后一段时间的图像像素变化分别进行累计,最后比较疑似烟区前后一段时间的图像像素变化总量来确定是否存在烟雾,进一步提高检测精度、降低假警率。The purpose of the present invention is to use the HSV color space to filter some non-smoky areas in the video image, continue to count the pixel changes of adjacent frames after filtering, and then use the YOLOv5 neural network to detect the image and find the suspected smoke area. The changes of image pixels before and after a period of time are accumulated respectively, and finally the total amount of changes in image pixels before and after the suspected smoke area is compared to determine whether there is smoke, which further improves the detection accuracy and reduces the false alarm rate.

本发明的技术方案如下:The technical scheme of the present invention is as follows:

一种基于视频分析的烟雾判定方法,包括如下步骤:A method for determining smoke based on video analysis, comprising the following steps:

步骤1:采集得到监控视频中的n帧图像,记为I1,I2,…,In;利用YOLOv5对任意第i帧图像Ii进行烟雾检测,得到Ki个候选烟雾区域,并将其中的第k个候选烟雾区域记为

Figure BDA0003664924890000021
其中,
Figure BDA0003664924890000022
表示第k个候选烟雾区域左上角的坐标,
Figure BDA0003664924890000023
表示第k个候选烟雾区域右下角的坐标;Step 1: collect and obtain n frames of images in the surveillance video, denoted as I 1 , I 2 , ..., I n ; use YOLOv5 to perform smoke detection on any i-th frame image I i to obtain K i candidate smoke regions, and use The kth candidate smoke area is recorded as
Figure BDA0003664924890000021
in,
Figure BDA0003664924890000022
represents the coordinates of the upper left corner of the kth candidate smoke area,
Figure BDA0003664924890000023
Represents the coordinates of the lower right corner of the kth candidate smoke area;

步骤2:计算得到n帧图像的相邻帧变化,得到图像集合S={I1a,I2a,…,In-1a},具体步骤如下:Step 2: Calculate and obtain the adjacent frame changes of n frames of images, and obtain the image set S={I 1a , I 2a ,...,I n-1a }, and the specific steps are as follows:

步骤2.1:对任意Ii和Ii+1进行HSV阈值过滤,i=1,2,…,n-1,将图像从RGB颜色空间转为HSV颜色空间,得到图像Gi和Gi+1,设定过滤条件Q={V∈[150,255],S∈[0,25]},对Gi和Gi+1的每个像素点的HSV值进行判定,即根据式(1)、(2)和(3)对Ii和Ii+1进行过滤,得到Ii和Ii+1在过滤条件Q下过滤后的图像Iiq和Ii+1q,Ii和Ii+1中不满足过滤条件的像素的RGB值均被置零,HSV阈值过滤公式如下:Step 2.1: Perform HSV threshold filtering on any I i and I i+1 , i=1,2,...,n-1, convert the image from RGB color space to HSV color space, and obtain images G i and G i+1 , set the filter condition Q={V∈[150,255], S∈[0,25]}, and determine the HSV value of each pixel of G i and G i+1 , that is, according to formulas (1), ( 2) and (3) filter I i and I i+1 to obtain the filtered images I i and I i+1 under the filter condition Q I iq and I i+1q , in I i and I i+1 The RGB values of pixels that do not meet the filtering conditions are set to zero, and the HSV threshold filtering formula is as follows:

Figure BDA0003664924890000024
Figure BDA0003664924890000024

Figure BDA0003664924890000025
Figure BDA0003664924890000025

Figure BDA0003664924890000026
Figure BDA0003664924890000026

其中,IiR(x,y)、IiG(x,y)和IiB(x,y)分别为Ii中在坐标(x,y)处的像素点的RGB值,GiS(x,y)和GiV(x,y)分别为Ii中在坐标(x,y)处的像素点的SV值,IiqR、IiqG和IiqB分别为Ii中在坐标(x,y)处的像素点经过阈值过滤后的RGB值,该值保存在过滤后的图像Iiq中,对于Ii+1进行相同的操作,得到过滤后的图像Ii+1qAmong them, I iR (x, y), I iG (x, y) and I iB (x, y) are the RGB values of the pixel points at coordinates (x, y) in I i , respectively, G iS (x, y) y) and G iV (x, y) are respectively the SV values of the pixel points in I i at coordinates (x, y), and I iqR , I iqG and I iqB are respectively the coordinates (x, y) in I i The pixel point at the place is filtered through the RGB value of the threshold value, and this value is stored in the filtered image I iq , and the same operation is performed for I i+1 to obtain the filtered image I i+1q ;

步骤2.2:根据式(4)计算Iiq中任意坐标(x,y)处的像素点的RGB值总和Ciq(x,y),采用同样的方法计算得到Ii+1q中任意坐标(x,y)处的像素点的RGB值总和Ci+1q(x,y);根据式(5)计算相邻帧Iiq和Ii+1q的变化图像IiaStep 2.2: Calculate the RGB value sum C iq (x, y) of the pixel points at any coordinates (x, y) in I iq according to formula (4), and use the same method to calculate any coordinates (x, y) in I i+1q . , y) the RGB value summation C i+1q (x, y) of the pixel point at place; Calculate the change image I ia of adjacent frame I iq and I i+1q according to formula (5);

Ciq(x,y)=IiqR(x,y)+IiqG(x,y)+IiqB(x,y) (4)C iq (x,y)=I iqR (x,y)+I iqG (x,y)+I iqB (x,y) (4)

Figure BDA0003664924890000031
Figure BDA0003664924890000031

其中,Iia(x,y)表示Iia中在坐标(x,y)处的像素点的值;Among them, I ia (x, y) represents the value of the pixel point at the coordinate (x, y) in I ia ;

步骤2.3:对图像Iia进行腐蚀和膨胀;Step 2.3: Erase and dilate the image Iia ;

步骤3:取S1={Ii-t-1a,Ii-ta,…,Ii-1a},S2={Iia,Ii+1a,…,Ii+t-1a},S1为第i帧图像前面的t帧的相邻帧变化图像,S2为第i帧图像后面的t帧的相邻帧变化图像,1≤i-t≤n,根据式(6)计算S1和S2中图像像素累积变化,得到图像R1和R2Step 3: Take S 1 ={I it-1a ,I i-ta ,...,I i-1a },S 2 ={I ia ,I i+1a ,...,I i+t-1a },S 1 is the adjacent frame change image of the t frame before the ith frame image, S 2 is the adjacent frame change image of the t frame after the ith frame image, 1≤it≤n, according to formula ( 6 ) Calculate S1 and S The image pixels in 2 are cumulatively changed to obtain images R 1 and R 2 ;

Figure BDA0003664924890000032
Figure BDA0003664924890000032

其中,|表示按位或操作;where | represents a bitwise OR operation;

步骤4:从R1和R2中选取与候选烟雾区域

Figure BDA0003664924890000033
重合的图像,得到R1ik和R2ik,统计R1ik和R2ik图像中三通道均为255的像素数,记为U1ik和U2ik,若U1ik/U2ik<0.5,则认为
Figure BDA0003664924890000034
处存在烟雾。Step 4 : Pick and candidate smoke regions from R1 and R2
Figure BDA0003664924890000033
Coincident images, get R 1ik and R 2ik , count the number of pixels in the three channels of R 1ik and R 2ik images are 255, record as U 1ik and U 2ik , if U 1ik /U 2ik <0.5, it is considered that
Figure BDA0003664924890000034
There is smoke.

本发明的有益效果如下:能够有效利用卷积神经网模型检测到烟雾之前和之后的视频图像,分析一段时间内监控视频相邻帧间的图像像素变化总量,通过HSV颜色空间过滤和腐蚀与膨胀操作减小了视频噪音及抖动对图像像素变化统计所造成的影响,排除部分因神经网络精度不够造成的错检现象。The beneficial effects of the present invention are as follows: the video images before and after the smoke detection can be effectively used by the convolutional neural network model, the total amount of image pixel changes between adjacent frames of the monitoring video can be analyzed within a period of time, and the HSV color space filtering and corrosion are combined with The expansion operation reduces the influence of video noise and jitter on the statistics of image pixel changes, and eliminates some false detections caused by insufficient neural network accuracy.

附图说明Description of drawings

图1为本发明未经处理的视频图像;Fig. 1 is the unprocessed video image of the present invention;

图2为本发明利用卷积神经网络模型检测后的图像;Fig. 2 is the image after the present invention utilizes the convolutional neural network model to detect;

图3为本发明经过HSV过滤且过滤条件为Q的图像;Fig. 3 is the image that the present invention is filtered through HSV and filter condition is Q;

图4为本发明相邻帧的变化图像;Fig. 4 is the change image of adjacent frame of the present invention;

图5为本发明经过腐蚀和膨胀之后的图像;Fig. 5 is the image after corrosion and expansion of the present invention;

图6为本发明累积100帧相邻帧像素变化的图像。FIG. 6 is an image of accumulating pixel changes of 100 adjacent frames according to the present invention.

具体实施方式Detailed ways

下面结合实例和图像来详细阐述本发明。The present invention is described in detail below with reference to examples and images.

一种基于视频分析的烟雾判定方法,具体步骤如下:A smoke determination method based on video analysis, the specific steps are as follows:

步骤1:采集得到监控视频中的n帧图像,记为I1,I2,…,In,图1为其中一帧未经处理的视频图像;利用卷积神经网络模型对任意第i帧图像Ii进行烟雾检测,得到Ki个候选烟雾区域,并将其中的第k个候选烟雾区域记为

Figure BDA0003664924890000044
其中,
Figure BDA0003664924890000045
表示第k个候选烟雾区域左上角的坐标,
Figure BDA0003664924890000046
表示第k个候选烟雾区域右下角的坐标,图2为图1利用卷积神经网络模型检测后的图像,其中smoke表示检测到的对象类别,0.39表示置信度,方框为1个候选烟雾区域;Step 1: Collect and obtain n frames of images in the surveillance video, denoted as I 1 , I 2 ,..., I n , and Figure 1 shows one of the unprocessed video images; The image I i is subjected to smoke detection to obtain K i candidate smoke regions, and the kth candidate smoke region among them is recorded as
Figure BDA0003664924890000044
in,
Figure BDA0003664924890000045
represents the coordinates of the upper left corner of the kth candidate smoke area,
Figure BDA0003664924890000046
Indicates the coordinates of the lower right corner of the kth candidate smoke area. Figure 2 is the image detected by the convolutional neural network model in Figure 1, where smoke represents the detected object category, 0.39 represents the confidence, and the box is a candidate smoke area. ;

步骤2:计算得到n帧图像的相邻帧变化,得到图像集合S={I1a,I2a,…,In-1a},具体步骤如下:Step 2: Calculate and obtain the adjacent frame changes of n frames of images, and obtain the image set S={I 1a , I 2a ,...,I n-1a }, and the specific steps are as follows:

步骤2.1:对任意Ii和Ii+1进行HSV阈值过滤,i=1,2,…,n-1,将图像从RGB颜色空间转为HSV颜色空间,得到图像Gi和Gi+1,设定过滤条件Q={V∈[150,255],S∈[0,25]},对Gi和Gi+1的每个像素点的HSV值进行判定,即根据式(1)、(2)和(3)对Ii和Ii+1进行过滤,得到Ii和Ii+1在过滤条件Q下过滤后的图像Iiq和Ii+1q,Ii和Ii+1中不满足过滤条件的像素的RGB值均被置零,HSV阈值过滤公式如下:Step 2.1: Perform HSV threshold filtering on any I i and I i+1 , i=1,2,...,n-1, convert the image from RGB color space to HSV color space, and obtain images G i and G i+1 , set the filter condition Q={V∈[150,255], S∈[0,25]}, and determine the HSV value of each pixel of G i and G i+1 , that is, according to formulas (1), ( 2) and (3) filter I i and I i+1 to obtain the filtered images I i and I i+1 under the filter condition Q I iq and I i+1q , in I i and I i+1 The RGB values of pixels that do not meet the filtering conditions are set to zero, and the HSV threshold filtering formula is as follows:

Figure BDA0003664924890000041
Figure BDA0003664924890000041

Figure BDA0003664924890000042
Figure BDA0003664924890000042

Figure BDA0003664924890000043
Figure BDA0003664924890000043

其中,IiR(x,y)、IiG(x,y)和IiB(x,y)分别为Ii中在坐标(x,y)处的像素点的RGB值,GiS(x,y)和GiV(x,y)分别为Ii中在坐标(x,y)处的像素点的SV值,IiqR、IiqG和IiqB分别为Ii中在坐标(x,y)处的像素点经过阈值过滤后的RGB值,该值保存在过滤后的图像Iiq中,对于Ii+1进行相同的操作,得到过滤后的图像Ii+1q;图3为图1经过HSV过滤且过滤条件为Q的图像,如图所示过滤后剩余少量满足条件的像素点;Among them, I iR (x, y), I iG (x, y) and I iB (x, y) are the RGB values of the pixel points at coordinates (x, y) in I i , respectively, G iS (x, y) y) and G iV (x, y) are respectively the SV values of the pixel points in I i at coordinates (x, y), and I iqR , I iqG and I iqB are respectively the coordinates (x, y) in I i The pixel point at the place is filtered through the RGB value of the threshold value, and this value is stored in the filtered image I iq , and the same operation is performed for I i+1 to obtain the filtered image I i+1q ; Fig. 3 is that Fig. 1 passes through The image filtered by HSV and the filter condition is Q, as shown in the figure, after filtering, a small number of pixels that meet the conditions remain;

步骤2.2:根据式(4)计算Iiq中任意坐标(x,y)处的像素点的RGB值总和Ciq(x,y),采用同样的方法计算得到Ii+1q中任意坐标(x,y)处的像素点的RGB值总和Ci+1q(x,y);根据式(5)计算相邻帧Iiq和Ii+1q的变化图像Iia,图4为图3及其相邻帧的变化图像;Step 2.2: Calculate the RGB value sum C iq (x, y) of the pixel points at any coordinates (x, y) in I iq according to formula (4), and use the same method to calculate any coordinates (x, y) in I i+1q . , y) the RGB value summation C i+1q (x, y) of the pixel point at place; Calculate the change image I ia of adjacent frame I iq and I i+1q according to formula (5), Fig. 4 is Fig. 3 and its Changed images of adjacent frames;

Ciq(x,y)=IiqR(x,y)+IiqG(x,y)+IiqB(x,y) (4)C iq (x,y)=I iqR (x,y)+I iqG (x,y)+I iqB (x,y) (4)

Figure BDA0003664924890000051
Figure BDA0003664924890000051

其中,Iia(x,y)表示Iia中在坐标(x,y)处的像素点的值;Among them, I ia (x, y) represents the value of the pixel point at the coordinate (x, y) in I ia ;

步骤2.3:对图像Iia进行腐蚀和膨胀,图5为图4经过腐蚀和膨胀之后的图像,过滤了细小的干扰像素点;Step 2.3: Corrode and dilate the image I ia . Figure 5 is the image of Figure 4 after the erosion and dilation, and filter out the small interfering pixels;

步骤3:取S1={Ii-t-1a,Ii-ta,…,Ii-1a},S2={Iia,Ii+1a,…,Ii+t-1a},S1为第i帧图像前面的t帧的相邻帧变化图像,S2为第i帧图像后面的t帧的相邻帧变化图像,1≤i-t≤n,根据式(6)计算S1和S2中图像像素累积变化,得到图像R1和R2,图6为累积100帧相邻帧像素变化的图像,如图可见候选烟雾区域累积像素数目比其他非候选烟雾区域多;Step 3: Take S 1 ={I it-1a ,I i-ta ,...,I i-1a },S 2 ={I ia ,I i+1a ,...,I i+t-1a },S 1 is the adjacent frame change image of the t frame before the ith frame image, S 2 is the adjacent frame change image of the t frame after the ith frame image, 1≤it≤n, according to formula ( 6 ) Calculate S1 and S Figure 2 shows the cumulative changes of image pixels in 2 to obtain images R 1 and R 2 . Figure 6 is an image of cumulative pixel changes of 100 adjacent frames. It can be seen from the figure that the cumulative number of pixels in the candidate smoke area is more than that in other non-candidate smoke areas;

Figure BDA0003664924890000052
Figure BDA0003664924890000052

其中,|表示按位或操作;where | represents a bitwise OR operation;

步骤4:从R1和R2中选取与候选烟雾区域

Figure BDA0003664924890000053
重合的图像,得到R1ik和R2ik,统计R1ik和R2ik图像中三通道均为255的像素数,记为U1ik和U2ik,若U1ik/U2ik<0.5,则认为
Figure BDA0003664924890000054
处存在烟雾。Step 4 : Pick and candidate smoke regions from R1 and R2
Figure BDA0003664924890000053
Coincident images, get R 1ik and R 2ik , count the number of pixels in the three channels of R 1ik and R 2ik images are 255, record as U 1ik and U 2ik , if U 1ik /U 2ik <0.5, it is considered that
Figure BDA0003664924890000054
There is smoke.

本说明书实施例所述的内容仅仅是对发明构思的实现形式的列举,本发明的保护范围的不应当被视为仅限于实施例所陈述的具体形式,本发明的保护范围也及于本领域技术人员根据本发明构思所能够想到的等同技术手段。The content described in the embodiments of the present specification is only an enumeration of the realization forms of the inventive concept, and the protection scope of the present invention should not be regarded as limited to the specific forms stated in the embodiments, and the protection scope of the present invention also extends to the field Equivalent technical means that can be conceived by a skilled person according to the inventive concept.

Claims (1)

1. A smog judgment method based on video analysis is characterized by comprising the following steps:
step 1: acquiring n frames of images in the monitoring video, and recording as I 1 ,I 2 ,…,I n (ii) a Using YOLOv5 to image I of any ith frame i Carrying out smoke detection to obtain K i A candidate smoke region, and the kth candidate smoke regionIs marked as
Figure FDA0003664924880000011
Wherein,
Figure FDA0003664924880000012
coordinates representing the upper left corner of the kth smoke candidate region,
Figure FDA0003664924880000013
coordinates representing the lower right corner of the kth smoke candidate region;
step 2: calculating adjacent frame changes of the n frames of images to obtain an image set S ═ { I } 1a ,I 2a ,…,I n-1a };
Step 2.1: for any I i And I i+1 Performing HSV threshold filtering, wherein i is 1,2, …, n-1, converting the image from RGB color space to HSV color space to obtain an image G i And G i+1 Setting a filter condition Q ═ V ∈ [150,255 ]],S∈[0,25]To G i And G i+1 The HSV value of each pixel point is judged, namely I is judged according to the formulas (1), (2) and (3) i And I i+1 Filtering to obtain I i And I i+1 Image I filtered under filtering condition Q iq And I i+1q ,I i And I i+1 The RGB values of the pixels which do not satisfy the filtering condition are all set to zero, and the HSV threshold filtering formula is as follows:
Figure FDA0003664924880000014
Figure FDA0003664924880000015
Figure FDA0003664924880000016
wherein, I iR (x,y)、I iG (x, y) and I iB (x, y) are each I i RGB value, G, of pixel point centered at coordinate (x, y) iS (x, y) and G iV (x, y) are each I i SV value, I, of a pixel point centered at coordinate (x, y) iqR 、I iqG And I iqB Are respectively I i The RGB value of the pixel point at the coordinate (x, y) after threshold value filtration is stored in the filtered image I iq In respect of I i+1 The same operation is carried out to obtain a filtered image I i+1q
Step 2.2: calculation of I according to formula (4) iq The total RGB value C of the pixel points at any coordinate (x, y) iq (x, y) and calculating to obtain I by the same method i+1q The total RGB value C of the pixel points at any coordinate (x, y) i+1q (x, y); computing neighboring frame I according to equation (5) iq And I i+1q Change image I of ia
C iq (x,y)=I iqR (x,y)+I iqG (x,y)+I iqB (x,y) (4)
Figure FDA0003664924880000017
Wherein, I ia (x, y) represents I ia The value of the pixel point at coordinate (x, y);
step 2.3: for image I ia Carrying out corrosion and expansion;
and step 3: get S 1 ={I i-t-1a ,I i-ta ,…,I i-1a },S 2 ={I ia ,I i+1a ,…,I i+t-1a },S 1 For t frames adjacent to the ith frame image, S 2 For the adjacent frame change image of t frames following the ith frame image, i-t is more than or equal to 1 and less than or equal to n, S is calculated according to the formula (6) 1 And S 2 The accumulated change of the image pixels is obtained to obtain an image R 1 And R 2
Figure FDA0003664924880000021
Wherein, | represents a bitwise or operation;
and 4, step 4: from R 1 And R 2 To select and candidate smoke regions
Figure FDA0003664924880000022
Superposed images, resulting in R 1ik And R 2ik Statistics of R 1ik And R 2ik The number of pixels with 255 three channels in the image is recorded as U 1ik And U 2ik If U is 1ik /U 2ik If less than 0.5, it is considered that
Figure FDA0003664924880000023
Where smoke is present.
CN202210583081.7A 2022-05-26 2022-05-26 A smoke determination method based on video analysis Active CN114998788B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210583081.7A CN114998788B (en) 2022-05-26 2022-05-26 A smoke determination method based on video analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210583081.7A CN114998788B (en) 2022-05-26 2022-05-26 A smoke determination method based on video analysis

Publications (2)

Publication Number Publication Date
CN114998788A true CN114998788A (en) 2022-09-02
CN114998788B CN114998788B (en) 2025-01-07

Family

ID=83029057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210583081.7A Active CN114998788B (en) 2022-05-26 2022-05-26 A smoke determination method based on video analysis

Country Status (1)

Country Link
CN (1) CN114998788B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116091935A (en) * 2023-04-07 2023-05-09 四川三思德科技有限公司 Forest fire and smoke alarm agriculture operation interference resistance processing method, device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085714A (en) * 2017-05-09 2017-08-22 北京理工大学 A Video-Based Forest Fire Detection Method
CN110516609A (en) * 2019-08-28 2019-11-29 南京邮电大学 A fire video detection and early warning method based on image multi-feature fusion
CN112258403A (en) * 2020-10-09 2021-01-22 哈尔滨理工大学 Method for extracting suspected smoke area from dynamic smoke

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085714A (en) * 2017-05-09 2017-08-22 北京理工大学 A Video-Based Forest Fire Detection Method
CN110516609A (en) * 2019-08-28 2019-11-29 南京邮电大学 A fire video detection and early warning method based on image multi-feature fusion
CN112258403A (en) * 2020-10-09 2021-01-22 哈尔滨理工大学 Method for extracting suspected smoke area from dynamic smoke

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116091935A (en) * 2023-04-07 2023-05-09 四川三思德科技有限公司 Forest fire and smoke alarm agriculture operation interference resistance processing method, device and medium
CN116091935B (en) * 2023-04-07 2023-08-01 四川三思德科技有限公司 Forest fire and smoke alarm agriculture operation interference resistance processing method, device and medium

Also Published As

Publication number Publication date
CN114998788B (en) 2025-01-07

Similar Documents

Publication Publication Date Title
CN108447219A (en) System and method for detecting fire hazard based on video image
CN101738394B (en) Method and system for detecting indoor smog
CN105741480B (en) Fire and smog detection method based on image recognition
JP2019505866A (en) Passerby head identification method and system
CN111611907B (en) An image-enhanced infrared target detection method
CN106991668B (en) A method for evaluating images captured by Skynet cameras
CN105761261A (en) Method for detecting artificial malicious damage to camera
CN107085714A (en) A Video-Based Forest Fire Detection Method
CN114169362B (en) A method for denoising event stream data based on spatiotemporal correlation filtering
CN111783685B (en) An improved target detection algorithm based on a single-stage network model
CN113657250B (en) A flame detection method and system based on monitoring video
CN111353496B (en) Real-time detection method for infrared dim targets
CN111046827A (en) Video smoke detection method based on convolutional neural network
CN114299050B (en) A fall detection method for infrared images based on improved Alphapose
CN113096103B (en) An intelligent image perception method for flue gas in flare venting
CN111461076A (en) Smoke detection method and detection system combined with frame difference method and neural network
CN111091586A (en) A fast detection and localization method of smoke dynamic occlusion area and its application
CN112419261B (en) Visual acquisition method and device with abnormal point removing function
CN110853077B (en) An Adaptive Feature Extraction Method for Infrared Dynamic Frames Based on Morphology Change Estimation
CN114998788A (en) A smoke detection method based on video analysis
CN117197064A (en) Automatic non-contact eye red degree analysis method
CN115511751A (en) Evaluation method for event stream abnormal event filtering effect
CN108491796A (en) A kind of time domain period point target detecting method
CN114863330A (en) A target object detection method, system and computer storage medium
CN111339945B (en) Video-based people group and scatter inspection method and 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
GR01 Patent grant
GR01 Patent grant