Infrared Image Enhancement Method for Power Grid Equipment Based on Single-Modal Sparse Samples
By setting image enhancement factors and weight matrices in infrared images of power grid equipment, and combining local information and temperature gradient information for enhancement processing, the problems of unclear infrared images and scarce samples of power grid equipment are solved, and the clarity and detail are improved, supporting equipment condition assessment and fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU ELECTRIC POWER INFORMATION TECH
- Filing Date
- 2025-11-10
- Publication Date
- 2026-04-17
AI Technical Summary
Existing image enhancement technologies suffer from problems such as unclear images, low contrast, and scarce samples in infrared images of power grid equipment, making it difficult to effectively improve clarity and detail, thus affecting the accuracy of equipment detection and diagnosis.
By acquiring scarce samples of power grid equipment, setting image enhancement factors, initializing weight matrices, and generating block-level enhancement matrices using local information and neighborhood self-similarity, region division is performed in conjunction with temperature gradient information, weight matrices are updated, and finally infrared images are enhanced to suppress over-enhancement and noise diffusion.
Under the condition of scarce single-mode samples, the local features and temperature distribution features of infrared images are fully explored to effectively improve clarity and detail, providing reliable support for power grid equipment condition assessment and fault diagnosis.
Smart Images

Figure CN121073858B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of scarce sample image enhancement, and more particularly to a method for enhancing infrared images of power grid equipment based on scarce samples generated from a single modality. Background Technology
[0002] In power systems, the safe and stable operation of power grid equipment directly affects the reliability and economy of the entire grid. To promptly detect potential hazards and faults, power systems typically require real-time equipment monitoring. However, due to the complex operating environment and wide distribution of power grid equipment, obtaining comprehensive multimodal monitoring data is extremely difficult. In this context, infrared images of power grid equipment become the most intuitive and commonly used monitoring method, effectively reflecting the temperature distribution characteristics of the equipment surface. However, influenced by external environmental factors and imaging conditions, infrared images of power grid equipment often suffer from unclear images, low contrast, and scarce samples, increasing the difficulty of equipment detection and diagnosis. Therefore, enhancing scarce infrared images of power grid equipment is of great significance.
[0003] Existing image enhancement techniques mainly include histogram equalization, adaptive histogram equalization, filtering-based multi-scale methods, and deep learning-based image generation or enhancement methods. For example, histogram equalization can improve overall contrast, but it is prone to over-enhancement and loss of detail; deep learning methods perform well in natural scene image enhancement, but their training relies on large-scale labeled samples, making them difficult to apply directly when infrared images of power grid equipment are scarce. These methods all have certain limitations in enhancing infrared images of power grid equipment. Summary of the Invention
[0004] The technical problem this invention aims to solve is to address the shortcomings of existing technologies by providing a method for enhancing infrared images of power grid equipment based on scarce single-modal samples. First, scarce samples of power grid equipment are acquired, image enhancement factors are set, and a weight matrix is initialized according to the size of the scarce samples. Second, a block-level enhancement matrix is generated using the local information content and neighborhood self-similarity of the infrared image, and a pixel-level enhancement matrix is obtained through smoothing, updating the weight matrix. Then, the temperature gradient information of the infrared image is calculated and regions are divided to generate a region enhancement matrix, which again updates the weight matrix. Finally, the infrared image of the power grid equipment is enhanced based on the updated weight matrix. This method can fully exploit the local features and temperature distribution features of infrared images under conditions of scarce samples and single-modality, effectively improving clarity and detail, and providing reliable support for power grid equipment condition assessment and fault diagnosis.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for enhancing infrared images of power grid equipment based on scarce single-modality samples, the method comprising:
[0007] Obtain scarce samples of power grid equipment, set image enhancement factors, and initialize a weight matrix based on the size of the scarce samples of power grid equipment;
[0008] Based on the local information content and neighborhood self-similarity of the acquired infrared image of the power grid equipment, a block-level enhancement matrix is generated. The block-level enhancement matrix is smoothed to obtain a pixel-level enhancement matrix. Based on the pixel-level enhancement matrix, the initialized weight matrix is updated and replaced.
[0009] Calculate the temperature gradient information of the infrared image of the power grid equipment, divide the region according to the temperature gradient information to obtain the region enhancement matrix, update the pixel-level enhanced weight matrix according to the region enhancement matrix and replace the weight matrix;
[0010] Image enhancement is performed on the infrared images of power grid equipment based on the weight matrix.
[0011] The image enhancement factor is used to limit the image enhancement intensity. When updating the weight matrix, the method further includes:
[0012] Based on the image enhancement factor, the weight matrix before the update is pre-enhanced to obtain the pre-enhanced weight matrix;
[0013] The pre-enhanced weight matrix and the updated weight matrix are compared to determine whether any element in the updated weight matrix exceeds the value range of the corresponding element in the pre-enhanced weight matrix. If any element in the updated weight matrix exceeds the value range of the corresponding element in the pre-enhanced weight matrix, an intensity restriction operation is applied to the exceeding element.
[0014] Based on the local information content and neighborhood self-similarity of the acquired infrared images of power grid equipment, a block-level enhancement matrix is generated, including:
[0015] The acquired infrared images of power grid equipment are divided into local blocks of fixed size;
[0016] Calculate the local information content and neighborhood self-similarity of each local block. The local information content includes local entropy, local contrast and texture energy. The neighborhood self-similarity represents the degree of similarity between each local block and local blocks in its neighborhood.
[0017] The weight of each local block is set according to the neighborhood self-similarity. The local information content is compared with the preset local information content threshold to perform local block re-division and local block weight setting until the local information content of all local blocks is less than the threshold, thus obtaining the block-level enhancement matrix.
[0018] Smoothing the block-level enhancement matrix yields the pixel-level enhancement matrix, including:
[0019] Based on the block-level enhancement matrix, a block-level graph is constructed, wherein the nodes of the block-level graph are local blocks, the initial values of the nodes of the block-level graph are the weights of the local blocks, and the edge weights of the block-level graph are the similarity between two local blocks.
[0020] Based on the block-level graph, a smooth block-level enhancement matrix is obtained by iteratively solving the Laplacian regularization objective function and graph propagation.
[0021] The smoothed block-level enhancement matrix is downsampled to obtain a pixel-level enhancement matrix.
[0022] Based on the block-level graph, a smoothed block-level enhancement matrix is obtained by iteratively solving the Laplacian regularization objective function and graph propagation, including:
[0023] Construct the block-level graph Laplacian matrix based on the block-level graph;
[0024] Define the Laplace regularization objective function;
[0025] The block-level graph Laplacian regularization objective function is minimized through graph propagation, and the smoothing intensity is iteratively updated by using the regularization coefficients in the Laplacian regularization objective function to control the smoothing intensity until the objective function converges, resulting in a smoothed block-level enhancement matrix.
[0026] The smoothed block-level enhancement matrix is downsampled to obtain a pixel-level enhancement matrix, including:
[0027] Obtain the set of pixel coordinates for each local block in the scarce samples of power grid equipment;
[0028] By using weighted interpolation, the enhancement weights of each local block are smoothly extended to all pixels within the local block to obtain the extended enhancement matrix;
[0029] The extended enhancement matrix is normalized to obtain the pixel-level enhancement matrix.
[0030] Based on the pixel-level enhancement matrix, update the initialized weight matrix and replace the weight matrix, including:
[0031] The pixel-level enhancement matrix is normalized to obtain a standard pixel-level enhancement matrix;
[0032] The standard pixel-level enhancement matrix is multiplied element-wise with the initialized weight matrix to update the initialized weight matrix and replace the weight matrix.
[0033] Calculate the temperature gradient information of the infrared image of the power grid equipment, and divide the region according to the temperature gradient information to obtain a region enhancement matrix, including:
[0034] Calculate the temperature gradient information of the infrared image of the power grid equipment. The temperature gradient information includes the temperature gradient magnitude and temperature gradient direction. Divide the region according to the temperature gradient information. The region includes hot spot region, temperature transition region and background region. Assign weights to different regions to generate a region weight matrix.
[0035] The temperature gradient information and regional weight matrix of the infrared image of the power grid equipment are input into the regional enhancement model. Features of different regions and regional boundaries are extracted, and hot spot features are enhanced through an attention mechanism to obtain the regional enhancement matrix.
[0036] The temperature gradient information and region weight matrix of the infrared image of the power grid equipment are input into the region enhancement model. Features of different regions and region boundaries are extracted, and hotspot region features are enhanced through an attention mechanism to obtain the region enhancement matrix, including:
[0037] The temperature gradient information of the infrared image of the power grid equipment is preprocessed, including normalizing the temperature gradient amplitude and using sine and cosine encoding for the temperature gradient direction.
[0038] The weighted gradient magnitude is obtained by multiplying the region weight matrix and the normalized temperature gradient magnitude point by point.
[0039] Multi-scale feature extraction is performed based on the weighted gradient magnitude and temperature gradient direction to obtain a multi-scale feature matrix.
[0040] The multi-scale feature matrix is input into the attention mechanism, and the location of hotspot regions is marked by spatial attention, while the feature channels related to high temperature anomalies are marked by channel attention.
[0041] Based on the multi-scale feature matrix output by the attention mechanism, a region enhancement matrix is output through the region enhancement model.
[0042] Image enhancement of the infrared image of the power grid equipment according to the weight matrix includes: standardizing the weight matrix and weighting the infrared image of the power grid equipment pixel by pixel, and outputting an enhanced image of the infrared image of the power grid equipment.
[0043] Compared with existing technologies, this invention effectively suppresses excessive image enhancement by introducing a constraint mechanism for image enhancement factors. At the same time, it achieves adaptive adjustment of enhancement weights by combining the updating of the weight matrix, thereby ensuring the robustness and reliability of image enhancement effects. Attached Figure Description
[0044] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0045] Figure 1 This is a flowchart illustrating the infrared image enhancement method for power grid equipment based on single-modal scarce samples in Embodiment 1 of the present invention.
[0046] Figure 2 This is a schematic diagram illustrating the principle of local block partitioning in Embodiment 1 of the present invention;
[0047] Figure 3 This is a schematic diagram of the process for generating the region enhancement matrix in Embodiment 1 of the present invention; Detailed Implementation
[0048] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0049] Example 1
[0050] Please see Figure 1 The present invention provides an embodiment of an infrared image enhancement method for power grid equipment based on sparse samples of a single mode. The specific steps of the method are as follows:
[0051] S1: Obtain scarce samples of power grid equipment, set image enhancement factors, and initialize the weight matrix according to the size of the scarce samples of power grid equipment;
[0052] In this embodiment, scarce samples of power grid equipment are obtained. These scarce samples are infrared images of the power grid equipment. The infrared images of the power grid equipment directly reflect the temperature distribution, hot spots, and potential defects of the equipment. They also have characteristics such as low local contrast, limited detailed information, and a small number of samples. Subsequently, an image enhancement factor is set to limit the enhancement intensity of different regions of the image. While ensuring the consistency of the overall temperature distribution, the image enhancer highlights the detailed features of key regions and suppresses over-enhancement or information loss.
[0053] Furthermore, the weight matrix is initialized based on the size information of the infrared scarce samples. First, the size of the weight matrix is determined so that it corresponds to the pixels of the infrared image. Then, the initial value of the initial weight matrix is set to provide basic weight parameters for subsequent block-level enhancement and pixel-level enhancement. The role of the weight matrix is to guide the weight update during the enhancement process.
[0054] S2: Based on the local information content and neighborhood self-similarity of the acquired infrared image of the power grid equipment, a block-level enhancement matrix is generated. The block-level enhancement matrix is smoothed to obtain a pixel-level enhancement matrix. Based on the pixel-level enhancement matrix, the initialized weight matrix is updated and replaced.
[0055] In this embodiment, local information content is typically used to characterize the texture complexity and information richness within a certain region, such as edge strength, gradient change, or grayscale entropy value, which can reflect how many effective diagnostic features the region contains. Neighborhood self-similarity is used to measure the structural similarity between a region and its surrounding regions. If a region differs significantly from its neighbors, it indicates that it may contain abnormal hotspots or key features. Combining these two indicators can effectively identify information-rich regions in infrared images that may have defects.
[0056] Specifically, the advantages of block-level enhancement matrices are high computational efficiency and good stability. By dividing the image into blocks as units and allocating different enhancement weights through local information content and self-similarity, the target area can be quickly highlighted with low computational cost. The block-level approach has natural noise suppression capabilities. Similar areas are processed as a whole and are not easily affected by single pixel outliers, making it easy to clearly present the temperature distribution trend of large areas of power grid equipment.
[0057] Furthermore, simply focusing on block-level enhancement can lead to discontinuities or artifacts at the boundaries. Therefore, it is necessary to smooth the block-level enhancement matrix to generate a pixel-level enhancement matrix. Pixel-level enhancement enables more precise enhancement control, resulting in natural boundary transitions and ensuring that small thermal anomalies are not overlooked. Finally, the weight matrix is updated and replaced based on the pixel-level enhancement matrix, which not only takes into account both global trends and local details but also maintains the overall infrared imaging stability of the power grid equipment.
[0058] S3: Calculate the temperature gradient information of the infrared image of the power grid equipment, divide the region according to the temperature gradient information to obtain the region enhancement matrix, update the pixel-level enhanced weight matrix according to the region enhancement matrix and replace the weight matrix.
[0059] In this embodiment, the temperature gradient information in the infrared image of the power grid equipment can directly reflect the speed and direction of temperature changes in different parts. High gradient areas often correspond to potential hazards such as electrical joints, insulation defects, or local overheating. By calculating the temperature gradient and dividing the area, the areas with drastic temperature changes and areas with uniform temperature distribution in the image can be distinguished, thereby avoiding the feature submersion problem caused by overall averaging.
[0060] Furthermore, the advantage of the region enhancement matrix lies in its stronger spatial adaptability and feature preservation capability. Using temperature gradient as the segmentation basis, it can ensure that each enhancement unit has relatively consistent temperature change characteristics, making the enhancement operation more in line with the physical laws of infrared images of power grid equipment. While ensuring the integrity of details, the region enhancement matrix can maintain the smoothness within the region, effectively reduce artifacts and noise diffusion, and highlight the difference between overheated areas and normal areas. By updating and replacing the weight matrix through the region enhancement matrix, image contrast and structural consistency can be optimized at both the global and local levels, thereby significantly improving the accuracy of defect identification.
[0061] S4: Perform image enhancement on the infrared image of the power grid equipment according to the weight matrix.
[0062] In this embodiment, the weight matrix is updated twice, which not only takes into account the global contrast and local details of the image, but also has strong adaptability. It can allocate enhancement intensity according to the temperature characteristics of different regions, ensuring that key parts are fully enhanced while the background area is not over-enlarged, maintaining the consistency of the overall structure and texture, with clear details and natural boundary transitions.
[0063] The specific steps for S1 are as follows:
[0064] S1.1: Based on the image enhancement factor, perform pre-enhancement processing on the weight matrix before updating to obtain the pre-enhancement weight matrix;
[0065] Specifically, setting image enhancement factors is mainly used to restrict and protect the initial weights of different regions, so that key target regions maintain appropriate enhancement intensity in subsequent enhancement, while preventing low-information regions from being over-enhanced. The pre-enhanced weight matrix formed by pre-enhanced processing can provide a reference range for subsequent weight matrix updates, thereby effectively controlling the enhancement intensity during image enhancement and ensuring the stability and consistency of the overall image structure and details.
[0066] S1.2: Compare the pre-enhanced weight matrix with the updated weight matrix to determine whether any element in the updated weight matrix exceeds the value range of the corresponding element in the pre-enhanced weight matrix. If any element in the updated weight matrix exceeds the value range of the corresponding element in the pre-enhanced weight matrix, apply an intensity restriction operation to the exceeding element.
[0067] Specifically, by comparing the pre-enhanced weight matrix with the updated weight matrix, it can be determined whether the updated elements exceed the preset reference range. If there are elements that exceed the range, an intensity limit operation is applied to them according to the image enhancement factor to adjust them back to the allowed value range. In this way, the image enhancement process not only ensures the highlighting effect of key areas, but also prevents artifacts and noise diffusion caused by excessive local enhancement.
[0068] The specific steps for S2 are as follows:
[0069] S2.1: Generate a block-level enhancement matrix based on the local information content and neighborhood self-similarity of the acquired infrared images of power grid equipment;
[0070] Specifically, in order to generate a block-level enhancement matrix, the acquired infrared image of the power grid equipment is first divided into local blocks of fixed size. For each local block, its local information content and neighborhood self-similarity are calculated. The local information content consists of indicators such as local entropy, local contrast, and texture energy, which are used to measure the detail and complexity within the region. The neighborhood self-similarity is used to reflect the degree of similarity between the region and the surrounding regions in terms of gray-level distribution and texture structure. If a region differs significantly from the surrounding regions, it indicates that it may contain abnormal hotspots or key features.
[0071] Furthermore, initial weights are assigned to each local block based on neighborhood self-similarity. By combining the comparison results of local information content with preset thresholds, the local blocks are dynamically re-divided and their weights are adjusted. Through this iterative approach, while maintaining consistency within the region, the weights of redundant regions are gradually reduced, highlighting regions with rich information content and obvious differences. This enables the generated block-level enhancement matrix to fully reflect the structural features of the infrared image.
[0072] S2.1.1: Divide the acquired infrared image of the power grid equipment into local blocks of fixed size;
[0073] Specifically, the acquired infrared images of power grid equipment are divided into local blocks of fixed size according to preset rules, so that the entire infrared image is composed of several independent and non-overlapping sub-regions, which facilitates the calculation of local information and neighborhood self-similarity, and provides basic units for generating block-level enhancement matrices.
[0074] S2.1.2: Calculate the local information content and neighborhood self-similarity of each local block. The local information content includes local entropy, local contrast and texture energy. The neighborhood self-similarity represents the degree of similarity between each local block and local blocks in its neighborhood.
[0075] Specifically, local information content includes local entropy, local contrast, and texture energy. Local entropy reflects the uncertainty of local gray-level distribution, and the higher the value, the richer the information contained in the region. Local contrast is used to characterize the degree of difference in pixel gray levels within a region, and has a higher response to regions with prominent edges and structures. Texture energy is used to characterize the periodic or directional features within a region, and is used to reveal potential texture patterns in the image. By comprehensively calculating these three indicators, regions with high information content in an image can be effectively identified.
[0076] Specifically, neighborhood self-similarity can suppress excessive enhancement of repetitive regions under the constraint of global spatial relationships, ensuring that dissimilar regions are sufficiently highlighted, so that the generated block-level enhancement matrix is more in line with the actual characteristics of infrared images of power grid equipment.
[0077] S2.1.3: Set the weight of each local block according to the neighborhood self-similarity, and perform local block re-division and local block weight setting according to the comparison between the local information content and the preset local information content threshold, until the local information content of all local blocks is less than the threshold, and obtain the block-level enhancement matrix.
[0078] Specifically, firstly, each local block is weighted according to its neighborhood self-similarity, so that regions with greater differences receive higher weights and regions with stronger similarities receive lower weights. Then, the local information content of each local block is compared with a preset threshold. If the local information content of a local block is still higher than the threshold, the local block is further divided to reduce the computational unit and improve the feature resolution, and the local information content and neighborhood self-similarity are recalculated. Finally, through continuous iteration of division and weight adjustment, the local information content of all local blocks is less than the threshold, thereby generating a block-level enhancement matrix that can effectively reflect the differences in image structure and feature distribution.
[0079] Please see Figure 2 When performing local block partitioning, the infrared image of the power grid equipment is first divided into fixed-size, independent, and non-overlapping local blocks as shown in the figure according to preset rules, which serve as the basic units for subsequent calculations. Then, the local information content and neighborhood self-similarity of each local block are calculated. Next, the weight of each local block is set according to the neighborhood self-similarity, and the local information content of each local block is compared with the preset local information content threshold. If the local information content is greater than the local information content threshold, such as the black local block in the figure, the black local block is further partitioned. Then, the local information content and neighborhood self-similarity of the partitioned local blocks are recalculated. By iterating the above partitioning and weight adjustment process, the local information content of all local blocks is less than the local information content threshold.
[0080] S2.2: Smooth the block-level enhancement matrix to obtain the pixel-level enhancement matrix;
[0081] Specifically, a block-level graph is constructed based on the block-level enhancement matrix, where nodes correspond to local blocks, the initial value of a node is determined by the weight of the local block, and the weight of an edge is calculated by the similarity between two local blocks. Through the construction of this graph structure, not only can the weight information of local blocks be preserved, but the interrelationships between blocks can also be modeled.
[0082] Furthermore, by constructing the Laplacian matrix of the block-level graph, defining the objective function and minimizing its value, the smoothing intensity is controlled by the regularization coefficient during the iteration process, ensuring that the weight characteristics of key regions are maintained while suppressing abrupt changes between blocks, until the objective function converges, thus obtaining a smooth block-level enhancement matrix. This process can effectively alleviate the boundary discontinuity problem caused by block partitioning, making the enhancement matrix more natural and harmonious as a whole.
[0083] Furthermore, the obtained smooth block-level enhancement matrix is mapped to a pixel-level enhancement matrix. Specifically, the pixel coordinate set of each local block in the scarce samples of power grid equipment is first obtained; then, the enhancement weight of the local block is smoothly extended to all the pixels it contains using weight interpolation to form an extended enhancement matrix; and then, through normalization processing, the weights of different regions are brought to a uniform scale to obtain the pixel-level enhancement matrix.
[0084] S2.2.1: Construct a block-level graph based on the block-level enhancement matrix, wherein the nodes of the block-level graph are local blocks, the initial values of the nodes of the block-level graph are the weights of the local blocks, and the edge weights of the block-level graph are the similarity between two local blocks;
[0085] Specifically, each local block is first treated as a node in the graph, and the enhancement weight corresponding to the local block is used as the initial value of the node, thus preserving the independent contribution of the block in the enhancement process. Then, the similarity between local blocks, such as the similarity of gray-scale distribution, texture features or temperature gradient, is calculated, and the similarity is used as the edge weight to assign the connection relationship between the nodes.
[0086] Furthermore, mapping the block-level enhancement matrix to a block-level graph is to explicitly encode the spatial context into the enhancement strategy. Nodes carry the enhancement intent of each block, and edge weights reflect the similarity of adjacent blocks in grayscale, texture, and temperature features. Compared to adjusting individual blocks in isolation, the graph model can propagate reliable information from high-confidence regions to uncertain or noise-affected regions, thereby suppressing the damage of isolated anomalies to the overall result while maintaining regional consistency.
[0087] S2.2.2: Based on the block-level graph, a smooth block-level enhancement matrix is obtained by iteratively solving the Laplace regularization objective function and graph propagation.
[0088] Specifically, a combination of Laplacian regularization and graph propagation is used on the block-level graph. The Laplacian term penalizes strong differences between similar nodes, keeping the weights consistent within similar regions. The smoothing intensity is finely controlled by setting the regularization coefficient, thus finding a balance between denoising and edge preservation. The advantage of using iterative graph propagation is that the results are stable. The weights of high-confidence blocks steadily influence their neighborhoods, and the boundaries are not blindly smoothed due to their lower edge weights, effectively alleviating the boundary discontinuities and artifacts caused by block partitioning.
[0089] S2.2.2.1: Construct the block-level graph Laplacian matrix based on the block-level graph;
[0090] Specifically, the Laplacian matrix, through the difference between the node degree matrix and the adjacency matrix, characterizes the similarity relationship between nodes in the graph and the overall topology. The Laplacian matrix can quantify the correlation between blocks, so that the enhancement weights not only depend on the characteristics of individual blocks, but are also constrained by the similarity of the neighborhood.
[0091] S2.2.2.2: Define the Laplace regularization objective function;
[0092] Specifically, the Laplace regularization objective function achieves spatial smoothness constraint on block-level augmentation weights by penalizing the difference in weights between similar nodes. The Laplace regularization objective function can prevent abrupt changes or discontinuities between blocks, preserve the differences in key regions, and suppress the over-augmentation of noise and isolated anomalous blocks.
[0093] S2.2.2.3: Minimize the Laplacian regularization objective function through graph propagation, and iteratively update the block-level graph Laplacian matrix, wherein the smoothing intensity is controlled by the regularization coefficient in the Laplacian regularization objective function until the objective function converges, resulting in a smoothed block-level enhancement matrix.
[0094] Specifically, using the graph propagation algorithm to iteratively optimize the Laplace regularization objective function can make full use of the global and local spatial relationships. The weights of high-confidence blocks can stably influence their neighborhoods, achieving reasonable diffusion of augmented information and making the final smooth block-level augmentation matrix continuous and consistent with natural boundaries.
[0095] S2.2.3: Downsample the smoothed block-level enhancement matrix to obtain a pixel-level enhancement matrix.
[0096] Specifically, the steps for mapping the smoothed block-level enhancement matrix to a pixel-level enhancement matrix include three parts: First, obtain the set of pixel coordinates for each local block in the scarce samples of power grid equipment to clarify the correspondence between blocks and pixels; then, smoothly extend the block-level weights to all pixels within the local block using a weighted interpolation method to form an extended enhancement matrix; finally, normalize the extended enhancement matrix to unify the enhancement intensity of different regions to the same scale, thereby obtaining the final pixel-level enhancement matrix.
[0097] Furthermore, the pixel coordinate set clearly defines the pixel positions contained in each local block, establishes the mapping relationship between block-level weights and specific pixels, and ensures that the enhancement of key regions can accurately cover the actual pixels, avoiding omissions and false enhancements; the weight interpolation method makes the weights present a smooth transition within the local block, avoids discontinuities or artifacts caused by hard boundaries, and preserves the local consistency structure learned in the block-level graph propagation; normalizing the extended enhancement matrix can prevent local over-strength or under-strength enhancement caused by differences in the absolute value of weights, and ensure that pixel-level enhancement is stable and reliable in the global scope.
[0098] Furthermore, the pixel-level enhancement matrix refines the spatial consistency and local features of the block level down to each pixel. The pixel-level enhancement matrix can better reflect the detailed changes in the target area, enhance the recognizability of overheated or abnormal areas, and at the same time help improve the accuracy and robustness of infrared image defect detection and diagnosis of power grid equipment.
[0099] S2.3: Update the initialized weight matrix and replace the weight matrix according to the pixel-level enhancement matrix.
[0100] Specifically, the pixel-level enhancement matrix is standardized to eliminate the influence of uneven numerical distribution among different pixels, resulting in a standard pixel-level enhancement matrix. Then, the standard pixel-level enhancement matrix is multiplied element-wise with the weight matrix to obtain an updated weight matrix. The updated matrix replaces the original weight matrix, thereby realizing the correction and optimization of the overall weight distribution by the enhancement information.
[0101] Furthermore, through the above processing steps, on the one hand, the standardization operation can unify the numerical range of the pixel-level enhancement matrix to a controllable range, effectively avoiding the imbalance of updates caused by some regions having values that are too large or too small; on the other hand, the element-wise multiplication method realizes the point-by-point adjustment of the weight matrix, so that the enhancement weights can be directly applied to the corresponding pixel positions, achieving refined weight updates.
[0102] The specific steps for S3 are as follows:
[0103] S3.1: Calculate the temperature gradient information of the infrared image of the power grid equipment. The temperature gradient information includes the temperature gradient magnitude and the temperature gradient direction. Divide the region according to the temperature gradient information. The region includes hot spot region, temperature transition region and background region. Assign weights to different regions and generate a region weight matrix.
[0104] Specifically, the temperature gradient information of the infrared image of the power grid equipment is first calculated. The magnitude of the temperature gradient can reflect the intensity of local temperature changes, and the direction of the temperature gradient can characterize the spatial direction of temperature changes. By combining the two, the subtle differences in temperature distribution and spatial structural features in the image can be accurately depicted.
[0105] Furthermore, after obtaining the temperature gradient information, the infrared image of the power grid equipment is divided into regions, namely hot spot regions, temperature transition regions, and background regions. Hot spot regions usually correspond to potential defects or abnormal heating points of the equipment and are key targets for detection and diagnosis. Temperature transition regions are located between hot spot regions and background regions and contain important edge and gradual change information, which helps to maintain a natural transition between regions. Background regions are stable low-temperature regions and are mainly used to provide reference and comparison.
[0106] Furthermore, after completing the region division, different weights are assigned to different regions. Hotspot regions, which contain the most critical information, should be assigned higher weights to highlight them. Temperature transition regions should be assigned medium weights to preserve their edge features during the enhancement process. Background regions should be assigned lower weights to avoid them occupying too many computing resources and affecting saliency. Through the differentiated weight allocation strategy, the generated region weight matrix can highlight key regions.
[0107] S3.2: Input the temperature gradient information and regional weight matrix of the infrared image of the power grid equipment into the regional enhancement model, extract the features of different regions and regional boundaries, and enhance the features of hot spots through an attention mechanism to obtain the regional enhancement matrix.
[0108] Please see Figure 3 First, the temperature gradient information of the input infrared image of the power grid equipment is preprocessed, including normalizing the temperature gradient amplitude and using sine and cosine encoding to represent the temperature gradient direction. Second, the region weight matrix is multiplied point by point with the normalized temperature gradient amplitude to obtain the weighted gradient amplitude. Then, the weighted gradient amplitude and the encoded temperature gradient direction are combined to perform multi-scale feature extraction to generate a multi-scale feature matrix. Then, the multi-scale feature matrix is input into an attention mechanism, which marks the location of hotspot regions through spatial attention and marks feature channels related to high temperature anomalies through channel attention. Finally, based on the multi-scale feature matrix output by the attention mechanism, the region enhancement model is processed to output a region enhancement matrix.
[0109] Specifically, the region enhancement matrix can highlight hotspot areas and key features related to anomalous temperatures while suppressing background interference. Temperature gradient magnitude normalization and temperature gradient direction encoding ensure the continuity and robustness of features. The region weight matrix provides prior guidance, making the enhancement more targeted. Multi-scale feature extraction ensures that it can capture both small-scale hotspots and large-scale anomalous trends. The attention mechanism further improves the accuracy of hotspot localization and feature channel selection. The final output region enhancement matrix can not only clearly enhance anomalous areas but also preserve boundary details.
[0110] S3.2.1: Preprocess the temperature gradient information of the infrared image of the power grid equipment. The preprocessing includes normalizing the temperature gradient amplitude and using sine and cosine encoding for the temperature gradient direction.
[0111] Specifically, the temperature gradient magnitude can be calculated from the temperature difference between adjacent pixels. To eliminate differences in numerical dimensions and range, the temperature gradient magnitude is normalized. For example, a normalization method can be used to linearly map the temperature gradient magnitude to the [0,1] interval, or the temperature gradient magnitude can be transformed into a distribution with zero mean and unit variance, so that different temperature gradient magnitudes are within a uniform scale range. The temperature gradient direction information is usually represented in the form of angle. To avoid discontinuities in the angle near 0° and 360°, the direction angle is encoded by sine and cosine functions respectively to obtain a two-dimensional vector representation, forming a smooth and continuous direction feature input.
[0112] Furthermore, the purpose of normalizing the temperature gradient amplitude is to improve numerical stability so that subsequent calculations will not be distorted due to differences in magnitude between different amplitudes. Sine and cosine encoding can effectively solve the discontinuity problem caused by the periodicity of angles, so that the model does not need to handle angle jumps when learning directional features.
[0113] S3.2.2: Multiply the region weight matrix and the normalized temperature gradient magnitude point by point to obtain the weighted gradient magnitude;
[0114] Specifically, by introducing a regional weight matrix, the importance of the region is directly injected into the temperature gradient information, so that the temperature gradient magnitude has a spatially differentiated response.
[0115] S3.2.3: Perform multi-scale feature extraction based on the weighted gradient magnitude and temperature gradient direction to obtain a multi-scale feature matrix;
[0116] Specifically, the weighted gradient magnitude reflects the intensity of temperature change in each pixel of the image, and the temperature gradient direction provides directional features of the change. Through multi-scale feature extraction, local details and overall contour information can be obtained simultaneously in receptive fields of different sizes, making the identification of temperature anomalies, hot spots and structural edges in key areas of power grid equipment more accurate and robust, and improving the ability to perceive abnormal patterns.
[0117] S3.2.4: Input the multi-scale feature matrix into the attention mechanism, mark the location of hotspot areas through spatial attention, and mark the feature channels related to high temperature anomalies through channel attention;
[0118] Specifically, the attention mechanism can automatically adjust the weights based on the input multi-scale feature matrix. Spatial attention is used to weight each spatial location of the feature matrix to highlight potential hotspot regions, while channel attention enhances the feature channels related to hotspot regions and suppresses channels related to background or irrelevant information, thereby improving feature discriminative power.
[0119] S3.2.5: Based on the multi-scale feature matrix output by the attention mechanism, the region enhancement model outputs a region enhancement matrix.
[0120] Specifically, the multi-scale feature matrix weighted by the attention mechanism is input into the region enhancement model. The region enhancement model usually includes multi-layer convolution or residual modules, which can process spatial and channel information simultaneously to fuse features at different scales. Inside the model, upsampling or downsampling operations can be used to integrate features of different resolutions. Combined with edge preservation or local smoothing strategies, the region boundary information is enhanced. After processing by the region enhancement model, the feature value of each pixel is adjusted so that the features of hot spots are highlighted, while non-critical regions are suppressed. The final output is the region enhancement matrix.
Claims
1. A power grid equipment infrared image enhancement method based on single modal sparse sample generation, characterized by, The method includes: Obtain scarce samples of power grid equipment, set image enhancement factors, and initialize a weight matrix based on the size of the scarce samples of power grid equipment; Based on the local information content and neighborhood self-similarity of the acquired infrared image of the power grid equipment, a block-level enhancement matrix is generated. The block-level enhancement matrix is smoothed to obtain a pixel-level enhancement matrix. Based on the pixel-level enhancement matrix, the initialized weight matrix is updated and replaced. Calculate the temperature gradient information of the infrared image of the power grid equipment, divide the region according to the temperature gradient information to obtain the region enhancement matrix, update the pixel-level enhanced weight matrix according to the region enhancement matrix and replace the weight matrix; Image enhancement is performed on the infrared images of power grid equipment based on the weight matrix; The image enhancement factor is used to limit the image enhancement intensity. When updating the weight matrix, the method further includes: Based on the image enhancement factor, the weight matrix before the update is pre-enhanced to obtain the pre-enhanced weight matrix; The pre-enhanced weight matrix and the updated weight matrix are compared to determine whether the elements of the updated weight matrix exceed the value range of the corresponding elements of the pre-enhanced weight matrix. If there are elements in the updated weight matrix that exceed the value range of the corresponding elements of the pre-enhanced weight matrix, an intensity restriction operation is performed on the elements that exceed the value range. Based on the local information content and neighborhood self-similarity of the acquired infrared images of power grid equipment, a block-level enhancement matrix is generated, including: The acquired infrared images of power grid equipment are divided into local blocks of fixed size; Calculate the local information content and neighborhood self-similarity of each local block. The local information content includes local entropy, local contrast and texture energy. The neighborhood self-similarity represents the degree of similarity between each local block and local blocks in its neighborhood. The weight of each local block is set according to the neighborhood self-similarity. The local information content is compared with the preset local information content threshold. The local blocks are then re-divided and the weights of the local blocks are set until the local information content of all local blocks is less than the threshold, thus obtaining the block-level enhancement matrix. Smoothing the block-level enhancement matrix yields the pixel-level enhancement matrix, including: Based on the block-level enhancement matrix, a block-level graph is constructed, wherein the nodes of the block-level graph are local blocks, the initial values of the nodes of the block-level graph are the weights of the local blocks, and the edge weights of the block-level graph are the similarity between two local blocks. Based on the block-level graph, a smooth block-level enhancement matrix is obtained by iteratively solving the Laplacian regularization objective function and graph propagation. The smoothed block-level enhancement matrix is downsampled to obtain a pixel-level enhancement matrix.
2. The method for enhancing infrared images of power grid equipment based on single-modal scarce samples according to claim 1, characterized in that, Based on the block-level graph, a smoothed block-level enhancement matrix is obtained by iteratively solving the Laplacian regularization objective function and graph propagation, including: Construct the block-level graph Laplacian matrix based on the block-level graph; Define the Laplace regularization objective function; The block-level graph Laplacian regularization objective function is minimized through graph propagation, and the smoothing intensity is iteratively updated by using the regularization coefficients in the Laplacian regularization objective function to control the smoothing intensity until the objective function converges, resulting in a smoothed block-level enhancement matrix.
3. The method for enhancing infrared images of power grid equipment based on single-modal scarce samples according to claim 1, characterized in that, The smoothed block-level enhancement matrix is downsampled to obtain a pixel-level enhancement matrix, including: Obtain the set of pixel coordinates for each local block in the scarce samples of power grid equipment; By using weighted interpolation, the enhancement weights of each local block in the block-level enhancement matrix are smoothly extended to all pixels within the local block to obtain the extended enhancement matrix; The extended enhancement matrix is normalized to obtain the pixel-level enhancement matrix.
4. The method for enhancing infrared images of power grid equipment based on single-modal scarce samples according to claim 1, characterized in that, Based on the pixel-level enhancement matrix, update the initialized weight matrix and replace the weight matrix, including: The pixel-level enhancement matrix is normalized to obtain a standard pixel-level enhancement matrix; The standard pixel-level enhancement matrix is multiplied element-wise with the initialized weight matrix to update the initialized weight matrix and replace the weight matrix.
5. The method for enhancing infrared images of power grid equipment based on single-modal scarce samples according to claim 1, characterized in that, Calculate the temperature gradient information of the infrared image of the power grid equipment, and divide the region according to the temperature gradient information to obtain a region enhancement matrix, including: Calculate the temperature gradient information of the infrared image of the power grid equipment. The temperature gradient information includes the temperature gradient magnitude and temperature gradient direction. Divide the region according to the temperature gradient information. The region includes hot spot region, temperature transition region and background region. Assign weights to different regions to generate a region weight matrix. The temperature gradient information and regional weight matrix of the infrared image of the power grid equipment are input into the regional enhancement model. Features of different regions and regional boundaries are extracted, and hot spot features are enhanced through an attention mechanism to obtain the regional enhancement matrix.
6. The method for enhancing infrared images of power grid equipment based on single-modal scarce samples according to claim 5, characterized in that, The temperature gradient information and region weight matrix of the infrared image of the power grid equipment are input into the region enhancement model. Features of different regions and region boundaries are extracted, and hotspot region features are enhanced through an attention mechanism to obtain the region enhancement matrix, including: The temperature gradient information of the infrared image of the power grid equipment is preprocessed, including normalizing the temperature gradient amplitude and using sine and cosine encoding for the temperature gradient direction. The weighted gradient magnitude is obtained by multiplying the region weight matrix and the normalized temperature gradient magnitude point by point. Multi-scale feature extraction is performed based on the weighted gradient magnitude and temperature gradient direction to obtain a multi-scale feature matrix. The multi-scale feature matrix is input into the attention mechanism, and the location of hotspot regions is marked by spatial attention, while the feature channels related to temperature anomalies are marked by channel attention. Based on the multi-scale feature matrix output by the attention mechanism, a region enhancement matrix is output through the region enhancement model.
7. The method for enhancing infrared images of power grid equipment based on single-modal scarce samples according to claim 1, characterized in that, Image enhancement of the infrared image of the power grid equipment according to the weight matrix includes: standardizing the weight matrix and weighting the infrared image of the power grid equipment pixel by pixel, and outputting an enhanced image of the infrared image of the power grid equipment.
Citation Information
Patent Citations
Infrared image edge enhancement method and device, equipment and storage medium
CN117115029A
Infrared image enhancement method and system based on deep learning convolutional neural network
CN120912459A