Infrared image noise reduction method and system for gas leakage detection

By employing three-dimensional collaborative filtering and region-adaptive contrast stretching, the problem of fragmented infrared image noise reduction and target region segmentation was solved, enabling efficient and accurate location of gas leak detection.

CN121504759AActive Publication Date: 2026-02-10STATE GRID SHANXI ELECTRIC POWER COMPANY TAIYUAN POWER SUPPLY COMPANY +1
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202610031059.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-02-10
Estimated Expiration
2046-01-12

AI Technical Summary

Technical Problem

Existing infrared image denoising methods are disconnected from the target region segmentation process, making it difficult to effectively preserve and enhance the feature details of the gas leak area while suppressing noise, thus affecting the accuracy of gas leak detection.

Method used

A three-dimensional collaborative filtering technique is used to divide the infrared image into multiple overlapping image blocks. Noise is removed through three-dimensional transformation and filtering. Weighted average aggregation is performed based on similar region division, and regional adaptive contrast stretching is combined to enhance the feature contrast between the gas leak area and the background.

Benefits of technology

While removing noise, it better preserves the detailed structure and edge information of the gas leak area, improves the contrast between the gas leak area and the background, and ensures accurate location of the leak in the future.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504759A_ABST
    Figure CN121504759A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of gas leakage detection, and discloses an infrared image noise reduction method and system for gas leakage detection, and the method comprises the steps: obtaining an original infrared image containing noise; dividing an image into overlapped image blocks, searching similar blocks and combining the similar blocks into a three-dimensional image block group; performing three-dimensional transformation on each three-dimensional group, performing inverse transformation back to a spatial domain after filtering and noise suppression in a transformation domain, generating a preliminary noise reduction image through weighted average, marking image blocks in the same group as the same similar region, and forming initial region division; and based on the division, independently carrying out contrast stretching on each similar region to enhance the contrast between the gas leakage region and the background so as to determine the leakage position. According to the method, noise reduction and region division are organically fused, the target feature contrast is remarkably improved through region adaptive enhancement while the noise is efficiently suppressed, and a high-quality image basis is provided for subsequent accurate positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas leak detection technology, and in particular to an infrared image noise reduction method and system for gas leak detection. Background Technology

[0002] In the field of power equipment safety monitoring, sulfur hexafluoride (SF6) is widely used in high-voltage power equipment such as gas-insulated switchgear, circuit breakers, and disconnectors due to its excellent electrical insulation and arc-extinguishing properties. However, its leakage poses a serious threat to equipment safety and the environment. In the detection of gas leaks, infrared imaging technology plays a crucial role because it can visualize gas leaks non-contactly. By capturing the difference in thermal radiation between the gas and the background environment, infrared cameras can present colorless and odorless leaked gas as "smoke" in the monitoring screen, greatly improving the efficiency and safety of inspections. However, the signal-to-noise ratio of infrared images in practical applications is generally low. Its inherent noise, non-uniform response, and complex environmental interference severely blur the boundary between the leaked gas and the background, making it difficult to accurately identify weak leak signals and directly affecting the reliability of early warning.

[0003] Existing technologies typically employ classic image filtering algorithms, such as Gaussian filtering or median filtering, to address noise issues. While these methods can smooth noise, they often inevitably blur the texture and edge details of the image. For gas leak detection, the edge features of the leak area are crucial for distinguishing it from the background. Losing these details leads to incomplete shapes and blurred boundaries in the leaking gas cloud, potentially causing missed or false detections in subsequent image segmentation steps. More critically, traditional denoising and subsequent target segmentation are usually two independent steps; the denoising module does not provide any auxiliary information to the segmentation module to help distinguish between the "target" and the "background." This disconnect in the processing flow limits further improvements in the overall system performance. Summary of the Invention

[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defect that the infrared image denoising process and the target region segmentation process are separated in the prior art, which makes it difficult to effectively preserve and enhance the feature details of the gas leak area while suppressing noise. The present invention provides an infrared image denoising method for gas leak detection that can organically integrate denoising and preliminary region segmentation. On the basis of efficiently suppressing image noise, it significantly improves the feature contrast between the gas leak area and the background through a region-adaptive enhancement strategy, thereby providing a high-quality, high-contrast image foundation for subsequent accurate location of the leak.

[0005] To address the aforementioned technical problems, this invention provides an infrared image noise reduction method for gas leak detection, comprising the following steps: Acquire raw infrared images to capture potential thermal radiation differences in gas leaks, resulting in initial image data containing noise; The original infrared image is divided into multiple overlapping image blocks. Similar region blocks are searched, and all similar image blocks are combined into a three-dimensional image block group to obtain multiple three-dimensional image block groups. A three-dimensional transformation is performed on each group of three-dimensional image blocks to obtain transform domain coefficients. The transform domain coefficients are then filtered to suppress noise in the initial image data. A three-dimensional inverse transform is performed on the filtered transform domain coefficients to obtain a denoised three-dimensional image patch group. Each image patch in the denoised three-dimensional image patch group is returned to its original image position. By weighted averaging and aggregating all image patches, a preliminary denoised image is generated. Among them, image patches belonging to the same three-dimensional image patch group are marked as the same similar region. The set of all similar regions constitutes the initial region division of the preliminary denoised image. Based on the initial region division, for each similar region, a contrast stretching transformation is performed independently according to the grayscale distribution of its internal pixels to enhance the feature contrast between the gas leak area and the background area and determine the gas leak location.

[0006] In one embodiment of the present invention, the search for similar region blocks includes the following steps: Taking one of the current image patches as the core, calculate the feature vector distance between all candidate image patches and the current image patch within its preset search neighborhood; Based on the feature vector distance, the candidate image patch is divided into multiple temporary clusters through dynamic clustering; Select all candidate image blocks that belong to the same temporary cluster as the current image block and determine them as similar region blocks; The feature vector is composed of the gray-level statistical features and spatial gradient features of the image patch.

[0007] In one embodiment of the present invention, combining all similar image patches into a three-dimensional image patch group includes: The current image block to be processed is established as the reference block. Among all similar blocks found, spatial offset compensation is performed on each similar block with the spatial coordinates of the reference block as a reference, to ensure that all blocks are geometrically aligned in the same local coordinate system. For each image block that has been geometrically aligned, including the reference block, the gray values ​​within the block are linearly normalized independently to eliminate the overall brightness deviation caused by local illumination or temperature differences, so that all blocks are at the same intensity level. Each M×N pixel two-dimensional image block, after alignment and normalization, is considered an independent two-dimensional plane. These two-dimensional planes are stacked along a third spatial dimension perpendicular to their respective planes. The stacking order of each stacked plane is determined by its similarity to the reference block. Finally, a three-dimensional data cube of size M×N×K is formed, where K is the total number of stacked image blocks. This cube is the three-dimensional image block group.

[0008] In one embodiment of the present invention, a three-dimensional transformation is performed on each group of three-dimensional image blocks to obtain transform domain coefficients, including: A transformation sequence consisting of three one-dimensional orthogonal transformation bases is predefined, which correspond to the height, width, and depth dimensions of the three-dimensional data cube, respectively. Along the height direction of the three-dimensional data cube, a first one-dimensional orthogonal transformation is independently applied to each row of pixel sequence to convert the pixel values ​​into spectral coefficients of that dimension; Along the width direction of the three-dimensional data cube, a second one-dimensional orthogonal transformation is independently applied to each column of pixel sequence to convert the pixel values ​​into spectral coefficients of that dimension; Along the depth direction of the three-dimensional data cube, i.e. the stacking direction of the image blocks, a third one-dimensional orthogonal transformation is independently applied to each spectral coefficient sequence obtained after the first two-dimensional transformation, converting each element in the three-dimensional data cube from a spatial pixel value into a three-dimensional transform domain coefficient.

[0009] In one embodiment of the present invention, when filtering the transform domain coefficients, the similarity of each image block in the three-dimensional image block group is sorted, and the intensity of the filtering operation is dynamically adjusted according to the similarity of each image block in the three-dimensional image block group; a stronger filtering intensity is used for three-dimensional image block groups with high similarity, and a weaker filtering intensity is used for three-dimensional image block groups with low similarity.

[0010] In one embodiment of the present invention, sorting the similarity of image blocks within a three-dimensional image block group includes: For each group of 3D image blocks, a reference image block is generated by calculating the median gray value of all image blocks in the group at each pixel position; Calculate the pixel-level absolute difference between each image block in the group and the reference image block, and sum all pixel difference values ​​of each image block to obtain the cumulative difference of each image block relative to the reference block. The cumulative difference of all image blocks constitutes a difference matrix. The cumulative differences in the difference matrix are arranged in ascending order of value. The lower the value, the more similar it is to the reference block. Based on this arrangement, a similarity ranking sequence of each image block in the three-dimensional image block group is generated.

[0011] In one embodiment of the present invention, a weighted average aggregation of all image blocks is performed to generate a preliminary denoised image, including: For each image block processed by the inverse 3D transformation, assign a weight value determined based on its reconstruction quality; Based on the weight values, all pixel values ​​in each image block are weighted to obtain a series of weighted image blocks; All weighted image blocks are superimposed and fused according to their original image positions, and the values ​​of each pixel position in the fused image are normalized based on the total weight to generate the preliminary denoised image.

[0012] In one embodiment of the present invention, the reconstruction quality is evaluated by calculating the proportion of core energy retained by the image patch in the transform domain before and after filtering. The higher the proportion of core energy, the greater the weight assigned.

[0013] In one embodiment of the present invention, a contrast stretching transformation is performed independently based on the grayscale distribution of its internal pixels, including: Identify the main range of grayscale distribution in the similar regions; The main body range is linearly mapped to all or most of the preset output grayscale range, while discrete noise pixels distributed outside the main body range are suppressed to the dark end of the output grayscale range.

[0014] To address the aforementioned technical problems, this invention also provides an infrared image noise reduction system for gas leak detection, used to implement the above method, comprising: The image acquisition module is used to acquire raw infrared images to capture potential thermal radiation differences in gas leaks, resulting in initial image data containing noise. The three-dimensional block group construction module is used to divide the original infrared image into multiple overlapping image blocks, search for similar region blocks, and combine all similar image blocks into a three-dimensional image block group to obtain multiple three-dimensional image block groups. The collaborative filtering module is used to perform a three-dimensional transformation on each three-dimensional image block group to obtain transform domain coefficients, and to filter the transform domain coefficients to suppress noise in the initial image data; The image reconstruction module is used to perform a three-dimensional inverse transform on the filtered transform domain coefficients to obtain a denoised three-dimensional image block group, and to return each image block in the denoised three-dimensional image block group to its original image position. By performing a weighted average aggregation on all image blocks, a preliminary denoised image is generated. Among them, image blocks belonging to the same three-dimensional image block group are marked as the same similar region, and the set of all similar regions constitutes the initial region division of the preliminary denoised image. The gas positioning module is used to perform contrast stretching transformation independently on each similar region based on the initial region division and the grayscale distribution of its internal pixels, so as to enhance the feature contrast between the gas leak area and the background area and determine the gas leak location.

[0015] The technical solution of the present invention has the following advantages compared with the prior art: The infrared image denoising method for gas leak detection described in this invention firstly removes noise while better preserving the detailed structure and edge information of the gas leak area through three-dimensional collaborative filtering. Secondly, it utilizes the intermediate result of the denoising process—the segmentation of similar regions—to guide subsequent image enhancement, making the entire processing flow an organic whole and solving the problem of the separation between denoising and segmentation in traditional processes. Finally, region-adaptive contrast stretching accurately enhances the target area, effectively improving the contrast between the gas leak area and the complex background, thus providing a reliable technical guarantee for the rapid and accurate location of the final leak point. Attached Figure Description

[0016] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart of the infrared image noise reduction method for gas leak detection according to the present invention; Figure 2 This is a flowchart of the steps for searching similar region blocks according to the present invention; Figure 3 This is a flowchart of the steps for constructing multiple three-dimensional image block groups according to the present invention; Figure 4 This is a flowchart of the steps for obtaining transform domain coefficients by performing a three-dimensional transformation on a three-dimensional image block group according to the present invention; Figure 5 This is a flowchart of the steps for sorting the similarity of image blocks within a 3D image block group. Figure 6 This is a flowchart of the steps for weighted average aggregation of image blocks according to the present invention; Figure 7 This is a structural framework diagram of the infrared image noise reduction system for gas leak detection according to the present invention. Detailed Implementation

[0017] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0018] Reference Figure 1As shown, this invention provides an infrared image noise reduction method for gas leak detection. Its core concept lies in organically combining the noise reduction process with preliminary region segmentation, thereby laying a solid foundation for subsequent accurate detection. The method includes the following steps: Acquire raw infrared images to capture potential thermal radiation differences in gas leaks, resulting in initial image data containing noise; The original infrared image is divided into multiple overlapping image blocks. Similar region blocks are searched, and all similar image blocks are combined into a three-dimensional image block group to obtain multiple three-dimensional image block groups. The method begins with the acquisition of the original infrared image and then enters its core processing stage: dividing the image into numerous overlapping small blocks and aggregating these blocks into several three-dimensional image block groups based on their similarity; this "three-dimensional grouping" operation itself is an adaptive clustering based on image content, which pre-classifies pixels with similar texture and grayscale.

[0019] A three-dimensional transformation is performed on each group of three-dimensional image blocks to obtain transform domain coefficients. The transform domain coefficients are then filtered to suppress noise in the initial image data. A three-dimensional inverse transform is performed on the filtered transform domain coefficients to obtain a denoised three-dimensional image patch group. Each image patch in the denoised three-dimensional image patch group is returned to its original image position. By weighted averaging and aggregating all image patches, a preliminary denoised image is generated. Among them, image patches belonging to the same three-dimensional image patch group are marked as the same similar region. The set of all similar regions constitutes the initial region division of the preliminary denoised image. Next, collaborative filtering is performed on these 3D groups in the transform domain. This method can separate noise from real signals with extremely high efficiency because noise is not correlated within the group, while the real image structure (including potential leakage areas) will show a high degree of consistency in 3D space. After inverse transformation and weighted averaging, the filtered data not only generates a high-quality preliminary denoised image, but more importantly, the method marks image blocks belonging to the same 3D image block group as the same similar region. The collection of all these regions constitutes an initial region partitioning map.

[0020] Based on the initial region division, for each similar region, a contrast stretching transformation is performed independently according to the grayscale distribution of its internal pixels to enhance the feature contrast between the gas leak area and the background area and determine the gas leak location. Through initial region segmentation, the image is intelligently deconstructed into multiple homogeneous sub-regions while simultaneously reducing noise. Based on this segmentation, contrast stretching transformation is independently applied to each similar region. Since gas leak areas typically form a continuous region distinct from the surrounding background in terms of thermal radiation characteristics, the grayscale distribution within this region is relatively concentrated. This region-adaptive enhancement maximizes the stretching of the grayscale dynamic range of this specific region, significantly amplifying its difference from the surrounding background without overstretching other irrelevant regions and introducing new background noise. Ultimately, this targeted enhancement allows the location of the gas leak to be clearly identified in the image.

[0021] Reference Figure 2 As shown, when performing the step of searching for similar regions, this embodiment aims to more accurately and adaptively identify truly similar image blocks through a structured feature matching and dynamic clustering mechanism. This includes the following steps: taking the current image block to be processed as the core, traversing its preset search neighborhood; for each candidate image block in the neighborhood, instead of simply comparing pixel values, calculating its vector distance to the current block in a feature space composed of gray-level statistical features and spatial gradient features; this design overcomes the limitations of single gray-level comparison. Gray-level statistical features reflect the brightness distribution characteristics of the block, while spatial gradient features characterize its internal edges and texture structure. The combination of the two makes the judgment of image block similarity more comprehensive and robust, effectively distinguishing regions that are similar in gray level but have different texture structures.

[0022] After obtaining the feature vector distances between all candidate blocks and the current block, the method does not use a fixed threshold to arbitrarily classify similarity. Instead, it introduces a dynamic clustering process. This process automatically divides candidate image blocks in the search neighborhood into several temporary clusters based on the calculated feature vector distances. The advantage of this dynamic clustering lies in its adaptability. It can dynamically determine the "similarity" classification criteria according to the actual distribution of image blocks in the current local area, thereby avoiding the recognition bias that may be caused by a globally fixed threshold in different image areas or under different imaging conditions.

[0023] After dynamic clustering is completed, not all candidate blocks are considered similar blocks. Instead, a precise classification is made: only those candidate blocks that are assigned to the same temporary cluster as the current core image block are selected and finally determined as truly similar regions. This mechanism means that similarity is relative to the current local context. Only blocks that belong to the same category in the local feature distribution pattern of the current core block will be classified into the similar set. This not only improves the internal consistency of the similar block set, but also provides a reliable guarantee for the subsequent construction of high-quality 3D image block groups.

[0024] Reference Figure 3 As shown, this embodiment precisely constructs a three-dimensional image block group by combining all similar image blocks. The core of this method lies in constructing a three-dimensional data unit that is highly consistent in both geometric space and signal strength by a series of normalization preprocessing steps, which transforms a group of initially considered similar two-dimensional image blocks into a three-dimensional data unit. This maximizes the efficiency of subsequent collaborative filtering. The steps include: establishing the current image block to be processed as the geometric reference, and using the spatial coordinates of the reference block as a unified reference system, performing fine spatial offset compensation on all searched similar blocks. This geometric alignment step is crucial because it ensures that, during subsequent stacking, pixels at the same depth position in the three-dimensional data volume strictly correspond to the same physical point in the scene. If this step is missing, even blocks with similar content will produce signal blurring after stacking due to tiny pixel-level misalignment, thus severely weakening the potential of three-dimensional transformation in mining intra-group correlations.

[0025] After the geometric space is unified, each aligned image block, including the reference block itself, is independently subjected to linear normalization of its grayscale values. This operation aims to eliminate the overall brightness deviation introduced by non-uniform illumination, detector response differences, or local temperature fluctuations in the scene. After normalization, all image blocks are placed at the same intensity level, and their grayscale distribution characteristics are determined only by their internal structure and texture, and decoupled from absolute brightness values. This allows subsequent processing to focus on mining common structural information between blocks, rather than being misled by intensity differences, thereby more accurately separating real structural signals from random noise.

[0026] Finally, after completing the dual regularization of geometry and intensity, these uniformly sized two-dimensional image patches are stacked in an ordered manner along a third dimension perpendicular to their plane, thus constructing the final three-dimensional data cube. It is particularly noteworthy that the stacking order is not arbitrary, but rather sorted according to the similarity between each patch and the reference patch. This ordered stacking ensures that the patches with the highest signal quality and are most representative are concentrated at one end of the three-dimensional data cube, forming a signal quality gradient from the core to the edge. The inherent regularity of this data structure allows for a more concentrated distribution of real, consistent signal energy in specific frequency bands after subsequent three-dimensional transformations, while noise and inconsistent interference are isolated to other areas. This creates extremely favorable conditions for subsequent precise filtering operations.

[0027] Reference Figure 4As shown, this embodiment further discloses the specific process of performing a three-dimensional transformation on each three-dimensional image block group to obtain the transform domain coefficients, including the following steps: A transformation sequence consisting of three one-dimensional orthogonal transform bases in a specific order is preset. This sequence setting is the logical blueprint of the entire transformation, which specifies the order of processing the dimensions of the three-dimensional data cube, namely height, width, and finally depth; Separable orthogonal transform bases are selected, whose core advantage is that a complex three-dimensional transformation problem can be decomposed into three consecutive one-dimensional transformations, thereby reducing the computational complexity to an engineering-feasible level while ensuring mathematical rigor and signal processing effect.

[0028] The transformation operation begins along the height of the three-dimensional data cube, independently applying a first one-dimensional orthogonal transformation to each row of pixel sequences. This step can be understood as performing frequency domain analysis on the vertical structural features within each image patch, converting the spatial brightness variation pattern of each row into a set of spectral coefficients characterizing the strength of different frequency components in that row. Next, the process moves to the second dimension, along the width, independently applying a second one-dimensional orthogonal transformation to each column sequence in the data cube after the row transformation. After this two-stage transformation, the original spatial image patch has been completely transformed into the two-dimensional frequency domain. At this point, the coefficients in the data volume can accurately characterize the spatial frequency features within each image patch. After laying the foundation for the spatial frequency domain in the first two-dimensional transformations, the process finally applies a third one-dimensional orthogonal transformation independently to each spectral coefficient sequence obtained after the first two-dimensional transformations, along the depth direction of the three-dimensional data cube, i.e., the stacking direction of the image blocks. This is the key to achieving synergy: it no longer analyzes the characteristics within a single image block, but rather analyzes the correlation between different image blocks within the group at the same spatial frequency point. Specifically, if all blocks are highly similar at a certain spatial frequency point (i.e., high structural consistency within the group), then in this frequency dimension within the group, its energy will be highly concentrated on the DC or low-frequency coefficients representing the consistency signal; conversely, noise or inter-block differences will manifest as high-frequency components within the group.

[0029] Ultimately, through recursive, separable transformations across these three dimensions, each element in the 3D data cube is transformed from a spatial pixel value into a 3D transform domain coefficient that simultaneously encodes spatial frequency and intra-group consistency frequency information. This creates a novel 3D "signal-noise" separation space where real, intra-group stable image structures (including potential gas leak features) are highly correlated and have concentrated energy, making them easy to identify and preserve; while randomly distributed noise is uncorrelated and has dispersed energy, making it easy to locate and filter out. This mechanism ensures that subsequent filtering operations are targeted, achieving the optimal balance between noise suppression and detail preservation, providing a crucial high-quality image prerequisite for the final accurate location of gas leaks.

[0030] Specifically, when filtering the transform domain coefficients, the filtering strength should not be fixed, but must be dynamically correlated with the intrinsic quality of the 3D image patch group—specifically, the similarity between the image patches within the group. The logic is that a group composed of highly similar image patches implies a stable and consistent internal signal structure, with random noise being its primary interference factor. Therefore, stronger filtering methods can be used to boldly suppress coefficients with smaller amplitudes in the transform domain, thus eliminating noise more thoroughly without excessive concern about damaging the true signal. Conversely, a group with low similarity may contain complex structures such as edges and textures. Overly strong filtering would obliterate these crucial details, thus requiring a more conservative, "weaker," filtering strength to protect this structural information. This principle fundamentally solves the drawbacks of the traditional "one-size-fits-all" approach to filtering methods.

[0031] To put this principle into practice, this embodiment also provides a specific, robust, and human-intervention-free quality assessment and ranking mechanism, referring to... Figure 5 As shown, the process includes the following steps: a virtual reference block is synthesized by calculating the median gray value of all blocks in the group at each pixel position. The median is used instead of the mean because it can naturally resist the influence of individual abnormal blocks in the group (such as those that happen to contain noise points or atypical interference), thus obtaining a more reliable reference that better represents the mainstream consensus characteristics of the group.

[0032] After establishing this robust benchmark, a difference matrix construction step is used to accurately score each member in the group. The absolute difference of all pixels between each image block and the benchmark block is calculated and summed to obtain the cumulative difference. This value quantitatively describes the degree of deviation of each block from the consensus within the group. The lower the value, the closer the block is to the consensus, that is, the higher the degree of similarity.

[0033] Finally, in the ranking sequence generation step, simply arranging these accumulated differences in ascending order of value directly generates a clear quality ranking sequence. This sequence objectively reflects the gradient distribution within the group, from the core high-quality signal to the peripheral similar members.

[0034] In this embodiment, the filtering algorithm no longer operates blindly, but intelligently selects or even dynamically adjusts filtering parameters based on the intra-group quality distribution revealed by the sorting sequence. For example, a more aggressive threshold can be used for highly similar groups. During reconstruction, different weights can be assigned to different blocks based on the sorting. This mechanism ensures that the denoising process can adapt to the image content: strong denoising is performed in flat background areas, while fine-grained maintenance is applied in areas with rich details or edges. This ultimately allows the method to achieve extremely clean denoising results while minimizing the introduction of blur or artifacts. In particular, it can achieve unprecedented protection and enhancement for weak signals at the boundary between gas leaks and the background, greatly improving the accuracy of subsequent gas localization.

[0035] Specifically, after performing a 3D inverse transformation to obtain a denoised 3D image patch group, when performing the step of returning each image patch in the denoised 3D image patch group to its original image position, because the reconstruction quality of each image patch after the aforementioned complex processing is not uniform, simply performing an arithmetic average will dilute the processing effect of high-quality patches by low-quality patches. Therefore, referring to... Figure 6 As shown, this embodiment introduces a quality-based weighted fusion mechanism to ensure that the final generated denoised image can gather the processing essence of all image blocks, thereby maximizing the overall denoising effect. The mechanism includes the following steps: assigning a weight value positively correlated with the reconstruction quality to each image block after the three-dimensional inverse transform processing. The reconstruction quality measures the degree to which the true signal of the image block is preserved after undergoing a series of processing steps such as transformation, filtering, and inverse transform, rather than the amount of residual noise. This design is a prerequisite for quality optimization, which means that it can intelligently identify which image blocks have been processed better and cleaner.

[0036] After obtaining the weight of each block, the process enters the substantive weighted synthesis stage. First, according to their respective weight values, each pixel value in the block is weighted. In this stage, the pixel values ​​of high-quality image blocks will account for a larger proportion in the subsequent fusion; conversely, the influence of blocks with slightly lower quality will be suppressed accordingly.

[0037] Finally, all these weighted image blocks are fed back into the global image coordinate system for overlay and fusion based on their original acquisition positions. Since the image blocks are divided in an overlapping manner, each pixel position receives weighted contribution values ​​from multiple different blocks. Simply summing these contribution values ​​would lead to brightness distortion. Therefore, the value of each pixel position in the fused image is normalized based on the total weight received at that position. This step ensures that the final grayscale value of each pixel is the weighted average of the weighted contribution values ​​provided by all image blocks covering that position, thereby guaranteeing the accuracy and consistency of the output image in terms of brightness.

[0038] From a mechanistic perspective, this embodiment constructs a quality-driven image reconstruction channel. Through this weighted average aggregation mechanism, the processing advantages generated by previous steps (such as block matching and 3D filtering) can be transferred to the final denoised image with higher weight by high-quality image blocks. At the same time, individual defects or residual noise that may be generated during processing are effectively suppressed because the blocks they belong to have lower weights. This is equivalent to performing a precise signal purification at the global image level, which not only improves the overall denoising effect but also effectively avoids block artifacts or local blurring that may be caused by differences in quality between blocks. This generates a more uniform, clear, and reliable preliminary denoised image, laying an impeccable data foundation for the subsequent accurate location of the gas leak area.

[0039] Specifically, the reconstruction quality is evaluated by calculating the proportion of core energy retained by the image patch in the transform domain before and after filtering. The higher the proportion of core energy, the greater the weight assigned. After transforming the group of 3D image patches, the larger amplitude components of the transform domain coefficients usually correspond to the real and significant structural information (such as edges and contours) in the image patch, which can be regarded as "core energy". The smaller amplitude coefficients often contain fine textures and a lot of random noise. The subsequent filtering process is essentially a thresholding operation, which retains (or slightly attenuates) these large core coefficients while significantly suppressing or even reducing those small coefficients to zero.

[0040] Based on this, the evaluation process is as follows: For a given image patch, the total energy of its transform domain coefficients (usually expressed as the sum of squares of the coefficients) is calculated before and after filtering. Then, the ratio of the coefficient energy retained after filtering to the original total energy before filtering is calculated. This ratio is the "core energy percentage". This ratio has a clear physical meaning: it quantifies the proportion of the most core and most likely real information components in the original signal of the image patch that are retained after noise reduction.

[0041] If an image patch has a high core energy percentage after filtering, it indicates that the filtering process has precisely removed noise (manifested as the removal of a large number of small coefficients) while perfectly preserving its core structural signal. Such an image patch naturally has the best reconstruction quality and should therefore be given a larger weight to play a leading role in the final image synthesis. Conversely, if an image patch has a low core energy percentage, it means that either too many important signals were mistakenly removed during the filtering process, or the residual noise energy is still considerable, resulting in poor reconstruction quality. Therefore, it should be assigned a smaller weight to limit its potential negative impact on the final result.

[0042] From a mechanistic perspective, utilizing reconstruction quality for weight allocation ensures fairness and efficiency. This transforms weighted aggregation from a simple averaging process into a process of selecting the best based on signal fidelity. Through this mechanism, the resulting preliminary denoised image is not merely smoothed overall, but rather a composite of image patches that withstood filtering in their respective local regions and achieved the highest signal fidelity. This ensures, in principle, that the denoised image, while obtaining a low-noise background, retains the structural integrity of the real scene to the greatest extent possible. In particular, subtle edge and texture features representing gas leaks are successfully preserved during processing (i.e., high core energy proportion) and thus stand out in the final image, providing crucial support for accurately determining the location of the gas leak in subsequent steps.

[0043] Specifically, when performing the step of independently performing contrast stretching transformation based on the grayscale distribution of its internal pixels, simple global contrast stretching, while enhancing the target, is also very likely to amplify background noise, causing the gas leak area to be submerged in background clutter. To solve this problem, this embodiment further proposes a region-adaptive stretching strategy to achieve targeted enhancement, ensuring that the gas leak features are effectively highlighted while irrelevant noise interference is actively suppressed. This includes the following steps: identifying the main range of grayscale distribution of the similar regions. Instead of focusing on the grayscale distribution of the entire image, the focus is on the homogeneous regions that represent potential gas leaks or specific backgrounds, as determined by the aforementioned noise reduction and region segmentation process. The main range is usually determined by statistically analyzing the main concentration intervals of pixel grayscale within the region (e.g., using the main peak area of ​​the histogram), which represents the most core and prevalent signal features within the region.

[0044] After precisely defining this subject area, the subject area is linearly mapped to all or most of the preset output grayscale range, thereby maximizing the grayscale dynamic range of the core signal that may have been lacking in contrast and appearing flat within the similar area. This makes the subtle grayscale changes and texture features within the area more clearly distinguishable, thus greatly enhancing the distinguishability of the gas leak area from the surrounding background.

[0045] In stark contrast to this enhancement of the core signal, the method for dealing with noise is also clearly defined: those discrete noise pixels distributed outside the main range are suppressed to the dark end of the output grayscale range (i.e., low grayscale value areas close to black). These discrete points are usually residual noise that could not be completely eliminated by the previous noise reduction steps, or some outliers on the boundary of the region. By forcibly suppressing them to the dark end, it is equivalent to actively reducing the visual salience of background noise while enhancing the target signal.

[0046] Reference Figure 7 As shown, in order to achieve the above method, the present invention further discloses an infrared image noise reduction system for gas leak detection, comprising: The image acquisition module is used to acquire raw infrared images to capture potential thermal radiation differences in gas leaks, resulting in initial image data containing noise. The three-dimensional block group construction module is used to divide the original infrared image into multiple overlapping image blocks, search for similar region blocks, and combine all similar image blocks into a three-dimensional image block group to obtain multiple three-dimensional image block groups. The collaborative filtering module is used to perform a three-dimensional transformation on each three-dimensional image block group to obtain transform domain coefficients, and to filter the transform domain coefficients to suppress noise in the initial image data; The image reconstruction module is used to perform a three-dimensional inverse transform on the filtered transform domain coefficients to obtain a denoised three-dimensional image block group, and to return each image block in the denoised three-dimensional image block group to its original image position. By performing a weighted average aggregation on all image blocks, a preliminary denoised image is generated. Among them, image blocks belonging to the same three-dimensional image block group are marked as the same similar region, and the set of all similar regions constitutes the initial region division of the preliminary denoised image. The gas positioning module is used to perform contrast stretching transformation independently on each similar region based on the initial region division and the grayscale distribution of its internal pixels, so as to enhance the feature contrast between the gas leak area and the background area and determine the gas leak location.

[0047] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for denoising infrared images for gas leak detection, characterized in that: Includes the following steps: Acquire raw infrared images to capture potential thermal radiation differences in gas leaks, resulting in initial image data containing noise; The original infrared image is divided into multiple overlapping image blocks. Similar region blocks are searched, and all similar image blocks are combined into a three-dimensional image block group to obtain multiple three-dimensional image block groups. A three-dimensional transformation is performed on each group of three-dimensional image blocks to obtain transform domain coefficients. The transform domain coefficients are then filtered to suppress noise in the initial image data. A three-dimensional inverse transform is performed on the filtered transform domain coefficients to obtain a denoised three-dimensional image patch group. Each image patch in the denoised three-dimensional image patch group is returned to its original image position. By weighted averaging and aggregating all image patches, a preliminary denoised image is generated. Among them, image patches belonging to the same three-dimensional image patch group are marked as the same similar region. The set of all similar regions constitutes the initial region division of the preliminary denoised image. Based on the initial region division, for each similar region, a contrast stretching transformation is performed independently according to the grayscale distribution of its internal pixels to enhance the feature contrast between the gas leak area and the background area and determine the gas leak location.

2. The infrared image noise reduction method for gas leak detection according to claim 1, characterized in that: The search for similar region blocks includes the following steps: Taking one of the current image patches as the core, calculate the feature vector distance between all candidate image patches and the current image patch within its preset search neighborhood; Based on the feature vector distance, the candidate image patch is divided into multiple temporary clusters through dynamic clustering; Select all candidate image blocks that belong to the same temporary cluster as the current image block and determine them as similar region blocks; The feature vector is composed of the gray-level statistical features and spatial gradient features of the image patch.

3. The infrared image noise reduction method for gas leak detection according to claim 1, characterized in that: Grouping all similar image patches into a 3D image patch group includes: The current image block to be processed is established as the reference block. Among all similar blocks found, spatial offset compensation is performed on each similar block with the spatial coordinates of the reference block as a reference, to ensure that all blocks are geometrically aligned in the same local coordinate system. For each image block that has been geometrically aligned, including the reference block, the gray values ​​within the block are linearly normalized independently to eliminate the overall brightness deviation caused by local illumination or temperature differences, so that all blocks are at the same intensity level. Each M×N pixel two-dimensional image block, after alignment and normalization, is considered an independent two-dimensional plane. These two-dimensional planes are stacked along a third spatial dimension perpendicular to their respective planes. The stacking order of each stacked plane is determined by its similarity to the reference block. Finally, a three-dimensional data cube of size M×N×K is formed, where K is the total number of stacked image blocks. This cube is the three-dimensional image block group.

4. The infrared image noise reduction method for gas leak detection according to claim 1, characterized in that: Perform a 3D transformation on each group of 3D image patches to obtain the transform domain coefficients, including: A transformation sequence consisting of three one-dimensional orthogonal transformation bases is predefined, which correspond to the height, width, and depth dimensions of the three-dimensional data cube, respectively. Along the height direction of the three-dimensional data cube, a first one-dimensional orthogonal transformation is independently applied to each row of pixel sequence to convert the pixel values ​​into spectral coefficients of that dimension; Along the width direction of the three-dimensional data cube, a second one-dimensional orthogonal transformation is independently applied to each column of pixel sequence to convert the pixel values ​​into spectral coefficients of that dimension; Along the depth direction of the three-dimensional data cube, i.e. the stacking direction of the image blocks, a third one-dimensional orthogonal transformation is independently applied to each spectral coefficient sequence obtained after the first two-dimensional transformation, converting each element in the three-dimensional data cube from a spatial pixel value into a three-dimensional transform domain coefficient.

5. The infrared image noise reduction method for gas leak detection according to claim 4, characterized in that: When filtering the transform domain coefficients, the similarity of each image patch within the 3D image patch group is sorted. The intensity of the filtering operation is dynamically adjusted according to the similarity of each image patch within the 3D image patch group. A stronger filtering intensity is used for 3D image patch groups with high similarity, and a weaker filtering intensity is used for 3D image patch groups with low similarity.

6. The infrared image noise reduction method for gas leak detection according to claim 5, characterized in that: The similarity of each image patch within a 3D image patch group is ranked, including: For each group of 3D image blocks, a reference image block is generated by calculating the median gray value of all image blocks in the group at each pixel position; Calculate the pixel-level absolute difference between each image block in the group and the reference image block, and sum all pixel difference values ​​of each image block to obtain the cumulative difference of each image block relative to the reference block. The cumulative difference of all image blocks constitutes a difference matrix. The cumulative differences in the difference matrix are arranged in ascending order of value. The lower the value, the more similar it is to the reference block. Based on this arrangement, a similarity ranking sequence of each image block in the three-dimensional image block group is generated.

7. The infrared image noise reduction method for gas leak detection according to claim 1, characterized in that: A weighted average aggregation of all image patches is performed to generate a preliminary denoised image, including: For each image block processed by the inverse 3D transformation, assign a weight value determined based on its reconstruction quality; Based on the weight values, all pixel values ​​in each image block are weighted to obtain a series of weighted image blocks; All weighted image blocks are superimposed and fused according to their original image positions, and the values ​​of each pixel position in the fused image are normalized based on the total weight to generate the preliminary denoised image.

8. The infrared image noise reduction method for gas leak detection according to claim 7, characterized in that: The reconstruction quality is evaluated by calculating the proportion of core energy retained by the image patch in the transform domain before and after filtering. The higher the proportion of core energy, the greater the weight assigned.

9. The infrared image noise reduction method for gas leak detection according to claim 1, characterized in that: Based on the grayscale distribution of its internal pixels, independent contrast stretching transformation is performed, including: Identify the main range of grayscale distribution in the similar regions; The main body range is linearly mapped to all or most of the preset output grayscale range, while discrete noise pixels distributed outside the main body range are suppressed to the dark end of the output grayscale range.

10. An infrared image noise reduction system for gas leak detection, used to implement the method described in any one of claims 1 to 9, characterized in that: include: The image acquisition module is used to acquire raw infrared images to capture potential thermal radiation differences in gas leaks, resulting in initial image data containing noise. The three-dimensional block group construction module is used to divide the original infrared image into multiple overlapping image blocks, search for similar region blocks, and combine all similar image blocks into a three-dimensional image block group to obtain multiple three-dimensional image block groups. The collaborative filtering module is used to perform a three-dimensional transformation on each three-dimensional image block group to obtain transform domain coefficients, and to filter the transform domain coefficients to suppress noise in the initial image data; The image reconstruction module is used to perform a three-dimensional inverse transform on the filtered transform domain coefficients to obtain a denoised three-dimensional image block group, and to return each image block in the denoised three-dimensional image block group to its original image position. By performing a weighted average aggregation on all image blocks, a preliminary denoised image is generated. Among them, image blocks belonging to the same three-dimensional image block group are marked as the same similar region, and the set of all similar regions constitutes the initial region division of the preliminary denoised image. The gas positioning module is used to perform contrast stretching transformation independently on each similar region based on the initial region division and the grayscale distribution of its internal pixels, so as to enhance the feature contrast between the gas leak area and the background area and determine the gas leak location.

Citation Information

Patent Citations

  • Method for enhancing gas infrared image based on self-adaption time-domain filtering and morphology

    CN102609907A

  • Combustible gas leakage area detection method based on AI algorithm

    CN116152724A

  • Gas leakage detection method based on high-dynamic infrared image enhancement

    CN116912172A

  • Complex scene gas leakage detection method and detection system thereof

    CN117232729A

  • Sparse three-dimensional transform domain collaborative filtering and denoising method based on CT image sequence

    CN118644410A