CN114821446A - Smoke and fire identification method and device, electronic equipment and storage medium - Google Patents

Smoke and fire identification method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114821446A
CN114821446A CN202210538435.6A CN202210538435A CN114821446A CN 114821446 A CN114821446 A CN 114821446A CN 202210538435 A CN202210538435 A CN 202210538435A CN 114821446 A CN114821446 A CN 114821446A
Authority
CN
China
Prior art keywords
moving object
flame
determining
smoke
feature
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.)
Pending
Application number
CN202210538435.6A
Other languages
Chinese (zh)
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.)
Jiangsu Sanleng Smartcity&iot System Co ltd
Original Assignee
Jiangsu Sanleng Smartcity&iot System 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 Jiangsu Sanleng Smartcity&iot System Co ltd filed Critical Jiangsu Sanleng Smartcity&iot System Co ltd
Priority to CN202210538435.6A priority Critical patent/CN114821446A/en
Publication of CN114821446A publication Critical patent/CN114821446A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/254Analysis of motion involving subtraction of images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/64Analysis of geometric attributes of convexity or concavity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Multimedia (AREA)
  • Fire-Detection Mechanisms (AREA)

Abstract

The invention discloses a firework identification method, a firework identification device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a video to be detected, and acquiring a video frame image to be detected from the video to be detected; determining a moving object region in a video frame image to be detected through a background modeling algorithm; judging whether a moving object in the moving object area has a first object characteristic or not to obtain a first firework identification result; judging whether the moving object has a second object characteristic or not to obtain a second firework identification result; and determining a target firework identification result according to the first firework identification result and the second firework identification result. By operating the technical scheme provided by the embodiment of the invention, the problems that the fire information acquisition consumes longer time and the detection precision and accuracy are lower due to the fact that the fire detector detects fire and smoke can be solved, and the beneficial effects of improving the accuracy and efficiency of fire and smoke identification are achieved.

Description

Smoke and fire identification method and device, electronic equipment and storage medium
Technical Field
The present invention relates to computer technologies, and in particular, to a method and an apparatus for identifying smoke and fire, an electronic device, and a storage medium.
Background
The fire hazard brings great harm to human society, and even in the highly developed current society, the fire hazard is still one of the major disasters threatening the life safety of human beings. Particularly, with the development of economy, various high-rise comprehensive building groups are more and more, the environment is more complex, various fire-fighting problems are frequent, and the harm and the loss caused by fire are also more huge. How to effectively control the occurrence of fire becomes a difficult problem of the development of human society. According to statistics, 90% conflagration all can be controlled at the initial stage, therefore the control conflagration, need follow the source and start, reduces the fire control hidden danger on the one hand, and on the other hand can go out early little that disappears in the initial stage of conflagration, reduces the degree of difficulty of putting out a fire.
Fire prevention presents problems: the fire detector is in service for a long time, the service life of the domestic detector is about thirty thousand hours generally, and the service life of the world brand fire detector can reach up to sixty thousand hours. However, the existing building alarm system usually does not replace, maintain or clean the detector for more than ten years, so that the sensitivity of the detector cannot meet the working requirement, the obtained fire information is inaccurate, and the alarm time can be delayed to cause disasters;
the common fire detector collects physical quantities such as smoke, heat, flame and the like generated by combustion in a certain space, changes the physical quantities into electric signals through the fire detector, transmits the electric signals to the fire alarm controller, belongs to passive contact, is easily influenced by space, airflow and temperature, has long time and low accuracy, and often changes small fire into big fire when triggering alarm;
the conventional fire detector is generally installed on a ceiling or a wall of a protected space, and an alarm is generated when a detection signal is transmitted to the detector and accumulated to a certain degree, which belongs to contact detection. In some high and large spaces, outdoor spaces and places with unstable airflow, due to the influence of interference of environmental factors, a fire signal cannot reach the detector quickly and timely, so that the fire detector cannot work normally and effectively, and the detection precision and accuracy are influenced.
Disclosure of Invention
The invention provides a firework identification method, a firework identification device, electronic equipment and a storage medium, and aims to improve accuracy and efficiency of firework identification.
According to an aspect of the present invention, there is provided a smoke and fire identification method, characterized by comprising:
acquiring a video to be detected, and acquiring a video frame image to be detected from the video to be detected;
determining a moving object region in the video frame image to be detected through a background modeling algorithm;
judging whether a moving object in the moving object area has a first object characteristic or not to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature;
judging whether the moving object has second object characteristics or not to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features;
and determining a target firework identification result according to the first firework identification result and the second firework identification result.
According to another aspect of the present invention, there is provided a pyrotechnic identification device characterized by comprising:
the video frame acquisition module is used for acquiring a video to be detected and acquiring a video frame image to be detected from the video to be detected;
the moving object region determining module is used for determining a moving object region in the video frame image to be detected through a background modeling algorithm;
the first result obtaining module is used for judging whether a moving object in the moving object area has first object characteristics or not so as to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature;
the second result obtaining module is used for judging whether the moving object has second object characteristics or not so as to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features;
and the target identification result determining module is used for determining a target firework identification result according to the first firework identification result and the second firework identification result.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a method of smoke and fire identification according to any of the embodiments of the invention.
According to another aspect of the invention, a computer-readable storage medium is provided, having stored thereon computer instructions for causing a processor to execute a method of smoke and fire identification according to any of the embodiments of the invention.
According to the technical scheme of the embodiment of the invention, the video to be detected is obtained, and the video frame image to be detected is obtained from the video to be detected; determining a moving object region in the video frame image to be detected through a background modeling algorithm; judging whether a moving object in the moving object area has a first object characteristic or not to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature; judging whether the moving object has a second object characteristic or not to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features; and determining a target firework identification result according to the first firework identification result and the second firework identification result. The problems that fire information is obtained by long time consumption and detection precision and accuracy are low due to the fact that fire and smoke are detected through a fire detector are solved, and the beneficial effects that the accuracy and the efficiency of fire and smoke identification are improved are achieved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
FIG. 1 is a flow chart of a smoke and fire identification method according to an embodiment of the present invention;
fig. 2 is a flowchart of a firework identification method according to a second embodiment of the present invention;
fig. 3 is a flowchart of a firework identification method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a firework identification device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," "target," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a smoke and fire identification method according to an embodiment of the present invention, which may be applied to identify smoke or flame in a video, and the method may be performed by a smoke and fire identification device according to an embodiment of the present invention, which may be implemented by software and/or hardware. Referring to fig. 1, the firework identification method provided in this embodiment includes:
s110, acquiring a video to be detected, and acquiring a video frame image to be detected from the video to be detected.
The video to be detected may be a surveillance video, which is not limited in this embodiment. The method comprises the steps of obtaining a video frame image to be detected from a video to be detected, and decoding a video stream of the video to be detected to obtain a single frame video image. Optionally, preprocessing such as noise reduction and image enhancement is performed on the decoded single-frame picture to improve the picture quality, so that the accuracy of subsequent firework identification is improved.
And S120, determining a moving object region in the video frame image to be detected through a background modeling algorithm.
The moving object area is an area where a moving object exists, wherein the moving object is a moving object in a scene corresponding to the video frame image to be detected.
The method for determining the moving object region can be that a structural element with a specific size and shape is constructed in each frame of video frame image to be detected and used for image morphological processing, a Gaussian mixture model is created and used for background modeling, each read frame is applied to the Gaussian mixture model, the background in the video frame image to be detected is removed, and noise points are removed by utilizing morphological open operation; the contour in the video frame image to be detected is searched through a contour detection algorithm, the perimeter of each contour can be calculated, and the minimum circumscribed rectangle of the contour, which meets preset conditions such as size, shape and perimeter, is used as a moving object region.
S130, judging whether a moving object in the moving object area has a first object characteristic or not to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature.
And judging whether the object characteristics of the moving object in the moving object area meet a first object characteristic condition or not, and if so, determining that the moving object has the first object characteristics. If the moving object has a first object characteristic, which may indicate the presence of a flame in the moving object area, a first smoke and fire identification result is obtained. The first smoke and fire identification result may be a direct identification result, for example, a flame exists in the current video scene, or may be a detailed identification result, for example, a flame exists in the current video scene, and a specific position of the flame in the video scene is identified, which is not limited in this embodiment.
The determining whether the moving object has the first object feature may be determining whether the moving object has at least one of the first static feature and the first dynamic feature, or determining whether the moving object has all of the first static feature and the first dynamic feature, which is not limited in this embodiment.
The first static feature comprises a flame color feature and a flame shape feature, wherein the moving object having the flame color feature may satisfy a color condition of the flame, such as red or blue, for the color of the moving object. The moving object having the flame color shape may satisfy the flame shape condition for the shape of the moving object, for example, a ratio of a contour perimeter of the moving object to a convex hull perimeter of the moving object satisfies a preset ratio.
The first dynamic characteristics comprise flame motion characteristics, and the moving object with the flame motion characteristics can satisfy the motion conditions of the flame, such as shaking motion and the like, for the motion mode of the moving object.
S140, judging whether the moving object has second object characteristics or not to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features.
And judging whether the object characteristics of the moving object in the moving object area meet a second object characteristic condition, and if so, determining that the moving object has the second object characteristics. If the moving object has a second object characteristic, which may indicate the presence of smoke in the moving object area, a second smoke and fire identification result is obtained. The second smoke and fire identification result may be a direct identification result, for example, smoke exists in the current video scene, or may be a detailed identification result, for example, smoke exists in the current video scene, and a specific position of the smoke in the video scene is identified, which is not limited in this embodiment.
The determining whether the moving object has the second object feature may be determining whether the moving object has at least one of the second static feature and the second dynamic feature, or determining whether the moving object has all of the second static feature and the second dynamic feature, which is not limited in this embodiment.
The second static feature comprises a smoke pixel feature, wherein the moving object having the smoke pixel feature may satisfy a pixel condition of smoke for a pixel of the moving object, for example, whether a pixel value satisfies a smoke pixel value requirement or not.
The second dynamic characteristics comprise smoke motion characteristics, and the moving object with the smoke motion characteristics can satisfy the motion conditions of smoke, such as whether diffusion is performed or not, for the motion mode of the moving object.
And 150, determining a target firework identification result according to the first firework identification result and the second firework identification result.
Determining a target firework identification result according to the first firework identification result and the second firework identification result, wherein the target firework identification result can be determined by directly combining the first firework identification result and the second firework identification result, for example, if the first firework identification result is that flame exists, and the second firework identification result is that smoke exists, the target firework identification result can be that flame and smoke exist; for example, if the first firework identification result is that a flame exists in the area a, and the second firework identification result is that smoke exists in the area B, the target firework identification result may be determined according to the position relationship between the area a and the area B, the states of the flame and the smoke, the source of the fire occurrence, the trend of the fire spread, and the like, and the present embodiment is not limited thereto.
In this embodiment, optionally, after determining a target firework identification result according to the first firework identification result and the second firework identification result, the method further includes:
determining whether to prompt smoke and fire according to the target smoke and fire identification result;
if yes, determining a prompting mode and prompting content of the firework prompt, and performing the firework prompt according to the prompting mode and the prompting content.
And determining whether to perform smoke and fire prompting according to the target smoke and fire identification result, wherein the smoke and fire prompting is performed if the target smoke and fire identification result indicates that smoke and/or flame exist.
Wherein, fireworks suggestion mode is the mode of suggestion fireworks state, and is exemplary, fireworks suggestion mode can be for carrying out light voice prompt through the siren, also can be for sending fireworks suggestion information etc. to relevant personnel's user terminal, and this embodiment does not restrict this.
The smoke and fire prompting content may include smoke and fire types such as big fire, small fire and dense smoke, and may also include a smoke and fire generating position, which is not limited by the embodiment.
By determining the prompt mode and the prompt content of the firework prompt and carrying out the firework prompt according to the prompt mode and the prompt content, the accuracy and the effectiveness of the firework prompt are improved. The firework generating condition can be timely known by related personnel, the generated firework can be further processed conveniently according to firework prompt, and the efficiency and accuracy of follow-up firework processing are improved.
According to the technical scheme provided by the embodiment, the video to be detected is obtained, and the video frame image to be detected is obtained from the video to be detected; the moving object area in the video frame image to be detected is determined through a background modeling algorithm, so that smoke and fire identification can be conveniently carried out on the moving object area with possible smoke and fire, smoke and fire identification on the whole image is avoided, and accuracy of smoke and fire identification is improved.
Determining whether a flame exists in the moving object area by judging whether the moving object has the first object characteristics or not, and obtaining a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature to improve the accuracy of flame identification.
Judging whether the moving object has second object characteristics or not to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object features comprise second static features comprising smoke pixel features and/or second dynamic features comprising smoke motion features to improve accuracy of smoke identification.
According to the first firework identification result and the second firework identification result, the target firework identification result is determined, the smoke and the flame are respectively identified, a unified result is finally obtained, partial factors of fire caused by neglect due to the fact that only the flame is identified or only the smoke is identified are avoided, and effectiveness and comprehensiveness of firework identification are improved; and the problems that the longer time is consumed for obtaining fire information and the detection precision and accuracy are lower due to the fact that fire and smoke are detected through a fire detector are solved, and the beneficial effects of improving the accuracy and efficiency of fire and smoke identification are achieved.
Example two
Fig. 2 is a flowchart of a firework identification method according to a second embodiment of the present invention, and this technical solution is supplementary explained with respect to a process of determining whether a moving object in the moving object area has a first object feature. Compared with the above scheme, the specifically optimizing of the scheme is that the judging whether the moving object in the moving object region has the first object feature includes:
judging whether the object color characteristics of the moving object meet preset RGB conditions or not; if yes, determining that the moving object has the flame color feature;
judging whether the object shape characteristics of the moving object meet a preset combustion shape condition or not; if yes, determining that the moving object has the flame shape feature;
judging whether the first object motion characteristic of the moving object meets a preset flame state switching condition or not; if yes, determining that the moving object has the flame motion characteristics. Specifically, the flow chart of the firework identification method is shown in fig. 2:
s210, acquiring a video to be detected, and acquiring a video frame image to be detected from the video to be detected.
S220, determining a moving object region in the video frame image to be detected through a background modeling algorithm.
S230, judging whether the object color features of the moving object meet preset RGB conditions or not; if yes, determining that the moving object has the flame color feature.
The object color feature may be an entire color feature of the moving object region, or may be a color feature of the moving object, which is not limited in this embodiment.
The color feature can be an RGB value of a pixel point, whether the object color feature of the moving object meets a preset RGB condition or not is judged, whether the proportion of pixels with R larger than G and G larger than B in the moving object region to all the pixel points is larger than a preset proportion or not is judged, and if yes, the moving object is determined to have the flame color feature.
S240, judging whether the object shape characteristics of the moving object meet a preset combustion shape condition or not; if yes, determining that the moving object has the flame shape feature.
The object shape feature can be a profile feature of the moving object, whether the object shape feature of the moving object meets a preset combustion shape condition or not is judged, whether multilayer profiles exist or not can be judged, whether the multilayer profiles of the moving object diffuse outwards layer by layer or not is judged, the profiles of the outer layers are clearer and more continuous, and if the multilayer profiles of the moving object do not diffuse outwards layer by layer, the moving object is determined to have the flame shape feature.
S250, judging whether the first object motion characteristics of the moving object meet a preset flame state switching condition or not; if yes, determining that the moving object has the flame motion characteristics.
The first object motion characteristic may be a characteristic generated when the moving object moves, such as a change in state. The method includes judging whether a first object motion characteristic of a moving object meets a preset flame state switching condition, and judging whether the same moving object has two states in different video frame images to be detected, and performing state switching, for example, switching from a flame state to a non-flame state, and then switching from the non-flame state to the flame state. And if so, determining that the moving object has the flame motion characteristics.
In this embodiment, optionally, the determining whether the first object motion characteristic of the moving object meets a preset flame state switching condition includes:
determining whether an outer flame is present in the moving object; if so, acquiring the current flame state of the outer flame according to the outer flame pixel information of the outer flame;
determining the first object motion characteristic as the switching frequency of the current flame state and the last flame state of the outer flame, and judging whether the switching frequency meets a first preset frequency condition; wherein the current flame condition and the previous flame condition are different ones of a no flame condition and a flame condition;
and if so, determining that the first object motion characteristic meets the preset flame state switching condition.
Judging whether the moving object has the outer flame or not by judging whether pixel information and shape information of the moving object in the video frame image to be detected with continuous preset frame numbers exist, for example, judging whether a part with brightness and a shape meeting preset conditions exists in the moving object or not; if yes, judging whether the number of the video frame images to be detected corresponding to the moving object meeting the conditions is larger than a preset frame number, and if yes, determining that the moving object has the outer flame.
And determining the current flame state of the outer flame according to the pixel information of the outer flame part, for example, if the pixel value of the outer flame meets the pixel requirement of the outer flame, determining that the current flame state of the outer flame is a flame state, and if the pixel value of the outer flame does not meet the pixel requirement of the outer flame, determining that the current flame state of the outer flame is a no-flame state. The previous flame state is a flame state of an outer flame of a moving object of the historical video frame image to be detected, and the previous flame state is different from the current flame state, for example, if the current flame state is a no-flame state, the previous flame state is a flame state.
And judging whether the switching frequency of the current flame state and the previous flame state meets a first preset frequency condition, namely judging whether the switching frequency is 10HZ, and if so, determining that the first object motion characteristic meets the preset flame state switching condition.
The method comprises the steps of determining whether the moving object has the outer flame or not by combining the jumping and changing characteristics of the outer flame, determining whether the motion characteristics of the first object meet the preset flame state switching condition or not by the switching frequency of the current flame state and the previous flame state of the outer flame, improving the accuracy of determining whether the moving object has the flame motion characteristics or not, and increasing the possibility that the determined moving object with the flame motion characteristics is the flame.
And S260, determining whether flames exist in the moving object area or not, and obtaining a first firework identification result.
Whether a flame exists in the moving object region is determined according to whether the moving object has at least one of a flame color feature, a flame shape feature and a flame motion feature, which may be exemplified by when the moving object has any one of a flame color feature, a flame shape feature and a flame motion feature, that is, it is determined that a flame exists in the moving object region.
S270, judging whether the moving object has second object characteristics or not to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features.
And S280, determining a target firework identification result according to the first firework identification result and the second firework identification result.
The method comprises the steps of determining whether the moving object has flame color characteristics or not by judging whether the object color characteristics of the moving object meet preset RGB conditions or not; judging whether the object shape characteristics of the moving object meet preset combustion shape conditions or not, and determining that the moving object has flame shape characteristics; and judging whether the first object motion characteristic of the moving object meets a preset flame state switching condition or not, and determining whether the moving object has the flame motion characteristic or not. The first object feature is highly correlated with the feature of the flame, and the accuracy of judging whether the moving object in the moving object region has the first object feature is improved, namely the accuracy of subsequently determining whether the flame exists in the moving object region is improved.
EXAMPLE III
Fig. 3 is a flowchart of a firework identification method according to a third embodiment of the present invention, and this technical solution is supplementary explained with respect to a process of determining whether a moving object in the moving object area has a second object feature. Compared with the above scheme, the specifically optimizing of the scheme is that the determining whether the moving object in the moving object area has the second object feature includes:
judging whether the characteristic change mode of the object pixel characteristic of the moving object meets a preset smoke pixel characteristic change condition or not; if yes, determining that the moving object has the smoke pixel characteristics;
and judging whether the second object motion characteristic of the moving object meets a preset smoke boundary change condition, if so, determining that the moving object has the smoke motion characteristic. Specifically, the flow chart of the firework identification method is shown in fig. 3:
s310, acquiring a video to be detected, and acquiring a video frame image to be detected from the video to be detected.
S320, determining a moving object region in the video frame image to be detected through a background modeling algorithm.
S330, judging whether a moving object in the moving object area has first object characteristics or not to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature.
S340, judging whether the characteristic change mode of the object pixel characteristic of the moving object meets a preset smoke pixel characteristic change condition or not; if so, determining that the moving object has the smoke pixel characteristics.
The object pixel feature may be a pixel contrast of the moving object, the feature change manner of the pixel contrast may be a change of the pixel contrast of the adjacent frame, and it is determined whether the feature change manner of the object pixel feature of the moving object satisfies a preset smoke pixel feature change condition, and it may be determined whether the change manner of the pixel contrast of the adjacent frame is that the contrast is lower and lower, and the like.
And S350, judging whether the second object motion characteristic of the moving object meets a preset smoke boundary change condition, and if so, determining that the moving object has the smoke motion characteristic.
The second object motion characteristic may be a characteristic generated when the moving object moves, such as a change in state. The second object motion characteristic of the moving object is judged whether to meet the preset smoke boundary change condition, which may be to judge whether the trend of the motion state change of the same moving object in different video frame images to be detected is the same as the smoke change mode, for example, whether the outline range of the moving object is larger and larger. And if so, determining that the moving object has the smoke motion characteristics.
In this embodiment, optionally, the determining whether the second object motion characteristic of the moving object meets a preset smoke boundary change condition includes:
determining a current contour range of a moving object, and determining the second object motion characteristic as the change frequency of the current contour range and a last contour range of the moving object;
judging whether the change frequency meets a second preset frequency condition or not, wherein the current contour range is larger than the last contour range;
and if the first object motion characteristic and the second object motion characteristic are both satisfied, determining that the second object motion characteristic satisfies a preset smoke boundary change condition.
The current contour range of the moving object can be obtained through a contour range recognition algorithm, the previous contour range can be the contour range of the moving object of the historical video frame image to be detected, and the current contour range is different from the previous contour range.
And judging whether the change frequency of the current contour range and the change frequency of the previous contour range meet a second preset frequency condition, namely judging whether the change frequency is 3Hz, and if so, determining that the motion characteristic of the second object meets a preset smoke boundary change condition, wherein the current contour range is larger than the previous contour range.
The method has the advantages that whether the smoke exists in the moving object is determined by combining the characteristic that the motion of the smoke is continuous and not rigid, whether the motion characteristic of the second object meets the preset smoke boundary change condition or not is determined according to the change frequency of the current contour range and the previous contour range, the accuracy of determining whether the moving object has the smoke motion characteristic or not is improved, and the possibility that the determined moving object with the smoke motion characteristic is the smoke is increased.
And S360, determining whether smoke exists in the moving object area or not, and obtaining a second smoke and fire identification result.
Whether flames exist in the moving object area is determined according to whether the moving object has at least one of the smoke pixel characteristics and the smoke motion characteristics, and illustratively, whether fireworks exist in the moving object area is determined when the moving object has any one of the smoke pixel characteristics and the smoke motion characteristics.
And S370, determining a target firework identification result according to the first firework identification result and the second firework identification result.
The embodiment of the invention determines whether the moving object has the smoke pixel characteristics by judging whether the characteristic change mode of the object pixel characteristics of the moving object meets the preset smoke pixel characteristic change condition or not; and judging whether the second object motion characteristic of the moving object meets a preset smoke boundary change condition or not, and determining whether the moving object has the smoke motion characteristic or not. The second object characteristics are highly correlated with the characteristics of the smoke, and the accuracy of judging whether the moving object in the moving object area has the second object characteristics is improved, namely the accuracy of subsequently determining whether the smoke exists in the moving object area is improved.
Example four
Fig. 4 is a schematic structural diagram of a firework identification device according to a fourth embodiment of the present invention. The device can be realized in a hardware and/or software mode, can execute the firework identification method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. As shown in fig. 4, the apparatus includes:
the video frame acquiring module 410 is configured to acquire a video to be detected and acquire a video frame image to be detected from the video to be detected;
a moving object region determining module 420, configured to determine a moving object region in the video frame image to be detected through a background modeling algorithm;
a first result obtaining module 430, configured to determine whether a moving object in the moving object area has a first object feature, to determine whether a flame exists in the moving object area, and to obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature;
a second result obtaining module 440, configured to determine whether the moving object has a second object feature, to determine whether smoke exists in the moving object area, and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features;
a target identification result determining module 450, configured to determine a target firework identification result according to the first firework identification result and the second firework identification result.
On the basis of the foregoing technical solutions, optionally, the first result obtaining module includes:
the first condition judging unit is used for judging whether the object color characteristics of the moving object meet the preset RGB condition or not; if yes, determining that the moving object has the flame color feature;
a second condition judgment unit configured to judge whether or not an object shape feature of the moving object satisfies a preset combustion shape condition; if yes, determining that the moving object has the flame shape feature;
the third condition judging unit is used for judging whether the first object motion characteristic of the moving object meets a preset flame state switching condition or not; if yes, determining that the moving object has the flame motion characteristics.
On the basis of the foregoing technical solutions, optionally, the third condition determining unit includes:
a current flame status obtaining subunit, configured to determine whether an outer flame exists in the moving object; if so, acquiring the current flame state of the outer flame according to the outer flame pixel information of the outer flame;
a first frequency satisfaction judging subunit, configured to determine that the first object motion characteristic is a switching frequency of the current flame state and a previous flame state of the outer flame, and judge whether the switching frequency satisfies a first preset frequency condition; wherein the current flame condition and the previous flame condition are different ones of a no flame condition and a flame condition;
and the first characteristic satisfaction determining subunit is configured to determine that the first object motion characteristic satisfies the preset flame state switching condition if the first frequency satisfaction judging subunit determines that the first frequency satisfaction is satisfied.
On the basis of the foregoing technical solutions, optionally, the second result obtaining module includes:
a fourth condition determining unit, configured to determine whether a characteristic change manner of the object pixel characteristic of the moving object satisfies a preset smoke pixel characteristic change condition; if yes, determining that the moving object has the smoke pixel characteristics;
and the fifth condition judging unit is used for judging whether the second object motion characteristic of the moving object meets a preset smoke boundary change condition or not, and if so, determining that the moving object has the smoke motion characteristic.
On the basis of the foregoing technical solutions, optionally, the fifth condition determining unit includes:
the motion characteristic determining subunit is used for determining the current contour range of the moving object and determining the second object motion characteristic as the change frequency of the current contour range and the last contour range of the moving object;
a second frequency satisfaction judging subunit, configured to judge whether the change frequency satisfies a second preset frequency condition, where the current profile range is greater than the previous profile range;
and the second characteristic satisfaction determining subunit is configured to determine that the second object motion characteristic satisfies a preset smoke boundary change condition if the second frequency satisfaction judging subunit judges that both of the second frequency satisfaction judging subunit and the second frequency satisfaction judging subunit are satisfied.
On the basis of the above technical solutions, optionally, the apparatus further includes:
the firework prompt determining module is used for determining whether to prompt firework or not according to the target firework identification result after the target identification result determining module;
and the firework prompt processing module is used for determining the prompt mode and the prompt content of the firework prompt if the firework prompt processing determining module determines that the firework prompt mode and the prompt content are the same, and processing the firework prompt according to the prompt mode and the prompt content.
EXAMPLE five
FIG. 5 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the smoke and fire identification method.
In some embodiments, the pyrotechnic identification method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the smoke and fire identification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the pyrotechnic identification method by any other suitable means (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of fire and smoke identification, comprising:
acquiring a video to be detected, and acquiring a video frame image to be detected from the video to be detected;
determining a moving object region in the video frame image to be detected through a background modeling algorithm;
judging whether a moving object in the moving object area has a first object characteristic or not to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature;
judging whether the moving object has second object characteristics or not to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features;
and determining a target firework identification result according to the first firework identification result and the second firework identification result.
2. The method of claim 1, wherein determining whether the moving object in the moving object region has the first object feature comprises:
judging whether the object color characteristics of the moving object meet a preset RGB condition or not; if yes, determining that the moving object has the flame color feature;
judging whether the object shape characteristics of the moving object meet a preset combustion shape condition or not; if yes, determining that the moving object has the flame shape feature;
judging whether the first object motion characteristic of the moving object meets a preset flame state switching condition or not; if yes, determining that the moving object has the flame motion characteristics.
3. The method of claim 2, wherein determining whether the first object motion characteristic of the moving object satisfies a preset flame state switching condition comprises:
determining whether an outer flame is present in the moving object; if so, acquiring the current flame state of the outer flame according to the outer flame pixel information of the outer flame;
determining the first object motion characteristic as the switching frequency of the current flame state and the last flame state of the outer flame, and judging whether the switching frequency meets a first preset frequency condition; wherein the current flame condition and the previous flame condition are different ones of a no flame condition and a flame condition;
and if so, determining that the first object motion characteristic meets the preset flame state switching condition.
4. The method of claim 1, wherein determining whether the moving object in the moving object region has the second object feature comprises:
judging whether the characteristic change mode of the object pixel characteristic of the moving object meets a preset smoke pixel characteristic change condition or not; if yes, determining that the moving object has the smoke pixel characteristics;
and judging whether the second object motion characteristic of the moving object meets a preset smoke boundary change condition, if so, determining that the moving object has the smoke motion characteristic.
5. The method of claim 4, wherein determining whether the second object motion characteristic of the moving object satisfies a preset smoke boundary change condition comprises:
determining a current contour range of a moving object, and determining the second object motion characteristic as the change frequency of the current contour range and a last contour range of the moving object;
judging whether the change frequency meets a second preset frequency condition or not, wherein the current contour range is larger than the last contour range;
and if the first object motion characteristic and the second object motion characteristic are both satisfied, determining that the second object motion characteristic satisfies a preset smoke boundary change condition.
6. The method of claim 1, further comprising, after determining a target firework identification from the first firework identification and the second firework identification:
determining whether to prompt smoke and fire according to the target smoke and fire identification result;
if yes, determining a prompting mode and prompting content of the firework prompt, and performing the firework prompt according to the prompting mode and the prompting content.
7. A pyrotechnic identification device characterized by comprising:
the video frame acquisition module is used for acquiring a video to be detected and acquiring a video frame image to be detected from the video to be detected;
the moving object region determining module is used for determining a moving object region in the video frame image to be detected through a background modeling algorithm;
the first result obtaining module is used for judging whether a moving object in the moving object area has first object characteristics or not so as to determine whether flames exist in the moving object area or not and obtain a first firework identification result; wherein the first object feature comprises a first static feature comprising a flame color feature and a flame shape feature and/or a first dynamic feature comprising a flame motion feature;
the second result obtaining module is used for judging whether the moving object has second object characteristics or not so as to determine whether smoke exists in the moving object area or not and obtain a second smoke and fire identification result; wherein the second object feature comprises a second static feature comprising smoke pixel features and/or a second dynamic feature comprising smoke motion features;
and the target identification result determining module is used for determining a target firework identification result according to the first firework identification result and the second firework identification result.
8. The apparatus of claim 7, wherein the first result obtaining module comprises:
the first condition judging unit is used for judging whether the object color characteristics of the moving object meet the preset RGB condition or not; if yes, determining that the moving object has the flame color feature;
a second condition judgment unit configured to judge whether or not an object shape feature of the moving object satisfies a preset combustion shape condition; if yes, determining that the moving object has the flame shape feature;
the third condition judging unit is used for judging whether the first object motion characteristic of the moving object meets a preset flame state switching condition or not; if yes, determining that the moving object has the flame motion characteristics.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the pyrotechnic identification method of any one of claims 1-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to carry out the method of smoke and fire identification according to any one of claims 1-6 when executed.
CN202210538435.6A 2022-05-17 2022-05-17 Smoke and fire identification method and device, electronic equipment and storage medium Pending CN114821446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210538435.6A CN114821446A (en) 2022-05-17 2022-05-17 Smoke and fire identification method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210538435.6A CN114821446A (en) 2022-05-17 2022-05-17 Smoke and fire identification method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114821446A true CN114821446A (en) 2022-07-29

Family

ID=82515970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210538435.6A Pending CN114821446A (en) 2022-05-17 2022-05-17 Smoke and fire identification method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114821446A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100073477A1 (en) * 2007-01-16 2010-03-25 Utc Fire & Security Corporation System and method for video detection of smoke and flame
CN103956016A (en) * 2014-04-25 2014-07-30 蚌埠依爱消防电子有限责任公司 Smoke and flame combined type automatic detection method based on video image
CN106897720A (en) * 2017-01-11 2017-06-27 济南中维世纪科技有限公司 A kind of firework detecting method and device based on video analysis
CN111460973A (en) * 2020-03-30 2020-07-28 国网山西省电力公司电力科学研究院 Smoke and fire signal detection and image visualization automatic identification method
CN111797726A (en) * 2020-06-18 2020-10-20 浙江大华技术股份有限公司 Flame detection method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100073477A1 (en) * 2007-01-16 2010-03-25 Utc Fire & Security Corporation System and method for video detection of smoke and flame
CN103956016A (en) * 2014-04-25 2014-07-30 蚌埠依爱消防电子有限责任公司 Smoke and flame combined type automatic detection method based on video image
CN106897720A (en) * 2017-01-11 2017-06-27 济南中维世纪科技有限公司 A kind of firework detecting method and device based on video analysis
CN111460973A (en) * 2020-03-30 2020-07-28 国网山西省电力公司电力科学研究院 Smoke and fire signal detection and image visualization automatic identification method
CN111797726A (en) * 2020-06-18 2020-10-20 浙江大华技术股份有限公司 Flame detection method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄晶 等: "一种面向森林火情监测的四旋翼无人机系统", 《控制与信息技术》 *

Similar Documents

Publication Publication Date Title
CN106878668B (en) Movement detection of an object
CN113177469B (en) Training method and device of human attribute detection model, electronic equipment and medium
CN113628236A (en) Camera shielding detection method, device, equipment, storage medium and program product
CN113299034B (en) Flame identification early warning method suitable for multiple scenes
Khan et al. Machine vision based indoor fire detection using static and dynamic features
CN115205291A (en) Circuit board detection method, device, equipment and medium
CN114821446A (en) Smoke and fire identification method and device, electronic equipment and storage medium
CN116824455A (en) Event detection method, device, equipment and storage medium
CN114973081A (en) High-altitude parabolic detection method and device, electronic equipment and storage medium
Tsetsos et al. A forest fire detection system: The Meleager approach
CN116668843A (en) Shooting state switching method and device, electronic equipment and storage medium
Lu et al. Flame feature model development and its application to flame detection
US10432901B2 (en) Content projection control apparatus, content projection control method and program
CN114580631B (en) Model training method, smoke and fire detection method, device, electronic equipment and medium
CN112256190A (en) Touch interaction method and device, storage medium and electronic equipment
CN116630843B (en) Fire prevention supervision and management method and system for fire rescue
CN115766933B (en) Barrier-free mode voice broadcasting method, device, equipment and storage medium
CN112988688B (en) Picture sharing method and device, electronic equipment and storage medium
CN116433829B (en) Scene visual monitoring method, device, equipment and storage medium
CN113568554B (en) Progress bar slider control method and device, electronic equipment and readable storage medium
CN114327715B (en) Interface display method, interface display device, electronic apparatus, and readable storage medium
CN114115657B (en) Display mode switching method, device, equipment and medium of cloud mobile phone
CN117037032A (en) Image target detection method, device, equipment and medium
CN118710935A (en) Target detection test method, device, equipment and medium
CN118485866A (en) Flame classification method based on contour information

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220729

RJ01 Rejection of invention patent application after publication