A substation gas leakage detection method based on target detection

CN123015404APending Publication Date: 2026-10-30STATE GRID HENAN ELECTRIC POWER CO FUGOU COUNTY POWER SUPPLY CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611094076.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

现有方法未能有效区分泄漏湍流与背景干扰的统计差异性,仅采用常规的时域滤波或能量累积策略,极易将环境噪声误判为泄漏或将微弱湍流信号抑制,检测精度难以满足变电站复杂工况的运维要求

Benefits of technology

1.本发明通过从红外图像序列中提取微动能量场并分离湍流涡动分量,能够有效捕捉泄漏气体扩散过程中产生的间歇性能量波动。基于相位保持映射构建扩散迹线,可在低对比度场景下准确还原泄漏气体沿设备表面的连续扩散路径,显著增强了对微弱泄漏信号的感知能力,提高了泄漏检测的空间定位精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015404A_ABST
    Figure CN123015404A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of target detection, and discloses a substation gas leakage detection method based on target detection, which comprises the following steps: frame difference accumulation is performed on an infrared image sequence of substation gas to obtain micro kinetic energy field of the infrared image sequence; turbulence precipitation is performed on the micro kinetic energy field to obtain turbulence eddy motion component of the micro kinetic energy field; phase-preserving mapping is performed on the turbulence eddy motion component to obtain diffusion trace of the turbulence eddy motion component; based on the diffusion trace, boundary clipping is performed on a first frame gray image of the infrared image sequence to obtain candidate region image of the first frame gray image; morphological quantity is taken from the candidate region image to obtain contour parameter of the candidate region image; and the contour parameter is subjected to grade quantization to obtain a leakage result of the substation gas. The application can improve the detection efficiency of substation gas leakage based on target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of target detection technology, and in particular to a method for detecting gas leaks in substations based on target detection. Background Technology

[0002] Existing infrared detection methods for gas leaks in substations primarily rely on the spatial domain grayscale features of single-frame infrared images, identifying leaks by comparing the thermal radiation differences between the leak area and the background. However, in scenarios with low leak concentrations or high ambient temperatures, the grayscale contrast of the leaking gas in the infrared image drops sharply, making it difficult for traditional methods based on grayscale thresholding or edge detection to extract effective leak signals, resulting in a significantly higher false negative rate. When the temperature of the leaking gas and the background tends to be the same, the leak area exhibits blurred or even reversed weak features in the image. Existing methods lack adaptive enhancement mechanisms for this extreme scenario, failing to guarantee the stability and reliability of detection.

[0003] Existing motion detection methods based on temporal frame differences or optical flow fields can utilize the dynamic information of gas diffusion, but they typically assume that the leak plume has continuous and stable motion characteristics, relying on simple inter-frame energy accumulation or differential thresholding for judgment. In reality, the turbulent eddies generated by gas leaks exhibit strong intermittent and non-Gaussian distribution characteristics, with their energy displaying a sparse, abrupt peak pattern in the spatiotemporal domain. In contrast, background thermal drift or equipment vibration often exhibits more stable statistical characteristics. Existing methods fail to effectively distinguish the statistical differences between leak turbulence and background interference, relying solely on conventional temporal filtering or energy accumulation strategies. This easily leads to misclassification of environmental noise as leaks or suppression of weak turbulent signals, resulting in detection accuracy that is insufficient to meet the operational requirements of complex substation conditions. Therefore, improving the accuracy and robustness of substation gas leak detection has become an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a substation gas leak detection method based on target detection to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides a substation gas leak detection method based on target detection, comprising: S1. Perform frame difference accumulation on the infrared image sequence of the substation gas to obtain the micro-motion energy field of the infrared image sequence;

[0006] S2. Perform turbulent extraction on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field;

[0007] S3. Perform phase-preserving mapping on the turbulent eddy component to obtain the diffusion trace of the turbulent eddy component;

[0008] S4. Based on the diffusion trace, the first grayscale image of the infrared image sequence is cropped to obtain a candidate region map of the first grayscale image.

[0009] S5. Perform morphological measurement on the candidate region map to obtain the contour parameters of the candidate region map;

[0010] S6. The contour parameters are quantified to obtain the leakage results of the gas in the substation.

[0011] In a preferred embodiment, the step of performing frame difference accumulation on the infrared image sequence of the substation gas to obtain the micro-motion energy field of the infrared image sequence specifically includes: Obtain the inter-frame difference map of the infrared image sequence; The modulus residual of the inter-frame difference map is obtained by taking the norm of the inter-frame difference map. Based on the modulus residual, the time-domain sequence of the infrared image sequence is integrated in the time domain to obtain the integrated energy of the modulus residual; The integrated energy is recombined point by point to obtain the micro-motion energy field of the infrared image sequence.

[0012] In a preferred embodiment, the step of integrating the modulus residual in the time domain to obtain the integrated energy of the modulus residual specifically includes: The modulus residual is exponentially weighted to obtain the weighted residual of the modulus residual; Based on the weighted residuals, the temporal sequence of the infrared image sequence is integrated regionally to obtain the in-window sum of the weighted residuals; The amplitude of the sum within the window is calibrated to obtain the calibration value of the sum within the window; Based on the calibration value, the time-domain sequence of the infrared image sequence is Gaussian smoothed to obtain the integral energy of the modulus residual.

[0013] In a preferred embodiment, the step of performing turbulent extraction on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field specifically includes: The micro-motion energy field is divided into blocks and windowed to obtain local time windows of the micro-motion energy field; The local time window block is deconstructed by energy fluctuation to obtain the fluctuation components of the local time window block; The fluctuation components are subjected to sparsity discrimination to obtain the intermittent characteristics of the fluctuation components; The fluctuation component is decomposed into multiple scales to obtain the scaling exponent of the fluctuation component. Based on the intermittent characteristics and the scaling index, eddy separation is performed on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field.

[0014] In a preferred embodiment, the step of performing energy fluctuation deconstruction on the local time window block to obtain the fluctuation components of the local time window block specifically includes: The energy ratio within the local time window is used as the energy probability of the local time window. Integrating the energy probability by entropy value yields the energy entropy value of the local time window block; The gradient mode field of the local time window is obtained by deconstructing the energy value within the local time window by slope. Based on the energy entropy value and the gradient mode field, the intermittency factor of the energy distribution of the local time window is solved to obtain the intermittency factor of the local time window. The intermittency factor is calculated using the following formula: ; In the formula, For the intermittent factor, For pixel index, The energy probability of the first Energy percentage per pixel For natural logarithm operations, It is a natural constant. For the gradient mode field, the first Gradient magnitude of 1 pixel, The standard deviation of the energy value within the local time window is given. The total number of pixels in the local time window block; Multiply the original energy value of each pixel within the local time window by the intermittency factor to obtain the fluctuation component of the local time window.

[0015] In a preferred embodiment, the step of performing phase-preserving mapping on the turbulent eddy component to obtain the diffusion trace of the turbulent eddy component specifically includes: Phase spectrum extraction is performed on the turbulent eddy component to obtain the original phase angle of the turbulent eddy component; The original phase angle is flattened to obtain the continuous phase field of the original phase angle; Based on the continuous phase field, the amplitude distribution of the turbulent eddy component is back-projected with phase preservation to obtain a spatial mapping of the turbulent eddy component; Extreme value tracing is performed on the spatial mapping to obtain the diffusion trace of the spatial mapping.

[0016] In a preferred embodiment, the extreme value tracing of the spatial mapping to obtain the diffusion trace of the spatial mapping specifically includes: The spatial mapping graph is subjected to directional filtering to obtain the main directional component of the spatial mapping graph; Based on the main current component, the gaps in the spatial mapping are bridged and filled to obtain the continuous main current trace of the spatial mapping. Curvature fitting is performed on the continuous mainstream trace to obtain the diffusion trace of the spatial mapping map.

[0017] In a preferred embodiment, the step of cropping the boundary of the first grayscale image of the infrared image sequence based on the diffusion trace to obtain a candidate region map of the first grayscale image specifically includes: The bounding box of the diffusion trace is obtained by fitting an outer frame to the diffusion trace. Linear compression is performed on the first frame grayscale image to obtain the reduced grayscale image of the first frame grayscale image; Based on the bounding box, the pixels within the bounding box of the reduced grayscale image are region-fixed to obtain the reserved area of ​​the reduced grayscale image; The pixels outside the frame of the reserved area are subjected to outer domain hidden removal to obtain the candidate region map of the first frame grayscale image.

[0018] In a preferred embodiment, the step of performing morphological measurement on the candidate region map to obtain the contour parameters of the candidate region map specifically includes: The candidate region image is segmented using a grayscale threshold to obtain a foreground binary image of the candidate region image; Edge tracing is performed on the foreground binary image to obtain the edge pixel string of the foreground binary image; Based on the edge pixel string, boundary measurements are performed on the outer edge of the foreground binary image to obtain the contour geometry of the edge pixel string; The contour geometry is aggregated to obtain the contour parameters of the candidate region map.

[0019] In a preferred embodiment, the step of quantizing the profile parameters to obtain the leakage result of the substation gas specifically includes: Obtain the maximum and minimum values ​​of the contour parameters; Based on the maximum and minimum values, the contour parameters are normalized by range to obtain the reduced values ​​of the contour parameters; Based on the normative value, the magnitude range of the contour parameters is matched and divided to obtain the membership level of the normative value; By performing a degree mapping on the membership level, the leakage results of the gas in the substation are obtained.

[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention effectively captures intermittent energy fluctuations generated during the diffusion of leaked gas by extracting the micro-motion energy field from infrared image sequences and separating the turbulent eddy components. Based on phase-preserving mapping to construct diffusion traces, the continuous diffusion path of leaked gas along the equipment surface can be accurately reconstructed even in low-contrast scenarios, significantly enhancing the ability to detect weak leak signals and improving the spatial positioning accuracy of leak detection.

[0021] 2. This invention employs an intermittent factor to quantify and analyze turbulent energy, combined with scaling indices obtained from multi-scale decomposition, to achieve a fine distinction between leakage turbulence and background thermal ripple interference. By measuring the morphology of candidate region maps and quantifying the levels of contour parameters, it can output quantitative leakage degree results, effectively avoiding false detections and false negatives in complex environments using traditional methods, and improving the reliability and engineering applicability of the detection results. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating a substation gas leak detection method based on target detection, provided in an embodiment of the present invention. The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0023] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0024] This application provides a substation gas leak detection method based on target detection. The execution entity of this target detection-based substation gas leak detection method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the target detection-based substation gas leak detection method can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0025] Reference Figure 1The diagram shown is a flowchart illustrating a substation gas leak detection method based on target detection according to an embodiment of the present invention. In this embodiment, the substation gas leak detection method based on target detection includes: S1. Perform frame difference accumulation on the infrared image sequence of the substation gas to obtain the micro-motion energy field of the infrared image sequence; In this embodiment of the invention, the step of performing frame difference accumulation on the infrared image sequence of the substation gas to obtain the micro-motion energy field of the infrared image sequence specifically includes: Obtain the inter-frame difference map of the infrared image sequence; The modulus residual of the inter-frame difference map is obtained by taking the norm of the inter-frame difference map. Based on the modulus residual, the time-domain sequence of the infrared image sequence is integrated in the time domain to obtain the integrated energy of the modulus residual; The integrated energy is recombined point by point to obtain the micro-motion energy field of the infrared image sequence.

[0026] The step of integrating the modulus residual in the time domain to obtain the integrated energy of the modulus residual specifically includes: The modulus residual is exponentially weighted to obtain the weighted residual of the modulus residual; Based on the weighted residuals, the temporal sequence of the infrared image sequence is integrated regionally to obtain the in-window sum of the weighted residuals; The amplitude of the sum within the window is calibrated to obtain the calibration value of the sum within the window; Based on the calibration value, the time-domain sequence of the infrared image sequence is Gaussian smoothed to obtain the integral energy of the modulus residual.

[0027] For two consecutive frames in an infrared image sequence, the gray values ​​at the same pixel position in the previous frame and the next frame are subtracted. The gray value of the previous frame is subtracted from the gray value of the next frame to obtain the gray value difference at that pixel position. After performing the same subtraction operation on all pixel positions, the differences of all pixel positions are arranged according to the original spatial coordinates to obtain a two-dimensional array composed of these differences, namely the inter-frame difference map.

[0028] For each pixel location in the inter-frame difference map, the absolute value of the grayscale difference is taken, that is, the negative difference value is converted into a positive value, while the zero and positive difference values ​​remain unchanged. This operation is called modulus calculation. After performing the absolute value operation on all pixel locations one by one, the obtained non-negative values ​​are reorganized according to the original spatial position to form a new two-dimensional array, namely the modulus residual.

[0029] Using the modulus residual as the basic data, for each fixed pixel position in the infrared image sequence, all modulus residual values ​​of that position on the entire time axis are extracted. These modulus residual values ​​are then summed in chronological order, that is, the values ​​at each moment are added one by one, and finally a sum value is obtained, which is called the integral energy of that pixel position. The same summation operation is performed on all pixel positions to obtain an integral energy map covering all pixel positions.

[0030] The integrated energy value at each pixel position in the integrated energy map is refilled into the corresponding cell of a blank two-dimensional grid based on the row and column coordinates of that pixel in the original image. The size of this grid is exactly the same as that of the original infrared image. In this way, the dispersed integrated energy values ​​are combined into a continuous energy distribution field, that is, the micro-motion energy field of the infrared image sequence.

[0031] For the values ​​at each time point in the modulus residual sequence, an exponential weighting coefficient is applied. This weighting coefficient decays exponentially as time moves away from the current time. Specifically, a decay constant is selected, and for the modulus residual value at time i, it is multiplied by the negative power of the natural constant to obtain the weighted value. This multiplication is repeated for all time points to generate a new sequence, namely the weighted residual sequence.

[0032] Using the weighted residual sequence as input data, a fixed-length time window is set for each pixel position. This window contains the weighted residual values ​​of several consecutive time points. All weighted residual values ​​in the window are summed to obtain the window cumulative sum. Then, the window is slid forward by one time point, and the summation operation is repeated. This process is repeated throughout the entire time axis to obtain a series of window cumulative sums. These cumulative sums are arranged in chronological order to form the window cumulative sum sequence.

[0033] For each cumulative sum in the cumulative sum sequence within the window, an amplitude calibration operation is performed. That is, the maximum cumulative sum in the sequence is found as the benchmark value, and each cumulative sum is divided by this benchmark value so that all results are constrained to the interval between zero and one. Alternatively, a preset fixed benchmark value is used for division, and each quotient value obtained is the calibration value of the window. All calibration values ​​constitute the calibration value sequence.

[0034] Using the calibrated quantitative sequence as input and a Gaussian function as the smoothing kernel, a convolution operation is performed on the calibrated quantitative sequence at each pixel position. That is, for each time point in the sequence, the calibrated quantitative values ​​in a certain neighborhood before and after that point are taken, and the weights calculated by the Gaussian function are used to perform a weighted average. The weighted average result is used as the new value after smoothing at that point. All time points are processed in sequence to obtain a smooth sequence, which is the integral energy of the modulus residual.

[0035] The beneficial effects are that by extracting the inter-frame grayscale difference and modulus residual, combined with time-domain integration and weighted smoothing, weak leakage energy can be effectively accumulated; and then a micro-motion energy field is constructed by reconstructing it point by point, which enhances the recognizability of leakage signals in low-contrast scenes and improves the stability and positioning accuracy of gas leakage detection.

[0036] S2. Perform turbulent extraction on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field; In this embodiment of the invention, the step of performing turbulent extraction on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field specifically includes: The micro-motion energy field is divided into blocks and windowed to obtain local time windows of the micro-motion energy field; The local time window block is deconstructed by energy fluctuation to obtain the fluctuation components of the local time window block; The fluctuation components are subjected to sparsity discrimination to obtain the intermittent characteristics of the fluctuation components; The fluctuation component is decomposed into multiple scales to obtain the scaling exponent of the fluctuation component. Based on the intermittent characteristics and the scaling index, eddy separation is performed on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field.

[0037] The step of performing energy fluctuation deconstruction on the local time window block to obtain the fluctuation components of the local time window block specifically includes: The energy ratio within the local time window is used as the energy probability of the local time window. Integrating the energy probability by entropy value yields the energy entropy value of the local time window block; The gradient mode field of the local time window is obtained by deconstructing the energy value within the local time window by slope. Based on the energy entropy value and the gradient mode field, the intermittency factor of the energy distribution of the local time window is solved to obtain the intermittency factor of the local time window. The intermittency factor is calculated using the following formula: ; In the formula, For the intermittent factor, For pixel index, The energy probability of the first Energy percentage per pixel For natural logarithm operations, It is a natural constant. For the gradient mode field, the first Gradient magnitude of 1 pixel, The standard deviation of the energy value within the local time window is given. The total number of pixels in the local time window block; Multiply the original energy value of each pixel within the local time window by the intermittency factor to obtain the fluctuation component of the local time window.

[0038] The micro-motion energy field is divided into blocks and windows. The entire two-dimensional energy field is divided into multiple adjacent rectangular sub-regions according to the preset window size. Each sub-region is called a local time window block. The window slides sequentially in the horizontal and vertical directions to traverse the entire energy field. Each slide extracts a local time window block. The set of all local time window blocks covers the entire spatial range of the original micro-motion energy field.

[0039] Energy fluctuation deconstruction is performed on the energy values ​​stored within each local time window block. First, the sum of the energy values ​​of all pixels within the time window block is calculated. Then, the energy value of each pixel is divided by this sum to obtain the energy ratio of each pixel. This ratio reflects the share of the pixel's energy in the total energy of the entire time window block. The energy ratios of all pixels are arranged according to their spatial positions to form an energy probability distribution.

[0040] The entropy integral of the energy probability distribution is calculated by multiplying the energy probability value of each pixel by the natural logarithm of that probability value, summing the products of all pixels, and then taking the negative value. This result is called the energy entropy value. The energy entropy value reflects the degree of disorder in the energy distribution within a local time window. The more uniform the energy distribution, the larger the entropy value; the higher the energy concentration, the smaller the entropy value.

[0041] The energy values ​​within the local time window are deconstructed by slope. For each pixel, the difference between the energy value of its right neighboring pixel and the energy value of the pixel itself is calculated. At the same time, the difference between the energy value of its lower neighboring pixel and the energy value of the pixel itself is calculated. These two differences are used as the rate of change of the pixel in the horizontal and vertical directions. Then, the square root of the sum of the squares of these two rates of change is calculated to obtain the gradient magnitude of the pixel. After traversing all pixels, the gradient magnitude field is obtained.

[0042] The intermittency factor is calculated based on the energy entropy and gradient modulus. The data in the intermittency factor calculation formula originate from the following processes: the energy probability is obtained by dividing the energy value of each pixel within the local time window by the total energy of the time window; the gradient modulus is calculated by the energy difference between each pixel and its neighboring pixels; the standard deviation is obtained by averaging the energy values ​​of all pixels within the local time window and then calculating the degree of dispersion; the negative exponential function value of the squared gradient modulus of each pixel divided by the squared standard deviation reflects the relative relationship between the pixel's energy mutation and the overall fluctuation level; the energy probability multiplied by the negative natural logarithm of that probability reflects the information contribution of that pixel to the total energy; and all these quantities are combined by multiplying them pixel-by-pixel and then summing them.

[0043] The calculation of the intermittency factor has a clear physical meaning. This factor couples the statistical uncertainty of energy distribution with the spatial energy mutation rate. The entropy term in the first part measures the uniformity of energy among pixels, and the gradient term in the second part measures the degree of drastic change of energy in space. The two terms are multiplied and then summed so that pixels with both high information content and high energy mutation rate contribute the most to the final factor, thus quantitatively characterizing the strength of the intermittency of energy distribution within a local time window. The stronger the intermittency, the more sparse and sudden turbulent spike signals are present.

[0044] The intermittency factor exhibits a regular variation trend depending on the scenario. When the energy distribution within a local time window is uniform and without drastic changes, the energy probability of each pixel is similar, the entropy value is large, but the gradient magnitude of each pixel is very small, and the second term is close to zero. Therefore, the intermittency factor obtained by summing the products tends to be close to zero. When a few pixels have extremely high energy and the surrounding energy changes drastically, the energy probability of these pixels is very low, but the natural logarithm value is very large. At the same time, the gradient magnitude is large, making the second term close to one, and the product term is significantly greater than zero. The product of other pixels is close to zero, and the summation yields a large positive value. The larger the factor value, the stronger the turbulence intermittency and the more significant the leakage signal.

[0045] The original energy value of each pixel within the local time window is multiplied by the intermittency factor corresponding to that pixel. That is, the original energy value is multiplied by the intermittency factor to obtain the modulated energy value of that pixel. After performing the same multiplication operation on all pixels, the modulated energy values ​​are rearranged according to the original spatial coordinates to form a new two-dimensional data array. This array is the fluctuation component of the local time window.

[0046] Sparsity discrimination is performed on the fluctuation component. The number of pixels with energy values ​​significantly higher than the background mean in the fluctuation component is counted. The proportion of these high-energy pixels to the total number of pixels is calculated. If the proportion is lower than a preset threshold, the fluctuation component is determined to be sparse, and its corresponding intermittent feature is marked as high intermittent; otherwise, it is marked as low intermittent.

[0047] The fluctuation component is decomposed into multiple scales, and spatial filtering kernels of different sizes are used to perform hierarchical filtering on the fluctuation component. Each layer of filtering obtains the energy distribution at that scale, and the changing trend of the energy distribution at different scales is calculated. The slope value is obtained by linear fitting under logarithmic coordinates. This slope value is the scaling index, which reflects the self-similarity characteristics of the fluctuation component at different spatial scales.

[0048] Eddy separation is performed based on intermittent characteristics and scaling exponents. When the intermittent characteristics are marked as highly intermittent and the scaling exponent is in the typical range of turbulence, the local time window is determined to belong to the turbulent eddy region. The wave components in this region are retained and merged into the corresponding positions of the micro-motion energy field according to their spatial location. Finally, all energy components that are determined to be turbulent eddy regions are extracted from the micro-motion energy field. The set of these energy components is the turbulent eddy component.

[0049] The beneficial effects are that by dividing the micro-motion energy field into blocks and deconstructing the energy fluctuations, the energy probability, entropy value and gradient mode field are extracted, and the intermittency factor is calculated to achieve a quantitative characterization of turbulent energy; then, by obtaining the scaling index through sparse discrimination and multi-scale decomposition, the turbulent eddy component is accurately separated, which significantly improves the ability to identify intermittent weak leakage signals.

[0050] S3. Perform phase-preserving mapping on the turbulent eddy component to obtain the diffusion trace of the turbulent eddy component; In this embodiment of the invention, the step of performing phase-preserving mapping on the turbulent eddy component to obtain the diffusion trace of the turbulent eddy component specifically includes: Phase spectrum extraction is performed on the turbulent eddy component to obtain the original phase angle of the turbulent eddy component; The original phase angle is flattened to obtain the continuous phase field of the original phase angle; Based on the continuous phase field, the amplitude distribution of the turbulent eddy component is back-projected with phase preservation to obtain a spatial mapping of the turbulent eddy component; Extreme value tracing is performed on the spatial mapping to obtain the diffusion trace of the spatial mapping.

[0051] The step of performing extreme value tracing on the spatial mapping map to obtain the diffusion trace of the spatial mapping map specifically includes: The spatial mapping graph is subjected to directional filtering to obtain the main directional component of the spatial mapping graph; Based on the main current component, the gaps in the spatial mapping are bridged and filled to obtain the continuous main current trace of the spatial mapping. Curvature fitting is performed on the continuous mainstream trace to obtain the diffusion trace of the spatial mapping map.

[0052] Phase spectrum extraction is performed on the turbulent eddy components, treating them as a two-dimensional complex array. Each complex number consists of a real part and an imaginary part. The real part corresponds to the cosine component of the original energy value, and the imaginary part corresponds to the sine component. The phase angle of each pixel is obtained by calculating the principal argument of the complex number at each pixel position, i.e., dividing the imaginary part by the real part and taking the arctangent function value. The phase angles of all pixels are arranged according to spatial coordinates to form the original phase angle distribution map.

[0053] The original phase angle distribution map is flattened to prevent phase jumps. Directly calculated phase angles are limited to the principal value range from negative π to positive π, and the actual phase difference between adjacent pixels may exceed π, causing discontinuities in the phase value. A phase unwinding method is used, scanning the image line by line. When the absolute value of the phase difference between adjacent pixels exceeds π, the phase value of the next pixel is increased or decreased by twice π, ensuring continuous phase variation along the spatial path. After traversing the entire image, a continuous phase field is obtained.

[0054] Phase-preserving backprojection is performed on the amplitude distribution of turbulent eddy components based on a continuous phase field. The amplitude value of each pixel is extracted from the turbulent eddy components, which is the square root of the sum of the squares of the real and imaginary parts of the complex number, resulting in an amplitude distribution map. Then, the amplitude value of each pixel is back-projected according to the direction information provided by the continuous phase field. Specifically, the amplitude value is back-projected back to the original spatial coordinates along the phase gradient direction, forming a new two-dimensional data array, which is called a spatial mapping map.

[0055] Extreme value tracking is performed on the spatial map. Each pixel in the spatial map is traversed, and its value is compared with the values ​​of all pixels in its eight neighboring regions. If the pixel's value is greater than the values ​​of all its neighboring pixels, it is marked as a local extreme point. All marked extreme points are connected according to spatial distance. Starting from the extreme point with the largest value, the nearest and continuously connected extreme points are connected sequentially to form a series of curve segments. The trajectory formed by these curve segments is the diffusion trace of the spatial map.

[0056] Directional filtering is performed on the spatial map. The local gradient direction at each pixel location in the spatial map is calculated, i.e., the partial derivatives in the horizontal and vertical directions are calculated using the Sobel operator, and then the arctangent of the partial derivatives is solved to obtain the direction angle. The distribution of direction angles of all pixels in the entire image is statistically analyzed, and the direction angle with the highest frequency is identified as the mainstream direction. Pixels whose direction angles exceed a preset threshold with respect to the mainstream direction are set to zero, while the remaining pixels retain their original values, thus obtaining the mainstream direction component image.

[0057] The blank gaps in the spatial mapping map are bridged and filled based on the mainstream component. In the mainstream component image, the scan is performed line by line along the mainstream direction. When a gap is detected between two curve segments and the gap distance is less than the preset length, the endpoints of the two curve segments are connected by a straight line segment. When connecting, the direction of the straight line is kept consistent with the mainstream direction. For small break points between curve segments, eight-neighborhood connectivity is used to fill the isolated points into the neighboring curves, so as to obtain a continuous and unbroken mainstream trace.

[0058] Curvature fitting is performed on continuous mainstream traces. Along each mainstream trace, the curvature value at each point on the trace is calculated, which is the rate of change of the trace direction angle. Specifically, three consecutive points are taken to form an arc, and the arc length is divided by the radius to obtain the curvature. When the curvature exceeds a preset threshold, the point and its neighborhood are smoothed. The trajectory points are re-interpolated using a cubic spline function to make the curvature change of the entire trace uniform, ultimately obtaining a smooth curve. The set of these curves constitutes the diffusion trace of the spatial mapping map.

[0059] The beneficial effects are that by extracting the phase spectrum and flattening the phase of the turbulent eddy component, a continuous phase field is obtained and the phase is preserved by back-projection, thus constructing a spatial mapping map that retains structural information; then, through extreme value tracking, direction filtering and bridging filling, a continuous mainstream trace is formed, and finally, a smooth diffusion trace is obtained by curvature fitting, which effectively improves the continuity and positioning accuracy of the leakage diffusion path.

[0060] S4. Based on the diffusion trace, the first grayscale image of the infrared image sequence is cropped to obtain a candidate region map of the first grayscale image. In this embodiment of the invention, the step of cropping the boundary of the first grayscale image of the infrared image sequence based on the diffusion trace to obtain a candidate region map of the first grayscale image specifically includes: The bounding box of the diffusion trace is obtained by fitting an outer frame to the diffusion trace. Linear compression is performed on the first frame grayscale image to obtain the reduced grayscale image of the first frame grayscale image; Based on the bounding box, the pixels within the bounding box of the reduced grayscale image are region-fixed to obtain the reserved area of ​​the reduced grayscale image; The pixels outside the frame of the reserved area are subjected to outer domain hidden removal to obtain the candidate region map of the first frame grayscale image.

[0061] To fit the bounding box of the diffusion trace, iterate through the coordinates of all pixels on the diffusion trace and find the minimum and maximum values ​​of the horizontal and vertical coordinates. Using these four extreme values ​​as boundaries, construct a rectangular frame enclosed by the left vertical line, the right vertical line, the upper horizontal line, and the lower horizontal line. This rectangular frame exactly encloses the entire diffusion trace, and this rectangular frame is the bounding box of the diffusion trace.

[0062] Linear compression is performed on the first grayscale image. The grayscale value of each pixel in the first grayscale image is traversed, and the minimum and maximum values ​​of all grayscale values ​​are found. Then, the minimum value is subtracted from the grayscale value of each pixel, and this difference is divided by the difference between the maximum and minimum values ​​to obtain a coefficient between zero and one. This coefficient is multiplied by the maximum value that grayscale value can represent and then rounded to obtain the compressed grayscale value. The image obtained after performing the operation point by point is the reduced grayscale image.

[0063] Region fixation is performed on pixels within the bounding box of the reduced grayscale image. A rectangular region is determined based on the four boundary coordinates of the bounding box. Each pixel in the reduced grayscale image is traversed, and it is determined whether the coordinates of the pixel fall within the rectangular region determined by the bounding box. If it falls within the region, the original grayscale value of the pixel is retained unchanged. If it falls outside the region, the grayscale value of the pixel is temporarily marked as pending processing. After the traversal is completed, the original grayscale values ​​of all pixels within the bounding box remain unchanged. The set of these pixels is called the reserved region of the reduced grayscale image.

[0064] For pixels outside the bounding box in the reserved area, perform outer domain culling. Then, iterate through each pixel in the reduced grayscale image again. For pixels previously marked as unprocessed (i.e., pixels whose coordinates fall outside the bounding box), set their grayscale value directly to zero. For pixels within the reserved area, keep their grayscale value unchanged. After all pixels outside the bounding box are set to zero, only the area inside the bounding box retains the original grayscale information in the reduced grayscale image, while the area outside the bounding box becomes black. The resulting image is the candidate region map of the first grayscale image.

[0065] The beneficial effects are that by fitting the outer frame of the diffusion trace, the bounding box of the leakage area can be accurately obtained. Then, the gray dimension of the image is unified by linear compression, the pixels within the box are fixed and the interference of the outer domain is eliminated, effectively removing non-target background information, significantly improving the signal-to-noise ratio of the candidate region map and the computational efficiency of subsequent morphological measurement.

[0066] S5. Perform morphological measurement on the candidate region map to obtain the contour parameters of the candidate region map; In this embodiment of the invention, the step of performing morphological measurement on the candidate region map to obtain the contour parameters of the candidate region map specifically includes: The candidate region image is segmented using a grayscale threshold to obtain a foreground binary image of the candidate region image; Edge tracing is performed on the foreground binary image to obtain the edge pixel string of the foreground binary image; Based on the edge pixel string, boundary measurements are performed on the outer edge of the foreground binary image to obtain the contour geometry of the edge pixel string; The contour geometry is aggregated to obtain the contour parameters of the candidate region map.

[0067] The candidate region image is segmented using grayscale thresholding. The grayscale value of each pixel in the candidate region image is traversed and compared with a pre-set threshold value. If the grayscale value is greater than the threshold, the pixel is identified as a foreground target point and its pixel value is set to the maximum value. If the grayscale value is less than or equal to the threshold, it is identified as a background point and its pixel value is set to zero. After completing the comparison and assignment point by point, a binary image containing only a black background and a white foreground target is obtained, which is the foreground binary image.

[0068] Edge tracing is performed on the foreground binary image. Starting from the top left corner of the foreground binary image, the image is scanned line by line. When the first white foreground pixel is encountered, it is used as the starting point for edge tracing. Then, the search for the next white pixel is performed in a clockwise direction according to the eight neighbors. Each new pixel found is recorded and moved to that pixel. The search continues in the same direction and rules until the starting point is returned or no new pixel can be found. All the recorded white pixels are connected into a pixel chain according to the search order. This pixel chain is the edge pixel string of the foreground binary image.

[0069] Boundary measurement is performed on the outer edge of the foreground binary image based on the edge pixel string. Along the trajectory of the edge pixel string, the number of all pixels on the trajectory is counted. The number of pixels is multiplied by the actual physical length represented by each pixel to obtain the perimeter value of the outer edge. At the same time, the total number of pixels contained in the region enclosed by the edge pixel string is calculated using the polygon area formula. The total number of pixels is multiplied by the actual physical area represented by each pixel to obtain the area value of the outer edge. These two values ​​are collectively referred to as the contour geometry.

[0070] The parameters of the contour geometry are aggregated, and the perimeter and area values ​​are arranged into an ordered data pair in a preset order. According to the actual detection requirements, the ratio of perimeter to area or the ratio of the square of perimeter to area can be further calculated. These derived parameters are combined with the original perimeter and area into a multi-dimensional vector, which is the contour parameter of the candidate area map, and is used for subsequent leakage level quantification.

[0071] The beneficial effect is that by performing grayscale threshold segmentation on the candidate region map to obtain the foreground binary map, and then obtaining the accurate edge pixel string through edge tracing, the perimeter and area boundary measurement of the outer edge is performed. Finally, the contour parameters are formed through parameter aggregation, which significantly improves the quantization accuracy and stability of the morphological features of the leakage region and provides a reliable basis for hierarchical quantization.

[0072] S6. The contour parameters are quantified to obtain the leakage results of the gas in the substation.

[0073] In this embodiment of the invention, the step of performing graded quantization on the contour parameters to obtain the leakage result of the substation gas specifically includes: Obtain the maximum and minimum values ​​of the contour parameters; Based on the maximum and minimum values, the contour parameters are normalized by range to obtain the reduced values ​​of the contour parameters; Based on the normative value, the magnitude range of the contour parameters is matched and divided to obtain the membership level of the normative value; By performing a degree mapping on the membership level, the leakage results of the gas in the substation are obtained.

[0074] Obtain the maximum and minimum values ​​of the contour parameters. Iterate through each value in the contour parameter vector, using the first value as the initial value for both the current maximum and minimum values. Then, compare each subsequent value with the current maximum value. If the value is greater than the current maximum value, update it to the new maximum value. Simultaneously, compare it with the current minimum value. If the value is less than the current minimum value, update it to the new minimum value. After iterating through all the values, record the final maximum and minimum values.

[0075] Range normalization is performed on the contour parameters based on the maximum and minimum values. The minimum value is subtracted from each original value of the contour parameters to obtain the difference between the original value and the minimum value. This difference is then divided by the difference between the maximum and minimum values. The quotient of this division is the normalized value of the original value. After this calculation, the minimum value of the original contour parameters is mapped to zero, the maximum value is mapped to one, and the remaining values ​​are uniformly mapped to the interval between zero and one. All the normalized values ​​together constitute the set of normalized values ​​of the contour parameters.

[0076] Based on the reduction values, the magnitude range of the profile parameters is matched and divided. The zero-to-one range is pre-divided into multiple continuous level sub-ranges. Each sub-range corresponds to a membership level. The boundary values ​​of the sub-ranges are set according to the actual application requirements. For example, different leakage degree ranges such as slight, moderate, and severe are divided. For each reduction value, it is determined which level sub-range it falls into. The level corresponding to the sub-range is taken as the membership level of the reduction value. After processing all reduction values ​​one by one, the membership level corresponding to each profile parameter is obtained.

[0077] A degree mapping is performed on the membership levels to establish a mapping table between membership levels and specific leakage degree descriptions. Each membership level in the table corresponds to a specific textual description or degree code of leakage degree. For example, level 1 corresponds to minor leakage, level 2 corresponds to moderate leakage, level 3 corresponds to severe leakage, etc. Based on the membership level of each profile parameter, the corresponding leakage degree description is found from the mapping table. The degree descriptions of all profile parameters are summarized and output to obtain the final leakage result of the substation gas.

[0078] The beneficial effects are that by normalizing the range of the profile parameters, the dimensional differences between different leakage samples are eliminated, and the parameters are standardized. Then, through the division of magnitude intervals and degree mapping, continuous values ​​are transformed into discrete leakage levels and readable result descriptions, providing a reliable basis for the quantitative assessment and graded early warning of gas leakage in substations.

[0079] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0080] This application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0081] 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 it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A substation gas leak detection method based on target detection, characterized in that, The method includes: S1. Perform frame difference accumulation on the infrared image sequence of the substation gas to obtain the micro-motion energy field of the infrared image sequence; S2. Perform turbulent extraction on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field; S3. Perform phase-preserving mapping on the turbulent eddy component to obtain the diffusion trace of the turbulent eddy component; S4. Based on the diffusion trace, the first grayscale image of the infrared image sequence is cropped to obtain a candidate region map of the first grayscale image. S5. Perform morphological measurement on the candidate region map to obtain the contour parameters of the candidate region map; S6. The contour parameters are quantified to obtain the leakage results of the gas in the substation.

2. The substation gas leak detection method based on target detection as described in claim 1, characterized in that, The step of performing frame difference accumulation on the infrared image sequence of the substation gas to obtain the micro-motion energy field of the infrared image sequence specifically includes: Obtain the inter-frame difference map of the infrared image sequence; The modulus residual of the inter-frame difference map is obtained by taking the norm of the inter-frame difference map. Based on the modulus residual, the time-domain sequence of the infrared image sequence is integrated in the time domain to obtain the integrated energy of the modulus residual; The integrated energy is recombined point by point to obtain the micro-motion energy field of the infrared image sequence.

3. The substation gas leak detection method based on target detection as described in claim 2, characterized in that, The step of integrating the modulus residual in the time domain to obtain the integrated energy of the modulus residual specifically includes: The modulus residual is exponentially weighted to obtain the weighted residual of the modulus residual; Based on the weighted residuals, the temporal sequence of the infrared image sequence is integrated regionally to obtain the in-window sum of the weighted residuals; The amplitude of the sum within the window is calibrated to obtain the calibration value of the sum within the window; Based on the calibration value, the time-domain sequence of the infrared image sequence is Gaussian smoothed to obtain the integral energy of the modulus residual.

4. The substation gas leak detection method based on target detection as described in claim 1, characterized in that, The step of performing turbulent extraction on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field specifically includes: The micro-motion energy field is divided into blocks and windowed to obtain local time windows of the micro-motion energy field; The local time window block is deconstructed by energy fluctuation to obtain the fluctuation components of the local time window block; The fluctuation components are subjected to sparsity discrimination to obtain the intermittent characteristics of the fluctuation components; The fluctuation component is decomposed into multiple scales to obtain the scaling exponent of the fluctuation component. Based on the intermittent characteristics and the scaling index, eddy separation is performed on the micro-motion energy field to obtain the turbulent eddy component of the micro-motion energy field.

5. The substation gas leak detection method based on target detection as described in claim 4, characterized in that, The step of performing energy fluctuation deconstruction on the local time window block to obtain the fluctuation components of the local time window block specifically includes: The energy ratio within the local time window is used as the energy probability of the local time window. Integrating the energy probability by entropy value yields the energy entropy value of the local time window block; The gradient mode field of the local time window is obtained by deconstructing the energy value within the local time window by slope. Based on the energy entropy value and the gradient mode field, the intermittency factor of the energy distribution of the local time window is solved to obtain the intermittency factor of the local time window. The intermittency factor is calculated using the following formula: ; In the formula, For the intermittent factor, For pixel index, The energy probability of the first Energy percentage per pixel For natural logarithm operations, It is a natural constant. For the gradient mode field, the first Gradient magnitude of 1 pixel, The standard deviation of the energy value within the local time window is given. The total number of pixels in the local time window block; Multiply the original energy value of each pixel within the local time window by the intermittency factor to obtain the fluctuation component of the local time window.

6. The substation gas leak detection method based on target detection as described in claim 1, characterized in that, The step of performing phase-preserving mapping on the turbulent eddy component to obtain the diffusion trace of the turbulent eddy component specifically includes: Phase spectrum extraction is performed on the turbulent eddy component to obtain the original phase angle of the turbulent eddy component; The original phase angle is flattened to obtain the continuous phase field of the original phase angle; Based on the continuous phase field, the amplitude distribution of the turbulent eddy component is back-projected with phase preservation to obtain a spatial mapping of the turbulent eddy component; Extreme value tracing is performed on the spatial mapping to obtain the diffusion trace of the spatial mapping.

7. The substation gas leak detection method based on target detection as described in claim 6, characterized in that, The step of performing extreme value tracing on the spatial mapping map to obtain the diffusion trace of the spatial mapping map specifically includes: The spatial mapping graph is subjected to directional filtering to obtain the main directional component of the spatial mapping graph; Based on the main current component, the gaps in the spatial mapping are bridged and filled to obtain the continuous main current trace of the spatial mapping. Curvature fitting is performed on the continuous mainstream trace to obtain the diffusion trace of the spatial mapping map.

8. The substation gas leak detection method based on target detection as described in claim 1, characterized in that, The step of cropping the first grayscale image of the infrared image sequence based on the diffusion trace to obtain a candidate region map of the first grayscale image specifically includes: The bounding box of the diffusion trace is obtained by fitting an outer frame to the diffusion trace. Linear compression is performed on the first frame grayscale image to obtain the reduced grayscale image of the first frame grayscale image; Based on the bounding box, the pixels within the bounding box of the reduced grayscale image are region-fixed to obtain the reserved area of ​​the reduced grayscale image; The pixels outside the frame of the reserved area are subjected to outer domain hidden removal to obtain the candidate region map of the first frame grayscale image.

9. The substation gas leak detection method based on target detection as described in claim 1, characterized in that, The step of performing morphological measurement on the candidate region map to obtain the contour parameters of the candidate region map specifically includes: The candidate region image is segmented using a grayscale threshold to obtain a foreground binary image of the candidate region image; Edge tracing is performed on the foreground binary image to obtain the edge pixel string of the foreground binary image; Based on the edge pixel string, boundary measurements are performed on the outer edge of the foreground binary image to obtain the contour geometry of the edge pixel string; The contour geometry is aggregated to obtain the contour parameters of the candidate region map.

10. The substation gas leak detection method based on target detection as described in claim 1, characterized in that, The step of quantifying the contour parameters to obtain the leakage results of the substation gas specifically includes: Obtain the maximum and minimum values ​​of the contour parameters; Based on the maximum and minimum values, the contour parameters are normalized by range to obtain the reduced values ​​of the contour parameters; Based on the normative value, the magnitude range of the contour parameters is matched and divided to obtain the membership level of the normative value; By performing a degree mapping on the membership level, the leakage results of the gas in the substation are obtained.