Research on Infrared Temperature Measurement Image Enhancement Technology of Transmission Line

It is one of the important means to ensure the safety of transmission line and its equipment to realize the rapid identification and accurate diagnosis of visual defect fault points of transmission line. In this paper, an adaptive infrared image enhancement algorithm is proposed based on the research of infrared image features and various image enhancement algorithms. The algorithm first filters the infrared image to remove the random noise and improve the signal-to-noise ratio of the image; then, based on the histogram analysis of the infrared image, adaptively selects the upper and lower thresholds of the gray histogram, and uses the histogram segmentation to divide the infrared image into three parts: target, target and background aliasing, and background. Finally, through the gray analysis of the three distributions, the algorithm can extract the gray image. Finally, infrared image background suppression and target enhancement are realized. By comparing the effect before and after image enhancement, it is proved that the algorithm has strong practicability.


Introduction
With the rapid development of economy and the increasing demand of social electricity, EHV / UHV long-distance transmission technology has been developed rapidly, and the scale of power grid has been upgraded and expanded. With the rapid extension of transmission line mileage, the inspection and maintenance of transmission line becomes particularly important for the safe and stable operation of transmission channel. The increasingly complex corridor environment of transmission lines makes the operation and maintenance of transmission lines more difficult. Therefore, the rapid identification and accurate diagnosis of visual defect fault point of transmission line has become one of the important means to ensure the safe operation of transmission line and its equipment. [1][2][3] The infrared thermal imager of transmission line is equipped with a special infrared optical scanning system, which is used to collect the infrared radiation signal of the object surface to realize the temperature detection. The corresponding infrared radiation signal released by temperature distribution is transformed and amplified to form an intuitive temperature distribution image. [4][5] Due to the low signal-to-noise ratio, fuzzy boundary and relatively concentrated gray distribution of infrared image, the region of interest is likely to be submerged in the complex background, so it is necessary to process the obtained image. Image processing is a complex process. The purpose of image processing is to display the image better. It can enhance the image contrast, improve the image resolution, remove part of the noise and interference, so as to present a high-quality infrared image adapted to human visual habits. [6][7] Therefore, this paper proposes an adaptive infrared image enhancement algorithm based on the research of infrared image features and various image enhancement algorithms. Firstly, the infrared image is filtered to remove the random noise and improve the signal-tonoise ratio. Then, on the basis of histogram analysis of infrared image, the upper and lower thresholds of gray histogram are adaptively selected. Using histogram segmentation, the infrared image is divided into three parts: target, target and background aliasing, and background. Finally, through the gray transformation of the three distributions, the infrared image background suppression and target enhancement are realized.

Median filtering
Median filtering is a nonlinear signal processing method. Its implementation principle is to use a moving window with odd points to replace the value of the center point of the window with the median value of each point in the window. That is, for a two-dimensional image after median filtering, the output is as follows: (1) Where A is the window of m×n. In this paper, a window of 3×3 is used to denoise the infrared image.

Adaptive selection of upper and lower thresholds of gray histogram
In the infrared image of transmission line, histogram distribution can usually divide the image into target, target and background mixed area (transition area) and background part. For the convenience of explanation, the distribution of threshold t1 and t2 corresponds to the lower and upper threshold. The lower threshold is used to separate the background and the aliasing part, and the upper threshold is used to separate the target and the aliasing area. Therefore, the infrared image enhancement is realized by piecewise linear gray transformation for three regions.

Determination of lower threshold
Generally, in the histogram of infrared image, the area reflecting the background has the characteristics of large area, low gray level, and the gray distribution is relatively concentrated, that is, there will be a narrow peak in the histogram. In order to suppress the background, it is very important to deal with the peak phenomenon, which is reflected in the selection of t1. It can be understood that the high peak gray region must participate in the selection of t1, so that when the gray distribution [min, t1] is processed, the peak value can be compressed.
The specific process is as follows: ①Using concavity analysis, the maximum value Max and minimum value min of pixel image gray are searched. ② The gray level between min and Max is traversed, and the gray level corresponding to the larger slope is taken as the corresponding gray level BP of the background part, where the slope s(i) is Where his(i) and his(min) are the number of pixels corresponding to gray level i and min in turn.
If we only rely on the peak gray value, there will be a certain risk, leading to the imbalance of enhancement effect. Therefore, in this paper, we need to adjust the selection of the lower threshold t1.
Where n is an adjustable parameter. Through a large number of experiments, it is found that the peak can be covered if n is an integer between 0 and 10.

Determination of threshold upper limit
The upper threshold T2 mainly defines the target area. Usually, it is difficult to locate the target from the gray level of the infrared image, and the boundary between the target and the aliasing area is also described by T2. In this paper, the value of T2 is the maximum estimation of the target range and the surrounding gray level.
From the infrared image analysis, we can see that the determination of the target area of the infrared image can be modeled on the background area, but the traversal direction of the pixel search is opposite, as follows: ① Starting from the H with high gray level, the target extremum is obtained gradually, and the gray range of the target area is evaluated as a whole.
② In the target area, take a random point. ③ In the center of this point, the cross window is used as the template to calculate the average gray value M in the same scale. Where M can be expressed as: ④ Repeat steps 2 and 3 k times to get k means. ⑤ The k average values obtained in step 4 are listed in order of size to obtain the maximum value Mmax, which is set to T2 required in the algorithm. The upper and lower thresholds of gray distribution are obtained by the above processing, so the histogram distribution can be adjusted by linearizing the histogram of each section.

Image enhancement based on piecewise linear transform
The mathematical form of piecewise linear transformation can be described by the following formula: Piecewise linear transformation is usually used to highlight and enhance the local area or the gray range of the target in the image. At the same time, it suppresses the irrelevant gray areas, so as to change the gray distribution of the image and realize the image enhancement.

Equal space equalization of histogram gray
After the above enhancement processing, although the image contrast has been improved to some extent, the gray level transformation range is not fully reflected, but is smaller than the maximum gray level transformation range, resulting in the lack of hierarchical sense of the image. Therefore, it is necessary to further process the image, that is, to process the image contrast distribution equidistant, so as to achieve the protection and enhancement of edge details and other information. Its concrete realization is as follows： ① First, count the number of gray levels of the image to be processed. 1 1 In the formula, it is required to sum the number of gray levels, that is, add the non-zero gray levels in the image, and calculate the real number of gray levels S L-1 of the transformed infrared image. Where, S 0 =0, L represents the number of gray levels of the image, and D represents the histogram distribution before image processing.
② The number of real gray levels is sorted by equal space. 1 1 0,1, 2,..., 1 Here, Tj represents the gray level j of the transformed image, so that the change of gray level has continuity and conforms to human visual perception.

Simulation result
Using the above algorithm to enhance the original infrared image in Figure 1, the result is shown in Figure  2. As can be seen from Figure 2, the direct use of histogram equalization image enhancement technology is easy to cause prominent background noise, which makes the whole image look brighter and reduces the overall contrast of the image. In this paper, the double threshold method is used to better reflect the target and background. Compared with figure 2 (b) without histogram gray equidistant equalization processing and Figure 2 (c) after equalization processing, it is obvious that the target information of the enhanced infrared image in Figure 2 (c) is more obvious than that of the target information after gray transformation enhancement, and the background information is better suppressed.

Evaluation index and performance comparison
In order to quantitatively evaluate the image quality, this paper uses three commonly used indicators as a reference.
(1) Peak signal to noise ratio (PSNR) Where A represents the pixel value with the largest gray scale in the original image, and ˆ( , ) s i j image is processed to get ( , ) s i j image. Generally, the higher the value of PSNR, the better the image quality.
(2) Edge retention (β) Where s  and ŝ  represent the images obtained by ( , ) s i j and ˆ( , ) s i j using Laplacian operator with the size of 3 * 3 for high pass filtering. The closer the β value is to 1, the better the edge preserving degree of the image is.
(3) Mean square error (MSE) The mean square error represents the error of the image and the image to be restored after processing, which is also an important parameter to measure the image effect after enhancement. It is defined as： ( )   Table 1 shows the performance comparison of the above methods.

Conclusion
It is not difficult to find that the histogram equalization enhancement algorithm starts from the whole image, which not only enhances the target of the image, but also enhances other information of the image, such as background noise, resulting in the reduction of signal-tonoise ratio.
To a certain extent, the algorithm proposed in this paper has greatly improved the image, reflected in the MSE has a small value and the signal-to-noise ratio has a large value, which shows that this algorithm has a certain effect on the enhancement effect of transmission line infrared image.