Flame identification method and readable storage medium
By pre-processing real-time images of fire accidents in the substation and identifying flame areas, the problem of inaccurate fire location capture is solved, the fire treatment efficiency is improved, and the safe and stable operation of the substation is ensured.
Patent Information
- Application Number
- CN202411005602.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-12-06
AI Technical Summary
The prior art captures fire locations in the substations inadequately accurate, resulting in low fire treatment efficiency and affecting the stability of the substations' operation.
By obtaining real-time images of fire accidents inside the substation for pre-processing, including denoising and graying, identifying the flame area and determining the internal flame position, using the counting parameters to determine the continuous pixel points as the flame boundary, and then accurately identify the flame area and internal flame. Location.
It has achieved the improvement of the accuracy and efficiency of fire treatment, and ensured the safe and stable operation of the substation.
Smart Images

Figure CN119091368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flame recognition, and in particular to a flame recognition method and a readable storage medium. Background Art
[0002] An electric substation is a location within a power system that transforms voltage and current, receives, and distributes electrical energy. Within a power plant, a substation is a step-up substation, boosting the voltage of generator power before feeding it into the high-voltage power grid. Therefore, fire safety is paramount in substation safety operations and maintenance.
[0003] Currently, fire inspections within substations are typically performed using automated firefighting robots. These robots, using substation image capture and smoke sensors, determine whether a fire is present and promptly address it. However, the current lack of accurate fire location detection results in inefficient fire response, which in turn impacts substation operational stability.
[0004] The inventors of the present application discovered during the process of realizing the present invention that the above-mentioned solutions in the prior art have the defect of low fire handling efficiency. Summary of the Invention
[0005] The purpose of the embodiments of the present invention is to provide a flame identification method and a readable storage medium, which have the function of high fire handling efficiency. To achieve the above purpose, the embodiments of the present invention provide a flame identification method, including:
[0006] Obtain real-time images of fire incident locations inside substations;
[0007] Preprocessing the real-time image;
[0008] Acquire the flame area according to the pre-processed real-time image;
[0009] An inner flame position is obtained according to the flame area.
[0010] Optionally, preprocessing the real-time image includes:
[0011] De-noising the real-time image using a spatial domain denoising method;
[0012] The real-time image after denoising is converted into grayscale.
[0013] Optionally, acquiring the flame area according to the pre-processed real-time image includes:
[0014] Obtaining the grayscale value of each pixel in the real-time image;
[0015] Constructing pixel coordinates of the real-time image, wherein the upper left corner of the image is the pixel coordinate origin;
[0016] Randomly select a pixel to be measured and obtain the coordinates of the pixel to be measured;
[0017] Initialize the counting parameters;
[0018] Obtaining the grayscale value of the pixel to be measured and the grayscale values of two adjacent pixels diagonally to the right of the pixel to be measured;
[0019] Determine whether the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to its right;
[0020] When it is determined that the grayscale value of the pixel to be measured is equal to the grayscale value of the pixel diagonally adjacent to it, the counting parameter is updated according to formula (1):
[0021] t=t+1,(1)
[0022] Wherein, t is the counting parameter.
[0023] Optionally, obtaining the flame area according to the pre-processed real-time image further includes:
[0024] Determining whether the counting parameter is greater than or equal to a preset value;
[0025] When it is determined that the counting parameter is greater than or equal to a preset value, determining that the continuous pixel points are flame boundaries;
[0026] When it is determined that the counting parameter is less than the preset value, the method returns to the step of obtaining the grayscale value of the pixel to be measured and the grayscale values of two adjacent pixels diagonally to the right of the pixel to be measured.
[0027] Optionally, obtaining the flame area according to the pre-processed real-time image further includes:
[0028] Obtaining the grayscale value of the pixel to be measured and the grayscale values of two adjacent pixels diagonally distributed to the left of the pixel to be measured;
[0029] Determine whether the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to its left;
[0030] When it is determined that the grayscale value of the pixel to be measured is equal to the grayscale value of the pixel diagonally adjacent to its left, the counting parameter is updated according to formula (1).
[0031] Optionally, obtaining the flame area according to the pre-processed real-time image further includes:
[0032] Determining whether the counting parameter is greater than or equal to a preset value;
[0033] When it is determined that the counting parameter is greater than or equal to a preset value, determining that the continuous pixel points are flame boundaries;
[0034] When it is determined that the counting parameter is less than the preset value, the method returns to the step of obtaining the grayscale value of the pixel to be measured and the grayscale values of two adjacent pixels diagonally distributed to the left of the pixel to be measured.
[0035] Optionally, obtaining the inner flame position according to the flame area includes:
[0036] Get the coordinates of multiple flame boundaries;
[0037] Acquire a plurality of pixel points of the flame boundary on the same pixel horizontal axis;
[0038] Obtaining a pixel point with the smallest vertical axis among the plurality of pixel points;
[0039] The flame boundary corresponding to the smallest pixel point on the vertical axis is taken as the inner flame.
[0040] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions are configured to be read by a machine so as to enable the machine to execute any of the flame identification methods described above.
[0041] Through the above technical solution, the present invention provides a flame identification method and a readable storage medium that captures a real-time image of the location of a fire accident inside a substation, preprocesses the real-time image, and analyzes the preprocessed real-time image to identify the flame area. Finally, the flame area is further analyzed to obtain the accurate location of the internal flame, thereby achieving precise fire fighting, improving the efficiency of fire fighting, and ensuring the safe and stable operation of the substation.
[0042] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:
[0044] Figure 1 is a flow chart of a flame identification method according to one embodiment of the present invention;
[0045] Figure 2This is a flow chart of graying a real-time image in a flame recognition method according to one embodiment of the present invention;
[0046] Figure 3 is a flow chart of obtaining a flame boundary in a flame recognition method according to one embodiment of the present invention;
[0047] Figure 4 is a flow chart of determining a flame boundary in a flame recognition method according to one embodiment of the present invention;
[0048] Figure 5 This is a flow chart of obtaining an inner flame in a flame identification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.
[0050] Figure 1 FIG. 1 is a flow chart of a flame identification method according to an embodiment of the present invention. Figure 1 In the embodiment of the present invention, the flame identification method may include:
[0051] In step S10, a real-time image of the location of the fire accident inside the substation is obtained, wherein the real-time image is captured by a camera of the firefighting robot.
[0052] In step S11 , the real-time image is pre-processed.
[0053] In step S12, the flame area is obtained based on the pre-processed real-time image. After the pre-processed real-time image is obtained, the flame area can be obtained by analyzing it.
[0054] In step S13, the inner flame position is obtained according to the flame area. After the flame area is obtained, further analysis can be performed to obtain the inner flame position.
[0055] In steps S10 through S13, after locating the fire incident location, the firefighting robot uses its built-in camera to capture real-time images of the fire incident location. After acquiring the real-time images, they are pre-processed to remove interference and then analyzed to determine the flame area. Finally, the flame area is analyzed to determine the location of the inner flame. The firefighting robot then sprays firefighting spray at this location to expedite fire control.
[0056] Traditionally, fire inspections within substations typically involve automated firefighting robots. These robots, using substation image capture and smoke sensors, determine whether a fire is present and promptly address it. However, current fire location capture is inaccurate, resulting in inefficient fire response and, in turn, impacting substation operational stability. This embodiment of the present invention utilizes internal flame identification to achieve precise fire response, improve fire response efficiency, and ensure safe and stable substation operation.
[0057] In this embodiment of the present invention, in order to accurately identify the flame area, it is also necessary to perform denoising on the real-time image. Specifically, the pre-processing steps can be as follows: Figure 2 Specifically, Figure 2 In the flame identification method, the flame identification method may further include:
[0058] In step S20, the real-time image is denoised using a spatial domain denoising method, which is a denoising method known in the art and has a good denoising effect.
[0059] In step S21 , the denoised real-time image is converted to grayscale.
[0060] In this embodiment of the present invention, after obtaining the pre-processed image, it is necessary to identify the flame area of the real-time image. The specific identification step can be as follows: Figure 3 as well as Figure 4 Specifically, Figure 3 and Figure 4 In the flame identification method, the flame identification method may further include:
[0061] In step S30, the grayscale value of each pixel in the real-time image is obtained.
[0062] In step S31 , the pixel coordinates of the real-time image are constructed, wherein the upper left corner of the image is the pixel coordinate origin.
[0063] In step S32, a pixel to be measured is randomly selected, and the coordinates of the pixel to be measured are obtained.
[0064] In step S33, the counting parameter is initialized, wherein the initial value of the counting parameter is 0.
[0065] In step S34, the grayscale value of the pixel to be tested and the grayscale values of two adjacent pixels located diagonally to the right of the pixel to be tested are obtained. The two adjacent pixels located diagonally to the right of the pixel to be tested refer to the pixels at the upper right corner and the lower right corner of the pixel to be tested.
[0066] In step S35 , it is determined whether the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to the right of the pixel.
[0067] In step S36, when it is determined that the grayscale value of the pixel to be measured is equal to the grayscale value of the pixel diagonally adjacent to it, the counting parameter is updated according to formula (1):
[0068] t=t+1,(1)
[0069] Specifically, if the grayscale value of the pixel to be tested is equal to the grayscale values of the pixels to its upper right and lower right, it means that the pixel may be a flame boundary and further diagnosis is required.
[0070] In step S37, it is determined whether the counting parameter is greater than or equal to a preset value.
[0071] In step S38, if the counting parameter is greater than or equal to the preset value, the continuous pixel points are determined to be flame boundaries. If the counting parameter is greater than or equal to the preset value, it means that there are continuous diagonal pixels with the same grayscale, and the continuous pixels are determined to be flame boundaries.
[0072] In step S39, if the count parameter is determined to be less than the preset value, the process returns to the step of obtaining the grayscale value of the pixel to be tested and the grayscale values of two adjacent pixels located diagonally to the right of the pixel to be tested. If the count parameter is less than the preset value, the diagnosis is not complete and further determination is required.
[0073] In step S40, the grayscale value of the pixel to be tested and the grayscale values of two adjacent pixels located diagonally to the left of the pixel to be tested are obtained, wherein the two adjacent pixels located diagonally to the left refer to the pixels at the upper left corner and the lower left corner of the pixel to be tested.
[0074] In step S41 , it is determined whether the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to its left.
[0075] In step S42, if the grayscale value of the pixel to be tested is determined to be equal to the grayscale value of the pixel diagonally adjacent to its left, the count parameter is updated according to formula (1). If the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel above and below its left, it indicates that the pixel may be a flame boundary and further diagnosis is required.
[0076] In step S43, it is determined whether the counting parameter is greater than or equal to a preset value.
[0077] In step S44, if the counting parameter is greater than or equal to the preset value, the continuous pixel points are determined to be flame boundaries. If the counting parameter is greater than or equal to the preset value, it means that there are continuous diagonal pixels with the same grayscale, and the continuous pixels are determined to be flame boundaries.
[0078] In step S45, if the count parameter is determined to be less than the preset value, the process returns to the step of obtaining the grayscale value of the pixel to be tested and the grayscale values of two adjacent pixels located diagonally to the left of the pixel to be tested. If the count parameter is less than the preset value, the diagnosis is not complete and further determination is required.
[0079] In steps S30 through S45, the pixel coordinates of the real-time image are constructed and the grayscale value of each pixel is obtained. A pixel to be measured is randomly selected and its grayscale value is compared with the grayscale value of the diagonal pixel. If they are identical, a count is performed. If the count parameter reaches a preset value, the consecutive pixels are considered to be the flame boundary / flame area.
[0080] In this embodiment of the present invention, in order to further determine the inner flame position and improve the fire fighting accuracy and efficiency, it is necessary to further identify the flame area. The identification step can be as follows: Figure 5 Specifically, Figure 5 In the flame identification method, the flame identification method may further include:
[0081] In step S50 , coordinates of a plurality of flame boundaries are obtained.
[0082] In step S51, a plurality of pixel points on the same horizontal axis of the flame boundary are obtained.
[0083] In step S52, the pixel point with the smallest vertical axis among the multiple pixel points is obtained.
[0084] In step S53, the flame boundary corresponding to the pixel point with the smallest vertical axis is taken as the inner flame.
[0085] In steps S50 to S53, multiple flame boundaries are first obtained, pixel points on the same horizontal axis of multiple flame boundaries are randomly selected, and the pixel point with the smallest vertical axis is selected as the inner flame boundary, thereby achieving the purpose of accurate fire fighting.
[0086] On the other hand, the present invention further provides a computer-readable storage medium storing instructions, wherein the instructions are configured to be read by a machine so as to enable the machine to execute any of the flame recognition methods described above.
[0087] Through the above technical solution, the present invention provides a flame identification method and a readable storage medium that captures a real-time image of the location of a fire accident inside a substation, preprocesses the real-time image, and analyzes the preprocessed real-time image to identify the flame area. Finally, the flame area is further analyzed to obtain the accurate location of the internal flame, thereby achieving precise fire fighting, improving the efficiency of fire fighting, and ensuring the safe and stable operation of the substation.
[0088] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0089] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0090] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0092] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0093] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0094] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0095] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0096] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A flame identification method, characterized in that: include: Get real-time images of fire incident locations inside substations; Preprocessing the real-time image; Acquire the flame area according to the preprocessed real-time image; The inner flame position is obtained according to the flame area.
2. The flame identification method according to claim 1, characterized in that: Preprocessing the real-time image includes: De-noising the real-time image using a spatial domain denoising method; The real-time image after denoising is grayed.
3. The flame identification method according to claim 2, characterized in that: Acquiring the flame area according to the preprocessed real-time image includes: Obtaining the grayscale value of each pixel in the real-time image; Constructing pixel coordinates of the real-time image, wherein the upper left corner of the image is the origin of the pixel coordinates; Randomly select a pixel to be tested, and obtain the coordinates of the pixel to be tested; Initialize the counting parameters; Obtaining the grayscale value of the pixel to be tested and the grayscale values of two adjacent pixels diagonally distributed to the right of the pixel to be tested; Determine whether the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to the right of the pixel; When it is determined that the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to it, the counting parameter is updated according to formula (1): t=t+1, (1) Wherein, t is the counting parameter.
4. The flame identification method according to claim 3, characterized in that: Acquiring the flame area according to the preprocessed real-time image also includes: Determine whether the counting parameter is greater than or equal to a preset value; When it is determined that the counting parameter is greater than or equal to a preset value, determining that the continuous pixel points are flame boundaries; When it is determined that the counting parameter is less than the preset value, the step of returning to the step of obtaining the grayscale value of the pixel to be measured and the grayscale values of two adjacent pixels diagonally distributed on the right side of the pixel to be measured is performed.
5. The flame identification method according to claim 4, characterized in that: Acquiring the flame area according to the preprocessed real-time image also includes: Obtaining the grayscale value of the pixel to be tested and the grayscale values of two adjacent pixels diagonally distributed to the left of the pixel to be tested; Determine whether the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to its left side; When it is determined that the grayscale value of the pixel to be tested is equal to the grayscale value of the pixel diagonally adjacent to its left, the counting parameter is updated according to formula (1).
6. The flame identification method according to claim 5, characterized in that: Acquiring the flame area according to the preprocessed real-time image also includes: Determine whether the counting parameter is greater than or equal to a preset value; When it is determined that the counting parameter is greater than or equal to a preset value, determining that the continuous pixel points are flame boundaries; When it is determined that the counting parameter is less than the preset value, the step of returning to the step of obtaining the grayscale value of the pixel to be measured and the grayscale values of two adjacent pixels diagonally distributed on the left side of the pixel to be measured is performed.
7. The flame identification method according to claim 6, characterized in that: Acquiring the inner flame position according to the flame area includes: Get the coordinates of multiple flame boundaries; Acquire a plurality of pixel points of the flame boundary on the same pixel horizontal axis; Obtaining a pixel point with the smallest vertical axis among the plurality of pixel points; The flame boundary corresponding to the smallest pixel point on the vertical axis is taken as the inner flame.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and the instructions are used to be read by a machine so that the machine executes the flame identification method according to any one of claims 1 to 7.
Citation Information
Cited By
Flame image recognition and feature extraction method and system
CN121032995A
