Disclosure of Invention
The invention aims to provide a fire re-ignition prediction method and system based on AI image recognition.
The invention is realized by the following technical scheme: a fire re-ignition prediction method based on AI image recognition comprises the following steps:
s1: acquiring a first video image and a second video image of the same place in the same time period, wherein the first video image is an infrared video and the second video image is a visible light video;
s2: detecting whether a thermal area in the first video image is increased along with the increase of shooting time, if so, dividing the thermal area into n thermal blocks, and obtaining a temperature value H of the thermal block based on a thermal value r of the thermal block;
s3: and comparing the temperature value H with a preset temperature, sending out an early warning when the temperature value H exceeds the preset temperature, identifying whether a smoke image exists in the second video image when the temperature value H approaches the preset temperature, and generating the early warning if the smoke image exists in the second video image.
Preferably, in step S2, the specific steps of detecting whether the thermal area in the first video increases with the increase of the shooting time are:
framing the first video image into a frame image picture, and calculating a thermal area of the frame image picture based on an image pixel value of the frame image picture;
selecting a thermal area of a t-second frame image picture, performing difference value operation on the thermal area in the t-second frame image picture, the thermal area in the t-5 second frame image picture and the thermal area in the t-10 second frame image picture to obtain a first difference value, a second difference value and a third difference value, and judging the number of positive numbers of the first difference value, the second difference value and the third difference value;
and detecting whether the number of all the obtained difference values which are positive values reaches a preset number P or not until all the frame image pictures are traversed, and if so, increasing the thermal power area in the first video along with the increase of the shooting time.
Preferably, the thermodynamic area calculation expression is:
p (i, j) is the pixel mean.
Preferably, the calculation expression of the temperature value H is:
r is the thermal mean of the thermal block.
Preferably, the calculation expression of r is:
q is a set of thermal blocks, Q i Is the thermal value at the ith point in the thermal block.
Preferably, the preset threshold T is 150.
The invention also discloses a fire re-ignition prediction system based on AI image recognition, the system comprises:
the image acquisition module is used for acquiring a first video image and a second video image of the same place in the same time period;
the image processing module is used for detecting whether a thermal area in the first video image is enlarged along with the increase of shooting time, if so, the thermal area is divided into n thermal blocks, and a temperature value H of each thermal block is obtained based on a thermal value r of each thermal block;
and the early warning analysis module is used for comparing the temperature value H with the preset temperature, sending out early warning when the temperature value H exceeds the preset temperature, identifying whether a smoke image exists in the second video image when the temperature value H approaches the preset temperature, and generating early warning if the smoke image exists in the second video image.
Preferably, the image acquisition module comprises an infrared camera and a visible light camera.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. by adopting the fire re-ignition prediction method and the fire re-ignition prediction system based on AI image recognition, provided by the invention, the infrared video image data and the visible light video image data are combined for analysis and processing, so that the real-time monitoring on whether the fire re-ignition condition exists or not in a monitoring place under the condition that no open fire exists is realized;
2. by adopting the fire re-ignition prediction method and system based on AI image recognition, provided by the invention, whether the fire has the re-ignition hidden danger or not is detected, and early warning is carried out in advance if the re-ignition hidden danger exists, so that related responsible persons can know the early warning in time and go to the site for processing, and secondary disasters are prevented;
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and the accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not used as limiting the present invention.
Example one
The embodiment discloses a fire reignition prediction method based on AI image recognition, as shown in FIG. 1, including the following steps:
s1: acquiring a first video image and a second video image of the same place in the same time period, wherein the first video image is an infrared video, and the second video image is a visible light video;
when monitoring the same place, simultaneously gather the infrared image and the visible light image of same place to infrared image and visible light image carry out the analysis, will combine infrared image analysis and visible light image analysis, not can realize when having no naked light, carry out real time monitoring to the temperature of monitored place, can also realize discerning under the condition that has the naked light to monitored place through visible light video image.
S2: detecting whether a thermal area in the first video image is increased along with the increase of shooting time, if so, dividing the thermal area into n thermal blocks, and obtaining a temperature value H of the thermal block based on a thermal value r of the thermal block;
the collected first video infrared image is collected under the condition of no open fire, the temperature in the monitored place is mainly identified through the first video image, the monitored place has no open fire after the fire disaster happens, and at the moment, the temperature in the monitored place needs to be identified in real time to judge whether the temperature in the monitored place exceeds or approaches the temperature condition of the preset burning point so as to judge.
The specific steps for detecting whether the thermal area in the first video increases along with the increase of the shooting time are as follows:
extracting a frame of the first video image into a frame image picture, and calculating a thermal area of the frame image picture based on an image pixel value of the frame image picture;
selecting a thermal area of a t-second frame image picture, performing difference value operation on the thermal area in the t-second frame image picture, the thermal area in the t-5 second frame image picture and the thermal area in the t-10 second frame image picture to obtain a first difference value, a second difference value and a third difference value, and judging the number of positive numbers of the first difference value, the second difference value and the third difference value;
and detecting whether the number of all the obtained difference values which are positive values reaches a preset number P or not until all the frame image pictures are traversed, and if so, increasing the thermal power area in the first video along with the increase of the shooting time.
The thermal deviation is calculated for all the frame image pictures of the frames according to the above calculation method, and finally, the number of positive numbers of all the calculated difference values is counted, if the number of the positive numbers exceeds the preset number, the thermal area representing the monitored site is increased along with the increase of time, so that when the thermal area of the monitored site is judged to be gradually increased, the situation that the monitored site has fire re-ignition is proved, and the temperature in the thermal area needs to be calculated.
The thermodynamic area calculation expression is:
p (i, j) is the pixel mean value, and the preset threshold T is 150.
S3: and comparing the temperature value H with a preset temperature, sending out an early warning when the temperature value H exceeds the preset temperature, identifying whether a smoke image exists in the second video image when the temperature value H approaches the preset temperature, and generating the early warning if the smoke image exists in the second video image.
Dividing a heating power area into a plurality of heating power blocks, calculating the heating power value in the heating power blocks, selecting the heating power block with the maximum heating power value, calculating the heating power value of the corresponding heating power block, calculating the temperature of the heating power block through the heating power value, judging the relation between the temperature value H and the preset temperature, confirming whether the situation of fire re-burning exists at the moment in the monitored site, directly pushing the generated early warning information to a web background, and reminding related personnel to process in time by the web background on public platforms such as a PC (personal computer) end, APP (application) and a WeChat public number and the like, and displaying the site situation in real time by monitoring and triggering early warning in a correlation manner. The web end can display the whole early warning process, and managers can conduct macroscopic analysis and emergency command according to the early warning process information. Public numbers and APP can timely receive early warning and remind, can display early warning information, and need to transmit the early warning information to a fireproof monitoring platform.
The calculation expression for the temperature value H is:
r is the thermal mean of the thermal block.
The computational expression of r is:
q is a set of thermal blocks, Q i Is the thermal value at the ith point in the thermal block.
Identifying smoke in the second video image by adopting the prior art, and extracting a suspected smoke area in the video image by an algorithm combining a color model of the smoke with a background subtraction method; extracting static texture features of the smoke, describing texture information of the smoke based on a Gaussian pyramid local binary pattern and a variance representation method of the local binary pattern, and obtaining local and global texture features of the smoke; then, the motion characteristics of the smoke are extracted by utilizing an image blocking processing technology and a Lucas-Kanada optical flow method, the method is high in accuracy, and the complexity and the operation time of the algorithm are reduced; and finally, inputting the extracted multiple features into the SVM to serve as a recognition criterion of the fire smoke, and if the obtained features meet the smoke discrimination standard, sending out an early warning signal.
Example two
The embodiment discloses a fire reignition prediction system based on AI image recognition, which is used for implementing the prediction method in the first embodiment, and as shown in fig. 2, the system includes:
the image acquisition module is used for acquiring a first video image and a second video image of the same place in the same time period; the image acquisition module comprises an infrared camera and a visible light camera, and the infrared camera and the visible light camera are acquired through a double-spectrum camera on the monitoring equipment, so that the reburning rate of the identified monitoring place is higher.
The image processing module is used for detecting whether the thermal area in the first video image is increased along with the increase of the shooting time, if so, the thermal area is divided into n thermal blocks, and the temperature value H of the thermal block is obtained based on the thermal value r of the thermal block;
and the early warning analysis module is used for comparing the temperature value H with the preset temperature, sending out early warning when the temperature value H exceeds the preset temperature, identifying whether a smoke image exists in the second video image when the temperature value H approaches the preset temperature, and generating early warning if the smoke image exists in the second video image.
As shown in fig. 3, when the number of the devices in the Lustan lake town in salt Source county is 08:17:22 in 11 months and 16 days in 020 years, the devices are converted into frame images through a front streaming media program and are sent to an algorithm for analysis based on the device named as "Lustan lake No. 1 monitoring" installed in the system to which the invention belongs, the algorithm identifies smoke generation, the streaming media is informed to intercept the early warning video and send the early warning message to a web background, the web background program forwards the message to a PC (personal computer) terminal, an APP (application), and a WeChat public number, local fire prevention and forest protection team members receive the early warning message, the smoke is upgraded to a fire, the relative fortunate personnel receive the early warning in time, and the relative personnel rapidly go to the place to extinguish the fire when the fire is small, and no personnel and property loss is caused.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.