Steam boiler gas leakage detection method based on image processing
In steam boiler gas leakage detection, multi-scale image processing and CLAHE algorithm are used for image enhancement, combined with edge detection and connectivity domain analysis, the problem of traditional methods being untimely or incorrectly recognized leaks is solved, achieving higher detection accuracy and real-timeness.
Patent Information
- Application Number
- CN202510376512.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-28
AI Technical Summary
In the prior art, when detecting gas leakage in steam boiler, the traditional CLAHE algorithm cannot accurately extract the edges and communication domains of the gas, resulting in untimely or incorrectly identifying the leakage.
By obtaining the continuous multi-frame grayscale image of the position to be measured by the steam boiler, segmenting the image at multiple scales, using the CLAHE algorithm to enhance the image, and analyzing and calculating the probability of edge pixel points based on the gradient amplitude and noise changes of the pixel points, and calculating the degree of irregularity based on the circularity and area difference of the connecting domain to determine whether there is gas leakage.
Through multi-scale processing and edge detection, the detection accuracy of gas leakage is improved, false detection and leakage detection are reduced, and it is possible to judge whether gas leakage occurs at the steam boiler position in real time.
Smart Images

Figure CN119887775A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image data processing, and more specifically, to a steam boiler gas leakage detection method based on image processing. Background Art
[0002] In the gas leakage detection of steam boilers, image processing methods can capture the boiler operation status through monitoring equipment, analyze possible leakage signs in the image in real time, and improve detection efficiency and accuracy. The existing technology extracts relevant gas features by image enhancement of the leaking gas image to determine whether a leak has occurred.
[0003] However, since the gas concentration is low when the steam boiler starts to leak, the contrast of gas features in images of different scales is different. The traditional CLAHE algorithm is based on a fixed local threshold and a single scale for image enhancement and cannot accurately extract the edges and connected domains of the gas, resulting in untimely or misidentified leaks.
[0004] At present, there is a Chinese patent document with the authorization announcement number CN116563283B and the name “Steam Boiler Gas Leakage Detection Method and Detection Device Based on Image Processing”. The specific method is: determine the first abnormal area of each infrared image in the infrared image set, and determine the second abnormal area of each visible light image in the visible light image set; calculate the similarity of the two abnormal areas, and determine the human body interference area in the first abnormal area based on the similarity; and eliminate the human body interference area in the first abnormal area to obtain the third abnormal area; then determine whether the steam boiler is leaking.
[0005] The above uses infrared images and visible light images to detect steam boiler gas leaks, but infrared images are greatly affected by temperature, and the temperature near steam boilers is generally high. The collected infrared images may have poor accuracy and easily cause false detections, resulting in the inability to accurately detect steam boiler gas leaks. Summary of the invention
[0006] In order to solve the above-mentioned problem of being unable to accurately detect gas leakage in a steam boiler, the present invention provides the following solution.
[0007] The present invention provides a steam boiler gas leakage detection method based on image processing, comprising: obtaining a continuous multi-frame grayscale image of a position to be tested in a steam boiler; presetting a plurality of scales, dividing each frame of the grayscale image into sub-regions of the same area according to the scale, each scale corresponding to a sub-region with a different area, and using a CLAHE algorithm to obtain a plurality of enhanced images corresponding to each frame of the grayscale image at a plurality of scales; when the probability that a pixel point in the grayscale image belongs to an edge pixel point exceeds a preset probability, the pixel point is an edge pixel point, and a connected domain in each frame of the grayscale image is obtained according to the edge pixel point; the probability that a pixel point in the grayscale image belongs to an edge pixel point , ,in, For normalization, is the number of scale types, is the noise level change difference of the enhanced image corresponding to scale k, is the gradient amplitude of pixel z in the enhanced image corresponding to scale k, is the maximum value of the gradient amplitude of all pixels in the enhanced image corresponding to scale k; the degree of irregularity of the connected domain is calculated according to the circularity and area difference of the connected domain of each frame of grayscale image, the degree of irregularity of the connected domain is negatively correlated with the circularity of the connected domain of each frame of grayscale image, and is positively correlated with the difference between the area of the connected domain of each frame of grayscale image and the mean area of the connected domain of multiple consecutive frames of grayscale images; when the degree of irregularity of the connected domain is greater than the threshold, there is a gas leak at the position to be tested.
[0008] By processing images at different scales, different details can be enhanced, noise interference at a certain scale can be avoided, and edge information can be extracted more accurately. By analyzing the gradient amplitude and noise change, the probability of each pixel belonging to the edge can be calculated more accurately, thereby improving the accuracy of edge detection. Using geometric features such as circularity and area difference, the connected domain features of whether there is a gas leak can be effectively distinguished. This method can determine whether a gas leak occurs at the steam boiler location in real time based on continuous frame images, thereby improving the accuracy of gas leak detection.
[0009] Preferably, the degree of irregularity of the connected domain includes: ,in, Indicates the degree of irregularity of the connected domain. Represents the total number of frames of continuous grayscale images, Indicates The circularity of the connected domain on the frame grayscale image, Indicates The area of the connected domain on the frame grayscale image, Represents the mean area of the connected domains in all consecutive frame grayscale images.
[0010] When a steam boiler leaks gas, the connected domain formed by the smoke or gas diffusion is often irregular, and the area will fluctuate greatly over time. However, the edge connected domain in the image under normal circumstances is relatively regular, and the area will not fluctuate greatly. Combining the circularity and area changes, it is possible to more accurately determine whether there is a gas leak.
[0011] Preferably, the method of obtaining multiple enhanced images corresponding to each frame of grayscale image at multiple scales using the CLAHE algorithm also includes: for each sub-region obtained at each scale of each frame of grayscale image, respectively setting a corresponding adaptive contrast limiting threshold, wherein the adaptive contrast limiting threshold is positively correlated with the noise level of the sub-region and negatively correlated with the sum of the noise levels of all sub-regions.
[0012] Since the contrast limit threshold changes adaptively with the local noise level, it can effectively reduce the over-enhancement of high noise areas and prevent the noise from being amplified.
[0013] Preferably, the adaptive contrast limiting threshold is specifically: , ,in, is the adaptive contrast limit threshold of the ith sub-region, is the initial contrast limit threshold, is the adjustment parameter of the ith sub-region, and is the noise level of the i-th and j-th sub-regions, and N is the number of sub-regions.
[0014] Preferably, the noise level of the sub-area includes: ,in, represents the noise level of the t-th sub-region, Indicates the number of pixels in the sub-area. represents the gray value of the w-th pixel in the sub-region, Represents the grayscale mean of all pixels in the t-th sub-region.
[0015] Preferably, obtaining the connected domain of each frame of grayscale image includes: for each frame of grayscale image, calculating the difference in noise level change of the enhanced image at each scale, ,in, is the noise level change difference of the enhanced image corresponding to scale k, and is the average noise level of all sub-regions of the enhanced image corresponding to scale k and scale h, and is the average noise level of all sub-regions after the grayscale image is divided into sub-regions according to scale k and scale h, and M is the number of scale types; the sobel operator is used to calculate the gradient amplitude of each pixel in the enhanced images at different scales, and the probability that each pixel in the grayscale image belongs to an edge pixel is calculated based on the difference in noise level changes of the enhanced images at each scale.
[0016] Combining the gradient information at multiple scales with the difference in noise level changes, edges can be extracted more accurately and false detections and missed detections can be reduced.
[0017] Preferably, obtaining a connected domain in each frame of grayscale image according to edge pixels includes: Use depth-first search or breadth-first search to get the connected domain.
[0018] Preferably, the acquiring of continuous multiple frames of grayscale images of the position to be tested of the steam boiler comprises: using a high-definition camera to capture continuous multiple frames of visible light images of the position to be tested of the steam boiler, and converting the continuous multiple frames of visible light images into grayscale images.
[0019] Preferably, when there is a gas leak at the position to be tested, an audible and visual warning is performed.
[0020] When a gas leak occurs, timely and effective feedback can be provided in a short period of time, allowing staff to respond quickly and take measures to prevent the accident from expanding.
[0021] Preferably, the threshold is 0.6.
[0022] The beneficial effects of the present invention are as follows: by processing images at different scales, different details can be enhanced, noise interference at a certain scale can be avoided, and edge information can be extracted more accurately. By analyzing the gradient amplitude and noise change, the probability that each pixel belongs to the edge can be more accurately calculated, thereby improving the accuracy of edge detection. By using geometric features such as circularity and area difference, the connected domain features of whether there is a gas leak can be effectively distinguished. The method can judge whether a gas leak occurs at the steam boiler position in real time based on continuous frame images, thereby improving the detection accuracy of gas leaks. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of a steam boiler gas leakage detection method based on image processing provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0025] Figure 1 The present invention provides a flow chart of a method for detecting gas leakage in a steam boiler based on image processing, which includes the following steps: S101, obtaining a plurality of continuous grayscale images of a position to be measured of a steam boiler.
[0026] In some embodiments, the step of obtaining a plurality of continuous grayscale images of the position to be measured of the steam boiler includes: using a high-definition camera to capture a plurality of continuous visible light images of the position to be measured of the steam boiler, and converting the plurality of continuous visible light images into grayscale images. The method of converting the visible light image into a grayscale image is a well-known technique and will not be described in detail herein.
[0027] The above embodiment directly captures a visible light image of the position to be measured. In another embodiment, a visible light image of the entire steam boiler may be captured, and a partial image including the position to be measured may be cut out from the entire image.
[0028] S102: Obtain a connected domain in each frame of the grayscale image.
[0029] The method for obtaining a connected domain in each frame of grayscale image specifically includes: presetting multiple scales, dividing each frame of grayscale image into sub-regions of the same area according to the scales, each scale corresponding to a sub-region with a different area, and using a CLAHE algorithm to obtain multiple enhanced images corresponding to each frame of grayscale image at multiple scales; when the probability that a pixel point in the grayscale image belongs to an edge pixel point exceeds a preset probability, the pixel point is an edge pixel point, and a connected domain in each frame of grayscale image is obtained based on the edge pixel point.
[0030] In one embodiment, in one embodiment, the gas leaked in the steam boiler mainly includes water vapor, carbon monoxide, carbon dioxide, etc. Since the concentration of these gases is low when the steam boiler starts to leak, the color contrast in the grayscale image is low and the edge of the gas is fuzzy, resulting in inaccurate edge point extraction, untimely leakage identification or misjudgment of leakage when the color contrast in the grayscale image is low and the steam edge is fuzzy. The traditional CLAHE algorithm usually applies a fixed contrast limiting threshold to each sub-region, which may cause loss of details in some areas or excessive enhancement in some areas with more noise. Therefore, the CLAHE algorithm can be improved, specifically including: for each sub-region obtained at each scale of each frame of grayscale image, an adaptive contrast limiting threshold is set for each sub-region, and the adaptive contrast limiting threshold is positively correlated with the noise level of the sub-region and negatively correlated with the sum of the noise levels of all sub-regions. In this embodiment, by adjusting the adaptive contrast limiting threshold according to the noise level, the contrast can be enhanced in areas with less noise, while avoiding excessive enhancement in areas with more noise, thereby improving the quality of the enhanced image.
[0031] Specifically, the adaptive contrast limiting threshold , , ,in, is the initial contrast limit threshold, is the adjustment parameter of the ith sub-region, and is the noise level of the ith and jth sub-regions, N is the number of sub-regions, The size of represents the first In some embodiments, the noise level of the sub-region includes: ,in, represents the noise level of the t-th sub-region, Indicates the number of pixels in the sub-area. represents the gray value of the w-th pixel in the sub-region, Represents the grayscale mean of all pixels in the t-th sub-region.
[0032] After obtaining multiple enhanced images of each grayscale image, it is necessary to comprehensively analyze these enhanced images to obtain the edge pixels in the grayscale image, thereby obtaining the connected domain of the grayscale image. To obtain the connected domain of each grayscale image, specifically: for each grayscale image, calculate the difference in noise level changes of the enhanced image at each scale, ,in, is the noise level change difference of the enhanced image corresponding to scale k, and is the average noise level of all sub-regions of the enhanced image corresponding to scale k and scale h, and is the noise level average of all sub-regions of the grayscale image after the sub-regions are divided according to scale k and scale h, and M is the number of scale types; the gradient amplitude of each pixel in the enhanced image at different scales is calculated using the sobel operator, and the probability of each pixel in the grayscale image belonging to an edge pixel is calculated in combination with the difference in noise level changes of the enhanced image at each scale. The method of obtaining a connected domain in each frame of the grayscale image according to the edge pixels includes: obtaining the connected domain using a depth-first search or a breadth-first search.
[0033] The probability that a pixel in the grayscale image belongs to an edge pixel , ,in, For normalization, is the number of scale types, is the noise level change difference of the enhanced image corresponding to scale k, is the gradient amplitude of pixel z in the enhanced image corresponding to scale k, is the maximum value of the gradient amplitude of all pixels in the enhanced image corresponding to scale k. In general, when the probability When it is greater than 0.7, the pixel z in the grayscale image can be considered as an edge pixel.
[0034] For example, three scales are preset, and each scale corresponds to a sub-region area: scale 1, sub-region area a×a, scale 2, sub-region area b×b, scale 3, sub-region area c×c. Each frame of grayscale image is divided into A blocks of a×a sub-regions according to scale 1, and the CLAHE algorithm is used to obtain the enhanced image of the frame of grayscale image at scale 1. Similarly, the enhanced images at scales 2 and 3 can be obtained. So far, a total of three enhanced images of the frame of grayscale image at three scales are obtained. According to the difference in noise level changes corresponding to these three images and the gradient amplitude of each pixel point, the probability of each pixel point in the grayscale image belonging to an edge pixel point is calculated. The pixel point that exceeds the probability threshold is an edge pixel point. Then, according to the edge pixel points in the grayscale image, the connected domain of the grayscale image can be obtained by depth-first search or breadth-first search. Obtaining a connected domain based on edge pixels belongs to a well-known technology and will not be repeated here.
[0035] S103, calculating the degree of irregularity of the connected domain according to the circularity and area difference of the connected domain of each grayscale image in the continuous multiple grayscale images, and when the degree of irregularity of the connected domain is greater than a threshold, there is a gas leak at the position to be tested.
[0036] The degree of irregularity of the connected domain is negatively correlated with the circularity of the connected domain of each frame of grayscale image, and positively correlated with the difference between the area of the connected domain of each frame of grayscale image and the mean area of the connected domains of multiple consecutive frames of grayscale images.
[0037] Due to the high temperature and high pressure environment inside the steam boiler, high-temperature evaporated water vapor will appear evenly around the steam boiler, and the shape of the water vapor is relatively regular. When a leak occurs, due to the large difference in internal and external pressures, the leaked gas will show irregular and continuous changes. The circularity can reflect whether the leaked gas is regular in shape, and the difference in area changes between different frames can reflect the degree of change in the area of the leaked gas. Therefore, the present invention calculates the degree of irregularity of the connected domain at the detection position based on the circularity and area difference of the connected domain in the grayscale image of continuous frames. The difference in the area of the connected domain between different frames is large. The lower the circularity of the connected domain, the higher the degree of irregularity of the connected domain, and the greater the probability of leakage.
[0038] The present invention provides a formula for calculating the degree of irregularity of a connected domain. Specifically, ,in, Indicates the degree of irregularity of the connected domain. Represents the total number of frames of continuous grayscale images, Indicates The circularity of the connected domain on the frame grayscale image, Indicates The area of the connected domain on the frame grayscale image, Indicates the average area of the connected domain on all continuous frame grayscale images. In one embodiment, the threshold is 0.6. When the degree of irregularity of the connected domain is greater than 0.6, it indicates that there is a gas leak at the location to be tested. At this time, an acoustic and visual warning can be issued to the control center in time. The acoustic and visual warning can provide timely and effective warnings in a short time, allowing the staff to quickly know the boiler leak and take measures to prevent the accident from expanding.
[0039] The present invention can capture edge features of different sizes by presetting sub-region segmentation of different scales, and finally obtain a more accurate connected domain. The CLAHE algorithm can suppress noise amplification while enhancing the image by limiting the amplitude of local histogram equalization. By quantitatively analyzing the degree of irregularity of the connected domain in the image, the morphological changes of the gas leakage area can be sensitively captured. This method combines multiple technologies such as multi-scale image processing, edge detection and connected domain analysis, and effectively improves the accuracy of gas leakage detection.
[0040] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0041] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A steam boiler gas leakage detection method based on image processing, characterized in that: include: Acquire continuous multiple-frame grayscale images of the position to be tested of the steam boiler; Multiple scales are preset, and each frame of grayscale image is divided into sub-regions of the same area according to the scale. Each scale corresponds to a different sub-region area. The CLAHE algorithm is used to obtain multiple enhanced images corresponding to each frame of grayscale image at multiple scales. When the probability that a pixel in the grayscale image belongs to an edge pixel exceeds a preset probability, the pixel is an edge pixel, and a connected domain in each frame of the grayscale image is obtained based on the edge pixel; The probability that a pixel in the grayscale image belongs to an edge pixel , ,in, For normalization, is the number of scale types, is the noise level change difference of the enhanced image corresponding to scale k, is the gradient amplitude of pixel z in the enhanced image corresponding to scale k, is the maximum value of the gradient amplitude of all pixels in the enhanced image corresponding to scale k; The degree of irregularity of the connected domain is calculated based on the circularity and area difference of the connected domain of each frame of grayscale image. The degree of irregularity of the connected domain is negatively correlated with the circularity of the connected domain of each frame of grayscale image, and positively correlated with the difference between the area of the connected domain of each frame of grayscale image and the mean area of the connected domain of multiple consecutive frames of grayscale images. When the degree of irregularity of the connected domain is greater than a threshold, there is a gas leak at the location to be tested.
2. The method for detecting gas leakage of a steam boiler based on image processing according to claim 1, characterized in that: The degree of irregularity of the connected domain includes: ,in, Indicates the degree of irregularity of the connected domain. Represents the total number of frames of continuous grayscale images, Indicates The circularity of the connected domain on the frame grayscale image, Indicates The area of the connected domain on the frame grayscale image, Represents the mean area of the connected domains in all consecutive frame grayscale images.
3. The method for detecting gas leakage of a steam boiler based on image processing according to claim 1, characterized in that: The method of using the CLAHE algorithm to obtain multiple enhanced images corresponding to each frame of grayscale image at multiple scales also includes: For each sub-region obtained at each scale of each frame of grayscale image, a corresponding adaptive contrast limiting threshold is set respectively, and the adaptive contrast limiting threshold is positively correlated with the noise level of the sub-region and negatively correlated with the sum of the noise levels of all sub-regions.
4. The method for detecting gas leakage of a steam boiler based on image processing according to claim 3, characterized in that: The adaptive contrast limiting threshold is specifically: , ,in, is the adaptive contrast limit threshold of the ith sub-region, is the initial contrast limit threshold, is the adjustment parameter of the ith sub-region, and is the noise level of the ith and jth sub-regions, and N is the number of sub-regions.
5. The method for detecting gas leakage of a steam boiler based on image processing according to claim 3, characterized in that: The noise level of the sub-areas includes: ,in, represents the noise level of the t-th sub-region, Indicates the number of pixels in the sub-area. represents the gray value of the w-th pixel in the sub-region, Represents the grayscale mean of all pixels in the t-th sub-region.
6. The method for detecting gas leakage of a steam boiler based on image processing according to claim 1, characterized in that: The method of obtaining a connected domain of each frame of grayscale image includes: For each frame of grayscale image, calculate the difference in noise level change of the enhanced image at each scale. ,in, is the noise level change difference of the enhanced image corresponding to scale k, and is the average noise level of all sub-regions of the enhanced image corresponding to scale k and scale h, and is the average noise level of all sub-regions of the grayscale image after the sub-regions are divided according to scale k and scale h, and M is the number of scale types; The Sobel operator is used to calculate the gradient amplitude of each pixel in the enhanced images at different scales, and the probability that each pixel in the grayscale image belongs to an edge pixel is calculated based on the difference in noise level changes in the enhanced images at each scale.
7. The method for detecting gas leakage of a steam boiler based on image processing according to claim 6, characterized in that: The method of obtaining a connected domain in each frame of grayscale image according to edge pixels includes: Use depth-first search or breadth-first search to get the connected domain.
8. The method for detecting gas leakage of a steam boiler based on image processing according to claim 1, characterized in that: The method of obtaining a continuous plurality of grayscale images of the position to be measured of the steam boiler comprises: A high-definition camera is used to capture continuous multiple-frame visible light images of the position to be measured in the steam boiler, and the continuous multiple-frame visible light images are converted into grayscale images.
9. The method for detecting gas leakage of a steam boiler based on image processing according to claim 1, characterized in that: When there is gas leakage at the position to be tested, an audible and visual warning is given.
10. The method for detecting gas leakage of a steam boiler based on image processing according to claim 1, characterized in that: The threshold is 0.6.
Citation Information
Patent Citations
Image Processing-Based Method and Device for Detecting Gas Leakage in Steam Boilers
CN116563283B
Inter-frame matching slam method based on image region segmentation
CN114372510A
Pipeline steam leakage detection method and system based on deep learning
CN115063584A
Combustible gas leakage area detection method based on AI algorithm
CN116152724A
Infrared image enhancement method based on Lagrange interpolation and multi-scale guide filtering
CN116433519A