Image preprocessing method for insulator fault detection
Guided filtering-Ret inex optimized through NSCT transformation and GWO algorithm, combined with hard threshold noise reduction processing, solves the problem of low contrast and noise in aerial insulator images, significantly improves the contrast and noise reduction effect of insulator images, and enhances fault detection efficiency.
Patent Information
- Application Number
- CN202410799456.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-06
AI Technical Summary
It is difficult to effectively improve the contrast and noise reduction effect of aerial insulator images with existing technology, resulting in low fault detection efficiency.
The image is decomposed into low-frequency and high-frequency sub-images using NSCT transformation, the low-frequency sub-image is enhanced using the guided filtering-Ret inex optimized by the GWO algorithm, and the high-frequency sub-image is denoised through hard thresholding, and finally the NSCT inverse transform is used Reconstruct the image.
It significantly improves the contrast and noise reduction effect of the insulator image, enhances the visual effect of the image, facilitates fault detection, and facilitates promotion and use.
Smart Images

Figure CN118608795A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image recognition, and in particular relates to an image preprocessing method for insulator fault detection. Background Art
[0002] In recent years, the power industry has provided a solid guarantee for the development of various industries in my country. Insulators are one of the indispensable power equipment in transmission lines. They are generally installed on the pole tower and the conductor connection to achieve mechanical fixation and electrical insulation. Since insulators are laid outdoors, they are subject to wind and rain erosion and human damage, and are prone to failures. For example, there is a certain amount of dirt on the surface of the insulator, which causes discharge, cracks and damage to the insulator due to external reasons such as lightning overvoltage, and string breakage caused by thermal expansion of glass insulators. Insulator failure has the most serious impact on the stable operation of the power system. Therefore, it is particularly important to inspect insulators.
[0003] With the development of science and technology, the use of drone inspections has overcome the problems of high cost and limited operating conditions of traditional insulator monitoring methods, but it also brings the defect that massive insulator images cannot be efficiently processed manually. With the continuous improvement of deep learning theory, many target detection models have been proposed one after another, which can automatically detect aerial images. Therefore, it is a general trend to apply deep learning to insulator fault detection. To detect insulator faults based on image processing, it is first necessary to accurately locate the insulator in a complex image, and then separate the insulator from the background through features such as color, texture, and shape, and detect the fault through algorithms.
[0004] Since most of the insulators are located in the mountains, the terrain has a serious impact on the light. The insulator images obtained by aerial photography are usually noisy and have a low contrast. Therefore, it is necessary to preprocess the insulator images. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide an image preprocessing method for insulator fault detection in view of the deficiencies in the above-mentioned prior art. The method has simple steps, reasonable design, and convenient implementation. It can be effectively applied to image preprocessing for insulator fault detection, effectively improve the contrast of insulator images, have significant noise reduction effect, enhance the insulator image effect, have good use effect, and be easy to promote and use.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: an image preprocessing method for insulator fault detection, comprising the following steps:
[0007] Step 1: Decompose the insulator image into low-frequency sub-image and high-frequency sub-image using NSCT transformation;
[0008] Step 2: using the guided filter optimized by the GWO algorithm - Ret inex to enhance the low-frequency sub-image and improve the image contrast;
[0009] Step 3: Using a threshold to perform noise reduction on the high-frequency sub-image;
[0010] Step 4: Use NSCT inverse transform to reconstruct the insulator image.
[0011] In the above-mentioned image preprocessing method for insulator fault detection, the specific process of enhancing the low-frequency sub-image by using the guided filter-Ret inex optimized by the GWO algorithm in step 2 includes:
[0012] Step 201, setting the initial population F of the wolf pack, the maximum number of iterations Z and the search dimension, and setting the search range of the guided filter kernel regularization factor ε;
[0013] Step 202, initializing the population orientation of the wolf pack, that is, the initial value of ε;
[0014] Step 203, performing Sigmoid-guided filtering-Ret inex enhancement on the low-frequency sub-image according to the ε parameter value;
[0015] Step 204, calculating the fitness value and evaluating the enhancement effect;
[0016] Step 205: select α, β, and δ wolves according to the fitness values, wherein the individual with the best fitness value is regarded as α, the individual with the second best fitness value is regarded as β, and the individual with the third best fitness value is regarded as δ. The positions of α, β, and δ wolves are the optimal solution, the best solution, and the suboptimal solution of ε.
[0017] Step 206: The α, β, and δ wolves evaluate the current position of the prey, and the remaining wolves evaluate their own positions and follow;
[0018] Step 207, updating the position of the gray wolf group;
[0019] Step 208, once the α wolf detects the location of the prey during the hunting process of the gray wolf population, it commands the wolf pack to approach the prey until the prey is captured, and updates the value of α and the values of the coefficient vectors A and C;
[0020] Step 209: When the number of iterations reaches the preset maximum number of iterations Z, the global optimal solution is the optimal enhancement parameter value;
[0021] Step 2010: Optimize Sigmoid-guided filter-Ret inex according to the optimal parameter value to enhance the low-frequency sub-image.
[0022] In the above-mentioned image preprocessing method for insulator fault detection, the formula for calculating the fitness value in step 204 is:
[0023] Fitness=Contrast×Entropy
[0024] In the formula, Fitness represents fitness, Contrast represents contrast, and Entropy represents information entropy.
[0025] In the above-mentioned image preprocessing method for insulator fault detection, the specific process of updating the position of the gray wolf group in step 207 includes: setting a hierarchy in the gray wolf group, each wolf individual is in one of the four defined levels, wherein the individual with the best fitness value is regarded as α, the individual with the second best fitness value is regarded as β, the individual with the third best fitness value is regarded as δ, and the remaining individuals are regarded as w. The gray wolves of different levels are closely combined, and the best prey source position is found through cyclic iteration. The behavior of the gray wolf population surrounding the prey is:
[0026] D=|C·X P (t)-X(t)|;
[0027] X(t+1)=X P (t)-A·D;
[0028] Where X(t+1) is the position of the gray wolf at the t+1th iteration, X(t) is the position of the gray wolf at the tth iteration, and X P (t) is the position of the prey at the tth iteration, D is the distance between the wolf and the prey, and A and C are both coefficient vectors.
[0029] In the above-mentioned image preprocessing method for insulator fault detection, the specific process of updating the values of coefficient vectors A and C in step 208 includes:
[0030] A=2ξr 1 -ξ;
[0031] C=2r 2 ;
[0032] In the formula, r 1 and r 2 is a random vector between [0,1], ξ is the convergence factor, which decreases linearly from 2 to 0.
[0033] In the above-mentioned image preprocessing method for insulator fault detection, the specific process of using a threshold value to perform noise reduction processing on the high-frequency sub-image in step 3 includes:
[0034] Step 301, using hard threshold to shrink the NSCT high frequency coefficients;
[0035] Step 302: Use wavelet transform to estimate the noise of the image signal;
[0036] Step 303: According to the relationship that the threshold is proportional to the standard deviation of the transformation coefficient, different thresholds are selected at different scales and in different directions.
[0037] In the above-mentioned image preprocessing method for insulator fault detection, the function expression of the hard threshold in step 301 is:
[0038]
[0039] In the formula, is the high frequency coefficient after processing, is the high frequency coefficient before processing, and T is the threshold.
[0040] In the above-mentioned image preprocessing method for insulator fault detection, the function expression for selecting different thresholds in step 303 is:
[0041]
[0042] Where M and N are the image sizes, C k j (x, y) is the coefficient of the kth subband of the jth scale at (x, y), mean c is the mean value of the coefficients in this subband, σ 1 is an estimate of the standard deviation of the noise.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] 1. The method of the present invention has simple steps, reasonable design and is easy to implement.
[0045] 2. To solve the problem of low contrast and noise in aerial insulator images, the present invention estimates the illumination component of Retinex through guided filtering to obtain more edge detail information, and adaptively extracts the regularization factor of guided filtering based on the GWO algorithm to enhance the insulator image effect.
[0046] 3. Based on the hard threshold shrinkage, the present invention assumes that the threshold is proportional to the standard deviation of the transformation coefficient, so that the threshold is selected according to the transformation coefficient, thereby solving the balance of denoising in different areas. After the image is denoised, the detail information of the image is also significantly improved.
[0047] 4. The present invention can be effectively applied to image preprocessing for insulator fault detection, effectively improves the contrast of insulator images, has a significant noise reduction effect, has good use effect, and is easy to promote and use.
[0048] In summary, the method of the present invention has simple steps, reasonable design, and easy implementation. It can be effectively applied to image preprocessing for insulator fault detection, effectively improves the contrast of insulator images, has significant noise reduction effect, enhances the insulator image effect, has good use effect, and is easy to promote and use.
[0049] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0051] like Figure 1 As shown, the image preprocessing method for insulator fault detection of the present invention comprises the following steps:
[0052] Step 1: Decompose the insulator image into low-frequency sub-images and high-frequency sub-images using NSCT transformation;
[0053] Step 2: using the guided filter optimized by the GWO algorithm - Ret inex to enhance the low-frequency sub-image and improve the image contrast;
[0054] Step 3: Using a threshold to perform noise reduction on the high-frequency sub-image;
[0055] Step 4: Use NSCT inverse transform to reconstruct the insulator image.
[0056] In this embodiment, the specific process of enhancing the low-frequency sub-image by using the guided filter-Ret inex optimized by the GWO algorithm in step 2 includes:
[0057] Step 201, setting the initial population F of the wolf pack, the maximum number of iterations Z and the search dimension, and setting the search range of the guided filter kernel regularization factor ε;
[0058] In the specific implementation, the initial population F is set to 50, the maximum number of iterations Z is set to 100, the search dimension is set to 2, and the search range of the guided filter kernel regularization factor ε is set to [0.01, 1].
[0059] Step 202, initializing the population orientation of the wolf pack, that is, the initial value of ε;
[0060] Step 203, performing Sigmoid-guided filtering-Ret inex enhancement on the low-frequency sub-image according to the ε parameter value;
[0061] Step 204, calculating the fitness value and evaluating the enhancement effect;
[0062] Step 205: select α, β, and δ wolves according to the fitness values, wherein the individual with the best fitness value is regarded as α, the individual with the second best fitness value is regarded as β, and the individual with the third best fitness value is regarded as δ. The positions of α, β, and δ wolves are the optimal solution, the best solution, and the suboptimal solution of ε.
[0063] Step 206: The α, β, and δ wolves evaluate the current position of the prey, and the remaining wolves evaluate their own positions and follow;
[0064] Step 207, updating the position of the gray wolf group;
[0065] Step 208, once the α wolf detects the location of the prey during the hunting process of the gray wolf population, it commands the wolf pack to approach the prey until the prey is captured, and updates the value of α and the values of the coefficient vectors A and C;
[0066] Step 209: When the number of iterations reaches the preset maximum number of iterations Z, the global optimal solution is the optimal enhancement parameter value;
[0067] Step 2010: Optimize Sigmoid-guided filter-Ret inex according to the optimal parameter value to enhance the low-frequency sub-image.
[0068] In this embodiment, the formula for calculating the fitness value in step 204 is:
[0069] Fitness=Contrast×Entropy
[0070] In the formula, Fitness represents fitness, Contrast represents contrast, and Entropy represents information entropy.
[0071] In specific implementation, contrast can represent the visual effect of the image, and entropy can reflect the degree of image detail.
[0072] In this embodiment, the specific process of updating the position of the gray wolf group described in step 207 includes: setting a hierarchy in the gray wolf group, each wolf individual is in one of the four defined levels, wherein the individual with the best fitness value is regarded as α, the individual with the second best fitness value is regarded as β, the individual with the third best fitness value is regarded as δ, and the remaining individuals are regarded as w. The gray wolves of different levels are closely combined, and the best prey source position is found through cyclic iteration. The behavior of the gray wolf population surrounding the prey is:
[0073] D=|C·X P (t)-X(t)|;
[0074] X(t+1)=X P (t)-A·D;
[0075] Where X(t+1) is the position of the gray wolf at the t+1th iteration, X(t) is the position of the gray wolf at the tth iteration, and X P (t) is the position of the prey at the tth iteration, D is the distance between the wolf and the prey, and A and C are both coefficient vectors.
[0076] In this embodiment, the specific process of updating the values of coefficient vectors A and C in step 208 includes:
[0077] A=2ξr 1 -ξ;
[0078] C=2r 2 ;
[0079] In the formula, r 1 and r 2 is a random vector between [0,1], ξ is the convergence factor, which decreases linearly from 2 to 0.
[0080] In specific implementation, image enhancement algorithms can be divided into spatial domain methods and frequency domain methods. The representative algorithm of the spatial domain method, Ret inex, can effectively solve the shortcomings of aerial insulator images, but it cannot avoid halo artifacts and unclear details. The image enhanced by wavelet transform, a typical algorithm based on the frequency domain method, has rough edges, so the non-subsampled Contourlet transform (NSCT) came into being. This transform has many advantages, such as multi-resolution, multi-direction, and translation invariance. When using NSCT for image enhancement, when the illumination of the image is uneven, a good visual effect cannot be obtained. The present invention combines the frequency domain method with the spatial domain method, and adopts the guided filter-Ret inex image enhancement algorithm optimized by the GWO algorithm, which can enhance the low-frequency sub-image obtained by NSCT transformation. When using guided filtering to estimate the illumination component, different values of the guided filter kernel regularization factor ε have a greater impact on the illumination component estimation result. When ε is small, the reflection part can better eliminate the halo, but the grayscale dynamic range is too small; on the contrary, when ε is large, the halo phenomenon is obvious and the grayscale dynamic range is wide. Therefore, in order to make ε adaptively select the optimal value under different environments, the present invention uses the GWO algorithm to optimize the regularization factor ε and obtain the reflection component result that eliminates the halo and maintains the details. In order to be able to adaptively adjust the regularization factor ε of the guided filter kernel so that the enhanced insulator image can achieve a better effect, it is necessary to construct a suitable fitness function for quantitative evaluation. Contrast can characterize the visual effect of the image, and information entropy can reflect the degree of image detail.
[0081] In this embodiment, the specific process of using the threshold value to perform noise reduction processing on the high-frequency sub-image in step 3 includes:
[0082] Step 301, using hard threshold to shrink the NSCT high frequency coefficients;
[0083] Step 302: Use wavelet transform to estimate the noise of the image signal;
[0084] Step 303: According to the relationship that the threshold is proportional to the standard deviation of the transformation coefficient, different thresholds are selected at different scales and in different directions.
[0085] In specific implementation, after NSCT transformation, the high-frequency sub-image generated contains a lot of noise. The high-frequency coefficient represents the characteristic information contained in the image details of a certain area in the image. If the absolute value of the high-frequency coefficient is relatively small, then it contains more noise. On the contrary, the part with a larger absolute value of the high-frequency coefficient corresponds to less noise and contains more information. Therefore, when performing noise reduction processing, the threshold T can be set in advance. If the high-frequency coefficient is less than the threshold, it is shrunk, that is, the coefficient is set to 0, thereby suppressing the noise. When shrinking the threshold, there are two methods often used, one is hard threshold shrinkage, and the other is soft threshold shrinkage. Different methods have very different effects on denoising. At the same time, the selection of threshold T should be appropriate. If the value is too small, the denoising effect will not be thorough; if the threshold is too large, it is likely to eliminate part of the image information and details during denoising, thereby making the image blurred and distorted. When the high-frequency coefficient is greater than the fixed threshold, the use of the soft threshold shrinkage method may bring about a constant deviation, thereby causing image distortion such as edge blur. At this time, the use of the hard threshold shrinkage method can better solve this problem. Using hard threshold shrinkage, the peak signal-to-noise ratio of the image is improved and the edge detail features of the image are highlighted.
[0086] In this embodiment, the function expression of the hard threshold in step 301 is:
[0087]
[0088] In the formula, is the high frequency coefficient after processing, is the high frequency coefficient before processing, and T is the threshold.
[0089] In this embodiment, the function expression for selecting different thresholds in step 303 is:
[0090]
[0091] Where M and N are the image sizes, is the coefficient of the kth subband of the jth scale at (x, y), mean c is the mean value of the coefficients in this subband, σ 1 is an estimate of the standard deviation of the noise.
[0092] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. An image preprocessing method for insulator fault detection, characterized in that: The following steps are involved: Step 1: Decompose the insulator image into low-frequency sub-images and high-frequency sub-images using NSCT transformation; Step 2: using the guided filter optimized by the GWO algorithm - Ret inex to enhance the low-frequency sub-image and improve the image contrast; Step 3: Using a threshold to perform noise reduction on the high-frequency sub-image; Step 4: Use NSCT inverse transform to reconstruct the insulator image.
2. An image preprocessing method for insulator fault detection according to claim 1, characterized in that: The specific process of enhancing the low-frequency sub-image by using the guided filter-Ret inex optimized by the GWO algorithm in step 2 includes: Step 201, setting the initial population F of the wolf pack, the maximum number of iterations Z and the search dimension, and setting the search range of the guided filter kernel regularization factor ε; Step 202, initializing the population orientation of the wolf pack, that is, the initial value of ε; Step 203, performing Sigmoid-guided filtering-Retinex enhancement on the low-frequency sub-image according to the ε parameter value; Step 204, calculating the fitness value and evaluating the enhancement effect; Step 205: select α, β, and δ wolves according to the fitness values, wherein the individual with the best fitness value is regarded as α, the individual with the second best fitness value is regarded as β, and the individual with the third best fitness value is regarded as δ. The positions of α, β, and δ wolves are the optimal solution, the best solution, and the suboptimal solution of ε. Step 206: The α, β, and δ wolves evaluate the current position of the prey, and the remaining wolves evaluate their own positions and follow; Step 207, updating the position of the gray wolf group; Step 208, once the α wolf detects the location of the prey during the hunting process of the gray wolf population, it commands the wolf pack to approach the prey until the prey is captured, and updates the value of α and the values of the coefficient vectors A and C; Step 209: When the number of iterations reaches the preset maximum number of iterations Z, the global optimal solution is the optimal enhancement parameter value; Step 2010: Optimize Sigmoid-guided filtering-Retinex according to the optimal parameter value to enhance the low-frequency sub-image.
3. An image preprocessing method for insulator fault detection according to claim 2, characterized in that: The formula for calculating the fitness value in step 204 is: Fitness=Contrast×Entropy In the formula, Fitness represents fitness, Contrast represents contrast, and Entropy represents information entropy.
4. The image preprocessing method for insulator fault detection according to claim 2, characterized in that: The specific process of updating the position of the gray wolf group in step 207 includes: setting a hierarchy in the gray wolf group, each wolf individual is in one of the four defined levels, wherein the individual with the best fitness value is regarded as α, the individual with the second best fitness value is regarded as β, the individual with the third best fitness value is regarded as δ, and the remaining individuals are regarded as w. The gray wolves of different levels are closely combined, and the best prey source position is found through cyclic iteration. The behavior of the gray wolf population to surround the prey is: D=|C·X P (t)-X(t)|; X(t+1)=X P (t)-A·D; Where X(t+1) is the position of the gray wolf at the t+1th iteration, X(t) is the position of the gray wolf at the tth iteration, and X P (t) is the position of the prey at the tth iteration, D is the distance between the wolf and the prey, and A and C are both coefficient vectors.
5. An image preprocessing method for insulator fault detection according to claim 4, characterized in that: The specific process of updating the values of coefficient vectors A and C in step 208 includes: A=2ξr1-ξ; C=2r2; Where r1 and r2 are random vectors between [0,1], and ξ is the convergence factor, which decreases linearly from 2 to 0.
6. An image preprocessing method for insulator fault detection according to claim 1, characterized in that: The specific process of using the threshold value to perform noise reduction on the high-frequency sub-image in step 3 includes: Step 301, using hard threshold to shrink the NSCT high frequency coefficients; Step 302: Use wavelet transform to estimate the noise of the image signal; Step 303: According to the relationship that the threshold is proportional to the standard deviation of the transformation coefficient, different thresholds are selected at different scales and in different directions.
7. An image preprocessing method for insulator fault detection according to claim 6, characterized in that: The function expression of the hard threshold in step 301 is: In the formula, is the high frequency coefficient after processing, is the high frequency coefficient before processing, and T is the threshold.
8. An image preprocessing method for insulator fault detection according to claim 7, characterized in that: The function expression for selecting different thresholds in step 303 is: Where M and N are image sizes, is the coefficient of the kth subband of the jth scale at (x, y), mean c is the mean of the coefficients in this subband, and σ1 is the estimated value of the noise standard deviation.
Citation Information
Patent Citations
Adaptive PCNN image denoising method based on GWO and BEMD optimization
CN112785522A
Power equipment infrared image enhancement method based on NSCT domain
CN113592729A
Rolling bearing fault diagnosis method based on CEEMDAN and GWO-NLM
CN113776837A
Camera System for Creating an Image From a Plurality of Images
US20100097444A1
Cited By
Communication line insulator fault detection method and system
CN121259442A
