Power line identification method, system and device and storage medium
By combining the phase filter stretching kernel function and the relative total variational RTV, the problems of noise and environmental interference in power line detection are solved, and the recognition accuracy and segmentation effect of power line are improved.
Patent Information
- Application Number
- CN202411231039.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-04
AI Technical Summary
Under the interference of noise and environmental linear elements, the existing power line detection algorithm leads to severe noise in power line imaging, weak and blurred imaging, difficult to distinguish, and unsatisfactory extraction effect.
The phase filter stretching kernel function is used to perform phase stretch transformation on the detected image, convert the frequency domain image into a spatial domain angle image, and sharpen the superimposed image through relative total variation RTV to identify the power line.
By combining the phase filter stretching kernel function and the relative total variational RTV, the main structures and weak fine textures are optimized to suppress noise, and the accuracy and segmentation effect of power line recognition are improved.
Smart Images

Figure CN119206240A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system detection, and in particular relates to a power line identification method, system, equipment and storage medium. Background Art
[0002] Power line inspection is an important part of daily power grid maintenance and plays a vital role in ensuring the healthy operation of the power grid. However, a large number of power transmission lines are built in mountainous areas with inconvenient transportation, and the efficiency of manual inspection is low. The use of drones to inspect the lines can overcome the above shortcomings, but the real-time feedback image clarity is insufficient, which is easy to cause missed detection. Therefore, deploying fault identification on drones to assist manual judgment is a better solution.
[0003] Segmenting power lines from images is the basis for power line defect detection. At present, power line extraction can be divided into traditional methods and data-based deep learning methods. Some people use the Canny operator to obtain edge maps and use Hough transform to extract power lines in edge maps, but the Canny algorithm will have inaccurate over-segmentation effect under the influence of noise when segmenting images; some people use the R-CNN (Region-Convolutional Neural Network) algorithm for line detection and propose an improved anchor frame generation strategy, but when using R-CNN image segmentation, it is not sensitive to image edges and has errors such as under-segmentation and excessive under-segmentation; Phase stretch transform (PST) is developed on the basis of time stretch transform (TST) of analog signals. At present, PST has been used in digital image edge feature detection, feature enhancement of visually damaged images, and digital image compression, but because the phase shift of each spectrum of PST is equal, the detected edge contains a lot of noise, especially those isolated and fragmented high-frequency noise points are mistakenly regarded as high-frequency components in the image and retained, which brings difficulties to the subsequent thresholding processing.
[0004] In summary, since the power line targets are small and the reflected energy is weak during imaging, the power line images taken by drones are easily interfered by environmental linear elements and noise, resulting in serious power line imaging noise, weak and blurred imaging, and difficulty in distinguishing, making the above-mentioned detection algorithms unsatisfactory in extracting power lines. Summary of the invention
[0005] In order to overcome the disadvantage that the power line extraction effect is not ideal, the present invention provides a power line identification method, comprising the following steps:
[0006] Acquire an image to be detected containing power lines;
[0007] Based on the phase shift kernel function and the convolution theorem, a phase stretching transformation and a convolution operation are performed on the phase shift kernel function to construct a phase filter stretching kernel function;
[0008] The image to be detected is input into the phase filter stretch kernel function, and the phase filter stretch kernel function is used to stretch the image to be detected, so as to convert the image to be detected in the frequency domain into an angle image in the space domain, and extract the contour edge in the angle image;
[0009] The image to be detected is superimposed with an angle image containing contour edges to obtain a superimposed image, and the superimposed image is sharpened and enhanced using relative total variation (RTV), and the electric force lines are identified from the image after the sharpening and enhancement processing.
[0010] Preferably, the construction of the phase filter stretch kernel function comprises the following steps:
[0011] The spatial domain complex matrix corresponding to the complex stretching kernel of the frequency domain of the phase shift kernel function is convolved with the image and then an angle transformation is performed to obtain an angle image after phase stretching;
[0012] The angle image after phase stretching is simplified, and the nonlinear phase distortion kernel function is transformed into polar coordinates and normalized to obtain the phase filter stretch kernel function with phase stretch strength parameter S and distortion parameter W.
[0013] Preferably, before the image to be detected is input into the phase filter stretching kernel function, it also includes grayscale processing and filtering processing on the image to be detected; the grayscale processing is specifically: the weighted average of the three numerical values of the R component, G component and B component of the pixel in the image to be detected is used as the grayscale value of the grayscale image; the filtering processing is to perform weighted averaging on all pixel values of the image to be detected, wherein the pixel value of each pixel point is obtained by weighted averaging its own value and other pixel values in the neighborhood.
[0014] Preferably, the phase filter stretch kernel function is:
[0015]
[0016] Where S is the phase stretch strength parameter, W is the distortion parameter, and r is the polar diameter when converting polar coordinates.
[0017] Preferably, the angle image is:
[0018]
[0019] in, is the phase filter stretch kernel function, IFFT2 is the inverse transform of the two-dimensional Fourier transform, It is the result after the input image B(x, y) is processed by inverse Fourier transform.
[0020] The present invention also provides a power line identification system, comprising:
[0021] An image acquisition module, used for acquiring an image to be detected containing power lines;
[0022] A kernel function construction module, used to perform phase stretching transformation and convolution operation on the phase shift kernel function based on the phase shift kernel function and the convolution theorem, so as to construct a phase filter stretching kernel function;
[0023] A contour extraction module is used to input the image to be detected into a phase filter stretch kernel function, use the phase filter stretch kernel function to stretch the image to be detected, convert the image to be detected in the frequency domain into an angle image in the space domain, and extract the contour edge in the angle image;
[0024] The power line identification module is used to superimpose the image to be detected with the angle image containing the contour edge to obtain a superimposed image, use the relative total variation RTV to perform sharpening and enhancement processing on the superimposed image, and identify the power lines from the sharpened and enhanced image.
[0025] The present invention also provides a computer device, comprising a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the power line identification method.
[0026] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the power line identification method.
[0027] The power line identification method, system, device and storage medium provided by the present invention have the following beneficial effects:
[0028] The present invention constructs a phase filter stretch kernel function model, and uses the phase filter stretch kernel function to perform a stretching transformation on the image to be detected taken by a drone, so that the image to be detected in the frequency domain can be converted into an angle image in the space domain, and the angle image can better reflect the linear target in the space domain; then the superimposed image is sharpened and enhanced by relative total variation RTV, and the main structure and weak and fine texture are optimized and separated, so that the sharpened image better highlights the main edge contour and structural texture, suppresses weak and small texture, removes noise well, and improves the accuracy of power line recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 is a flow chart of an embodiment of the present invention;
[0031] Figure 2 The experimental results corresponding to different values of K and tensile strength S are shown in Table 1. Figure 2 (a) is the original image; Figure 2 (b) is k=2, W=10, S=10 3 The corresponding experimental results when taking the value; Figure 2 (c) is k = 2, W = 10, S = 10 5 The corresponding experimental results when taking the value; Figure 2 (d) is k=3, W=10, S=10 5 The corresponding experimental results when taking the value; Figure 2 (e) is k=4, W=10, S=10 6 The corresponding experimental results when taking the value; Figure 2 (f) is k=7, W=10, S=10 6 The corresponding experimental results when taking the value;
[0032] Figure 3 is the image to be detected; Figure 3 (a), (b), (c) and (d) are different original images;
[0033] Figure 4 For S = 1.48, W = 10.24, various algorithms are used to Figure 3 (a) Recognition effect comparison chart; among them, Figure 4 (a) is the corresponding recognition effect diagram when PST is used and S=1.48, W=10.24; Figure 4 (b) is the recognition effect diagram corresponding to Canny; Figure 4 (c) is the corresponding recognition effect diagram using R-CNN; Figure 4 (d) is the algorithm of the present invention when k=3, W=10, S=10 5 The corresponding recognition effect diagram when taking values;
[0034] Figure 5 To use various algorithms Figure 3 (b) Recognition effect comparison chart; among them, Figure 5 (a) is the corresponding recognition effect diagram when PST is used and S=1.48, W=10.24; Figure 5 (b) is the recognition effect diagram corresponding to Canny; Figure 5 (c) is the corresponding recognition effect diagram using R-CNN; Figure 5 (d) is the algorithm of the present invention when k=3, W=10, S=10 5 The corresponding recognition effect diagram when taking values;
[0035] Figure 6 To use various algorithms Figure 3 (c) Recognition effect comparison chart; among them, Figure 6 (a) is the corresponding recognition effect diagram when PST is used and S=1.48, W=10.24; Figure 6 (b) is the recognition effect diagram corresponding to Canny; Figure 6 (c) is the corresponding recognition effect diagram using R-CNN; Figure 6 (d) is the algorithm of the present invention when k=3, W=10, S=10 5 The corresponding recognition effect diagram when taking values;
[0036] Figure 7 To use various algorithms Figure 3 (d) Recognition effect comparison chart; among them, Figure 7 (a) is the corresponding recognition effect diagram when PST is used and S=1.48, W=10.24; Figure 7 (b) is the recognition effect diagram corresponding to Canny; Figure 7 (c) is the corresponding recognition effect diagram using R-CNN; Figure 7 (d) is the algorithm of the present invention when k=3, W=10, S=10 5 The corresponding recognition effect diagram when taking values;
[0037] Figure 8 is the evaluation index P PA Numeric value;
[0038] Fig. 9 is the evaluation index M MPA Numeric value;
[0039] Fig.10 is the evaluation index M MIoU Numeric value. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.
[0041] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the technical solutions of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0042] In addition, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. In the description of the present invention, it should be noted that, unless otherwise clearly specified or limited, the terms "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. In the description of the present invention, unless otherwise specified, "plurality" means two or more, which will not be described in detail here.
[0043] Example
[0044] The present invention provides a method for identifying power lines, specifically Figure 1 As shown, the following steps are included:
[0045] Step 1: Obtain an image to be detected containing power lines.
[0046] Step 2: Based on the phase shift kernel function and convolution theorem, perform phase stretch transformation and convolution operation on the phase shift kernel function to construct a phase filter stretch kernel function.
[0047] In 2015, MHAsghari and B.Jalali proposed a digital image transformation inspired by physical phenomena, called phase stretch transform PST, which simulates the propagation of electromagnetic waves in a diffraction medium with a distorted dispersive dielectric function. This phase stretch transform PST uses an all-pass phase filter H(ω)=exp{jβ(ω)} with a specific frequency-dependent divergence to simulate the diffraction process, where j is the imaginary part, ω is the frequency, and the group delay of the phase β(ω) is It is an "S"-shaped linear or sublinear function, which can reshape the shape of the signal complex field before the analog signal is sampled and digitized, so as to compress the analog signal bandwidth without increasing the duration of the signal in the time domain, that is, to reduce the signal's time-bandwidth product TBP (time bandwidth product), thereby "solving the two inherent problems of the traditional Nyquist sampling theorem (Nyquist) uniform sampling itself: first, when the sampling rate is given, the traditional Nyquist uniform sampling can only sample information that is twice the maximum frequency component of the signal; second, when the analog signal has redundancy, the traditional Nyquist uniform sampling process will result in the number of samples collected being much larger than the necessary number of samples (because the part of the signal below the Nyquist frequency is oversampled).
[0048] The phase stretch transform PST applied before analog-to-digital conversion ADC can also be applied to the field of digital signal processing. The process for digital image edge detection is as follows: first, the original image is smoothed by a local low-pass filter kernel function, and then a phase operation of a nonlinear frequency function is performed in the frequency domain, which is called a phase stretch (divergence) transform PST. Finally, edge detection is achieved through post-processing of thresholding and morphological filtering.
[0049] The mathematical model of the frequency domain phase stretch transform PST is:
[0050]
[0051] Among them, A(m,n) represents the angle image, "∠" represents the angle operation, B(m,n) represents the original input image, FFT2 and IFFT2 represent the two-dimensional fast Fourier transform and inverse transform respectively, (u, v) represents the frequency variable, is the frequency response of the local smoothing low-pass filter, is the frequency-dependent nonlinear phase distortion kernel function, is a nonlinear function of the frequency variable.
[0052] The PST kernel function is described as follows:
[0053] Although any phase kernel function can be considered in the phase stretch transform PST, the results show that the kernel phase function The derivative of is the group delay, which is a linear or sublinear function of the frequency variable. A simple example of this phase kernel function is the "S" type inverse tangent function. For simplicity, if we further require that this phase distortion operation is isotropic in the frequency domain plane, the degree of distortion is only related to the polar radius r in the polar coordinate system of the o-uv frequency plane, but has nothing to do with the polar angle θ, that is, assuming that the prototype of the phase stretch kernel function of PST is circularly symmetric about the frequency variable, we have:
[0054]
[0055] Among them, r is the polar diameter in the frequency plane o-uv polar coordinate system, θ is the polar angle, and the relationship between it and the uv frequency variable is: u=r*cosθv=r*sinθ
[0056] ,, If required The derivative about r is an S-shaped inverse tangent function, then:
[0057]
[0058] Note that the uv frequency plane of the image after Fourier transform is a finite area, so it can be solved according to equation (3):
[0059]
[0060] Where x is the Fourier transform variable.
[0061] Normalizing the phase function in equation (4) yields
[0062]
[0063] For the phase function in equation (5), the phase stretching strength S (Strength) and the warping W (Warped) in the nonlinear warping transformation are added to obtain the phase shift kernel function with phase stretching strength parameter S and warping parameter W in the final PST transformation:
[0064]
[0065] Among them, tan -1 (·) represents the inverse tangent function, ln(·) is the natural logarithm, r max Represents the maximum frequency polar diameter of the uv frequency plane.
[0066] The derivation process of the improved phase filter kernel function is as follows:
[0067] Let t = W·r, C = S / {W·r max ·tan -1 (W·r max )-0.5ln[1+(W·r max ) 2 ]} can be obtained:
[0068]
[0069] but
[0070]
[0071] set up:
[0072]
[0073] get
[0074] A(m,n)=∠IFFT2{D(m,n)·FFT2[B(m,n)]} (11)
[0075] A(m,n)=∠IFFT2{FFT2[E(m,n)]·FFT2[B(m,n)]} (12)
[0076] According to the convolution theorem, it is obvious that:
[0077]
[0078] So we get:
[0079] E(x,y)*B(x,y)=IFFT2{FFT2[E(m,n)]·FFT2[B(m,n)]} (14)
[0080] A(m,n)=∠E(x,y)*B(x,y) (15)
[0081] Among them, B(x, y) is the input image, E(x, y) is the spatial matrix corresponding to the calculated phase stretch kernel, and E(m, n) is the result of the inverse Fourier transform of D(m, n).
[0082] The above results show that taking the angle after phase stretching transformation is equivalent to taking the angle after the spatial domain "complex matrix" corresponding to the "complex stretching kernel" in the frequency domain is convolved with the image, which is equivalent to the gradient of the input image being "reflected" in the angle image formed after the "taking" angle through convolution. Therefore, the theoretical basis for the "angle image" after phase stretching to achieve the function of edge extraction may lie in this. Different selections of parameters W and S may cause different proportions of image gradient reflected in the angle image, so the edge detection effect is also different.
[0083] From formula (1) and the principle that the angle information of the PST angle image A(m, n) can be used for edge extraction, we can know that:
[0084]
[0085] Simplified to:
[0086]
[0087] set up
[0088] Where A(x) is the simplified angle image, and B(x) is the simplified form of the original input image. is the result of the inverse Fourier transform of B(x), is a frequency-dependent nonlinear phase distortion kernel function, j is the imaginary part, u is the function variable, and x is the Fourier transform variable.
[0089] In a two-dimensional image, we have: If expressed in polar coordinates:
[0090]
[0091] Normalization:
[0092]
[0093] The improved phase filter stretch kernel function with phase stretch strength parameter S and distortion parameter W is obtained:
[0094]
[0095] The corresponding angle image:
[0096]
[0097] Among them, v 2 is the y-axis variable in the plane coordinates, It is the result after the input image B(x, y) is processed by inverse Fourier transform.
[0098] Step 3: Input the image to be detected into the phase filter stretch kernel function, use the phase filter stretch kernel function to stretch the image to be detected, convert the image to be detected in the frequency domain into an angle image in the spatial domain, and extract the contour edge in the angle image.
[0099] Before the image to be detected is input into the phase filter stretch kernel function, it is necessary to grayscale and filter the image to be detected; the grayscale processing is specifically: the weighted average of the three values of the R component, G component and B component of the pixel in the image to be detected is used as the grayscale value of the grayscale image. In the RGB model, the color of a pixel at the spatial position (x, y) is represented by the three values of the R component R(x, y), the G component G(x, y) and the B component B(x, y) of the pixel, and the specific formula is:
[0100] Gray(x,y)=0.299*R(x,y)+0.578*G(x,y)+0.114*B(x,y)(26)
[0101] After grayscale processing, the matrix dimension of the image to be detected is reduced, the calculation speed is greatly improved, and the gradient information is still retained.
[0102] The filtering process used in the present invention is a low-pass Gaussian filtering process. Gaussian filtering is a linear smoothing filter that is suitable for eliminating Gaussian noise and is widely used in image denoising. Simply put, Gaussian filtering denoising is to perform weighted averaging on the pixel values of the entire image. The value of each pixel point is obtained by weighted averaging its own value and the values of other pixels in the neighborhood. The one-dimensional and two-dimensional Gaussian distribution functions are:
[0103]
[0104] Where σ is the standard deviation of the Gaussian function, and x and y are pixel coordinates.
[0105] High-frequency noise is often contained in the high-frequency components of the signal. Low-pass Gaussian filtering can be used to filter out these noises and improve the quality and reliability of the signal.
[0106] Step 4: Superimpose the image to be detected with the angle image containing the contour edge to obtain a superimposed image, use the relative total variation RTV to perform sharpening and enhancement processing on the superimposed image, and identify the power lines from the sharpened and enhanced image.
[0107] The purpose of image sharpening is to highlight those meaningful, large-scale structural features, such as contour edges, structural details, etc., and to suppress unimportant fine textures, such as irregular, messy, and repetitive fine patterns. In order to achieve the sharpened image enhancement effect, the extracted enhanced edge and important structural images need to be superimposed on the original image so that the resulting image highlights the edges and important structural features, which is beneficial for subsequent specific applications. However, the superimposed image will have noise and edge burrs, which is caused by the insufficient suppression of unimportant fine textures. To this end, the present invention uses relative total variation RTV to post-process the superimposed image and obtains good results.
[0108] The relative total variation (RTV) can well measure and clearly distinguish important structures from fine textures, thanks to its measurement criterion for relative total variation, which is composed of the pixel-by-pixel windowed total variation measure D x (p), D y (p) and the windowed intrinsic variation measure L x (p), L y (p) Two groups of indicators determine:
[0109]
[0110] Among them, S can be temporarily considered as the input image, R(p) is a rectangular local neighborhood window centered on pixel p, q is any pixel in R(p), and g p,q is the weighting factor defined according to the spatial similarity relationship, is the partial derivative of the input image S in the x direction, is the partial derivative of the input image S in the y direction.
[0111] Drawing on the good properties of relative total variation (RTV) in optimizing the separation of main structures and faint and fine textures, the RTV step is introduced into the image feature extraction algorithm of the improved phase filter stretch transform in the present invention, so that the sharpened image can better highlight the main edge contours and structural textures and suppress faint and fine textures.
[0112] The present invention also provides a power line identification system, including an image acquisition module, a kernel function construction module, a contour extraction module and a power line identification module. The image acquisition module is used to acquire an image to be detected containing power lines; the kernel function construction module is used to construct a phase filter stretch kernel function based on a phase shift kernel function and a convolution theorem; the contour extraction module is used to input the image to be detected into the phase filter stretch kernel function, use the phase filter stretch kernel function to perform a stretching transformation on the image to be detected, convert the image to be detected in the frequency domain into an angle image in the space domain, and extract the contour edge in the angle image; the power line identification module is used to superimpose the image to be detected with the angle image containing the contour edge to obtain a superimposed image, use the relative total variation RTV to perform sharpening and enhancement processing on the superimposed image, and identify the power lines.
[0113] The present invention also provides a computer device, comprising a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the power line identification method.
[0114] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the power line identification method.
[0115] Example 2
[0116] The effect of image recognition using the phase filter stretch transformation kernel function is analyzed, equation (21) u can be transformed into u to the kth power, that is: The experimental results obtained for different k values, different phase stretch strength parameters S and twist parameters W are also different. The specific effects are as follows: Figure 2 shown. Figure 2 (a) is the original image; Figure 2 (b) is k=2, W=10, S=10 3The corresponding experimental results when taking the value; Figure 2 (c) is k = 2, W = 10, S = 10 5 The corresponding experimental results when taking the value; Figure 2 (d) is k=3, W=10, S=10 5 The corresponding experimental results when taking the value; Figure 2 (e) is k=4, W=10, S=10 6 The corresponding experimental results when taking the value; Figure 2 (f) is k=7, W=10, S=10 6 The corresponding experimental results when taking the value. Figure 2 It can also be seen from the stretching result of (f) that when k=7, the higher the stretching power, the better the detection of the "more curved" edge, and the curved edges of fine hair, hats, shoulders, etc. are extracted very delicately and perfectly. This is because the higher the power, the better it can depict the high-order derivatives in the image. The high-order derivatives of the function are the curvature information, singular information, and high-order non-stationary information in the function, but it will also produce more subtle noise. For this reason, in the specific target segmentation algorithm, the appropriate power index k and phase stretching intensity parameter S should be selected to improve the phase filter stretching transform.
[0117] The image segmentation effect diagram obtained by the algorithm of the present invention is compared and analyzed with the image segmentation based on Canny, the image segmentation based on traditional isotropic PST, and the image segmentation based on the R-CNN algorithm. Figure 3 (a), (b), (c) and (d) are different images to be detected; Figure 4-Figure 7 The comparison effect diagram is obtained, where Figure 4-Figure 7 (a) is to use PST to Figure 3 (a), (b), (c) and (d) are the corresponding recognition effect diagrams when S = 1.48 and W = 10.24; Figure 4-Figure 7 (b) Use Canny to analyze Figure 3 Recognition effect diagrams of (a), (b), (c) and (d); Figure 4-Figure 7 (c) Use R-CNN to analyze Figure 3 Recognition effect diagrams of (a), (b), (c) and (d); Figure 4-Figure 7 (d) is the method of the present invention to respectively Figure 3 (a), (b), (c) and (d) are shown in Figure 2 when k = 3, W = 10, S = 10 5 The corresponding recognition effect diagram when taking the value.
[0118] Analysis of the effect of electronic wire segmentation
[0119] In order to effectively evaluate the image segmentation performance of the algorithm, three commonly used evaluation indicators in image segmentation are selected, namely image pixel accuracy, average pixel accuracy and average intersection-over-union ratio.
[0120] The image pixel accuracy reflects the ratio of the number of accurately predicted pixels to the total number of pixels, and its calculation formula is:
[0121]
[0122] Where n ii is the number of real pixels of category i, n ij is the number of pixels of class i that are mistakenly identified as class j.
[0123] The average pixel accuracy reflects the proportion of pixels correctly predicted by the category, and the average value is taken on this basis. The calculation formula is:
[0124]
[0125] Where N is the number of pixels.
[0126] The average intersection-over-union ratio reflects the ratio of the predicted correct pixel area to the total predicted pixel area, and its calculation formula is:
[0127]
[0128] against Figure 4-Figure 7 The P of the four image segmentation methods including traditional PST, Canny, R-CNN and the algorithm of the present invention PA 、M MPA and M MIoU The values are shown in Table 1, Table 2 and Table 3
[0129] Table 1 P of four different segmentation algorithms PA value
[0130]
[0131] In order to further illustrate the advantages of the algorithm of the present invention, 60 power line detection images were taken by drone, and the 60 images were processed using four image segmentation algorithms such as traditional PST and R-CNN to obtain the evaluation index P PA 、M MPA and M MIoU The value of Figure 8 , Fig. 9 and Fig.10 shown.
[0132] Table 2 M of four different segmentation algorithms MPA value
[0133]
[0134] Table 3 M of four different segmentation algorithms MIoU value
[0135]
[0136] From Table 1 to Table 3, Figure 8 , Fig. 9 and Fig.10 The results show that: the image segmentation result evaluation index P of the algorithm of the present invention PA 、M MPA and M MIoU The values are higher than those based on traditional image segmentation algorithms such as PST and R-CNN, which fully demonstrates that the algorithm of the present invention has a better noise suppression effect. When segmenting aerial power line images with noise and unclear edges, the probability of over-segmentation, under-segmentation, and incomplete segmentation is reduced, and because the image edge is enhanced, the segmentation result is closer to the ideal contour, and a better segmentation effect is obtained. The image segmentation based on traditional PST is better for the edge of the image, but the effect of suppressing the edge noise of the power line is not good; the image segmentation based on Canny will have inaccurate segmentation results such as more over-segmentation under the influence of noise; the image segmentation based on R-CNN is insensitive to the edge of the image, and there are too many under-segmentation errors.
[0137] In summary, both the overall segmentation effect and the mean of the evaluation index further verify the effectiveness and stability of the algorithm of the present invention.
[0138] According to the objective evaluation index P PA 、M MPA and M MIoU The value of shows that the power line segmentation result of the proposed algorithm is significantly better than that of traditional PST, Canny and R-CNN algorithms. Compared with the image segmentation algorithms based on traditional PST, the evaluation index P of the power line result is PA 、M MPA and M MIoU The values of are increased by about 15%. The research results can be applied to aerial power line inspection and detection.
[0139] The above embodiments are only preferred specific implementation methods of the present invention, and the protection scope of the present invention is not limited thereto. Any simple changes or equivalent replacements of the technical solutions that can be obviously obtained by any technician familiar with the field within the technical scope disclosed in the present invention belong to the protection scope of the present invention.
Claims
1. A method for identifying power lines, characterized in that: The steps include: Acquire an image to be detected containing power lines; Based on the phase shift kernel function and the convolution theorem, a phase stretching transformation and a convolution operation are performed on the phase shift kernel function to construct a phase filter stretching kernel function; The image to be detected is input into the phase filter stretch kernel function, and the phase filter stretch kernel function is used to stretch the image to be detected, so as to convert the image to be detected in the frequency domain into an angle image in the space domain, and extract the contour edge in the angle image; The image to be detected is superimposed with an angle image containing contour edges to obtain a superimposed image, and the superimposed image is sharpened and enhanced using relative total variation (RTV), and the electric force lines are identified from the image after the sharpening and enhancement processing.
2. The method for identifying power lines according to claim 1, characterized in that: The step of constructing a phase filter stretch kernel function comprises the following steps: The spatial domain complex matrix corresponding to the complex stretching kernel of the frequency domain of the phase shift kernel function is convolved with the image and then an angle transformation is performed to obtain an angle image after phase stretching; The angle image after phase stretching is simplified, and the nonlinear phase distortion kernel function is transformed into polar coordinates and normalized to obtain the phase filter stretch kernel function with phase stretch strength parameter S and distortion parameter W.
3. The method for identifying power lines according to claim 1, characterized in that: Before the image to be detected is input into the phase filter stretching kernel function, it also includes grayscale processing and filtering processing on the image to be detected; the grayscale processing is specifically: the weighted average of the three numerical values of the R component, G component and B component of the pixel in the image to be detected is used as the grayscale value of the grayscale image; the filtering processing is to perform weighted averaging on all pixel values of the image to be detected, wherein the pixel value of each pixel point is obtained by weighted averaging its own value and other pixel values in the neighborhood.
4. The method for identifying power lines according to claim 1, characterized in that: The phase filter stretch kernel function is: Where S is the phase stretch strength parameter, W is the distortion parameter, and r is the polar diameter when converting polar coordinates.
5. The method for identifying power lines according to claim 1, characterized in that: The angle image is: in, is the phase filter stretch kernel function, IFFT2 is the inverse transform of the two-dimensional Fourier transform, It is the result after the input image B(x, y) is processed by inverse Fourier transform.
6. A power line identification system, characterized in that: include: An image acquisition module, used for acquiring an image to be detected containing power lines; A kernel function construction module, used to perform phase stretching transformation and convolution operation on the phase shift kernel function based on the phase shift kernel function and the convolution theorem, so as to construct a phase filter stretching kernel function; A contour extraction module is used to input the image to be detected into a phase filter stretch kernel function, use the phase filter stretch kernel function to stretch the image to be detected, convert the image to be detected in the frequency domain into an angle image in the space domain, and extract the contour edge in the angle image; The power line identification module is used to superimpose the image to be detected with the angle image containing the contour edge to obtain a superimposed image, use the relative total variation RTV to perform sharpening and enhancement processing on the superimposed image, and identify the power lines from the sharpened and enhanced image.
7. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the power line identification method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the power line identification method according to any one of claims 1 to 5.
Citation Information
Patent Citations
A fingerprint image enhancement method based on phase stretching transformation
CN109544474A
A phase-consistency-based phase stretching transformation PST image edge detection method
CN109949329A
Active sludge strain segmentation method based on anisotropic phase stretching transformation
CN114581468A
Phase transform for object and shape detection in digital images
WO2015171661A1
