Fire-fighting equipment fault automatic detection method and system based on image processing

By collecting images in the region order on the fire water pipe and performing grayscale processing, it is divided into two types of pixel points, analyzing the probability parameters of corrosion and leakage, and setting thresholds for fault detection, the problem of high false alarm rate of water leakage caused by condensate interference in the existing technology is solved, and more accurate identification of corrosion and leakage is achieved.

CN120411080AActive Publication Date: 2025-08-01SHAANXI TIANCHEN FIRE INSPECTION CENT CO LTD

Patent Information

Application Number
CN202510897713.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-08-01
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

The existing fire water pipe rust leakage detection method based on image processing cannot effectively distinguish environmental condensate interference from real leakage, resulting in low accuracy and high false alarm rate for water leakage fault identification.

Method used

The automatic fault detection method of fire-fighting equipment based on image processing is adopted. By moving the camera in the order of the area, the image is collected and grayscale is performed. It is divided into two types of pixel points, the grayscale value fluctuations are analyzed, the corrosion probability and leakage probability parameters are calculated, and the threshold is set for fault detection.

Benefits of technology

Accurate identification of rust and leakage of fire water pipes is achieved, avoiding the interference of condensate water and noise, and improving the accuracy and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411080A_ABST
    Figure CN120411080A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to a fire-fighting equipment fault automatic detection method and system based on image processing, and the method comprises the steps: collecting a plurality of images in a plurality of regions at the same time interval, and carrying out the graying of the images; pixel points are classified according to gradient distribution of gray level images in the area, and corrosion probability parameters of the area are obtained; obtaining a water leakage probability parameter according to the time sequence change of pixel points in the suspected corrosion area; and comparing the change conditions of the pixel points of the suspected corrosion area and the non-suspected corrosion area to obtain a water leakage correction parameter, obtaining a fault early warning parameter by combining the parameters, setting a threshold value, comparing the threshold value with the fault early warning parameter, judging whether a water leakage condition exists or not, and completing automatic fault detection of the fire-fighting equipment. The method can effectively distinguish environment condensate water interference and real leakage, and has anti-noise capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and particularly to an automatic fire-fighting equipment fault detection method and system based on image processing. Background Art

[0002] In the operation and maintenance of a fire-fighting equipment system, the automatic and accurate detection of faults is the core requirement for ensuring its reliability. As a key water supply component of fire-fighting equipment, the rusting of fire hoses leading to water leakage is one of the typical and high-risk types of equipment faults. The traditional detection method relying on manual inspections is inefficient, limited in coverage, and labor-consuming, making it difficult to meet the requirements of real-time and comprehensive monitoring of the status of fire-fighting equipment in large and complex facilities. The machine vision technology based on image processing, with its advantages of non-contact, automation, and efficient analysis, provides a very promising solution for the intelligent identification of fire-fighting equipment faults (such as pipe rusting), which is of great significance for improving the operation and maintenance efficiency and reliability of the overall fire-fighting system.

[0003] However, when directly applying the machine vision method based on image processing to the detection of this specific equipment fault of fire hose rusting and water leakage, there are significant deficiencies. Existing methods mainly focus on identifying rust stains, but it is difficult to accurately determine whether the rusted part has developed into an actual water leakage fault. Rusting is a necessary but not sufficient condition for rusting and water leakage. Many rusty areas may not have penetrated the pipe wall to form leakage. Particularly crucial is that the temperature difference in the environment where the fire hose is located (such as a garage or basement) is extremely likely to cause water vapor to condense into water droplets or water stains on the surface of the rusted pipe. The visual characteristics of these condensed waters are highly similar to those of real tiny leakage faults. Relying on the analysis algorithm based on traditional static image features, it is impossible to effectively distinguish this environmental interference, resulting in a significant increase in the false alarm rate of water leakage faults. This not only causes waste of maintenance resources but also reduces the credibility of the alarms of the entire automatic fire-fighting equipment fault detection system. Therefore, developing a new image processing method that can overcome the interference of condensed water and accurately identify the fire hose rusting and water leakage faults has become an urgent need to improve the practicality and effectiveness of the automatic fire-fighting equipment fault detection technology based on image processing. Summary of the Invention

[0004] The present invention provides an automatic fire-fighting equipment fault detection method and system based on image processing to solve the existing problems: the existing image processing-based fire hose rusting and water leakage detection methods have low accuracy and high false alarm rate in identifying water leakage faults because they cannot effectively distinguish environmental condensed water interference from real leakage.

[0005] The automatic fire-fighting equipment fault detection method and system based on image processing of the present invention adopt the following technical solutions: In the first aspect of the present invention, an automatic fire-fighting equipment fault detection method based on image processing is provided, and the method includes the following steps: Move the camera in the order of regions, collect n images at fixed time intervals in each region, perform grayscale processing on the collected images, and obtain a series of grayscale images traversed in the order of regions and acquisition time sequences. According to the gradient distribution of the pixel grayscale values of each grayscale image in each region, divide the pixel points of each grayscale image into two categories, analyze the fluctuation of the grayscale values of the two categories of pixel points, calculate the general level of the fluctuation of the grayscale values of all classified pixel points in each region, and obtain the rust probability parameter of each region; according to the change and fluctuation degree of the pixel grayscale values in the suspected rust regions of each grayscale image in the same region, obtain the water leakage probability parameter of each region; according to the water leakage probability parameter of each region and the fluctuation degree of the pixel grayscale values in the non-suspected rust regions over time, obtain the water leakage correction parameter of each region; according to the rust probability parameter, water leakage probability parameter and water leakage correction parameter of each region, obtain the fault warning coefficient of each region. Set a threshold and compare it with the warning coefficient to determine whether the fire pipeline is rusted and leaking, and complete the automatic detection of fire equipment faults.

[0006] Further, the method for moving the camera in the order of regions, collecting n images at fixed time intervals in each region, performing grayscale processing on the collected images, and obtaining a series of grayscale images traversed in the order of regions and acquisition time sequences includes the following specific steps: Fix the camera on the bracket to ensure that the camera is relatively stationary with respect to the pipeline wall and keep the shooting distance constant, and collect the images of the fire water pipes in multiple regions in sequence; among them, in each region, collect n images at fixed time intervals; after completing the image collection in one region, move the camera to the next region and repeat the above collection process; after the collection is completed, perform grayscale processing on all the fire water pipe images to obtain a series of grayscale images; traverse the grayscale images in the order of the collection regions and collection time sequences corresponding to the fire water pipe images to obtain a series of traversed grayscale images.

[0007] Further, the method for dividing the pixel points of each grayscale image into two categories according to the gradient distribution of the pixel grayscale values of each grayscale image in each region, analyzing the fluctuation of the grayscale values of the two categories of pixel points, calculating the general level of the fluctuation of the grayscale values of all classified pixel points in each region, and obtaining the rust probability parameter of each region includes the following specific steps: For each grayscale image, different grayscale values are sequentially selected as thresholds for testing: for each threshold to be tested, the pixel points in the image with grayscale values greater than the threshold are classified as the first type of pixel points, and the pixel points with grayscale values less than or equal to the threshold are classified as the second type of pixel points; the standard deviations of the pixel values of the first type of pixel points and the second type of pixel points are calculated respectively; the absolute value of the difference between these two standard deviations is divided by the sum of these two standard deviations, and the quotient obtained is the classification threshold parameter corresponding to the current threshold; after traversing all possible grayscale thresholds, the grayscale value corresponding to the maximum classification threshold parameter is selected as the optimal threshold for the grayscale image; based on this optimal threshold, the pixel points of the grayscale image are finally divided into the first type of pixel points and the second type of pixel points; this process is independently applied to all grayscale images, and the pixel points of all images are divided into two categories; Calculate the general level of the fluctuation of the grayscale values of all classified pixel points in each area, and obtain the rust probability parameter for each area. The specific method is as follows:

[0008] In the formula, represents the rust probability parameter of the fire pipeline in the q-th area, n represents the number of grayscale images in each area, represents the set of grayscale values of the first type of pixel points in the I-th grayscale image of the fire pipeline area in the q-th area, represents the set of grayscale values of the second type of pixel points in the J-th grayscale image of the fire pipeline area in the q-th area, represents the standard deviation of the grayscale values of the first type of pixel points in the I-th grayscale image of the fire pipeline area in the q-th area, represents the standard deviation of the grayscale values of the second type of pixel points in the J-th grayscale image of the fire pipeline area in the q-th area. The rust probability parameter is used to judge the relative probability of pipeline rust in the area.

[0009] Furthermore, the method for obtaining the water leakage probability parameter for each area according to the degree of change and fluctuation of the grayscale values of the pixel points in the suspected rust area of each grayscale image in the same area includes the following specific methods: For the q-th area, first traverse all the suspected rust pixel points in its first grayscale image, and completely record the set of position coordinates; based on this coordinate set, sequentially traverse the pixel points with exactly the same coordinates in the subsequent grayscale images of this area, and define the set of pixel points obtained by traversing each image through this mapping as the rust template data of this image;

[0010] In the formula, represents the water leakage probability parameter of the q-th area, represents the number of elements extracted from the set, Denote the rust template data of the first grayscale image in the q-th area, and n represents the number of grayscale images in each area. Denote the grayscale value of the x-th pixel point in the rust template data of the X-th grayscale image in the q-th area. Denote the mean value of the grayscale values of the x-th pixel points in all rust templates in the q-th area, and further obtain the water leakage probability parameter for each area.

[0011] Furthermore, according to the water leakage probability parameter of each area and the degree of fluctuation of the grayscale values of the pixel points in the non-suspected rust area over time, obtain the water leakage correction parameter for each area. The specific method included is as follows: For the q-th area, first traverse all non-suspected rust pixel points of its first grayscale image, and completely record the set of position coordinates; based on this coordinate set, traverse pixel points with exactly the same coordinates in the subsequent grayscale images of this area one by one, and define the set of pixel points obtained by traversing each image through this mapping as the normal area template data of this image. For the q-th area, calculate the standard deviation of the grayscale values of the pixel points in each normal area template data, accumulate all standard deviations and divide by the number of elements in the normal area template data, and denote the quotient as the surface fluctuation coefficient of the q-th area. Further obtain the surface fluctuation coefficient for each area. According to the water leakage probability parameter and the surface fluctuation coefficient of each area, obtain the water leakage correction parameter for each area. The specific method is as follows:

[0012] In the formula, Denote the water leakage correction parameter of the q-th area. Denote the water leakage probability parameter of the q-th area. Denote the surface fluctuation coefficient of the q-th area, e represents the natural base, and T represents the hyperparameter.

[0013] Furthermore, according to the rust probability parameter, water leakage probability parameter, and water leakage correction parameter of each area, obtain the fault warning coefficient for each area. The specific method included is as follows:

[0014] In the formula, Denote the fault warning coefficient of the q-th area. Denote the rust probability parameter of the fire pipeline in the q-th area. Denote the water leakage probability parameter of the q-th area. Denote the water leakage correction parameter of the q-th area.

[0015] Furthermore, set the threshold and compare it with the warning coefficient to determine whether the fire pipeline is rusted and leaking, and complete the automatic detection of fire equipment faults. The specific method included is as follows: Set a threshold value K, compare the size of the fault warning coefficient with the threshold value K. When the fault warning coefficient is greater than or equal to the threshold value, there is a rust and water leakage fault in this area, and relevant personnel are reminded to perform maintenance through a loudspeaker, thus completing the automatic detection method for fire-fighting equipment faults.

[0016] In the second aspect of the present invention, an automatic fire-fighting equipment fault detection system based on image processing is provided. The system includes a data packet acquisition module, a data analysis module, and an alarm module, where: The data acquisition module moves the camera in the order of regions, acquires n images at a fixed time interval in each region, performs grayscale processing on the acquired images, and obtains a series of grayscale images traversed in the order of regions and acquisition time sequences. The data analysis module is used to divide the pixel points of each grayscale image into two categories according to the gradient distribution of the pixel point grayscale values of each grayscale image in each region, analyze the fluctuation of the grayscale values of the two categories of pixel points, calculate the general level of the fluctuation of the pixel point grayscale values after classification in each region, and obtain the rust probability parameter of each region; obtain the water leakage probability parameter of each region according to the change and fluctuation degree of the pixel point grayscale values in the suspected rust region of each grayscale image in the same region; obtain the water leakage correction parameter of each region according to the water leakage probability parameter of each region and the fluctuation degree of the pixel point grayscale values in the non-suspected rust region over time; obtain the fault warning coefficient of each region according to the rust probability parameter, water leakage probability parameter, and water leakage correction parameter of each region. The alarm module is used to set a threshold value and compare it with the warning coefficient to determine whether the fire-fighting pipeline is rusted and leaking water, thus completing the automatic detection of fire-fighting equipment faults.

[0017] In the third aspect of the present invention, a computer-readable storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the steps of the above-mentioned automatic fire-fighting equipment fault detection method based on image processing are implemented.

[0018] In the fourth aspect of the present invention, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, the steps of the above-mentioned automatic fire-fighting equipment fault detection method based on image processing are implemented.

[0019] The beneficial effects of the technical solution of the present invention are as follows: In this embodiment, the camera is moved in the order of regions, n images are acquired at a fixed time interval in each region, and the acquired images are subjected to grayscale processing to obtain a series of grayscale images traversed in the order of regions and acquisition time sequences; it is convenient to analyze and distinguish the influence of dynamic water leakage and condensate water according to the temporal change of the grayscale images. Based on the gradient distribution of the grayscale values of the pixels in each grayscale image of each area, the pixels in each grayscale image are divided into two categories. The fluctuations in the grayscale values of the two categories of pixels are analyzed, and the general level of grayscale value fluctuations of all classified pixels in each area is calculated to obtain the corrosion probability parameter for each area. The pixels are adaptively classified, and based on the differences in the grayscale values of the classified pixels, a clearer and more accurate analysis of whether the fire protection pipes are corroded can be achieved.

[0020] Based on the fluctuation in the grayscale values of pixels in suspected rusted areas of each grayscale image in the same region, the leakage probability parameter for each area is obtained. By considering the fluctuation characteristics of pixels in suspected rusted areas over time, it is possible to better analyze the difference between pipeline corrosion leakage and condensation water, avoiding false alarms of pipeline corrosion without leakage. Based on the water leakage probability parameter of each area and the degree of fluctuation of the grayscale value of the pixels in the non-suspected rust area over time, the water leakage correction parameter of each area is obtained. This prevents the image from being affected by severe noise, resulting in the suspected rust area being dry but being mistakenly judged as a water leak due to excessive pixel fluctuation. Obtain the fault warning coefficient for each area based on the corrosion probability parameter, water leakage probability parameter, and water leakage correction parameter of each area. Obtaining the fault warning parameters of the area by combining the above parameters can provide more accurate data analysis for subsequent judgment. A threshold is set and compared with the warning coefficient to determine whether the fire-fighting pipe is rusted and leaking, completing the automatic detection of fire-fighting equipment failures. Using this method for fire-fighting equipment failure detection can accurately distinguish rusted areas and more accurately identify rust and leakage situations, avoiding environmental interference factors such as condensed water, and having high noise resistance. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 This is a flowchart of the steps of an automatic detection method for fire-fighting equipment failure based on image processing of the present invention; Figure 2 This is a structural block diagram of an automatic fire equipment fault detection system based on image processing according to the present invention. DETAILED DESCRIPTION

[0023] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, in conjunction with the accompanying drawings and preferred embodiments, a method and system for automatically detecting faults in fire-fighting equipment based on image processing, including its specific implementation manner, structure, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.

[0025] The following specifically describes the specific solution of a method and system for automatically detecting faults in fire-fighting equipment based on image processing provided by the present invention in conjunction with the accompanying drawings.

[0026] Please refer to Figure 1 , which shows the first object of the present invention, a flowchart of the steps of a method for automatically detecting faults in fire-fighting equipment based on image processing. The method includes the following steps: Step S001: Move the camera in the order of regions, collect n images at a fixed time interval in each region, perform grayscale processing on the collected images, and obtain a series of grayscale images traversed in the order of regions and acquisition time sequences.

[0027] When using the existing machine vision method based on image processing to detect the specific equipment fault of corrosion and leakage of fire-fighting water pipes, the conventional method can only detect the corrosion of the water pipes, and it is difficult to identify the leakage problem caused by the corrosion. Because the visual characteristics of condensate are highly similar to those of real tiny leakage faults, this method continuously collects water pipe images in the same region to judge the image characteristics of suspected leakage regions in different images. Since the water stains at the tiny leakage points are dynamic compared to the condensate accumulation points, the dynamic water stains will present different image characteristics during the shooting process, and the real tiny leakage fault region is determined according to the image characteristics.

[0028] Specifically, move the camera in the order of regions, collect n images at a fixed time interval in each region, perform grayscale processing on the collected images, and obtain a series of grayscale images traversed in the order of regions and acquisition time sequences. The specific method is as follows: Fix the camera on the bracket to ensure that the camera is relatively stationary with respect to the pipe wall and keep the shooting distance constant. Then, collect the images of the fire hose in multiple areas in sequence. Among them, in each area, collect n images at fixed time intervals. After completing the image collection in one area, move the camera to the next area and repeat the above collection process. After the collection is completed, perform grayscale processing on all the fire hose images to obtain a series of grayscale images. Traverse the grayscale images in the order of the collection areas and collection times of the fire hose images corresponding to the grayscale images to obtain a series of traversed grayscale images.

[0029] It should be noted that the present invention does not limit the image acquisition specifications and shooting distance of the camera. The image acquisition specifications and shooting distance of the camera should ensure that the texture and color features of the fire hose image can be clearly observed and only the pipe wall exists in the image. In this embodiment, the image acquisition specification of the camera is a rectangle with a side length m = 250 pixel points, the shooting distance is 0.2 m, the fire hose image acquisition area is at m = 30, the acquisition time interval is 0.05 seconds, and the number of images collected in each area n = 20. The present invention does not specifically limit the number of fire hose image acquisition areas, the acquisition image time interval, and the number of collected images n. In other embodiments, the number of fire hose image acquisition areas, the acquisition image time interval, and the number of collected images n depend on the specific implementation situation.

[0030] Step S002: According to the gradient distribution of the pixel gray values of each grayscale image in each area, divide the pixel points of each grayscale image into two categories, analyze the fluctuation of the gray values of the two categories of pixel points, calculate the general level of the fluctuation of the pixel gray values after classification in each area, and obtain the rust probability parameter of each area; according to the change fluctuation degree of the pixel gray values of the suspected rust areas in each grayscale image in the same area, obtain the water leakage probability parameter of each area; according to the water leakage probability parameter of each area and the fluctuation degree of the pixel gray values of the non-suspected rust areas over time, obtain the water leakage correction parameter of each area; according to the rust probability parameter, water leakage probability parameter, and water leakage correction parameter of each area, obtain the fault warning coefficient of each area.

[0031] It should be noted that in the operation and maintenance of the fire protection equipment system, automatic fault detection is relatively important. First, it is necessary to judge the relative size of the probability of corrosion of the fire protection pipeline, and then analyze the water leakage characteristics of the pixels in the pipeline image with a relatively large corrosion probability of the fire protection pipeline to eliminate the influence of noise, and finally judge the corrosion and water leakage situation of the pipeline.

[0032] Specifically, according to the gradient distribution of the gray values of the pixel points of each grayscale image in each area, the pixel points of each grayscale image are divided into two categories. Analyze the fluctuation of the gray values of the two categories of pixel points, calculate the general level of the fluctuation of the gray values of all classified pixel points in each area, and obtain the rust probability parameter of each area. The specific method is as follows: For each grayscale image, different gray values are sequentially selected as thresholds for testing: for each threshold to be tested, the pixel points in the image with gray values greater than the threshold are classified as the first category of pixel points, and the pixel points with gray values less than or equal to the threshold are classified as the second category of pixel points; calculate the standard deviation of the pixel values of the first category of pixel points and the standard deviation of the pixel values of the second category of pixel points respectively; divide the absolute value of the difference between these two standard deviations by the sum of these two standard deviations, and the obtained quotient value is the classification threshold parameter corresponding to the current threshold; after traversing all possible gray thresholds, select the gray value corresponding to the maximum classification threshold parameter as the optimal threshold of the grayscale image; according to this optimal threshold, finally divide the pixel points of the grayscale image into the first category of pixel points and the second category of pixel points; this process is independently applied to all grayscale images, and the pixel points of all images are divided into two categories; Calculate the general level of the fluctuation of the gray values of all classified pixel points in each area, and obtain the rust probability parameter of each area. The specific method is as follows:

[0033] In the formula, represents the rust probability parameter of the fire pipeline in the qth area, n represents the number of grayscale images in each area, represents the set of gray values of the first category of pixel points in the Ith grayscale image of the fire pipeline area in the qth area, represents the set of gray values of the second category of pixel points in the Jth grayscale image of the fire pipeline area in the qth area, represents the standard deviation of the gray values of the first category of pixel points in the Ith grayscale image of the fire pipeline area in the qth area, represents the standard deviation of the gray values of the second category of pixel points in the Jth grayscale image of the fire pipeline area in the qth area. The rust probability parameter is used to judge the relative probability of pipeline rust in the area.

[0034] It should be noted that the core of the pixel point classification method for grayscale images is adaptive classification, so that the first category of pixel points (suspected rust area of the fire pipeline) and the second category of pixel points (suspected normal area of the fire pipeline) after classification simultaneously meet two optimization conditions: one is to minimize the standard deviation of the pixel values within the class (ensuring that the gray values of the same class of pixels are highly consistent), and the other is to maximize the difference in the standard deviation between classes (enhancing the separation between the rust area and the normal area). This dual requirement can effectively distinguish the statistical feature differences between the two categories of pixels, thereby improving the accuracy of rust area detection. The comparison of the sizes of is to prevent misclassifying the pixel points in the suspected normal area as those in the suspected abnormal area only based on the gray values. It is possible that the paint color in the normal area of the pipeline is darker than that in the rust area, that is, the gray value is smaller. The judgment based on multiple images in the same area prevents sample errors. In the analysis of grayscale images, the larger the standard deviation of the pixel values in the suspected rust area, the closer the gray fluctuation characteristics are to the typical distribution of real rust; while the smaller the standard deviation of the pixel values in the suspected normal area, the more it conforms to the stable distribution characteristics of the intact area of the pipeline wall. Therefore, when the ratio of the standard deviations of the pixel values of the two types of areas (standard deviation of the suspected rust area / standard deviation of the suspected normal area) is larger, the probability of the existence of rust failure at the corresponding pipeline wall position in the image is greater.

[0035] It should be further noted that the above method obtains the relative magnitudes of the probabilities of rust existence in each area by judging the distribution characteristics and gradient characteristics of the gray values of the grayscale images. Subsequently, the problem of whether the rust leaks needs to be considered. Rust is a necessary but not sufficient condition for a leakage fault (the existence of rust does not necessarily mean leakage, but leakage must be accompanied by rust). In the continuous image acquisition, the leakage area generates light scattering due to the dynamic flow of water, resulting in significant fluctuations in the pixel gray values at that location over time; while in the dry area or the non-rusted area with a smooth surface, due to the lack of water flow interference or stable surface reflection, the fluctuation range of the pixel gray values over time is significantly smaller. Therefore, in this step, the similarity degree of the fluctuation characteristics of the pixel gray values in the suspected rust area is calculated to judge whether there is a leakage situation in the rust area.

[0036] Specifically, according to the degree of change and fluctuation of the pixel gray values of the suspected rust areas in each grayscale image in the same area, the leakage probability parameter of each area is obtained. The specific method is as follows: For the q-th area, first traverse all the suspected rust pixel points in the first grayscale image of it, and completely record the set of position coordinates; based on this coordinate set, traverse the pixel points with exactly the same coordinates in the subsequent grayscale images of this area one by one, and define the set of pixel points obtained by traversing each image through this mapping as the rust template data of this image;

[0037] In the formula, represents the leakage probability parameter of the q-th area, represents the number of elements extracted from the set, represents the rust template data of the first grayscale image in the q-th area, and n represents the number of grayscale images in each area, represents the gray value of the x-th pixel point in the rust template data of the X-th grayscale image in the q-th area, Represents the average gray value of the x-th pixel in all rust templates in the q-th region, and further obtains the water leakage probability parameter for each region.

[0038] Furthermore, it should be noted that the above method obtains the water leakage probability parameter for each region. The purpose of obtaining the rust template data is to ensure that each pixel in each suspected rust region can be compared in subsequent operations. By using the principle of mapping, it can track the change of the gray value of each pixel in the suspected water leakage region to the greatest extent; the water leakage probability parameter compares the change of each pixel in the suspected water leakage region in all gray images in each region over time. When the gray value of each pixel in the suspected water leakage region fluctuates more greatly over time, it indicates that the water flow rate may be faster, resulting in a large change in the gray value of the pixels in the suspected water leakage region.

[0039] Furthermore, it should be noted that the above steps are all analyzed based on the temporal change of the gray value of the pixels in the suspected rust region. There may be a situation where the image is severely affected by noise, resulting in a relatively large change in the gray value of the suspected rust region although it is dry. Therefore, this step needs to compare whether the fluctuation degree of the gray value of the pixels in the suspected rust region is close to the fluctuation degree of the gray value of the pixels in other regions. If the fluctuation degree of the gray value of the pixels in the two regions over time is close, the probability that the image is affected by noise may be relatively large, and the probability that there is water leakage in the rust region may be relatively small; it should be noted that the underlying logic of the water leakage probability parameter is the fluctuation degree of the gray value of the pixels in the rust region, so it only needs to compare the water leakage probability parameter and the fluctuation degree of the gray value of the pixels in other regions over time.

[0040] Specifically, according to the water leakage probability parameter of each region and the fluctuation degree of the gray value of the pixels in the non-suspected rust region over time, obtain the water leakage correction parameter for each region. The specific method is as follows: For the q-th region, first traverse all non-suspected rust pixels in its first gray image, and completely record the position coordinate set; based on this coordinate set, traverse the pixels with exactly the same coordinates in the subsequent gray images of this region one by one, and define the pixel set obtained by traversing each image through this mapping as the normal region template data of this image; For the q-th region, calculate the standard deviation of the gray value of the pixels in each normal region template data, accumulate all the standard deviations and divide by the number of elements in the normal region template data, and record the quotient as the surface fluctuation coefficient of the q-th region. Further obtain the surface fluctuation coefficient of each region. According to the water leakage probability parameter and the surface fluctuation coefficient of each region, obtain the water leakage correction parameter for each region. The specific method is as follows:

[0041] In the formula, Denote the leakage correction parameter for the q-th area. Denote the leakage probability parameter for the q-th area. Denote the surface fluctuation coefficient for the q-th area, where e represents the natural base and T represents a hyperparameter.

[0042] It should be noted that the greater the difference between the leakage probability parameter and the surface fluctuation coefficient, the lower the degree of noise influence on the image, and the higher the credibility of the calculated leakage probability parameter. If the probability of misjudging a leakage phenomenon is lower, T is used to adjust the increase and decrease speed of the curve. In this embodiment, the hyperparameter T is 4.6, and the value of the hyperparameter T in other embodiments depends on the actual situation.

[0043] Furthermore, it should be noted that the above process obtains the corrosion probability parameter, leakage probability parameter, and leakage correction parameter for each area, and can comprehensively obtain the corrosion leakage warning parameter for each area, and set a warning threshold. By comparing the size relationship between the warning threshold and the warning parameter, the entire process of automatic detection of fire-fighting equipment faults is completed.

[0044] Specifically, according to the corrosion probability parameter, leakage probability parameter, and leakage correction parameter of each area, obtain the fault warning coefficient for each area. The specific method is as follows:

[0045] In the formula, Denote the fault warning coefficient for the q-th area. Denote the corrosion probability parameter of the fire-fighting pipeline in the q-th area. Denote the leakage probability parameter for the q-th area. Denote the leakage correction parameter for the q-th area.

[0046] It should be noted that when the corrosion probability parameter of a certain area is larger, the probability of corrosion occurring in that area is higher, then the prerequisite for corrosion leakage in that area is more satisfied, and the probability of possible corrosion leakage in that area is higher; when the leakage probability parameter of a certain area is larger, the probability of possible corrosion leakage in that area is higher. When the leakage correction parameter is larger, it means that the degree of noise influence on the data is relatively smaller and the data authenticity is higher. Therefore, when the corrosion probability parameter is larger, the leakage probability parameter is larger, and the leakage correction parameter is larger, the probability of corrosion leakage in that area is higher.

[0047] Step S003: Set a threshold and compare it with the warning coefficient to determine whether the fire-fighting pipeline is corroded and leaking, and complete the automatic detection of fire-fighting equipment faults.

[0048] Set a threshold and compare it with the warning coefficient to determine whether the fire-fighting pipeline is corroded and leaking, and complete the automatic detection of fire-fighting equipment faults. The specific method is as follows: Set a threshold value K, and the value of K is determined according to the distribution of the water leakage fault samples in the historical data. Compare the size of the fault warning coefficient with the threshold value K. When the fault warning coefficient is greater than or equal to the threshold value K, there is a rust and water leakage fault in this area, and relevant personnel are reminded to carry out maintenance through a loudspeaker, thus completing the automatic detection method for fire-fighting equipment faults.

[0049] It should be noted that the threshold value K is not limited in this embodiment. In this embodiment, K = 36, and the value of K in other embodiments depends on the specific implementation situation.

[0050] Please refer to Figure 2 , which shows the second object of the present invention, a structural block diagram of an automatic fire-fighting equipment fault detection system based on image processing. The system includes the following modules: A data acquisition module, which is used to move the camera in the order of regions, collect n images at a fixed time interval in each region, perform gray-scale processing on the collected images, and obtain a series of gray-scale images traversed in the order of regions and acquisition time sequences; A data analysis module, which is used to divide the pixel points of each gray-scale image into two categories according to the gradient distribution of the gray values of the pixel points of each gray-scale image in each region, analyze the fluctuation of the gray values of the two types of pixel points, calculate the general level of the fluctuation of the gray values of all classified pixel points in each region, and obtain the rust probability parameter of each region; according to the degree of change and fluctuation of the gray values of the pixel points in the suspected rust region of each gray-scale image in the same region, obtain the water leakage probability parameter of each region; according to the water leakage probability parameter of each region and the degree of fluctuation of the gray values of the pixel points in the non-suspected rust region over time, obtain the water leakage correction parameter of each region; according to the rust probability parameter, water leakage probability parameter and water leakage correction parameter of each region, obtain the fault warning coefficient of each region; An alarm module, which is used to set a threshold value and compare it with the warning coefficient to judge whether the fire-fighting pipeline is rusted and leaking water, thus completing the automatic detection of fire-fighting equipment faults.

[0051] The third object of the embodiment of the present invention is to provide a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned automatic fire-fighting equipment fault detection method based on image processing are realized.

[0052] The fourth object of the embodiment of the present invention is to provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned automatic fire-fighting equipment fault detection method based on image processing are realized.

[0053] This embodiment moves the camera sequentially by region, captures n images at fixed time intervals in each region, and grayscales the captured images to obtain a series of grayscale images traversed in the region sequence and acquisition time sequence. This facilitates analysis and differentiation of the effects of dynamic water leakage and condensation based on the temporal changes in the grayscale images. Based on the gradient distribution of the grayscale values of the pixels in each grayscale image of each area, the pixels in each grayscale image are divided into two categories. The fluctuations in the grayscale values of the two categories of pixels are analyzed, and the general level of grayscale value fluctuations of all classified pixels in each area is calculated to obtain the corrosion probability parameter for each area. The pixels are adaptively classified, and based on the differences in the grayscale values of the classified pixels, a clearer and more accurate analysis of whether the fire protection pipes are corroded can be achieved.

[0054] Based on the fluctuation in the grayscale values of pixels in suspected rusted areas of each grayscale image in the same region, the leakage probability parameter for each area is obtained. By considering the fluctuation characteristics of pixels in suspected rusted areas over time, it is possible to better analyze the difference between pipeline corrosion leakage and condensation water, avoiding false alarms of pipeline corrosion without leakage. Based on the water leakage probability parameter of each area and the degree of fluctuation of the grayscale value of the pixels in the non-suspected rust area over time, the water leakage correction parameter of each area is obtained. This prevents the image from being affected by severe noise, resulting in the suspected rust area being dry but being mistakenly judged as a water leak due to excessive pixel fluctuation. Obtain the fault warning coefficient for each area based on the corrosion probability parameter, water leakage probability parameter, and water leakage correction parameter of each area. Obtaining the fault warning parameters of the area by combining the above parameters can provide more accurate data analysis for subsequent judgment. A threshold is set and compared with the warning coefficient to determine whether the fire-fighting pipe is rusted and leaking, completing the automatic detection of fire-fighting equipment failures. Using this method for fire-fighting equipment failure detection can accurately distinguish rusted areas and more accurately identify rust and leakage situations, avoiding environmental interference factors such as condensed water, and having high noise resistance.

[0055] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take 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.) containing computer-usable program code.

[0056] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a means for implementing the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 a means for implementing the functions specified in one or more blocks or a plurality of blocks.

[0057] These computer program instructions can 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, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction means that implements the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 a means for implementing the functions specified in one or more blocks or a plurality of blocks.

[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 a means for implementing the functions specified in one or more blocks or a plurality of blocks.

[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.

Claims

1. An automatic fire-fighting equipment fault detection method based on image processing, characterized in that, The method includes the following steps: Move the camera in the order of regions, collect n images at a fixed time interval in each region, perform grayscale processing on the collected images, and obtain a series of grayscale images traversed in the order of regions and acquisition time sequences; According to the gradient distribution of the pixel grayscale values of each grayscale image in each region, divide the pixel points of each grayscale image into two categories, analyze the fluctuation of the grayscale values of the two categories of pixel points, and obtain the rust probability parameter of each region; according to the change fluctuation degree of the pixel grayscale values of the suspected rust regions in each grayscale image in the same region, obtain the water leakage probability parameter of each region; according to the water leakage probability parameter of each region and the fluctuation degree of the pixel grayscale values of the non-suspected rust regions over time sequence, obtain the water leakage correction parameter of each region; according to the rust probability parameter, water leakage probability parameter and water leakage correction parameter of each region, obtain the fault warning coefficient of each region; Set a threshold and compare it with the warning coefficient to determine whether the fire pipeline is rusty and leaking, and complete the automatic detection of fire equipment faults.

2. The automatic fire equipment fault detection method based on image processing according to claim 1, characterized in that The method of moving the camera in the order of regions, collecting n images at a fixed time interval in each region, and performing grayscale processing on the collected images to obtain a series of grayscale images traversed in the order of regions and acquisition time sequences includes the following specific methods: Fix the camera on the bracket to ensure relative static between the camera and the pipeline wall, keep the shooting distance constant, and collect the fire water pipe images in multiple regions in turn; among them, in each region, collect n images at a fixed time interval; after the image collection of one region is completed, move the camera to the next region and repeat the process of collecting n images at a fixed time interval; after the collection is completed, perform grayscale processing on all the fire water pipe images to obtain a series of grayscale images; traverse the grayscale images according to the collection region order and collection time order of the fire water pipe images corresponding to the grayscale images to obtain a series of traversed grayscale images.

3. The automatic fire-fighting equipment fault detection method based on image processing according to claim 1, wherein, The method of dividing the pixel points of each grayscale image in each region into two categories according to the gradient distribution of the pixel grayscale values of each grayscale image, analyzing the fluctuation of the grayscale values of the two categories of pixel points, and obtaining the rust probability parameter of each region includes the following specific methods: For each grayscale image, select different grayscale values as thresholds for testing in turn: for each threshold to be tested, classify the pixel points with grayscale values greater than the threshold in the image as the first category of pixel points, and classify the pixel points with grayscale values less than or equal to the threshold as the second category of pixel points; calculate the standard deviation of the pixel values of the first category of pixel points and the standard deviation of the pixel values of the second category of pixel points respectively; divide the absolute value of the difference between these two standard deviations by the sum of these two standard deviations, and the obtained quotient value is the classification threshold parameter corresponding to the current threshold; after traversing the possible grayscale thresholds, select the grayscale value corresponding to the maximum classification threshold parameter as the optimal threshold of the grayscale image; according to this optimal threshold, finally divide the pixel points of the grayscale image into the first category of pixel points and the second category of pixel points; this process is independently applied to all grayscale images to divide the pixel points of all images into two categories; Calculate the general level of the gray value fluctuation of all classified pixel points in each area, and obtain the rust probability parameter of each area. The specific method is as follows: In the formula, represents the corrosion probability parameter of the q-th area's fire pipeline, and n represents the number of grayscale images in each area. represents the set of grayscale values of the first type of pixel points in the I-th grayscale image of the q-th area's fire pipeline area. represents the set of grayscale values of the second type of pixel points in the J-th grayscale image of the q-th area's fire pipeline area. represents the standard deviation of the grayscale values of the first type of pixel points in the I-th grayscale image of the q-th area's fire pipeline area. represents the standard deviation of the grayscale values of the second type of pixel points in the J-th grayscale image of the q-th area's fire pipeline area. The corrosion probability parameter is used to quantitatively evaluate the statistical probability of pipeline corrosion.

4. The automatic fire equipment fault detection method based on image processing according to claim 1, characterized in that, According to the degree of change and fluctuation of the gray values of the pixel points in the suspected rust areas of each gray image in the same area, obtain the water leakage probability parameter of each area. The specific method included is: For the q-th area, first traverse all the suspected rust pixel points of its first gray image, and completely record the position coordinate set; based on this coordinate set, traverse the pixel points with exactly the same coordinates in the subsequent gray images of this area one by one, and define the pixel point set obtained by traversing each image through this mapping as the rust template data of this image; In the formula, represents the water leakage probability parameter of the q-th area, represents the number of elements in the extraction set, represents the rust template data of the first grayscale image in the q-th area, and n represents the number of grayscale images in each area, represents the grayscale value of the x-th pixel point in the rust template data of the X-th grayscale image in the q-th area, represents the average value of the grayscale values of the x-th pixel points in all rust templates in the q-th area, and further obtains the water leakage probability parameter of each area.

5. The automatic fire-fighting equipment fault detection method based on image processing according to claim 1, characterized in that According to the water leakage probability parameter of each area and the degree of fluctuation of the gray values of the pixel points in the non-suspected rust area over time, obtain the water leakage correction parameter of each area. The specific method included is: For the q-th area, first traverse all the non-suspected rust pixel points of its first gray image, and completely record the position coordinate set; based on this coordinate set, traverse the pixel points with exactly the same coordinates in the subsequent gray images of this area one by one, and define the pixel point set obtained by traversing each image through this mapping as the normal area template data of this image; For the q-th area, calculate the standard deviation of the gray values of the pixel points in each normal area template data, accumulate all the standard deviations and divide by the number of elements in the normal area template data, and record the quotient as the surface fluctuation coefficient of the q-th area. Further obtain the surface fluctuation coefficient of each area, and according to the water leakage probability parameter and the surface fluctuation coefficient of each area, obtain the water leakage correction parameter of each area. The specific method is as follows: In the formula, represents the leakage correction parameter for the q-th area, represents the leakage probability parameter for the q-th area, represents the surface fluctuation coefficient of the q-th area, e represents the natural base, and T represents the hyperparameter.

6. The automatic fire equipment fault detection method based on image processing according to claim 1, wherein According to the rust probability parameter, water leakage probability parameter and water leakage correction parameter of each area, obtain the fault warning coefficient of each area. The specific method included is: In the formula, represents the fault warning coefficient of the q-th area, represents the corrosion probability parameter of the fire pipeline in the q-th area, represents the water leakage probability parameter of the q-th area, represents the water leakage correction parameter of the q-th area.

7. The automatic fire-fighting equipment fault detection method based on image processing according to claim 1, characterized in that Set a threshold and compare it with the warning coefficient to determine whether the fire pipeline is rusted and leaking, and complete the automatic detection of fire equipment faults. The specific method included is: Set a threshold value K. The value of K is determined according to the distribution of water leakage fault samples in historical data. The default value of K is 36. Compare the size of the fault warning coefficient with the threshold value K. When the fault warning coefficient is greater than or equal to the threshold value K, there is a rust and water leakage fault in this area. Remind relevant personnel to perform maintenance through a speaker, and complete the automatic detection method for fire-fighting equipment faults.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of a method for automatic detection of fire equipment faults based on image processing as described in any one of claims 1 to 7.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of a method for automatic detection of fire equipment faults based on image processing as described in any one of claims 1 to 7.

10. An automatic fire-fighting equipment fault detection system based on image processing, characterized in that, The system includes the following modules: A data acquisition module, which is used to move the camera in the order of areas, collect n images at a fixed time interval in each area, perform gray-scale processing on the collected images, and obtain a series of gray images traversed in the order of areas and acquisition time sequences; A data analysis module, which is used to divide the pixel points of each gray image into two categories according to the gradient distribution of the gray values of the pixel points of each gray image in each area, analyze the fluctuation of the gray values of the two categories of pixel points, and obtain the rust probability parameter of each area; according to the degree of change and fluctuation of the gray values of the pixel points in the suspected rust areas of each gray image in the same area, obtain the water leakage probability parameter of each area; Obtain the water leakage correction parameter for each area according to the water leakage probability parameter of each area and the degree of fluctuation of the gray value of the pixel points in the non-suspected rust area over time; obtain the fault warning coefficient for each area according to the rust probability parameter, water leakage probability parameter and water leakage correction parameter of each area; The alarm module is used to set a threshold and compare it with the warning coefficient to determine whether the fire pipeline is rusted and leaking, so as to complete the automatic detection of fire equipment faults.

Citation Information

Patent Citations

  • Water supply pipe surface leakage detection method based on image processing

    CN116993745A

  • Valve anomaly detection system based on image recognition and detection method thereof

    CN119023242A

  • Contact rusting image recognition method and system

    CN119295735A

  • Pipeline pump surface image processing method and system for icing detection

    CN120107255A

  • Image processing device, inspection device, image processing method, and non-transitory recording medium

    US20160125612A1

Cited By

  • Method for evaluating energy use efficiency in IBMS based on image recognition

    CN120634775A

  • Water leakage detection method and system for copper rod continuous casting secondary cooling chamber

    CN121190494A

  • Condensation image monitoring method and system for early recognition of non-contact pipeline leakage

    CN122170365A

  • Condensation image monitoring method and system for early identification of non-contact pipeline leaks

    CN122170365B