# Insulator Hydrophobic Image Edge Detection Algorithm considering Deconvolution and Deblurring Algorithm

Authors: Dalei Wang; Lan Ma
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In this paper, the Gram matrix is used to calculate the correlation of the filter response sets under different scale kernels learned by each layer of the network in the deconvolution, and the loss between the corresponding feature response correlations in the multilayer network is calculated. Linear summation is used to obtain a stable, multiscale image model representation. This paper extracts the contours of the salient areas of the image and adjusts the parameters of the deconvolution network to learn the salient area patterns of the image. At the same time, for the image to be generated, a shape template is used to limit the range of the area to be generated in order to obtain a shape image with similar patterns. When the spatial relative relationship characteristics of the image constituent objects are obvious, we appropriately add high-level semantic feature activation values for reinforcement. This paper solves the estimation of the unknown blur kernel by using image prior knowledge, filtering and gradient domain algorithms and other different technologies to obtain image jitter or scene movement information and estimate the size, location, and density of the blur kernel. This paper studies a relatively robust deconvolution model, which is insensitive to random noise, has stable effects, and can overcome the water ripple effect caused by the usual convolution process. This paper attempts to study the fuzzy model with variable space. The usual blur is a spatial invariant model; that is, a single kernel is used to describe the motion of all pixels on the image. By selecting different characteristic parameters, this paper conducts experimental research on some existing hydrophobic indicator function methods and calculates the relationship between characteristic parameters and hydrophobicity when different hydrophobic indicator functions are adopted. One characteristic of the hydrophobic image of composite insulators is low contrast. The traditional method of converting color images to grayscale images cannot improve the image contrast. This paper analyzes the hydrophobic image of the composite insulator, and the extracted B channel component image of the hydrophobic image improves the contrast of the image and facilitates the subsequent segmentation of water traces and background. In this paper, the water repellent image's watermark area is counted, and connected-domain wave processing is used to limit the area of water droplets retained, thereby improving the efficiency of filtering water droplets without having a big impact on the image as a whole. The problem of uneven illumination is an unavoidable problem in the field of image processing, and the resulting reflection problem brings difficulties to image processing. This article regards the reflective area of the watermark as a “hole” and uses the idea of “hole filling” to eliminate the reflective point, which weakens the reflection problem to a certain extent.


---

## Body

## 1. Introduction

Insulators are commonly used insulation controls on overhead transmission lines and locomotive roofs. They have the two basic functions of supporting wires and preventing current from returning to the ground. They are important devices to ensure the normal operation of the entire transmission line system and the locomotive power system [1]. Environmental stress and changes in the electrical charge on the power system may cause insulators to fail, thereby affecting the normal operation of the entire transmission line and locomotive system, causing serious economic losses [2]. The investigation found that the pollution flashover of insulators is the main reason for the tripping of power supply lines. At the end of 2020, nearly 30% of the transmission lines put into operation in the East China Grid had flashover accidents, causing serious economic losses. Large-scale pollution flashover accidents occurred in Liaoning, Hebei, Henan, and other places, with more than 3,000 trip accidents, and the loss of electricity in the accidents reached 900 million megawatts, causing inestimable economic losses to the country. Early insulator materials were ceramic or glass, which caused a large number of pollution flashover accidents due to poor pollution resistance. This seriously affected the normal operation of electric power and locomotive systems and was gradually replaced by composite insulators with superior electrical performance [3]. Composite insulators have the advantages of high mechanical lightness, aging resistance, and long service life, so they account for more than 5% of the total use of insulators. In the course of use, composite insulators are exposed to the outdoors for a long time and will be affected by the harsh environment. The water repellent performance is easily destroyed, causing its performance to gradually decline, leading to hidden dangers in the power system and increasing the occurrence of failures [4]. Based on the abovementioned situation, in order to ensure the safe and stable operation of the circuit and reduce the occurrence of power failures, it is necessary to periodically detect the hydrophobicity of the composite insulator to determine its level [3].Due to the imbalance between the current power demand, the scale of the synchronized grid, and the energy consumption structure, in order to meet the needs of large-scale optimization of grid configuration and energy consumption under the conditions of the new era and to improve the safe carrying capacity of the grid, it is urgent to strengthen the cross-regional characteristics [5]. In addition to the increase in the number of insulators, the construction of large-scale UHV transmission lines is bound to put forward higher requirements on the insulation characteristics and mechanical strength of insulators, and the insulation characteristics of insulators are closely related to the safe and stable operation of the power grid [6]. Once insulators occur, corona discharge and pollution flashover will destroy the stability of the power system and even cause large-scale pollution flashover blackouts. Although high-voltage composite insulators have high mechanical strength, aging resistance, and a long service life, their water repellency and hydrophobicity change gradually. When they are subjected to the combined effects of corona discharge, ultraviolet rays, pollution, rain, and snow, the composite insulators’ umbrella skirts will gradually age, which will reduce their water repellent properties and increase the probability of pollution flashover [7]. In order to improve the safety and stability of the power system and reduce the probability of pollution flashover on transmission lines, it is particularly important to detect the hydrophobicity of composite insulators in real time and to discover the aging phenomenon in time. In recent years, the power and locomotive industries have developed rapidly, and insulators, as important supporting equipment, have also developed rapidly [8]. With the rapid development of the insulator industry, the incidence of accidents is also increasing, causing immeasurable losses to the economy. Therefore, new requirements are put forward for insulator performance testing and fault diagnosis technology. There is an urgent need to develop composite insulators that can quickly and efficiently detect composite insulators. It can be seen that the research on the failure mechanism of composite insulators and their performance detection and failure prevention measures is always one of the key technical issues in this field and has important practical significance.This paper proposes a multiscale pattern learning model based on a deconvolutional network to express the color, texture, local structure, and spatial relationship of the image and the combination of these characteristics. A high-level semantic feature activation value has been added to enhance the spatial correlation feature mode in the image. We introduced a single-core deblurring algorithm based on image gradient enhancement, which is suitable for single images in a whole-to-partial manner and in a rough-to-detailed order. We introduce the overall framework of the algorithm-multiresolution iterative architecture and analyze the advantages of this architecture. According to the algorithm flow, the principles, implementation, and effects of gradient enhancement, strong edge screening and denoising, fuzzy kernel estimation and refinement, and fast nonblind convolution steps are detailed in detail. This paper mainly completes the preprocessing of the hydrophobic image of the composite insulator and the extraction of the characteristic parameters of the water trace. In view of the characteristics of hydrophobic images, commonly used image preprocessing measures include methods such as improving contrast, enhancing binarization, filtering out water droplets, and eliminating reflections. By analyzing the characteristics of the water-repellent image, measures to improve the contrast are taken that are different from the traditional processing methods; in the binary image enhancement, the Otsu method is used to achieve the optimal processing of the binary image; through the statistics of the water trace characteristics, different measures are adopted. In the method of morphological processing to filter out some watermarks, measures have also been taken to improve the reflection of water droplets. Through the statistics of selected characteristic parameters of composite insulator samples, the relationship between commonly used characteristic parameters and hydrophobicity levels is experimentally studied.


## 2. Related Work

Inspired by the two-person zero-sum game [9], the network consists of a generator network and a discriminator network and learns the data distribution through adversarial learning. The main purpose of the proposed GAN network is to estimate the potential distribution of data samples and generate a large number of new data samples. It has great development prospects for its application in the field of image generation. At the same time, the research on digital image technology based on the GAN network in the past two years has been more extensive, from image style conversion to text generation of pictures, from image super-resolution reconstruction (SR) to the research of removing image global blur [10].More and more scholars have carried out research on image blur removal technology based on the GAN network [11]. Related scholars use theGAN network for SR problems, reconstructing high-resolution images from a single low-resolution image, which can save high-resolution images well [12]. Frequency texture details, and the method can also be applied to image deblurring detail information restoration. Relevant scholars combined with the Wasserstein GAN (WGAN) network to propose a deblurring method that does not require the estimation of the orbital blur kernel for the blur problem in the space imaging system [13]. This method is currently superior to most advanced remote sensing image blind deblurring algorithms.Related scholars have proposed a method based on conditional adversarial networks (CGANs) to remove the blur caused by a single camera shake [14]. The restored deblurred image is very close to the real image, but the drawback is that the grid phenomenon of the restored image is more serious. Nowadays, algorithm research based on deep learning is still in rapid development. Many deep learning models have been proposed one after another, and image deblurring technology will get further breakthroughs [15].Related scholars use deep neural networks (DNNs) to extract clear edges from blurred images, which greatly simplifies the estimation of the fuzzy kernel and reduces the amount of calculation [16]. Aiming at the problem of estimating the fuzzy kernel in the traditional blind deblurring algorithm, the researchers proposed a scale recursive network SRN-DeblurNet to remove image blur, and used a complex fuzzy data set for verification and achieved good results [17]. Since the removal of image blur based on the deep learning method requires a huge dataset to train the model, there is not so much fuzzy data that can be trained, which limits the application of the deep learning method to a certain extent.Gradient-based edge differential detection is a common method for image edge detection. This method is simple in operation and small in computational complexity, but is sensitive to noise and produces a wide response at the edge of the image; that is, the detected image edge area may contain more than one pixel, so the detection accuracy is not high. The wavelet transform is another common method for image edge extraction. Due to the multiscale characteristics of the wavelet transform, each wavelet transform of an image provides certain edge information. When the scale is small, the edge information is rich but the localization accuracy is not high; when the scale is large, the localization accuracy is high but the noise immunity is poor. Therefore, it is particularly important to control the scale reasonably in the edge extraction of the wavelet transform.Relevant scholars use wavelet transform to decompose the water-sprayed composite insulator image into high and low frequencies, and then perform coefficient processing on the high and low frequencies [18]. After inverse transformation, an enhanced image is formed, and the image is further filtered and preprocessed, and then the optimal threshold is used to segment the image into binarized images, then the insulator water spray binarized images are extracted from the feature amount [19].In the determination of the hydrophobicity level, when the number of images to be judged is large enough, it takes a lot of time to judge with human eyes, and the accuracy of manual recognition is not high, resulting in many wrong judgments. In response to this problem, in recent years, the personnel apply the technology of digital image processing to the hydrophobicity level detection [20]. After a series of processing on the image, they can intelligently judge which level the image belongs to. The input is an image, and the output is the hydrophobicity level category. No matter how large the image data is, accurate judgments can be obtained in a short time, forming a set of automatic identification intelligent systems for judging hydrophobicity, and the overall recognition rate is relatively high [21]. The processing process of the system includes image preprocessing, image segmentation, image feature extraction, and classifier level automatic recognition [22].Because the study of the hydrophobicity indicator function needs to be supported by a large number of statistical data, and to obtain dirty insulators with different hydrophobicity levels, data needs to be collected from the operating site. The clean insulators are generally unused new insulators, and their hydrophobicity is usually very good, which brings difficulties to the collection of samples. And the hydrophobicity grade of insulators obtained by the water spray classification method needs to be verified by other methods. Therefore, the current research on the hydrophobicity indicator function is still based on the improved shape factor method, and the results are continuously improved through the continuous improvement of the criterion and criterion.


## 3. Method

### 3.1. Multiscale Image Pattern Learning Based on Deconvolution

In the design of the network model, the network used by the model is deconvolution to remove the fully connected layer and the classification layer. The convolution part of the deconvolution network uses the network structure of VggNet16. The convolutional layer uses a convolution kernel of 3 ∗ 3 ∗k matrix, where k is the number of feature maps that will be obtained, and the moving step is one. The feature map obtained by convolution can be compared with the feature map before unconvolution or the input image. The weights obtained by VggNet16 for target recognition training are used, and the weights of the fully connected layer are removed. The pooling layer uses maximum pooling, and the maximum value of the features in the 2 ∗ 2 area is extracted accordingly, and the length and width of the feature map are reduced to one-half of the original. The network structure of the deconvolution part and the convolution part is mirror symmetrical. In order to perform the depooling operation, we use the “switch” in the pooling part to record the position of the maximum value in its 2 ∗ 2 neighborhood. In the process of depooling, the feature value of the previous layer is placed at the position recorded by the “switch” of the pooling part corresponding to this layer, and the feature value of the remaining part is zero. Therefore, the depooling layer can obtain a sparse excitation feature image with an area four times that of before depooling. Through the deconvolution operation, the part with zero feature value is “filled” as the learned feature. Unlike the convolution kernel used for semantic segmentation above, the convolution kernel used in the deconvolution layer here is the transposition of the convolution kernel of the corresponding convolution network part, that is, the convolution kernel of the convolution network part. The horizontal and vertical symmetrical structures are shown in Figure 1.Figure 1
Deconvolution network structure for multiscale image mode.Since the convolution part of the deconvolution network model and the deconvolution part of the network structure and filter weights are highly symmetrical, in order to maintain the balance of its style characteristics, the weight between the convolution part and the deconvolution part of the corresponding layer is unified, the weights are shared, and it is also in line with the perception of the image by the human visual nerve. The global feature relevance is expressed as follows:(1)M=∏l=1Lwl⋅Gl−GL−l.In this network, a batch normalization (BN) layer is added to normalize the learned features in the batch layer of the current iteration. This method can increase the learning rate, alleviate overfitting, reduce image distortion, etc. At the same time, the process of normalizing the learned weights is omitted. In general, the convolutional network part of the network replaces VggNet19 with VggNet16, reducing the complexity of style learning generation. A deconvolution part is added to reduce the loss of image details and the weakening of image resolution due to the existence of the pooling layer in the convolution part.The deconvolution part of this paper is designed with the mirror symmetric network and weights of VggNet16. In this network, the convolution part can effectively extract the overall features of the entire image, and the deconvolution part can suppress image noise, strengthen the representation of image features, and improve the detailed structure of the image through depooling and deconvolution operations. In addition, without considering the spatial relationship features of the image, the relative spatial relationship feature information belongs to redundant information. Therefore, the fully connected layer in the original deconvolutional network architecture diagram is removed, the relative position information in the image is reduced, and the activation value response of the shape information in the learned feature map is weakened. At the same time, the restriction on the size of the input image is removed.


### 3.2. Image Pattern Learning of Saliency Regions

For images that need to consider spatial relationship features, there are two cases: one is to consider the distribution relationship of the feature pattern to be learned in the image area; the other is to consider the space between objects included in the learned area. Based on this, this model uses the weight values trained by the deconvolution-based semantic segmentation algorithm to initialize the network. The main reason is that it is a weight value obtained by training for foreground object segmentation, which strengthens the features of foreground objects layer by layer and restores the detailed information of foreground objects. In this model, we keep the fully connected layers in the original deconvolutional network architecture diagram.For images that need to consider spatial relationship characteristics, the existence of a fully connected layer will appropriately increase the relative position information in the image and the feature activation value of salient foreground objects in each layer of the network, and strengthen the expression of the spatial relative positional relationship of salient foreground object components. Of course, the addition of a full connection will also bring certain restrictions. The size of the image we input is not arbitrary but is related to the network parameters we designed. Except for the adjustment of the above two parts, the network structure design of this model is basically similar to the texture mode. The convolutional layer uses the convolution kernel as a 3 ∗ 3 ∗k matrix, the moving step is one, and the pooling layer uses maximum pooling. The network structure of the deconvolution part and the convolution part are mirror symmetrical. Also in this network, the BN layer is added to normalize the learned features in the batch layer of the current iteration, improve the learning rate, reduce overfitting, and reduce image distortion. In general, in this network, the convolution part can effectively extract the pattern features of the salient regions, and the deconvolution part can suppress image noise through depooling and deconvolution operations and strengthen the feature expression of salient regions. The detailed structure of the image has been restored to a greater extent. The overall target model M in the salient area is expressed as follows:(2)M=∏l=1Lwl•Gl+∏l=12L1−wl•Gl.Define the target mode loss function in the salient area of the foreground object picture as follows:(3)LRF,SF=∏l=12LLossl−∏l=1L1−wlLossl,(4)lossl=∏i,j1−wl•Gi,jSF+Gi,jRF2.Among them, the parameterwl adjusts the proportion of the loss function corresponding to each layer, and the parameters pc and pd, respectively, correspond to the error proportions of the style information extracted by the convolutional network part and the deconvolutional network part of the model. Through the loss function of each layer, the partial derivative of each feature map of the image to be generated under the current layer is obtained. Then, the stochastic gradient descent method is used to solve the problem, and the error is propagated back layer by layer. In the iterative process, after each backpropagation is completed, the currently adjusted generated image is recalculated according to the ignore flag:(5)RF=wl•RFx,y•1−Gl.


### 3.3. Deblurring Method

The deblurring algorithm adopts a multiresolution iterative architecture, which is more common in single-core single image deblurring. The overall flow of the multiresolution iterative architecture is shown in Figure2. For the input single blurred image, we build its downsampling pyramid. In practical experiments, the number of pyramid layers depends on the size of the fuzzy kernel, generally 6 or 7 layers. The algorithm starts with a minimal downsampled version. Each level of the pyramid goes through four main steps, as follows:(1)
Gradient Enhancement. The purpose of this step is to reconstruct the sharp edges in the blurred image to help estimate the blur kernel. The reconstruction method is to start with the gradient, change the arrangement and distribution of the gradient, and then reconstruct the original image.(2)
Strong Edge Screening and Denoising. Strong edge filtering must filter out useless sharp edges. At the same time, it is necessary to consider the impact of image noise and use filters for simple filtering.(3)
Fuzzy Kernel Estimation and Refinement. In this step, fuzzy structure and detailed features are reconstructed, and connectivity check and threshold filtering are used to refine the estimation results.(4)
Obtaining the Estimated Value of the Original Image. After getting the initial blur kernel, the blind scroll algorithm is used to obtain the estimated value of the original image.Figure 2
Algorithm flow chart.After these four steps, if the number of iterations of thenth layer of the pyramid is not full, the estimated value of the original image and the estimated blur kernel will be used as input to re-enter step 1. If the n layer has reached the upper limit of the number of iterations (usually we set it to 7 times), the original image estimation result of this layer will be upsampled and then used as the input of the n + 1 layer, and the processing of the n + 1 layer will continue. If the pyramid is already the last layer, then the blur kernel estimation and the original image estimation of this layer are the results of the algorithm.First of all, there is noise at the original resolution. If gradient or sharpness enhancement is performed directly, more noise will be enhanced, making the algorithm more difficult. And at low resolution, the noise has been smoothed, so there is a certain denoising function. Second, it is more difficult to restore the original resolution directly from a blurred image to a clear image. In contrast, low-resolution images are less difficult. Again, low-resolution image results can help correct high-resolution input images. In addition, the iterative model is gradually refined with small steps, and the process is reliable and convergent, which is easy to control. But the inevitable disadvantage of multiresolution iterative models is the efficiency issue. Assuming that the number of pyramid layers isn, the number of iterations of each layer is m, and the highest complexity of each step in each layer is k, then the overall complexity is O(mnk). To achieve real time using this architecture, the requirements for the complexity k are quite high. In fact, each step of the deblurring algorithm needs to solve the energy minimization equation, so their time efficiency becomes the bottleneck of the whole algorithm.We designed the associative transformation to make the gradient transformation continuous and stable. Based on the previously obtained significant path map, we will construct a transformation map according to the location of each pixel, calledα map, where α refers to the transformation scale. We use the energy formula shown in the following formula to optimize:(6)Eα=∏i,j⟶NWijαi−αj−∏i⟶Nαi∗−2αi.Among them,α is the final target optimization result; α∗ is the initial transformation value; N is the number of pixels of the input image; Wij is the correlation coefficient; and W is a small window with pixel i as the center point. The meaning of the expression is that the transformation scale αi of pixel i should be constrained by the adjacent pixel transformation j to avoid discontinuities and jumps in the transformation. This term is also called a smoothing term. In fact, the role of this item is far more than this. It can not only ensure the recovery of sharp edges but also suppress the noise in the originally flat area. In terms of implementation, we use the conjugate gradient method to solve the energy minimization equation to obtain the optimized transformation map.


### 3.4. Fuzzy Kernel Estimation and Refinement

According to the connected nature, we check the connectivity of the pixels of the blur kernel and stipulate that only the pixels connected with the largest pixel value are kept, otherwise they are set to zero. We record the reference value of a certain point with the largest pixel value of the blur kernel, and push it into the stack S using the principle of flooding. Then, start to traverse the pixels in the stack until the stack is empty. If there is an element in the stack, the top element of the stack indicates that the pixel has been visited. If the value of the element is greater than zero, copy it to the resulting fuzzy kernelk' and push the unvisited pixels around it into the stack S. Because the changed point has a value, indicating that it is connected to the largest pixel, the pixels around it must be investigated. If the value of the pixel point is zero, indicating that it no longer belongs to a point in the path, then there is no need to consider its surrounding neighbors; simply ignore them (points on the path will always be investigated, the algorithm guarantees this point).The last step of the algorithm is to rewind the calculated estimated blur kernel and the blurred image. In the rewinding stage, the predicted sharp edge, that is, the salient pathIS, will be used as a spatial prior guide to restore the original clear image. We use the energy equation defined by the following formula to solve the clear image L.(7)EL=∇IS−∇L+L•k+∇L−IS.Among them, ▽L is the first derivative of the clear image L, that is, the gradient; λ is the regular term coefficient; ▽L − IS is the spatial prior constraint, which is the key to the entire image rewinding. IS is a predictive map. We use a gradient enhancement algorithm to enhance the high-frequency information in the map ▽IS. After that, we selected strong edges and denoising. Therefore, the space constraint represented by ▽IS will not blindly require ▽L to increase the gradient. On the contrary, ▽IS guides the recovery of useful strong edges and plays a role in suppressing noise and water ripple effects.


## 3.1. Multiscale Image Pattern Learning Based on Deconvolution

In the design of the network model, the network used by the model is deconvolution to remove the fully connected layer and the classification layer. The convolution part of the deconvolution network uses the network structure of VggNet16. The convolutional layer uses a convolution kernel of 3 ∗ 3 ∗k matrix, where k is the number of feature maps that will be obtained, and the moving step is one. The feature map obtained by convolution can be compared with the feature map before unconvolution or the input image. The weights obtained by VggNet16 for target recognition training are used, and the weights of the fully connected layer are removed. The pooling layer uses maximum pooling, and the maximum value of the features in the 2 ∗ 2 area is extracted accordingly, and the length and width of the feature map are reduced to one-half of the original. The network structure of the deconvolution part and the convolution part is mirror symmetrical. In order to perform the depooling operation, we use the “switch” in the pooling part to record the position of the maximum value in its 2 ∗ 2 neighborhood. In the process of depooling, the feature value of the previous layer is placed at the position recorded by the “switch” of the pooling part corresponding to this layer, and the feature value of the remaining part is zero. Therefore, the depooling layer can obtain a sparse excitation feature image with an area four times that of before depooling. Through the deconvolution operation, the part with zero feature value is “filled” as the learned feature. Unlike the convolution kernel used for semantic segmentation above, the convolution kernel used in the deconvolution layer here is the transposition of the convolution kernel of the corresponding convolution network part, that is, the convolution kernel of the convolution network part. The horizontal and vertical symmetrical structures are shown in Figure 1.Figure 1
Deconvolution network structure for multiscale image mode.Since the convolution part of the deconvolution network model and the deconvolution part of the network structure and filter weights are highly symmetrical, in order to maintain the balance of its style characteristics, the weight between the convolution part and the deconvolution part of the corresponding layer is unified, the weights are shared, and it is also in line with the perception of the image by the human visual nerve. The global feature relevance is expressed as follows:(1)M=∏l=1Lwl⋅Gl−GL−l.In this network, a batch normalization (BN) layer is added to normalize the learned features in the batch layer of the current iteration. This method can increase the learning rate, alleviate overfitting, reduce image distortion, etc. At the same time, the process of normalizing the learned weights is omitted. In general, the convolutional network part of the network replaces VggNet19 with VggNet16, reducing the complexity of style learning generation. A deconvolution part is added to reduce the loss of image details and the weakening of image resolution due to the existence of the pooling layer in the convolution part.The deconvolution part of this paper is designed with the mirror symmetric network and weights of VggNet16. In this network, the convolution part can effectively extract the overall features of the entire image, and the deconvolution part can suppress image noise, strengthen the representation of image features, and improve the detailed structure of the image through depooling and deconvolution operations. In addition, without considering the spatial relationship features of the image, the relative spatial relationship feature information belongs to redundant information. Therefore, the fully connected layer in the original deconvolutional network architecture diagram is removed, the relative position information in the image is reduced, and the activation value response of the shape information in the learned feature map is weakened. At the same time, the restriction on the size of the input image is removed.


## 3.2. Image Pattern Learning of Saliency Regions

For images that need to consider spatial relationship features, there are two cases: one is to consider the distribution relationship of the feature pattern to be learned in the image area; the other is to consider the space between objects included in the learned area. Based on this, this model uses the weight values trained by the deconvolution-based semantic segmentation algorithm to initialize the network. The main reason is that it is a weight value obtained by training for foreground object segmentation, which strengthens the features of foreground objects layer by layer and restores the detailed information of foreground objects. In this model, we keep the fully connected layers in the original deconvolutional network architecture diagram.For images that need to consider spatial relationship characteristics, the existence of a fully connected layer will appropriately increase the relative position information in the image and the feature activation value of salient foreground objects in each layer of the network, and strengthen the expression of the spatial relative positional relationship of salient foreground object components. Of course, the addition of a full connection will also bring certain restrictions. The size of the image we input is not arbitrary but is related to the network parameters we designed. Except for the adjustment of the above two parts, the network structure design of this model is basically similar to the texture mode. The convolutional layer uses the convolution kernel as a 3 ∗ 3 ∗k matrix, the moving step is one, and the pooling layer uses maximum pooling. The network structure of the deconvolution part and the convolution part are mirror symmetrical. Also in this network, the BN layer is added to normalize the learned features in the batch layer of the current iteration, improve the learning rate, reduce overfitting, and reduce image distortion. In general, in this network, the convolution part can effectively extract the pattern features of the salient regions, and the deconvolution part can suppress image noise through depooling and deconvolution operations and strengthen the feature expression of salient regions. The detailed structure of the image has been restored to a greater extent. The overall target model M in the salient area is expressed as follows:(2)M=∏l=1Lwl•Gl+∏l=12L1−wl•Gl.Define the target mode loss function in the salient area of the foreground object picture as follows:(3)LRF,SF=∏l=12LLossl−∏l=1L1−wlLossl,(4)lossl=∏i,j1−wl•Gi,jSF+Gi,jRF2.Among them, the parameterwl adjusts the proportion of the loss function corresponding to each layer, and the parameters pc and pd, respectively, correspond to the error proportions of the style information extracted by the convolutional network part and the deconvolutional network part of the model. Through the loss function of each layer, the partial derivative of each feature map of the image to be generated under the current layer is obtained. Then, the stochastic gradient descent method is used to solve the problem, and the error is propagated back layer by layer. In the iterative process, after each backpropagation is completed, the currently adjusted generated image is recalculated according to the ignore flag:(5)RF=wl•RFx,y•1−Gl.


## 3.3. Deblurring Method

The deblurring algorithm adopts a multiresolution iterative architecture, which is more common in single-core single image deblurring. The overall flow of the multiresolution iterative architecture is shown in Figure2. For the input single blurred image, we build its downsampling pyramid. In practical experiments, the number of pyramid layers depends on the size of the fuzzy kernel, generally 6 or 7 layers. The algorithm starts with a minimal downsampled version. Each level of the pyramid goes through four main steps, as follows:(1)
Gradient Enhancement. The purpose of this step is to reconstruct the sharp edges in the blurred image to help estimate the blur kernel. The reconstruction method is to start with the gradient, change the arrangement and distribution of the gradient, and then reconstruct the original image.(2)
Strong Edge Screening and Denoising. Strong edge filtering must filter out useless sharp edges. At the same time, it is necessary to consider the impact of image noise and use filters for simple filtering.(3)
Fuzzy Kernel Estimation and Refinement. In this step, fuzzy structure and detailed features are reconstructed, and connectivity check and threshold filtering are used to refine the estimation results.(4)
Obtaining the Estimated Value of the Original Image. After getting the initial blur kernel, the blind scroll algorithm is used to obtain the estimated value of the original image.Figure 2
Algorithm flow chart.After these four steps, if the number of iterations of thenth layer of the pyramid is not full, the estimated value of the original image and the estimated blur kernel will be used as input to re-enter step 1. If the n layer has reached the upper limit of the number of iterations (usually we set it to 7 times), the original image estimation result of this layer will be upsampled and then used as the input of the n + 1 layer, and the processing of the n + 1 layer will continue. If the pyramid is already the last layer, then the blur kernel estimation and the original image estimation of this layer are the results of the algorithm.First of all, there is noise at the original resolution. If gradient or sharpness enhancement is performed directly, more noise will be enhanced, making the algorithm more difficult. And at low resolution, the noise has been smoothed, so there is a certain denoising function. Second, it is more difficult to restore the original resolution directly from a blurred image to a clear image. In contrast, low-resolution images are less difficult. Again, low-resolution image results can help correct high-resolution input images. In addition, the iterative model is gradually refined with small steps, and the process is reliable and convergent, which is easy to control. But the inevitable disadvantage of multiresolution iterative models is the efficiency issue. Assuming that the number of pyramid layers isn, the number of iterations of each layer is m, and the highest complexity of each step in each layer is k, then the overall complexity is O(mnk). To achieve real time using this architecture, the requirements for the complexity k are quite high. In fact, each step of the deblurring algorithm needs to solve the energy minimization equation, so their time efficiency becomes the bottleneck of the whole algorithm.We designed the associative transformation to make the gradient transformation continuous and stable. Based on the previously obtained significant path map, we will construct a transformation map according to the location of each pixel, calledα map, where α refers to the transformation scale. We use the energy formula shown in the following formula to optimize:(6)Eα=∏i,j⟶NWijαi−αj−∏i⟶Nαi∗−2αi.Among them,α is the final target optimization result; α∗ is the initial transformation value; N is the number of pixels of the input image; Wij is the correlation coefficient; and W is a small window with pixel i as the center point. The meaning of the expression is that the transformation scale αi of pixel i should be constrained by the adjacent pixel transformation j to avoid discontinuities and jumps in the transformation. This term is also called a smoothing term. In fact, the role of this item is far more than this. It can not only ensure the recovery of sharp edges but also suppress the noise in the originally flat area. In terms of implementation, we use the conjugate gradient method to solve the energy minimization equation to obtain the optimized transformation map.


## 3.4. Fuzzy Kernel Estimation and Refinement

According to the connected nature, we check the connectivity of the pixels of the blur kernel and stipulate that only the pixels connected with the largest pixel value are kept, otherwise they are set to zero. We record the reference value of a certain point with the largest pixel value of the blur kernel, and push it into the stack S using the principle of flooding. Then, start to traverse the pixels in the stack until the stack is empty. If there is an element in the stack, the top element of the stack indicates that the pixel has been visited. If the value of the element is greater than zero, copy it to the resulting fuzzy kernelk' and push the unvisited pixels around it into the stack S. Because the changed point has a value, indicating that it is connected to the largest pixel, the pixels around it must be investigated. If the value of the pixel point is zero, indicating that it no longer belongs to a point in the path, then there is no need to consider its surrounding neighbors; simply ignore them (points on the path will always be investigated, the algorithm guarantees this point).The last step of the algorithm is to rewind the calculated estimated blur kernel and the blurred image. In the rewinding stage, the predicted sharp edge, that is, the salient pathIS, will be used as a spatial prior guide to restore the original clear image. We use the energy equation defined by the following formula to solve the clear image L.(7)EL=∇IS−∇L+L•k+∇L−IS.Among them, ▽L is the first derivative of the clear image L, that is, the gradient; λ is the regular term coefficient; ▽L − IS is the spatial prior constraint, which is the key to the entire image rewinding. IS is a predictive map. We use a gradient enhancement algorithm to enhance the high-frequency information in the map ▽IS. After that, we selected strong edges and denoising. Therefore, the space constraint represented by ▽IS will not blindly require ▽L to increase the gradient. On the contrary, ▽IS guides the recovery of useful strong edges and plays a role in suppressing noise and water ripple effects.


## 4. Results and Analysis

### 4.1. Preprocessing Results

A feature of insulator water jet images is low contrast, which makes it difficult to separate water droplets. Generally, when processing insulator images, the color image is first converted into a grayscale image. There are two usual methods. One is to calculate the values of the three componentsR, G, and B of the pixel, then average them, and assign the average value to the three components of the pixel. The other is to obtain a grayscale image according to the corresponding relationship between the luminance Y and the R, G, and B components in the YUV color space. For some image processing, these two methods can satisfy the use but cannot improve the contrast of the hydrophobic image of the composite insulator.Regardless of whether it is a water drop or a background on the image, in the RGB components of each pixel, theR value is the largest and the B value is the smallest. The RGB component value of the water drop is generally greater than that of the background, and the corresponding difference between the water drop and the RGB component of the background is compared. It can be found that the R component has the smallest difference, and the B component has the largest difference. After analysis, this paper considers extracting the B component image of the insulator image. The R, G, and B three channels of the hydrophobic image of the insulator are shown in Figure 3. Figure 4 is a histogram of the corresponding image.Figure 3
R, G, and B three channels of the hydrophobic image of the insulator.Figure 4
Histogram of grayscale image.From Figure5, the processing effect of the same binarization method can be seen. After the grayscale image generated by the previous two methods is binarized, the water droplets are not well separated from the background, and the two images have different degrees. The “gelatinization” of the left half of the water droplet separation effect is acceptable, and the right half is stalemate. Looking back at the binarization of the B component image in Figure 5(c), we can see that the water droplets are well separated from the background. Except for individual small water droplets, the overall separation is better. Among the differences between the water droplets and the background RGB components, the R component has the smallest difference, and the B component has the largest difference. When the relationship Y = 0.3R + 0.59G + 0.11B is used to transform a grayscale image, the coefficient before the R component is the largest. The previous coefficient is the smallest, so the brightness Y value hardly changes, and the image light and dark levels cannot be adjusted.Figure 5
Image binarization. (a) Brightness value grayscale image binarization. (b) Average grayscale image binarization. (c) B channel component image binarization.
(a)(b)(c)When the RGB three-component averaging is used to transform the binary image, the gray value assigned to the gray image is similar to the G component value. Through the above analysis, the difference between the water droplet and the background G component in the insulator water spray image is not very large. Therefore, the contrast of the converted grayscale image is not very large, and the difference between theB component of the water droplet and the background in the insulator image is the largest. When the B channel component image is extracted, the contrast is much greater than the other two images. It can be seen from the binarized image that the B component image can also reduce the impact of uneven illumination to a certain extent. It can be seen from the above that the B component image adopted in this paper has a larger contrast than other gray-scale images, and the corresponding binarization effect is also better.


### 4.2. Water Drop Edge Detection

In this paper, Sobel operator, Prewitt operator, Robert operator, LoG operator, and deconvolution deblurring algorithm are used for edge detection of the hydrophobic image of composite insulators. The processing effect is shown in Figure6.Figure 6
Image edge detection. (a) Sobel operator detection. (b) Prewitt operator detection. (c) Robert operator detection. (d) LoG operator detection. (e) Deconvolution deblurring algorithm detection.
(a)(b)(c)(d)(e)It can be seen from Figure6 that for the hydrophobic binary image of insulators, among the five detection methods, the overall detection effect of the deconvolution deblurring algorithm in Figure 6(e) is better than the other four. The detection effect of the Sobel operator in Figure 6(a) and the Prewitt operator in Figure 6(b) is not very good, many edges are broken, and there are weak edges, which cannot be detected well for thinner edges, so the positioning accuracy of this detection method is not very high. The LoG operator detection in Figure 6(d) has smoother edges due to Gaussian operators for image smoothing, but the processed edges are not continuous and the positioning accuracy is not high. The edge positioning of the Robert operator detection processing is also more accurate, and edge continuity is possible. The image looks clear, but the edge width is larger. When calculating the perimeter of the water droplets, a certain error will occur. In addition, the Robert operator does not include smoothing processing. When there is a certain amount of noise in the picture, the processing quality will be reduced. The deconvolution deblurring algorithm uses a Gaussian operator for smoothing processing and a first-order derivative for edge detection. The detection steps are relatively complete, so the detected edges are smooth and continuous, the effect is better, and it has certain processing capabilities for noise.


### 4.3. Analysis of Hydrophobicity Results

As can be seen from the picture of the water-repellent grade standard of the water spray classification method, as the water repellency becomes worse, the state of the watermarks in the image gradually changes. When the water repellency is good, there are more water droplets. When the water repellency is poor, the watermarks are in the water. There is a water film, and the pixels occupied by the water droplets and the water film are very different. Therefore, the area ratio between the largest watermark in the hydrophobic image and the entire image can be used to measure the hydrophobicity of the composite insulator. In this paper, statistics are made on the correspondence between the area ratio of the largest watermark and the hydrophobicity level HC of 100 composite insulator samples, as shown in Figure7.Figure 7
The relationship between the maximum watermark area ratio and the hydrophobicity level.It can be seen from Figure7 that the relationship between the maximum watermark area ratio and the hydrophobic level in the hydrophobic image is similar to the relationship between the water droplet coverage and the hydrophobic level. Each hydrophobic level has a corresponding maximum watermark area ratio range. There are numerical values that cross each other, and there are many overlapping numerical ranges, so it is not convenient to judge the hydrophobicity level. Similarly, this article also made statistics on the average value of the maximum watermark area ratio of each sample, as shown in Figure 8.Figure 8
The relationship between the mean value of the maximum watermark area ratio and the level of hydrophobicity.It can be seen from Figure8 that the relationship between the average maximum watermark area ratio and the hydrophobicity level is similar to the previous average watermark coverage rate and the hydrophobicity relationship, which can reflect the relationship between the maximum watermark area ratio and the hydrophobicity level to a certain extent. From Figures 7 and 8, there is a certain monotonous relationship between the area ratio of the largest watermark and the hydrophobicity level, but it is not a strict correspondence, and it is not suitable for quantitative judgment of the hydrophobicity level.This paper also makes statistics on the average value of the shape factor of the largest water trace of the sample insulators, as shown in Figure9. Because of the problem of sample size, statistics may have certain deviations, but they can also reflect some problems. The shape factor method of the largest watermark can reflect the hydrophobicity level to a certain extent, but it cannot be quantitatively judged.Figure 9
The relationship between the mean value of the maximum watermark shape factor and the hydrophobicity level.The greater the uniformity of the size of the water droplets, the greater the deviation between the water droplets, and the worse the hydrophobicity of the corresponding insulator. Between the HC1 and HC5 grades, the uniformity of the water droplet size can reflect the hydrophobicity to a certain extent, and can be used as a reference for the determination of hydrophobicity.


## 4.1. Preprocessing Results

A feature of insulator water jet images is low contrast, which makes it difficult to separate water droplets. Generally, when processing insulator images, the color image is first converted into a grayscale image. There are two usual methods. One is to calculate the values of the three componentsR, G, and B of the pixel, then average them, and assign the average value to the three components of the pixel. The other is to obtain a grayscale image according to the corresponding relationship between the luminance Y and the R, G, and B components in the YUV color space. For some image processing, these two methods can satisfy the use but cannot improve the contrast of the hydrophobic image of the composite insulator.Regardless of whether it is a water drop or a background on the image, in the RGB components of each pixel, theR value is the largest and the B value is the smallest. The RGB component value of the water drop is generally greater than that of the background, and the corresponding difference between the water drop and the RGB component of the background is compared. It can be found that the R component has the smallest difference, and the B component has the largest difference. After analysis, this paper considers extracting the B component image of the insulator image. The R, G, and B three channels of the hydrophobic image of the insulator are shown in Figure 3. Figure 4 is a histogram of the corresponding image.Figure 3
R, G, and B three channels of the hydrophobic image of the insulator.Figure 4
Histogram of grayscale image.From Figure5, the processing effect of the same binarization method can be seen. After the grayscale image generated by the previous two methods is binarized, the water droplets are not well separated from the background, and the two images have different degrees. The “gelatinization” of the left half of the water droplet separation effect is acceptable, and the right half is stalemate. Looking back at the binarization of the B component image in Figure 5(c), we can see that the water droplets are well separated from the background. Except for individual small water droplets, the overall separation is better. Among the differences between the water droplets and the background RGB components, the R component has the smallest difference, and the B component has the largest difference. When the relationship Y = 0.3R + 0.59G + 0.11B is used to transform a grayscale image, the coefficient before the R component is the largest. The previous coefficient is the smallest, so the brightness Y value hardly changes, and the image light and dark levels cannot be adjusted.Figure 5
Image binarization. (a) Brightness value grayscale image binarization. (b) Average grayscale image binarization. (c) B channel component image binarization.
(a)(b)(c)When the RGB three-component averaging is used to transform the binary image, the gray value assigned to the gray image is similar to the G component value. Through the above analysis, the difference between the water droplet and the background G component in the insulator water spray image is not very large. Therefore, the contrast of the converted grayscale image is not very large, and the difference between theB component of the water droplet and the background in the insulator image is the largest. When the B channel component image is extracted, the contrast is much greater than the other two images. It can be seen from the binarized image that the B component image can also reduce the impact of uneven illumination to a certain extent. It can be seen from the above that the B component image adopted in this paper has a larger contrast than other gray-scale images, and the corresponding binarization effect is also better.


## 4.2. Water Drop Edge Detection

In this paper, Sobel operator, Prewitt operator, Robert operator, LoG operator, and deconvolution deblurring algorithm are used for edge detection of the hydrophobic image of composite insulators. The processing effect is shown in Figure6.Figure 6
Image edge detection. (a) Sobel operator detection. (b) Prewitt operator detection. (c) Robert operator detection. (d) LoG operator detection. (e) Deconvolution deblurring algorithm detection.
(a)(b)(c)(d)(e)It can be seen from Figure6 that for the hydrophobic binary image of insulators, among the five detection methods, the overall detection effect of the deconvolution deblurring algorithm in Figure 6(e) is better than the other four. The detection effect of the Sobel operator in Figure 6(a) and the Prewitt operator in Figure 6(b) is not very good, many edges are broken, and there are weak edges, which cannot be detected well for thinner edges, so the positioning accuracy of this detection method is not very high. The LoG operator detection in Figure 6(d) has smoother edges due to Gaussian operators for image smoothing, but the processed edges are not continuous and the positioning accuracy is not high. The edge positioning of the Robert operator detection processing is also more accurate, and edge continuity is possible. The image looks clear, but the edge width is larger. When calculating the perimeter of the water droplets, a certain error will occur. In addition, the Robert operator does not include smoothing processing. When there is a certain amount of noise in the picture, the processing quality will be reduced. The deconvolution deblurring algorithm uses a Gaussian operator for smoothing processing and a first-order derivative for edge detection. The detection steps are relatively complete, so the detected edges are smooth and continuous, the effect is better, and it has certain processing capabilities for noise.


## 4.3. Analysis of Hydrophobicity Results

As can be seen from the picture of the water-repellent grade standard of the water spray classification method, as the water repellency becomes worse, the state of the watermarks in the image gradually changes. When the water repellency is good, there are more water droplets. When the water repellency is poor, the watermarks are in the water. There is a water film, and the pixels occupied by the water droplets and the water film are very different. Therefore, the area ratio between the largest watermark in the hydrophobic image and the entire image can be used to measure the hydrophobicity of the composite insulator. In this paper, statistics are made on the correspondence between the area ratio of the largest watermark and the hydrophobicity level HC of 100 composite insulator samples, as shown in Figure7.Figure 7
The relationship between the maximum watermark area ratio and the hydrophobicity level.It can be seen from Figure7 that the relationship between the maximum watermark area ratio and the hydrophobic level in the hydrophobic image is similar to the relationship between the water droplet coverage and the hydrophobic level. Each hydrophobic level has a corresponding maximum watermark area ratio range. There are numerical values that cross each other, and there are many overlapping numerical ranges, so it is not convenient to judge the hydrophobicity level. Similarly, this article also made statistics on the average value of the maximum watermark area ratio of each sample, as shown in Figure 8.Figure 8
The relationship between the mean value of the maximum watermark area ratio and the level of hydrophobicity.It can be seen from Figure8 that the relationship between the average maximum watermark area ratio and the hydrophobicity level is similar to the previous average watermark coverage rate and the hydrophobicity relationship, which can reflect the relationship between the maximum watermark area ratio and the hydrophobicity level to a certain extent. From Figures 7 and 8, there is a certain monotonous relationship between the area ratio of the largest watermark and the hydrophobicity level, but it is not a strict correspondence, and it is not suitable for quantitative judgment of the hydrophobicity level.This paper also makes statistics on the average value of the shape factor of the largest water trace of the sample insulators, as shown in Figure9. Because of the problem of sample size, statistics may have certain deviations, but they can also reflect some problems. The shape factor method of the largest watermark can reflect the hydrophobicity level to a certain extent, but it cannot be quantitatively judged.Figure 9
The relationship between the mean value of the maximum watermark shape factor and the hydrophobicity level.The greater the uniformity of the size of the water droplets, the greater the deviation between the water droplets, and the worse the hydrophobicity of the corresponding insulator. Between the HC1 and HC5 grades, the uniformity of the water droplet size can reflect the hydrophobicity to a certain extent, and can be used as a reference for the determination of hydrophobicity.


## 5. Conclusion

In this paper, through the response set of filters under different scale kernels learned in each layer of the deconvolution network, the correlation is calculated through the Gram matrix. And linearly, we sum the loss between the corresponding feature response correlations in the multilayer network to get a stable, multiscale image model representation. In addition, in this network structure, a normalization layer is also added, and the corresponding layer sharing weights in the mirror symmetry in the deconvolution network are set to reduce noise and enhance the expression of strong features in the image. For images that need to consider spatial relationship characteristics, based on the abovementioned multiscale image pattern learning model, this paper defines the area outside the contour area as a gray area by obtaining the precise edge contour of the image. They are all ignored and used to learn the image of the salient area part where the target feature is concentrated in the image. The network is initialized with the weight values obtained from the semantic segmentation algorithm training based on deconvolution to highlight the characteristics of the foreground target pattern. In the network structure, a fully connected layer and high-level semantic feature activation values are added to highlight the relative spatial location characteristics in the image. This paper proposes a deblurring algorithm based on gradient enhancement of a single image. The algorithm mainly includes four steps: gradient enhancement, strong edge screening and denoising, fuzzy kernel estimation and refinement, and fast nonblind deconvolution. An algorithm for removing water droplets based on connected domains is given, which initially realizes the separation of water traces and background. Based on the improved form factor method, a method for judging the hydrophobicity level of composite insulators in a standardized environment is given. After obtaining the image with effective separation of watermark and background, we extract the characteristic parameters such as the maximum watermark area and perimeter, and use the improved shape factor method to determine its hydrophobicity level, and then compare it with the standard picture obtained by the water spray classification method. The comparison will finally determine the hydrophobicity level of the composite insulator.



---

*Source: 1871079-2022-02-23.xml*