Combustible substance identification method, electronic device, and readable storage medium
By analyzing the smoke and flame colors in images of fire scenes and identifying the burning materials, the problem of low accuracy in fire rescue plans has been solved, enabling the development of precise rescue plans in advance and improving the efficiency of fire rescue.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF ADVANCED TECH UNIV OF SCI & TECH OF CHINA
- Filing Date
- 2021-12-22
- Publication Date
- 2026-06-12
AI Technical Summary
The accuracy of fire rescue plans is low. Firefighters cannot accurately determine the burning materials after arriving at the scene, resulting in inaccurate rescue plans.
By acquiring images of the fire scene, extracting target smoke and flame areas, analyzing their pixel values and colors, and combining them with preset mapping relationships to identify burning materials, accurate rescue plans can be provided.
It enables the identification of burning materials when a fire occurs, improves the accuracy of rescue plans, ensures that firefighters can formulate reasonable rescue plans in advance, and enhances the effectiveness of fire rescue.
Smart Images

Figure CN114241389B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to a method for identifying combustible substances, an electronic device, and a readable storage medium. Background Technology
[0002] Fire has become a frequent disaster endangering people's lives and property. In a fire, smoke and flames are the first and most important identifiable signals of its occurrence. By analyzing smoke and flames, it is possible to effectively help relevant rescue personnel respond to fires in a timely manner and minimize casualties and property losses. Currently, many video surveillance devices used in production and daily life have fire smoke detection functions, which can quickly identify the occurrence of fires. However, different fires require different rescue methods. After arriving at the scene, firefighters need to formulate a rescue plan based on the actual situation visible outside the fire scene and select appropriate fire extinguishers. Common fire extinguishers are roughly divided into dry powder fire extinguishers, halon fire extinguishers, carbon dioxide fire extinguishers, foam fire extinguishers, etc., and their uses are different. The accuracy of the rescue plan has a significant impact on the effectiveness of fire rescue. Summary of the Invention
[0003] The main objective of this application is to provide a method for identifying combustible materials, an electronic device, and a readable storage medium, aiming to solve the technical problem of low accuracy in fire rescue solutions.
[0004] To achieve the above objectives, this application provides a method for identifying combustible substances, the method comprising:
[0005] Obtain photos of the fire scene;
[0006] Extract at least one target smoke area and at least one target flame area from the images of the fire scene;
[0007] The measured smoke color corresponding to each of the target smoke regions is determined based on the measured smoke pixel value of each target smoke region, and the measured flame color corresponding to each of the target flame regions is determined based on the measured flame pixel value of each target flame region.
[0008] The target burning material is identified based on the measured smoke color and the measured flame color.
[0009] Optionally, the step of determining the measured smoke color corresponding to each of the target smoke regions based on the measured smoke pixel values of each target smoke region includes:
[0010] Determine the range of smoke pixel values to which each measured smoke pixel value belongs in each of the target smoke regions;
[0011] If, among the measured smoke pixel values corresponding to each of the target smoke regions, there are more than a preset first proportion of measured smoke pixel values belonging to the same smoke pixel value range, then the same smoke pixel value range is taken as the target smoke pixel value range.
[0012] The smoke color corresponding to the target smoke pixel value range is determined as the measured smoke color corresponding to the target smoke region.
[0013] Optionally, the step of determining the measured flame color corresponding to each of the target flame regions based on the measured flame pixel values of each target flame region includes:
[0014] Determine the range of flame pixel values to which each measured flame pixel value belongs in each of the target flame regions;
[0015] If, among the measured flame pixel values corresponding to each of the target flame regions, there are more than a preset second proportion of measured flame pixel values belonging to the same flame pixel value range, then the same flame pixel value range is taken as the target smoke pixel value range.
[0016] The flame color corresponding to the target flame pixel value range is determined as the measured flame color corresponding to the target flame region.
[0017] Optionally, the step of identifying the target combustible material based on the measured smoke color and the measured flame color includes:
[0018] Based on the mapping relationship between the combination of smoke color and flame color and the burning substance, the target burning substance corresponding to the actual combination of the measured smoke color and the measured flame color is determined.
[0019] Optionally, after the step of identifying the target combustible material based on the measured smoke color and the measured flame color, the method further includes:
[0020] The system outputs identification results based on the target combustible material, along with prompts for viewing image data.
[0021] Optionally, after the step of outputting identification result information and prompts for viewing image data based on the target combustible material, the method further includes:
[0022] When an image viewing request triggered by the prompt information is detected, the target smoke areas and target flame areas are standardized to obtain standard fire scene images;
[0023] The images show the standard fire scene.
[0024] Optionally, the step of standardizing each of the target smoke areas and each of the target flame areas to obtain a standard fire scene image when an image viewing request triggered based on the prompt information is detected includes:
[0025] When an image viewing request triggered by the prompt information is detected, the target smoke areas and target flame areas are standardized to obtain a standard target image;
[0026] Obtain the fire video corresponding to the fire scene image and related images in the fire video that are adjacent to the fire scene image for a preset number of frames;
[0027] Extract at least one relevant smoke region and at least one relevant flame region from the relevant images, and standardize each of the relevant smoke regions and each of the relevant flame regions to obtain a standard relevant image;
[0028] The standard target image and the standard related image are combined to generate a dynamic standard fire scene image.
[0029] Optionally, the step of standardizing each of the target smoke regions and each of the target flame regions includes:
[0030] Determine whether each measured smoke pixel value of each target smoke region belongs to a first threshold range of a preset reference smoke pixel value;
[0031] Replace the initial smoke pixel value that belongs to the first threshold interval in each of the measured smoke pixel values with the reference smoke pixel value;
[0032] Determine whether each measured flame pixel value of each target flame region belongs to a second threshold range of a preset reference flame pixel value;
[0033] Replace the initial flame pixel value that belongs to the second threshold range among the measured flame pixel values with the reference flame pixel value.
[0034] This application also provides an electronic device, which is a physical device, comprising: a memory, a processor, and a program for the combustible substance identification method stored in the memory and executable on the processor. When the program for the combustible substance identification method is executed by the processor, it can implement the steps of the combustible substance identification method as described above.
[0035] This application also provides a readable storage medium, which is a computer-readable storage medium, and stores a program for implementing a method for identifying flammable substances. When the program for identifying flammable substances is executed by a processor, it implements the steps of the method for identifying flammable substances as described above.
[0036] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the combustible substance identification method described above.
[0037] This application provides a method, electronic device, and readable storage medium for identifying combustible materials. By acquiring images of a fire scene, at least one target smoke region and at least one target flame region are extracted from the images, achieving feature extraction of smoke and flame from the fire scene images. The measured smoke color for each target smoke region is determined based on its measured smoke pixel values, and the measured flame color for each target flame region is determined based on its measured flame pixel values. This achieves the determination of corresponding smoke and flame colors based on image pixels of the smoke and flame regions, and identification based on the measured smoke and flame colors. The target combustion material identification system enables the recognition and judgment of combustion materials based on the different colors of smoke and flames produced by the combustion of different substances. It only requires acquiring images of the fire scene during the fire's occurrence, and can quickly determine the combustion materials in the fire by detecting the colors of smoke and flames in the images. This provides effective and accurate technical support for the formulation of rescue plans, allowing rescuers to determine accurate rescue plans as early as possible before arriving at the scene. This avoids the situation where rescuers can only formulate less accurate rescue plans based on the external visible scene of the fire without knowing the internal combustion materials, thus overcoming the technical problem of low accuracy in fire rescue plans and greatly improving the effectiveness of fire rescue. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic flowchart of an embodiment of the combustible substance identification method of this application;
[0041] Figure 2 This is a schematic flowchart of another embodiment of the combustible substance identification method of this application;
[0042] Figure 3 This is a schematic diagram of a fire scene image used in the flammable substance identification method of this application;
[0043] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the combustion substance identification method in the embodiments of this application.
[0044] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0045] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] Fire has become a frequent disaster threatening people's lives and property. In a fire, smoke and flames are the first and most important identifiable signals. Analyzing smoke and flames can effectively help rescue personnel respond to fires promptly, minimizing casualties and property damage. Currently, many video surveillance devices used in production and daily life have fire smoke detection functions, enabling them to quickly identify fires. However, different fires require different rescue methods. Upon arrival at the scene, firefighters need to formulate a rescue plan based on the visible external conditions of the fire and select appropriate fire extinguishers. Common fire extinguishers are broadly classified into dry powder extinguishers, halon extinguishers, carbon dioxide extinguishers, and foam extinguishers, each with different uses, such as: Dry powder fire extinguishers can be used to extinguish flammable liquids, flammable gases, and electrical equipment, but cannot be used to extinguish fires involving reactive metals. Halon fire extinguishers can be used to extinguish fires involving oils and electrical equipment, but cannot be used to extinguish fires involving reactive metals or metal hydrides. Carbon dioxide fire extinguishers can be used to extinguish flammable liquids and flammable gases, but cannot be used to extinguish fires involving metal hydrides or inside fibrous materials. Foam fire extinguishers are generally used to extinguish flammable liquid fires, but cannot be used to extinguish water-soluble liquids or light metal fires. Therefore, simply knowing whether a fire has occurred is insufficient for fire safety work; it is necessary to further determine the type of fire to provide guidance for subsequent fire rescue work. The accuracy of the rescue plan has a significant impact on the effectiveness of fire rescue. If the burning material can be identified in advance, it can greatly facilitate the fire rescue operation.
[0047] This application provides a method for identifying combustible substances. In the first embodiment of this method, refer to... Figure 1 The method for identifying combustible substances includes:
[0048] Step S10: Obtain images of the fire scene;
[0049] In this embodiment, specifically, when the fire detection device detects a fire, it acquires image data of the fire scene and obtains one or more fire scene pictures from the fire scene image data. The fire scene image data includes monitoring videos of the fire scene, video data taken by on-site personnel, and / or photos taken on-site. The fire scene pictures include on-site pictures at different stages of the fire, for example, pictures taken from different times during the process of the fire starting to intensify, obtained from images taken from monitoring videos.
[0050] Step S20: Extract at least one target smoke area and at least one target flame area from the fire scene image;
[0051] In this embodiment, specifically, smoke and flame images are identified from the fire scene images using image recognition technology, and target smoke regions containing all or part of the smoke images and target flame regions containing all or part of the flame images are extracted. The target smoke region can be a square region, a circular region, an irregular region, or a region encompassed by the outer contour of the identified smoke image, etc. The target flame region can be a square region, a circular region, an irregular region, or a region encompassed by the outer contour of the identified flame image, etc. In one implementable method, referring to... Figure 3 ,exist Figure 3 In the image, regions A, B, C, D, and E are the target smoke and target flame regions extracted from a fire scene image using image recognition technology. Regions A, B, C, and D are the target smoke regions, and region E is the target flame region.
[0052] Step S30: Determine the measured smoke color corresponding to each of the target smoke regions based on the measured smoke pixel values of each target smoke region, and determine the measured flame color corresponding to each of the target flame regions based on the measured flame pixel values of each target flame region.
[0053] In this embodiment, specifically, at least one measured smoke pixel value and at least one measured flame pixel value for each of the target smoke regions are collected. The smoke pixel value range to which all or part of the measured smoke pixel values of each target smoke region belong is determined. Based on a preset mapping relationship between pixel value ranges and colors, the color corresponding to each of the measured smoke pixel values of each target smoke region is determined. Colors exceeding a preset number or proportion are determined as the measured smoke color corresponding to each target smoke region. Similarly, the flame pixel value range to which all or part of the measured flame pixel values of each target flame region belong is determined. Based on a preset mapping relationship between pixel value ranges and colors, the color corresponding to each of the measured flame pixel values of each target flame region is determined. Colors exceeding a preset number or proportion are determined as the measured flame color corresponding to each target flame region. In this embodiment, each pixel of an image is composed of three channels: red, green, and blue. Therefore, the pixel value is composed of three values: R (red), G (green), and B (blue). The mapping relationship between the pixel value range and the color can be determined based on existing research results, big data, or custom settings. For example, a pixel value with an R value greater than or equal to 195, a G value greater than or equal to 195, and a B value greater than or equal to 195 can be defined as white. A pixel value with an R value greater than 122 and less than 180, a G value greater than 122 and less than 180, and a B value greater than 122 and less than 180 can be defined as gray. In one feasible approach, before extracting the measured smoke pixel value and the measured flame pixel value, image processing such as background removal, light adjustment, and tone adjustment can be performed on the image to reduce the influence of environmental factors or hardware devices such as cameras on the smoke and flame images.
[0054] Optionally, the step of determining the measured smoke color corresponding to each of the target smoke regions based on the measured smoke pixel values of each target smoke region includes:
[0055] Step A10: Determine the range of smoke pixel values to which each measured smoke pixel value belongs in each of the target smoke regions;
[0056] In this embodiment, it should be noted that the range of smoke pixel values is a range of pixel values that is determined in advance based on the color of the smoke produced when various types of combustible substances are burned.
[0057] Specifically, the range of smoke pixel values to which each measured smoke pixel value belongs in each target smoke region is determined.
[0058] Step A20: If, among the measured smoke pixel values corresponding to each of the target smoke regions, there are more than a preset first proportion of measured smoke pixel values belonging to the same smoke pixel value range, then the same smoke pixel value range is taken as the target smoke pixel value range.
[0059] In this embodiment, specifically, if in any target smoke area, the proportion of measured smoke pixel values belonging to a certain same smoke pixel value range in the total measured smoke pixel values in the target smoke area exceeds a preset first proportion, then the same smoke pixel value range is taken as the target smoke pixel value range.
[0060] Step A30: Determine the smoke color corresponding to the target smoke pixel value range as the measured smoke color corresponding to the target smoke region.
[0061] In this embodiment, specifically, the target smoke color corresponding to the target smoke pixel value is determined according to the preset mapping relationship between smoke pixel value and smoke color, and the target smoke color is determined as the measured smoke color corresponding to the target smoke region. It is easy to understand that when there is more than one target smoke region, each target smoke region has a corresponding measured smoke color, and the measured smoke colors of different target smoke regions can be the same or different.
[0062] Optionally, the step of determining the measured flame color corresponding to each of the target flame regions based on the measured flame pixel values of each target flame region includes:
[0063] Step B10: Determine the range of flame pixel values to which each measured flame pixel value belongs in each of the target flame regions;
[0064] In this embodiment, it should be noted that the range of flame pixel values is a range of pixel values that is determined in advance based on the color of the flame produced when various types of combustible substances are burned.
[0065] Specifically, the range of flame pixel values to which each measured flame pixel value belongs in each target flame region is determined.
[0066] Step B20: If, among the measured flame pixel values corresponding to each of the target flame regions, there are more than a preset second proportion of measured flame pixel values belonging to the same flame pixel value range, then the same flame pixel value range is taken as the target smoke pixel value range.
[0067] In this embodiment, specifically, if in any target flame region, the proportion of measured flame pixel values belonging to a certain same flame pixel value range in all measured flame pixel values in the target flame region exceeds a preset first proportion, then the same flame pixel value range is taken as the target flame pixel value range.
[0068] Step B30: Determine the flame color corresponding to the target flame pixel value range as the measured flame color corresponding to the target flame region.
[0069] In this embodiment, specifically, the target flame color corresponding to the target flame pixel value is determined according to the preset mapping relationship between flame pixel value and flame color, and the target flame color is determined as the measured flame color corresponding to the target flame region. It is easy to understand that when there is more than one target flame region, each target flame region has a corresponding measured flame color, and the measured flame colors of different target flame regions can be the same or different.
[0070] Step S40: Identify the target burning substance based on the measured smoke color and the measured flame color.
[0071] In this embodiment, it should be noted that the target combustible material is the combustible material at the fire scene. It can be a specific substance, such as magnesium or diesel, or it can be a general term for a class of substances, such as combustible gas, combustible metal, or electrical equipment. It can also include both specific substances and a general term for a class of substances. The specific terms can be set according to the actual situation.
[0072] Specifically, based on a preset mapping table of smoke color and combustible material, one or more first initial combustible materials corresponding to each measured smoke color can be determined. Similarly, based on a preset mapping table of flame color and combustible material, one or more second initial combustible materials corresponding to each measured flame color can be determined. Combustible materials that are repeated in each first and second initial combustible material are identified as the target combustible material corresponding to the fire scene image. It is easy to understand that different target smoke areas can correspond to the same or different measured smoke colors, and different target flame areas can also correspond to the same or different measured flame colors. Alternatively, based on the combination of smoke color and flame color, a preset mapping table of combinations and combustible materials can be consulted to determine the combustible material corresponding to the combination. For example, refer to... Figure 3 If the measured smoke color of target smoke area A is determined to be gray, the measured smoke color of target smoke area B is black, the measured smoke color of target smoke area C is black, the measured smoke color of target smoke area D is gray, and the measured flame color of target flame area E is red, then the measured smoke colors include black and gray, and the measured flame colors include red. We can first determine that the combustible substances corresponding to black smoke include a and b, the combustible substances corresponding to gray smoke include b, c, and d, and the combustible substances corresponding to red flames include c and d. Finally, we can determine that the target combustible substances are c and d. Alternatively, we can first determine that the combinations of smoke and flame colors include combinations of black smoke and red flames, as well as combinations of gray smoke and red flames. Then, we can determine that the combination of black smoke and red flames has no corresponding combustible substances, and the combination of gray smoke and red flames corresponds to combustible substances c and d. Finally, we can determine that the target combustible substances are c and d.
[0073] Optionally, the step of identifying the target combustible material based on the measured smoke color and the measured flame color includes:
[0074] Based on the mapping relationship between the combination of smoke color and flame color and the burning substance, the target burning substance corresponding to the actual combination of the measured smoke color and the measured flame color is determined.
[0075] In this embodiment, specifically, the determined measured smoke colors and measured flame colors are combined to obtain an actual combination composed of the measured smoke colors and measured flame colors. Based on the pre-established mapping relationship between the combination of smoke colors and flame colors and the combustion substances, the target combustion substance corresponding to the actual combination is determined.
[0076] Optionally, after the step of identifying the target combustible material based on the measured smoke color and the measured flame color, the method further includes:
[0077] Step S50: Output identification result information and prompts for viewing image data based on the target combustible material.
[0078] In this embodiment, specifically, the target combustible material is output as a combustible material identification result to inform relevant personnel of the combustible material at the fire scene. This allows relevant personnel to select appropriate fire extinguishers and formulate suitable rescue plans based on the combustible material at the fire scene. A prompt message is also output to allow relevant personnel to determine whether to view the image data of the fire scene, further confirming the situation at the fire scene, the location of the combustible material, and other detailed information. The image data can be a picture of the fire scene, a video of the fire scene, or a processed image of the fire scene, such as a fire scene picture marked with target smoke and target flame areas, or a fire scene picture with adjusted color or lighting.
[0079] In this embodiment, by acquiring images of the fire scene, at least one target smoke region and at least one target flame region are extracted from the images, achieving feature extraction of smoke and flame from the fire scene images. The measured smoke color of each target smoke region is determined based on the measured smoke pixel values, and the measured flame color of each target flame region is determined based on the measured flame pixel values, achieving the determination of corresponding smoke and flame colors based on image pixels of the smoke and flame regions. By identifying the target burning material based on the measured smoke and flame colors, the system achieves root... Based on the different colors of smoke and flames produced by the combustion of different substances, the burning materials can be identified and judged. Only images of the fire scene during the fire process are needed; by detecting the colors of smoke and flames in the images, the burning materials in the fire can be quickly determined. This provides effective and accurate technical support for the formulation of rescue plans, allowing rescuers to determine an accurate rescue plan as early as possible before arriving at the scene. This avoids the situation where rescuers can only formulate less accurate rescue plans based on the external visible scene of the fire without knowing the internal burning materials. Therefore, it overcomes the technical problem of low accuracy in fire rescue plans and greatly improves the effectiveness of fire rescue.
[0080] Furthermore, referring to Figure 2 In another embodiment of this application, content that is the same as or similar to the above embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, the step of obtaining at least one target function file according to the personalized configuration information includes:
[0081] Step S51: When an image data viewing request triggered by the prompt information is detected, the target smoke areas and the target flame areas are standardized to obtain a standard fire scene image.
[0082] In this embodiment, it should be noted that due to differences in time, light source, shooting equipment, and other conditions, the same color may appear differently in images taken by different shooting equipment in different environments. Standardization processing is the process of replacing pixels in the target smoke area that are similar to a certain preset reference color with that preset reference color.
[0083] Specifically, when a user operation triggered by the prompt information is detected to view image data, each pixel value of each target smoke area and each target flame area in the fire scene image is matched with a preset reference pixel value. The pixel values in the target smoke area and each target flame area that can match the reference pixel value are replaced with the corresponding reference pixel values to obtain a standard fire scene image.
[0084] Optionally, the step of standardizing each of the target smoke areas and each of the target flame areas to obtain a standard fire scene image when an image viewing request triggered based on the prompt information is detected includes:
[0085] Step C10: When an image data viewing request triggered by the prompt information is detected, the target smoke areas and the target flame areas are standardized to obtain a standard target image;
[0086] In this embodiment, specifically, when a user operation triggered by the prompt information is detected to view image data, each pixel value of each target smoke area and each target flame area in the fire scene image is matched with a preset reference pixel value. The pixel values in the target smoke area and each target flame area that can match the reference pixel value are replaced with the corresponding reference pixel values to obtain a standard target image.
[0087] Step C20: Obtain the fire video corresponding to the fire scene image and related images in the fire video that are adjacent to the fire scene image at a preset number of frames;
[0088] In this embodiment, specifically, the fire video corresponding to the fire scene image is obtained, the arrangement position of the fire scene image in the fire video is determined, and related images of a preset number of frames in the fire video adjacent to the arrangement position of the fire scene image are obtained. The arrangement position can be determined according to frame order, number, etc. For example, z-frame images in the fire video arranged before and / or after the fire scene image are taken as related images.
[0089] Step C30: Extract at least one relevant smoke region and at least one relevant flame region from the relevant images, and standardize each of the relevant smoke regions and each of the relevant flame regions to obtain a standard relevant image;
[0090] In this embodiment, specifically, at least one related smoke region and at least one related flame region are extracted from the related image using image recognition technology. Each pixel value of each related smoke region and each related flame region in the related image is matched with a preset reference pixel value. The pixel values in the related smoke region and each related flame region that can match the reference pixel value are replaced with the corresponding reference pixel value to obtain a standard related image.
[0091] Step C40: Combine the standard target image and the standard related image to generate a dynamic standard fire scene image.
[0092] In this embodiment, specifically, the standard target image and the standard related image are combined according to their arrangement order in the video to generate a dynamic standard fire scene image.
[0093] Optionally, the step of standardizing each of the target smoke regions and each of the target flame regions includes:
[0094] Step D10: Determine whether the measured smoke pixel values of each of the target smoke regions belong to the first threshold range of the preset reference smoke pixel values;
[0095] Step D20: Replace the initial smoke pixel value that belongs to the first threshold interval in each of the measured smoke pixel values with the reference smoke pixel value;
[0096] In this embodiment, it should be noted that the reference smoke pixel value is the pixel value corresponding to the standard color of smoke and flame produced when the combustible substance is burned. The standard color can be obtained by testing with a set standard environment and shooting equipment, or it can be obtained from papers or big data analysis. This embodiment does not limit this. The threshold is an error range determined according to the actual situation. It can be obtained by testing with a set standard environment and shooting equipment, or it can be obtained from papers or big data analysis. This embodiment does not limit this. For example, if the reference smoke pixel value is R value 50, G value 50, B value 50, and the threshold is 15, then pixel values with R value between 35-65, G value between 35-65, and B value between 35-65 are within the threshold.
[0097] Specifically, it is determined whether each measured smoke pixel value in each target smoke region belongs to a preset threshold value of a baseline smoke pixel value. The initial smoke pixel value in each measured smoke pixel value that belongs to the first threshold interval is replaced with the baseline smoke pixel value, and the initial smoke pixel value in each measured smoke pixel value that belongs to the first threshold interval is kept unchanged.
[0098] Step D30: Determine whether the measured flame pixel value of each of the target flame regions belongs to the second threshold range of the preset reference flame pixel value;
[0099] Step D40: Replace the initial flame pixel value that belongs to the second threshold interval among the measured flame pixel values with the reference flame pixel value.
[0100] In this embodiment, it should be noted that the reference flame pixel value is based on the pixel value corresponding to the flame and standard color of the flame produced when the combustible material is burned. The standard color can be obtained by testing with a set standard environment and shooting equipment, or by obtaining it from papers or big data analysis. This embodiment does not limit this. The threshold is an error range determined according to the actual situation. It can be obtained by testing with a set standard environment and shooting equipment, or by obtaining it from papers or big data analysis. This embodiment does not limit this. For example, if the reference flame pixel value is R value 50, G value 50, B value 50, and the threshold is 15, then pixel values with R value between 35-65, G value between 35-65, and B value between 35-65 are within the threshold.
[0101] Specifically, it is determined whether each measured flame pixel value of each target flame region belongs to a preset threshold value of a reference flame pixel value. The initial flame pixel value belonging to the first threshold interval in each measured flame pixel value is replaced with the reference flame pixel value, and the initial flame pixel value belonging to the first threshold interval in each measured flame pixel value is kept unchanged.
[0102] Step S52: Display the standard fire scene image.
[0103] In this embodiment, specifically, the standard fire scene images are displayed so that users can more intuitively view more standard and clearer images of smoke and flames, thereby more accurately judging the burning material and the situation of the fire scene. In one feasible approach, the display of the standard fire scene images can also be achieved by establishing a link between the standard fire scene images and the identified burning material. Based on the user's selection of the target burning material, the fire scene images corresponding to the user's selected target burning material are displayed. When multiple fire scene images exist, different burning materials may be ignited at different stages of the fire, so different fire scene images may identify different burning materials. When a user selects different burning materials, they want to understand the specific situation of that burning material. Therefore, displaying the fire scene images corresponding to the burning material makes it easier for users to directly obtain the required fire scene images and understand accurate fire information in a timely manner.
[0104] Furthermore, embodiments of the present invention provide an electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the combustible substance identification method of Embodiment 1 described above.
[0105] The following is for reference. Figure 4The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0106] like Figure 4 As shown, an electronic device may include a processing unit (such as a central processing unit, graphics processing unit, etc.) that can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) or a program loaded from a storage device into random access memory (RAM). The RAM also stores various programs and data required for the operation of the electronic device. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0107] Typically, the following systems can be connected to the I / O interface: input devices including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tapes, hard disks, etc.; and communication devices. Communication devices allow electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although electronic devices with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.
[0108] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined above in the methods of embodiments of this disclosure.
[0109] The electronic device provided by this invention, employing the combustible material identification method in the above embodiments, solves the technical problem of low accuracy in fire rescue plans. Compared with the prior art, the beneficial effects of the electronic device provided by this invention are the same as those of the combustible material identification method provided in Embodiment 1 above, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0110] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0111] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0112] Furthermore, embodiments of the present invention provide a computer-readable storage medium having computer-readable program instructions stored thereon, the computer-readable program instructions being used to execute the method for identifying combustible substances in Embodiment 1 above.
[0113] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0114] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0115] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: acquire images of a fire scene; extract at least one target smoke region and at least one target flame region from the fire scene images; determine the measured smoke color corresponding to each of the target smoke regions based on the measured smoke pixel values of each of the target smoke regions, and determine the measured flame color corresponding to each of the target flame regions based on the measured flame pixel values of each of the target flame regions; and identify target burning materials based on the measured smoke color and the measured flame color.
[0116] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0118] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0119] The computer-readable storage medium provided by this invention stores computer-readable program instructions for executing the above-described method for identifying combustible materials, thus solving the technical problem of low accuracy in fire rescue plans. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this invention are the same as those of the combustible material identification method provided in the above-described embodiments, and will not be repeated here.
[0120] Furthermore, embodiments of the present invention also provide a computer program product, including a computer program, which, when executed by a processor, implements the steps of the combustion substance identification method described above.
[0121] The computer program product provided in this application solves the technical problem of low accuracy in fire rescue plans. Compared with the prior art, the beneficial effects of the computer program product provided in this invention are the same as those of the combustible material identification method provided in the above embodiments, and will not be repeated here.
[0122] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of this application.
Claims
1. A method for identifying combustible substances, characterized in that, The method for identifying combustible substances includes: Obtain photos of the fire scene; Extract at least one target smoke area and at least one target flame area from the images of the fire scene; Determine the range of smoke pixel values to which each measured smoke pixel value belongs in each of the target smoke regions, wherein the range of smoke pixel values is a range of pixel values pre-determined based on the color of the smoke produced when various types of combustible substances are burned; If, among the measured smoke pixel values corresponding to each of the target smoke regions, there are more than a preset first proportion of measured smoke pixel values belonging to the same smoke pixel value range, then the same smoke pixel value range is taken as the target smoke pixel value range. The smoke color corresponding to the target smoke pixel value range is determined as the measured smoke color corresponding to the target smoke region; Determine the range of flame pixel values to which each measured flame pixel value belongs in each of the target flame regions, wherein the range of flame pixel values is a range of pixel values pre-determined based on the color of the flame produced when various types of combustible substances burn; If, among the measured flame pixel values corresponding to each of the target flame regions, there are more than a preset second proportion of measured flame pixel values belonging to the same flame pixel value range, then the same flame pixel value range is taken as the target smoke pixel value range. The flame color corresponding to the target flame pixel value range is determined as the measured flame color corresponding to the target flame region; The target burning material is identified based on the measured smoke color and the measured flame color.
2. The method for identifying combustible substances as described in claim 1, characterized in that, The step of identifying the target combustible material based on the measured smoke color and the measured flame color includes: Based on the mapping relationship between the combination of smoke color and flame color and the burning substance, the target burning substance corresponding to the actual combination of the measured smoke color and the measured flame color is determined.
3. The method for identifying combustible substances as described in any one of claims 1 to 2, characterized in that, Following the step of identifying the target combustible material based on the measured smoke color and the measured flame color, the method further includes: The system outputs identification results based on the target combustible material and prompts for viewing image data.
4. The method for identifying combustible substances as described in claim 3, characterized in that, Following the step of outputting identification result information and prompts for viewing image data based on the target combustible material, the method further includes: When an image viewing request triggered by the prompt information is detected, the target smoke areas and target flame areas are standardized to obtain standard fire scene images; The images show the standard fire scene.
5. The method for identifying combustible substances as described in claim 4, characterized in that, The step of standardizing each target smoke area and each target flame area to obtain a standard fire scene image when an image viewing request triggered by the prompt information is detected includes: When an image viewing request triggered by the prompt information is detected, the target smoke areas and target flame areas are standardized to obtain a standard target image; Obtain the fire video corresponding to the fire scene image and related images in the fire video that are adjacent to the fire scene image for a preset number of frames; Extract at least one relevant smoke region and at least one relevant flame region from the relevant images, and standardize each of the relevant smoke regions and each of the relevant flame regions to obtain a standard relevant image; The standard target image and the standard related image are combined to generate a dynamic standard fire scene image.
6. The method for identifying combustible substances as described in claim 5, characterized in that, The step of standardizing each of the target smoke regions and each of the target flame regions includes: Determine whether each measured smoke pixel value of each target smoke region belongs to a first threshold range of a preset reference smoke pixel value; Replace the initial smoke pixel value that belongs to the first threshold interval in each of the measured smoke pixel values with the reference smoke pixel value; Determine whether each measured flame pixel value of each target flame region belongs to a second threshold range of a preset reference flame pixel value; Replace the initial flame pixel value that belongs to the second threshold range among the measured flame pixel values with the reference flame pixel value.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the combustible substance identification method according to any one of claims 1 to 6.
8. A readable storage medium, characterized in that, The readable storage medium stores a program for implementing a method for identifying flammable substances, which is executed by a processor to implement the steps of the method for identifying flammable substances as described in any one of claims 1 to 6.