Search

CN-122023758-A - Flame detection method and system based on flame dynamic characteristics and electronic equipment

CN122023758ACN 122023758 ACN122023758 ACN 122023758ACN-122023758-A

Abstract

The invention belongs to the field of flame detection, and particularly relates to a flame detection method, a flame detection system and electronic equipment based on flame dynamic characteristics, which aim to solve the problems of unstable detection effect and false alarm existing in the existing method. The method comprises the steps of inputting a flame picture into a flame detection model to obtain a flame detection frame area, cutting out the flame detection frame area in a current frame to serve as a first picture, cutting out the flame detection frame area detected by a previous frame or a next frame corresponding to the current frame to serve as a second picture, respectively carrying out Gaussian blur processing on a gray level image of the first picture and a gray level image of the second picture to obtain a first image and a second image, respectively carrying out binarization image processing on the first image and the second image based on a gray level value threshold K, and judging whether flame exists on site based on an image contour area after the binarization image processing. And further, the final detection effect, the detection efficiency and the accuracy of the detection result are improved.

Inventors

  • WANG ZHEN
  • YIN HONGSHI
  • QIAN CHAO
  • FANG SANHUI
  • Shang Baoqi
  • XIAO FENG
  • ZHANG KUN
  • WANG LIANG

Assignees

  • 中国石油天然气股份有限公司

Dates

Publication Date
20260512
Application Date
20241101

Claims (10)

  1. 1. A flame detection method based on flame dynamics, the method comprising: Acquiring a flame data set with a training tag, and training the flame data set with the training tag by utilizing a YOLOv algorithm model to obtain a flame detection model; Intercepting a given video of a scene into a flame picture by using FFmpeg, inputting the flame picture into the flame detection model to obtain a flame detection frame area; cutting out the flame detection frame area corresponding to the frame or the frame after the frame as a first picture; Respectively carrying out Gaussian blur processing on the gray level image of the first picture and the gray level image of the second picture to obtain a first image and a second image; calculating a gray value threshold K based on the global average value of the first image and the second image, and respectively carrying out binarization image processing on the first image and the second image based on the gray value threshold K to obtain a first binarization image and a second binarization image; determining whether the scene has a flame based on the first binarized image and the second binarized image contour area.
  2. 2. The flame detection method based on flame dynamics according to claim 1, wherein the method of acquiring a flame dataset with training tags comprises: Extracting key frames from the flame monitoring video as image materials according to a set time interval by using FFmpeg; Performing scaling, rotation, blurring and labeling processing on the image material and the flame detection and disclosure data set to obtain a data sample; And marking the flame target object on the data sample to obtain a flame data set with a training label.
  3. 3. The flame detection method based on flame dynamic characteristics according to claim 1, wherein a gaussian kernel for performing gaussian blur processing on the grayscale image of the first picture and the grayscale image of the second picture, respectively, is size= (3, 5).
  4. 4. A flame detection method based on flame dynamics according to claim 3, wherein the method of calculating the gray value threshold K comprises: Firstly, calculating the global average value of the first image and the second image; then calculating the accumulated average value of gray value threshold K in the first image and the second image; Calculating to obtain a probability maximum equation based on the global average value and the accumulated average value; the maximum variance value corresponding to the probability maximum equation is the gray value threshold K.
  5. 5. The flame detection method based on flame dynamics according to claim 4, wherein the method of calculating the global average of the first image and the second image is: where m G represents the global average, i represents the ith pixel, and Pi represents the pixel of the ith pixel.
  6. 6. The flame detection method based on flame dynamics according to claim 5, wherein the method of calculating the accumulated average of gray value thresholds K in the first image and the second image comprises: wherein m represents the accumulated average value of the gray value threshold K, i represents the ith pixel point, and Pi represents the pixel of the ith pixel point.
  7. 7. The flame detection method based on flame dynamics according to claim 6, wherein the probability maximum equation is: Wherein, sigma is the variance value, the maximum variance value sigma is the gray value threshold K, and p 1 is the parameter, which is related to i and K.
  8. 8. The flame detection method based on flame dynamics according to claim 7, wherein the method of determining whether the scene has a flame based on the first binarized image and the second binarized image contour area comprises: Firstly, calculating the change rate of the contour areas of the first binarized image and the second binarized image, wherein the change rate is specifically as follows: Wherein S a is the contour area of the first binarized image, S b is the contour area of the second binarized image, and rate is the rate of change of the contour areas of the first binarized image and the second binarized image; And if the rate of change rate is smaller than or equal to a first threshold value, judging that the site has no flame.
  9. 9. A flame detection system based on flame dynamics, the system comprising: The data acquisition module is used for acquiring a flame data set with a training tag, and training the flame data set with the training tag by using a YOLOv algorithm model to obtain a flame detection model; the flame detection module is used for intercepting a given video on site into a flame picture by using FFmpeg, and inputting the flame picture into the flame detection model to obtain a flame detection frame area; the picture processing module is used for cutting out the flame detection frame area corresponding to the current frame as a first picture, and cutting out the flame detection frame area detected by the previous frame or the next frame corresponding to the current frame as a second picture; The gray level image processing module is used for respectively carrying out Gaussian blur processing on the gray level image of the first picture and the gray level image of the second picture to obtain a first image and a second image; the binarization processing module is used for calculating a gray value threshold K based on the global average value of the first image and the second image, and respectively carrying out binarization image processing on the first image and the second image based on the gray value threshold K to obtain a first binarization image and a second binarization image; And the flame judging module is used for judging whether the scene has flame or not based on the outline area of the first binarized image and the outline area of the second binarized image.
  10. 10. An electronic device comprising at least one processor and a memory communicatively coupled to at least one of the processors, wherein the memory stores instructions executable by the processor for execution by the processor to implement the flame dynamics-based flame detection method of any one of claims 1-8.

Description

Flame detection method and system based on flame dynamic characteristics and electronic equipment Technical Field The invention belongs to the field of flame detection, and particularly relates to a flame detection method and system based on flame dynamic characteristics and electronic equipment. Background Fire is a common disaster, and causes great threat to personnel safety and property, and particularly in the industrial fields such as forests, oil fields, warehouses and the like, real-time monitoring and timely response are key to fire prevention and control. Especially in unattended or difficult-to-touch areas, timely detection and early warning of flames is important for preventing flame propagation. With the rapid progress of computer vision technology, the image analysis technology is utilized to detect flame, a new and effective means is provided for detecting flame, and proper measures are found and taken as early as possible to reduce loss when fire occurs. These techniques typically involve a combination of sensors, monitoring systems and intelligent algorithms to detect signs of fire such as flame, smoke, temperature changes, etc. The existing fire detection technology mainly comprises the following steps of (1) a flame detection sensor, wherein the flame detection sensor is specially designed for detecting flame, and the occurrence of fire can be judged by monitoring parameters such as spectral characteristics, light intensity and the like of the flame. Such sensors are typically capable of detecting and alerting at the beginning of a fire. But it is greatly affected by ambient light and is prone to false positives. (2) Temperature monitoring-fire is typically accompanied by an increase in ambient temperature, so temperature monitoring is also a common method of fire detection. The change of the ambient temperature is monitored by installing a temperature sensor or a thermal infrared imager and the like, and an alarm can be sent out once the temperature exceeds a preset threshold value. The temperature rise caused by fire and other heat sources cannot be accurately distinguished, and the problem of false alarm exists. (3) The image processing technology is that a camera or an infrared camera is used for shooting images or videos of fire scene, and then fire characteristics such as flame, smoke and the like are detected through the image processing technology, so that fire detection is realized. The method can provide visual image information such as flame, smoke and the like, and is convenient for judging fire situations. However, the detection effect is unstable because the environment with poor illumination condition and complex background is easily affected. Therefore, the existing flame detection method has the problems of unstable detection effect and false alarm. Disclosure of Invention In order to solve the above problems in the prior art, that is, the existing SPARC architecture processor boot method has the problems of loading for the nonvolatile memory, complicated replacement procedure and increased risk items in the chip test, the invention provides a method for loading the SPARC architecture SoC based on general IO, which comprises the following steps: Acquiring a flame data set with a training tag, and training the flame data set with the training tag by utilizing a YOLOv algorithm model to obtain a flame detection model; Intercepting a given video of a scene into a flame picture by using FFmpeg, inputting the flame picture into the flame detection model to obtain a flame detection frame area; cutting out the flame detection frame area corresponding to the frame or the frame after the frame as a first picture; Respectively carrying out Gaussian blur processing on the gray level image of the first picture and the gray level image of the second picture to obtain a first image and a second image; calculating a gray value threshold K based on the global average value of the first image and the second image, and respectively carrying out binarization image processing on the first image and the second image based on the gray value threshold K to obtain a first binarization image and a second binarization image; determining whether the scene has a flame based on the first binarized image and the second binarized image contour area. In a preferred embodiment, a method of acquiring a flame dataset with training tags comprises: Extracting key frames from the flame monitoring video as image materials according to a set time interval by using FFmpeg; Performing scaling, rotation, blurring and labeling processing on the image material and the flame detection and disclosure data set to obtain a data sample; And marking the flame target object on the data sample to obtain a flame data set with a training label. In a preferred embodiment, the gaussian kernel for performing the gaussian blur processing on the grayscale image of the first picture and the grayscale image of the second picture is s