Power equipment wire positioning and fault diagnosis method and system based on temperature vision
Through a temperature vision-based method, using infrared temperature sensors and computer vision algorithms, the precise positioning and fault diagnosis of power equipment wires are achieved, and the problem of insufficient identification of temperature relationship between power equipment and wires in the prior art is solved, and the accuracy and efficiency of fault diagnosis are improved.
Patent Information
- Application Number
- CN202510334041.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-11
AI Technical Summary
The existing power equipment fault diagnosis technology cannot accurately judge the temperature relationship between power equipment and connected wires, resulting in the inability to accurately locate the fault location and properties, and is easily disturbed by complex backgrounds and multi-equipment scenarios, with a high false alarm rate.
Through a temperature vision-based method, data is collected using infrared temperature sensors for normalized mapping, edge detection is performed by combining the Canny algorithm, and wire direction is extracted using the probability Hough transform and DBSCAN clustering algorithm, and wire position is fitted with the least squares method to determine whether there is a fault in the power equipment.
It realizes accurate positioning and fault diagnosis of power equipment wires, improves the accuracy and efficiency of fault diagnosis, reduces the workload of manual inspection, and provides safe and stable operation guarantee for the power system.
Smart Images

Figure CN120294492A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a method and system for power equipment wire positioning and fault diagnosis based on thermal vision. Background Art
[0002] The safe operation of power equipment is crucial for the stability and reliability of the power system. Traditional power equipment fault detection methods mainly rely on manual inspections, regularly checking power equipment with a portable thermal imager, or conducting local monitoring by installing fixed temperature sensors. These methods have achieved certain results in practical applications, being able to detect thermal abnormal points in power equipment and then judge possible faults of the equipment. With the development of computer vision technology, thermal imaging fault diagnosis technology based on image recognition has also been widely applied. By processing thermal images such as edge detection and target recognition, it can automatically detect temperature abnormal areas and reduce the burden of manual judgment.
[0003] However, the existing thermal imaging-based power equipment fault diagnosis technology still has significant deficiencies. First, most methods only focus on the temperature abnormalities of the equipment body, while ignoring the temperature relationship between the equipment and the connected wires, resulting in an inability to accurately judge the specific location and nature of the faults. Second, existing technologies usually use a fixed threshold method to judge temperature abnormalities, without considering the temperature differences between different equipment and the influence of environmental factors, causing a high false alarm rate. Third, there is a lack of an effective algorithm for automatically positioning the wire position, making it difficult for the system to accurately distinguish the temperature characteristics at the connection between the power equipment and the wire, and it is difficult to achieve accurate diagnosis of common connection faults such as poor contact, looseness, and oxidation. In addition, existing methods are easily interfered with when dealing with complex backgrounds and multi-equipment scenarios, reducing the accuracy of fault judgment. Summary of the Invention
[0004] This application provides a method and system for power equipment wire positioning and fault diagnosis based on thermal vision, which solves the problem of automatic recognition of the positional relationship between power equipment and connected wires. By accurately positioning the wire direction and the position of the connection with the equipment, and combining temperature difference analysis, accurate diagnosis of connection faults is achieved.
[0005] In a first aspect, the present application provides a method for positioning and fault diagnosis of power equipment wires based on temperature vision. The method for positioning and fault diagnosis of power equipment wires based on temperature vision includes: performing normalization mapping processing on the temperature matrix collected by an infrared temperature sensor to obtain a temperature grayscale image; performing edge detection processing on the temperature grayscale image through the Canny algorithm to obtain an edge detection image; performing magnification processing on the equipment frame according to the position coordinates of the power equipment obtained by the target detection model to obtain an extended equipment area, where the extended equipment area is extended by 0.8 times the original size of the equipment frame in both the length direction and the width direction; performing line segment extraction processing on the extended equipment area in the edge detection image through the probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the equipment frame; performing clustering grouping processing on the slopes of the line segments in the candidate line segment set according to the DBSCAN clustering algorithm to obtain a wire orientation grouping, where the wire orientation grouping includes a line segment group in the same direction as the insulator and a line segment group in a different direction from the insulator; performing fitting processing on the line segments in the wire orientation grouping based on the least squares method to obtain wire position coordinates, and determining whether there is a fault in the power equipment by comparing the temperature values of the wire position coordinates and the power equipment position coordinates.
[0006] In a second aspect, the present application provides a system for positioning and fault diagnosis of power equipment wires based on temperature vision. The system for positioning and fault diagnosis of power equipment wires based on temperature vision includes:
[0007] A mapping module for performing normalization mapping processing on the temperature matrix collected by an infrared temperature sensor to obtain a temperature grayscale image;
[0008] A detection module for performing edge detection processing on the temperature grayscale image through the Canny algorithm to obtain an edge detection image;
[0009] A processing module for performing magnification processing on the equipment frame according to the position coordinates of the power equipment obtained by the target detection model to obtain an extended equipment area, where the extended equipment area is extended by 0.8 times the original size of the equipment frame in both the length direction and the width direction;
[0010] An extraction module for performing line segment extraction processing on the extended equipment area in the edge detection image through the probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the equipment frame;
[0011] A clustering module for performing clustering grouping processing on the slopes of the line segments in the candidate line segment set according to the DBSCAN clustering algorithm to obtain a wire orientation grouping, where the wire orientation grouping includes a line segment group in the same direction as the insulator and a line segment group in a different direction from the insulator;
[0012] A fitting module, configured to perform fitting processing on the line segments in the grouped wire routes based on the least squares method to obtain wire position coordinates, and determine whether there is a fault in the power equipment by comparing the temperature values of the wire position coordinates and the power equipment position coordinates.
[0013] The third aspect of the present invention provides a computer device, including: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory to cause the computer device to execute the above-mentioned power equipment wire positioning and fault diagnosis method based on temperature vision.
[0014] The fourth aspect of the present invention provides a computer-readable storage medium, in which instructions are stored, and when it runs on a computer, it causes the computer to execute the above-mentioned power equipment wire positioning and fault diagnosis method based on temperature vision.
[0015] In the technical solution provided by this application, through the normalization mapping process of the temperature grayscale image, the unified standardization of temperature data in different scenarios and devices is realized, enhancing the adaptability and comparability of the method, while retaining the key feature information of the original temperature distribution; the Canny algorithm is used for edge detection, combined with multi-stage processing such as Gaussian filtering, non-maximum suppression, and double-threshold method, ensuring the accurate extraction of the edges of power equipment and wires, laying a solid foundation for subsequent line segment recognition; the equipment frame is enlarged and extended by 0.8 times according to the position coordinates of the power equipment obtained by the target detection model, effectively covering the area where wires may be connected around the equipment, while avoiding the interference information caused by excessive expansion; line segments are extracted from the extended equipment area through probabilistic Hough transform, and the line segment length threshold is set to one-fourth of the smaller value of the width and height of the equipment frame, effectively filtering out the interference of short line segments and retaining the effective line segments representing wires; according to the DBSCAN clustering algorithm, the slopes of the line segments in the candidate line segment set are clustered and grouped, adaptively discovering the main trend characteristics of the wires, without the need to preset the number of clusters, and adapting to complex wire distribution scenarios; based on the least squares method, the line segments in the wire trend grouping are fitted to obtain the wire position coordinates, and fault diagnosis is carried out by comparing the temperature difference between the wire and the equipment, realizing the accurate identification of faults such as poor contact, looseness, or oxidation at the connection points. The contribution of this method in the application of artificial intelligence algorithms is particularly significant. The application of the target detection model solves the problem of automatic positioning of power equipment and reduces the workload of manual annotation; the DBSCAN algorithm, as a density clustering method, its self-adaptability enables the system to cope with the wire trend changes in different power scenarios without manual intervention to adjust parameters; the least squares fitting provides high-precision wire position coordinates while ensuring computational efficiency, improving the accuracy of fault diagnosis. This method organically combines computer vision and artificial intelligence technologies and applies them to the field of power equipment fault diagnosis, realizing the full-process automation from temperature image acquisition to wire positioning and then to fault diagnosis, greatly improving the efficiency and accuracy of power equipment monitoring, providing a strong guarantee for the safe and stable operation of the power system, and at the same time reducing the workload and potential risks of manual inspection. Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0017] Figure 1 It is a schematic diagram of an embodiment of the method for power equipment wire positioning and fault diagnosis based on temperature vision in the embodiment of this application;
[0018] Figure 2 Schematic diagram of an embodiment of the power equipment wire positioning and fault diagnosis system based on temperature vision in the embodiment of the present application;
[0019] Figure 3 It is a schematic block diagram of the structure of a computer device in the embodiment of the present invention. Specific embodiments
[0020] The embodiment of the present application provides a power equipment wire positioning and fault diagnosis method and system based on temperature vision. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0021] For ease of understanding, the specific process of the embodiment of the present application will be described below. Please refer to Figure 1 , an embodiment of the power equipment wire positioning and fault diagnosis method based on temperature vision in the embodiment of the present application includes:
[0022] Step S101: Perform normalization mapping processing on the temperature matrix collected by the infrared temperature sensor to obtain a temperature grayscale image;
[0023] Step S102: Perform edge detection processing on the temperature grayscale image through the Canny algorithm to obtain an edge detection image;
[0024] Step S103: Enlarge the device frame according to the power equipment position coordinates obtained by the target detection model to obtain an extended device area, and the extended device area is extended by 0.8 times the original size of the device frame in both the length and width directions;
[0025] Step S104: Perform line segment extraction processing on the extended device area in the edge detection image through probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the device frame;
[0026] Step S105: Cluster and group the slopes of the line segments in the candidate line segment set according to the DBSCAN clustering algorithm to obtain the wire orientation groups, where the wire orientation groups include the line segment group in the same direction as the insulator and the line segment group in a different direction from the insulator;
[0027] Step S106: Fit the line segments in the wire orientation groups based on the least squares method to obtain the wire position coordinates, and determine whether there is a fault in the power equipment by comparing the temperature values of the wire position coordinates and the power equipment position coordinates.
[0028] It can be understood that the execution entity of this application can be a power equipment wire positioning and fault diagnosis system based on temperature vision, or a terminal or a server. Specifically, it is not limited here. This application embodiment is described by taking the server as the execution entity as an example.
[0029] Specifically, the temperature matrix collected by the infrared temperature sensor is processed by normalization mapping to generate a temperature grayscale image. The original temperature data collected by the infrared temperature sensor is used to construct a temperature distribution matrix. The maximum temperature value and the minimum temperature value in the temperature distribution matrix are calculated to determine the temperature range interval, and then linear normalization conversion is performed to map the temperature value to the interval [0, 1] to obtain a normalized temperature matrix. The normalized temperature matrix is numerically amplified, and the numerical range is mapped to the integer interval [0, 255] to obtain a grayscale value mapping matrix. The grayscale value mapping matrix is smoothed by a Gaussian function to suppress noise interference, and a smoothed grayscale matrix is obtained. Then, a pixel lattice is constructed in row and column order to form a temperature grayscale image. Subsequently, edge detection processing is performed on the temperature grayscale image by the Canny algorithm to obtain an edge detection image. The Canny algorithm is a multi-stage edge detection algorithm. It performs Gaussian filtering on the temperature grayscale image to obtain a noise suppression image, calculates the gradient values in the horizontal and vertical directions of the image based on the noise suppression image to obtain a gradient intensity matrix and a gradient direction matrix. Non-maximum suppression processing is performed based on the gradient intensity matrix and the gradient direction matrix to obtain a preliminary edge contour. The double threshold method is used to screen the threshold of the preliminary edge contour to obtain a set of strong edge points and a set of weak edge points. The weak edge point set is subjected to hysteresis edge connection processing according to the strong edge point set to obtain a continuous edge contour. Morphological processing is performed on the continuous edge contour to finally obtain the edge detection image.
[0030] The device frame is enlarged according to the power equipment position coordinates obtained by the target detection model to obtain an extended device area. The extended device area is extended by 0.8 times the original size of the device frame in both the length and width directions. When implemented, the clamp device frame and the insulator device frame are extracted according to the power equipment position coordinates. The two ends of the clamp device frame are enlarged by 0.8 times the original length of the device frame along the length direction to obtain a length extended area, and the two ends of the clamp device frame are enlarged by 0.8 times the original width of the device frame along the width direction to obtain a width extended area. The length extended area and the width extended area are combined to obtain an enlarged clamp component frame. The edge detection image is intercepted according to the enlarged clamp component frame to obtain an edge clamp area, and the edge clamp area is pasted onto a same-size image with all pixel points being 0. The pixel values of the area where the insulator is located in the same-size image are set to 0 according to the position coordinates of the insulator device frame to obtain an extended device area. Then, line segments are extracted from the extended device area in the edge detection image through probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the device frame. The probabilistic Hough transform is an improved algorithm of the Hough transform, which performs pixel point cumulative voting processing on the extended device area to obtain a Hough parameter space matrix. The voting results are screened by a threshold according to the cumulative values in the Hough parameter space matrix to obtain a high cumulative value point set. The straight line equation is solved for the high cumulative value point set by the random sampling method to obtain a straight line parameter set. The line segment endpoint coordinates are located for the original extended device area according to the straight line parameter set to obtain a line segment endpoint coordinate set. The length values of each line segment are calculated based on the line segment endpoint coordinate set, and the line segments with a length less than one-fourth of the smaller value of the width and height of the device frame are removed to obtain an effective line segment set. The intersection of the line segments in the effective line segment set and the boundary of the power equipment frame is determined, and the line segments intersecting with the device frame are retained to form a candidate line segment set.
[0031] The slopes of the line segments in the candidate line segment set are clustered and grouped according to the DBSCAN clustering algorithm to obtain the wire orientation grouping. The DBSCAN algorithm is a density-based clustering algorithm. The slope values of the line segments are calculated based on the endpoint coordinates of each line segment in the candidate line segment set to form a slope data set. The outlier detection is performed on the slope data set to remove the abnormal slope values to obtain an effective slope set. The neighborhood radius parameter ε and the minimum sample number parameter MinPts of the DBSCAN algorithm are determined according to the effective slope set. The density clustering calculation is performed on the effective slope set through the neighborhood radius parameter ε and the minimum sample number parameter MinPts to obtain a slope clustering result. According to the relative direction relationship with the insulator position, the slope clustering result is directionally marked to distinguish the slope group in the same direction as the insulator and the slope group in the different direction from the insulator. The line segments in the candidate line segment set are assigned to the corresponding slope groups according to their slope values to form the wire orientation grouping.
[0032] Finally, the line segments in the wire direction grouping are fitted based on the least squares method to obtain the wire position coordinates, and whether there is a fault in the power equipment is judged by comparing the temperature values of the wire position coordinates and the power equipment position coordinates. Extract the line segment group in the same direction as the insulator from the wire direction grouping, obtain the set of line segment endpoint coordinates in the line segment group, construct a least squares linear fitting equation according to the set of line segment endpoint coordinates, solve the linear parameter coefficients of the line, and determine the wire main direction line equation based on the linear parameter coefficients. According to the minimum and maximum x coordinates in the set of line segment endpoint coordinates, intercept the effective wire segment on the wire main direction line equation. Translate the power equipment frame 1.5 times the frame width distance along the direction of the effective wire segment to obtain the wire position coordinates, extract the wire temperature value from the temperature matrix through the wire position coordinates, and calculate the difference from the temperature value at the power equipment position coordinates. When the temperature difference exceeds the preset threshold, it is determined that there is a fault in the power equipment.
[0033] In a specific embodiment, the process of executing step S101 may specifically include the following steps:
[0034] (1) Extract the clamp equipment frame and insulator equipment frame according to the power equipment position coordinates;
[0035] (2) Enlarge both ends of the clamp equipment frame along the length direction by 0.8 times the original length of the equipment frame to obtain a length extended area;
[0036] (3) Enlarge both ends of the clamp equipment frame along the width direction by 0.8 times the original width of the equipment frame to obtain a width extended area;
[0037] (4) Combine the length extended area and the width extended area to obtain an enlarged clamp component frame;
[0038] (5) Perform regional interception processing on the edge detection image according to the enlarged clamp component frame to obtain an edge clamp area, and paste the edge clamp area onto a same-sized picture with all pixel points being 0;
[0039] (6) Set the pixel values of the area where the insulator is located in the same-sized picture to 0 according to the position coordinates of the insulator equipment frame to obtain an extended equipment area.
[0040] Specifically, the clamp device frame and insulator device frame are extracted according to the position coordinates of the power equipment. The position coordinates of the power equipment in this step are pre-obtained through an object detection model. The object detection model usually uses a deep learning network such as Faster R-CNN or YOLO to process the temperature grayscale image and outputs information including the category of the power equipment, the confidence score, and the position coordinates. The position coordinates are usually represented in the form of a bounding box, including the pixel coordinates of the upper left corner and the lower right corner. During the extraction process, the detection boxes with a confidence greater than the threshold in the object detection results are respectively extracted as the clamp device frame and the insulator device frame.
[0041] The two ends of the clamp device frame are enlarged along the length direction by 0.8 times the original length of the device frame to obtain a length extension area. The length extension calculation process is to extend each side of the horizontal direction of the original clamp device frame by half of 0.8 times the original length, that is, to extend 40% of the distance to the left and right on the basis of the original width. Here, the length direction refers to the size of the clamp device frame in the horizontal direction. By extending in this way to both ends, it is ensured that the area where the clamp is connected to the wire can be included.
[0042] At the same time, the two ends of the clamp device frame are enlarged along the width direction by 0.8 times the original width of the device frame to obtain a width extension area. The calculation of the width extension is similar. The vertical direction of the original clamp device frame is extended upward and downward by half of 0.8 times the original height, that is, to extend 40% of the distance to the upper and lower sides on the basis of the original height. The width direction refers to the size of the clamp device frame in the vertical direction. Such an extension ensures that the wire parts that may appear in the upper and lower areas of the clamp can be included.
[0043] Subsequently, the length extension area and the width extension area are merged to obtain an enlarged clamp component frame. The merging process is actually to take the union of the two extension areas to form a larger rectangular area, which includes all the areas after horizontal and vertical extensions. This enlarged clamp component frame is extended by 0.8 times in both the horizontal and vertical directions compared to the original clamp device frame, enabling subsequent processing to fully consider the wire connection situation around the clamp.
[0044] According to the enlarged clamp component frame, the edge detection image is subjected to regional interception processing to obtain an edge clamp area, and the edge clamp area is pasted onto a same-sized image with all pixel points being 0. In this step, the corresponding area is first intercepted from the edge detection image according to the coordinates of the enlarged clamp component frame to obtain a local image containing the clamp and its surrounding edge information. Then, a completely black image (with all pixel values being 0) of the same size as the original edge detection image is created, and the intercepted edge clamp area is pasted onto the corresponding position on this completely black image. The purpose of such processing is to focus the analysis on the clamp and its surrounding area while keeping the size and coordinate system of the original image unchanged.
[0045] Finally, according to the position coordinates of the insulator device frame, the pixel values in the area where the insulator is located in the same-sized image are set to 0 to obtain the extended device area. In this step, in the image obtained previously that already contains the edge information of the clamp, all the pixel values in the area corresponding to the insulator are set to 0 (black). The purpose of this processing is to eliminate the possible interference of the insulator area on wire detection. Since the edge features of the insulator area may be similar to those of the wire, by blackening this area, it is ensured that the subsequent Hough transform line segment detection focuses on the wire area.
[0046] Taking the line monitoring of a 220 kV substation as an example, an infrared temperature sensor collects a temperature image containing a clamp and an insulator. The object detection model detects a clamp located at the image coordinates (100, 150) with a box size of 60×40 pixels, and an insulator located at the coordinates (180, 160) with a box size of 50×100 pixels. When expanding the clamp device frame in the length direction, the calculated expansion width is 60×0.8 / 2 = 24 pixels, that is, expanding 24 pixels to the left and right respectively, and the obtained expanded horizontal range is (76, 184). When expanding the clamp device frame in the width direction, the calculated expansion height is 40×0.8 / 2 = 16 pixels, that is, expanding 16 pixels up and down respectively, and the obtained expanded vertical range is (134, 166). Combining these two expanded areas, the coordinates of the finally enlarged clamp component frame are (76, 134, 184, 166). The edge information of this area is intercepted from the edge detection image and pasted onto a completely black image of 600×400 pixels (the same as the original image). Then, all the pixel values in the insulator area (155, 110, 205, 210) are set to 0, and finally, the extended device area highlighting the wires that may be connected around the clamp is obtained. This processing method ensures that the subsequent line segment detection can accurately identify the wires around the clamp, while avoiding the interference of the edge features of the insulator area on the wire detection results.
[0047] In a specific embodiment, the process of executing step S102 may specifically include the following steps:
[0048] (1) Perform Gaussian filtering on the temperature grayscale image to obtain a noise-suppressed image;
[0049] (2) Calculate the gradient values in the horizontal and vertical directions of the image based on the noise-suppressed image to obtain the gradient intensity matrix and the gradient direction matrix;
[0050] (3) Perform non-maximum suppression processing based on the gradient intensity matrix and the gradient direction matrix to obtain the preliminary edge contour;
[0051] (4) Screen the preliminary edge contour through the double-threshold method to obtain the strong edge point set and the weak edge point set;
[0052] (5) Perform hysteresis edge connection processing on the weak edge point set according to the strong edge point set to obtain a continuous edge contour;
[0053] (6) Perform morphological processing on the continuous edge contour to obtain an edge detection image.
[0054] Specifically, perform Gaussian filtering on the temperature grayscale image to obtain a noise-suppressed image. Gaussian filtering is a linear smoothing filter that achieves image smoothing by weighted averaging of pixels and their neighboring pixels. Use a 5×5 Gaussian kernel to perform a convolution operation on the temperature grayscale image. The weight at the center of the Gaussian kernel is the largest, and the weight gradually decreases with the increase of distance. During convolution calculation, for each pixel point in the image, multiply the point and its surrounding points by the values at the corresponding positions of the Gaussian kernel and sum them to obtain the filtered result of this point. After Gaussian filtering, the noise in the temperature grayscale image is effectively suppressed, and at the same time, key feature information such as edges is retained, providing a cleaner data basis for subsequent edge detection.
[0055] Calculate the gradient values in the horizontal and vertical directions of the image based on the noise-suppressed image to obtain a gradient intensity matrix and a gradient direction matrix. The gradient calculation uses the Sobel operator to calculate the gradient in the horizontal direction (x direction) and the vertical direction (y direction) respectively. The Sobel operator is a differential operator that calculates the approximate gradient values in the x direction and y direction through a 3×3 convolution kernel. For each pixel point in the noise-suppressed image, calculate the gradient values Gx and Gy using the horizontal Sobel operator and the vertical Sobel operator respectively. Then calculate the gradient intensity based on the gradient values in these two directions, that is, the gradient magnitude At the same time, calculate the gradient direction θ = arctan(Gy / Gx). The gradient intensity represents the severity of the grayscale change at the pixel point, and the gradient direction represents the direction of the largest grayscale change. These two matrices contain the intensity and direction characteristics of the edge information in the image, providing the necessary data for subsequent non-maximum suppression.
[0056] Non-maximum suppression processing is performed based on the gradient intensity matrix and the gradient direction matrix to obtain a preliminary edge contour. Non-maximum suppression is a process of edge refinement, aiming to exclude the points that are not local maxima in the gradient direction and only retain the points that are local maxima in the gradient direction as edge points. During specific processing, first, the gradient direction angle is quantized into one of the four directions: 0°, 45°, 90°, or 135°. Then, for each non-boundary pixel point in the image, the gradient intensity of the current point is compared with the gradient intensities of the two adjacent points along both sides of the gradient direction. If the gradient intensity of the current point is not the maximum among these three points, its gradient intensity is set to 0; otherwise, its original gradient intensity value is retained. After such processing, the edge line is refined to be only one pixel wide, effectively eliminating the edge blurring phenomenon and making the edge contour of the power equipment clearer and more accurate.
[0057] Threshold screening is performed on the preliminary edge contour through the double-threshold method to obtain a set of strong edge points and a set of weak edge points. The double-threshold method sets two thresholds, a high threshold and a low threshold. Usually, the low threshold is 1 / 2 or 1 / 3 of the high threshold. For each pixel point in the image after non-maximum suppression, if its gradient intensity is greater than the high threshold, it is marked as a strong edge point; if the gradient intensity is less than the low threshold, it is excluded; if the gradient intensity is between the two thresholds, it is marked as a weak edge point. Strong edge points are regarded as the definite edge parts, while weak edge points need to be further judged whether they are part of the edge. This double-threshold screening method can effectively distinguish the important edges and secondary edges in the power equipment, especially suitable for processing thermal images with uneven temperature gradient changes. Based on the set of strong edge points, hysteresis edge connection processing is performed on the set of weak edge points to obtain a continuous edge contour. Hysteresis edge connection means checking whether each weak edge point is adjacent to a strong edge point. During specific processing, for each weak edge point, check whether there are strong edge points or weak edge points that have been confirmed as edges among its 8 neighboring pixel points. If there are, the weak edge point is also confirmed as an edge point; otherwise, it is excluded. This process starts from the strong edge points and gradually expands to the weak edge points connected to them until no further expansion is possible. In this way, the scattered edge points can be connected into a continuous edge contour, effectively solving the problem of discontinuous edges caused by heat conduction in the temperature image and making the boundary between the power equipment and the wire more complete.
[0058] Morphological processing is performed on the continuous edge contour to obtain an edge detection image. The morphological processing includes dilation and erosion operations. First, the dilation operation is performed to fill the small gaps in the edge contour, and then the erosion operation is performed to refine the edge lines. The dilation operation uses a 3×3 structuring element. For each pixel in the edge image, if any pixel in the region where it overlaps with the structuring element is an edge point, then this pixel is also set as an edge point. The erosion operation also uses a 3×3 structuring element. For each pixel in the edge image, only when all pixels in the region where it overlaps with the structuring element are edge points, this pixel is retained as an edge point. Through these morphological processes, the final edge detection image is made smoother and more continuous, while retaining the key edge features of the power equipment and wires.
[0059] Taking the monitoring of the clamp of a 110 kV transmission line as an example, the temperature grayscale image collected by the infrared temperature sensor contains a pixel matrix with a resolution of 640×480. First, a 5×5 Gaussian kernel with a standard deviation of 1.4 is used to perform a convolution operation on the temperature grayscale image to obtain a noise suppression image. Then, the Sobel operator is used to calculate the horizontal gradient Gx and vertical gradient Gy of each pixel point. For example, at the pixel (300, 240) in the image, the horizontal gradient Gx = 78 and the vertical gradient Gy = 125. The gradient intensity at this point is calculated The gradient direction θ = arctan(125 / 78) ≈ 58°, and the gradient direction is quantized to 45°. In the non-maximum suppression process, the gradient intensity of this point is compared with that of its two adjacent points along the 45° direction, and it is found that the gradient intensity of this point is greater than that of the two side points, so its value is retained. Next, the high threshold is set to 100 and the low threshold is set to 50. Since the gradient intensity of this point, 147, is greater than the high threshold of 100, it is marked as a strong edge point. After the hysteresis edge connection process, the weak edge points connected to the strong edge points are also included in the edge set. Finally, through the dilation and erosion operations in morphology, a smooth and continuous edge detection image is obtained, clearly showing the connection boundary between the clamp and the wire in the power line.
[0060] In a specific embodiment, the process of executing step S103 may specifically include the following steps:
[0061] (1) Perform pixel point cumulative voting processing on the extended device area to obtain a Hough parameter space matrix;
[0062] (2) Perform threshold screening on the voting results according to the cumulative values in the Hough parameter space matrix to obtain a high cumulative value point set;
[0063] (3) Solve the straight line equation for the high cumulative value point set by the random sampling method to obtain a straight line parameter set;
[0064] (4) Locate the line segment end points for the original extended device area according to the straight line parameter set to obtain a line segment end point coordinate set;
[0065] (5) Calculate the length values of each line segment based on the set of line segment endpoint coordinates, and eliminate the line segments with lengths less than one-fourth of the smaller value between the width and height of the device frame to obtain a set of valid line segments;
[0066] (6) Determine the intersection points of the line segments in the set of valid line segments with the boundaries of the power device frame, and retain the line segments that intersect with the device frame to form a candidate line segment set.
[0067] Specifically, perform pixel point cumulative voting processing on the extended device area to obtain a Hough parameter space matrix. The probabilistic Hough transform is an improved Hough transform algorithm used to detect line segments from a binary image. In the standard Hough transform, a line is usually represented in polar coordinates:
[0068] ρ = xcosθ + ysinθ
[0069] where ρ represents the perpendicular distance from the coordinate origin to the line, and θ represents the angle between the perpendicular line and the x-axis. For each non-zero pixel point (x e , y e ) in the extended device area, calculate all possible line parameters (ρ, θ) that it passes through, and increment the cumulative value at the corresponding position in the Hough parameter space by 1. Specifically, when implementing, the value range of θ is [0, π), and the step size is usually π / 180, that is, 1 degree; for each θ value, calculate the corresponding ρ value:
[0070] ρ e = x e cosθ + y e sinθ
[0071] Then increment the cumulative value at the coordinate (ρ e , θ) in the Hough parameter space by 1. After voting by all non-zero pixel points, a two-dimensional Hough parameter space matrix H(ρ, θ) is formed, and the value of each cell in the matrix represents the cumulative number of votes for the corresponding parameter combination.
[0072] Perform threshold screening on the voting results according to the cumulative values in the Hough parameter space matrix to obtain a set of high cumulative value points. In the Hough parameter space matrix, the higher the cumulative value of a point, the more pixel points exist on the corresponding line, that is, these lines are more obvious in the original image. Set a cumulative threshold T h
[0073] , usually taken as a certain proportion (such as 10%) of the total number of voting pixels or a fixed value set according to experience. Traverse all cells in the Hough parameter space matrix, and extract the cell coordinates (ρ h , θ h ) with cumulative values greater than the threshold T_h to form a set of high cumulative value points P high=(ρ1,θ1),(ρ2,θ2),...,(ρ k ,θ k ). These high-accumulation value point sets represent the most likely combinations of line parameters in the image.
[0074] By using the random sampling method to solve the line equation for the high-accumulation value point sets, a set of line parameters is obtained. The main difference between the probabilistic Hough transform and the standard Hough transform is that it does not detect infinitely long lines but the line segments existing in the image. For each high-accumulation value point (\rho_h,\theta_h), the starting and ending points of the line segment on the corresponding line need to be determined. First, convert the line parameters in polar coordinate form to the line equation in the Cartesian coordinate system:
[0075] ax d +by d +c = 0
[0076] where the coefficients are a = cosθ h , b = sinθ h , c = -ρ h . Then, find all non-zero pixel points in the original image that satisfy this line equation, that is, all points in the original edge image that satisfy |ax p +by p +c| < δ, where δ is a small tolerance value, usually taken as 1 or 2. Use the Random Sample Consensus (RANSAC) algorithm to randomly select several subsets from these points, calculate the fitted lines, and select the line with the maximum support as the final result. Finally, obtain the set of line parameters L = (a1,b1,c1),(a2,b2,c2),...,(a m ,b m ,c m ). Locate the endpoints of the line segments for the original extended device area according to the set of line parameters, and obtain the set of line segment endpoint coordinates. For each set of line parameters (a l ,b l ,c l ), find all non-zero pixel points in the original extended device area that satisfy this line equation, and sort these points according to the line direction. Conduct a connectivity analysis on the sorted point set to find continuous point clusters, and each point cluster represents a potential line segment.
[0077] For each point cluster, take its two endpoints as the endpoints of the line segment, and obtain the set of line segment endpoint coordinates E = (x s1 ,y s1 ,x e1 ,y e1 ),(x s2 ,y s2 ,x e2 ,y e2),...,(x sn ,y sn ,x en ,y en ), where (x si ,y si ) and (x ei ,y ei ) represent the starting and ending coordinates of the i-th line segment, respectively.
[0078] Calculate the length values of each line segment based on the set of line segment endpoint coordinates, and eliminate the line segments with lengths less than one-fourth of the smaller value of the width and height of the equipment frame to obtain a set of valid line segments. The line segment length calculation formula is:
[0079]
[0080] Let the width of the power equipment frame be W box , and the height be H box , then the length threshold T len = min(W box , H box ) / 4. Screen out all line segments that satisfy L seg ≥T len to form a set of valid line segments S valid . This threshold setting is based on the actual situation of the connection between the power equipment and the wire. The length of the wire segment is usually at least a certain proportion of the equipment size. Too short line segments are likely to be noise or the edges of the equipment's own structure.
[0081] Determine the intersection points of the line segments in the set of valid line segments with the boundaries of the power equipment frame, and retain the line segments that intersect with the equipment frame to form a set of candidate line segments. The power equipment frame consists of four boundary line segments. For each line segment in the set of valid line segments, calculate its intersection points with the four sides of the equipment frame. For each side of the equipment frame, calculate the intersection points of the line segment with it and determine whether the intersection points are within the boundary range. If there is at least one valid intersection point, it is considered that the line segment intersects with the equipment frame, and it is retained in the set of candidate line segments. These candidate line segments are likely to represent the wires connecting the power equipment and are an important basis for subsequent wire positioning.
[0082] In a specific embodiment, the process of executing step S104 may specifically include the following steps:
[0083] (1) Calculate the line segment slope values based on the endpoint coordinates of each line segment in the set of candidate line segments to form a slope data set;
[0084] (2) Detect outliers in the slope data set and eliminate the abnormal slope values to obtain a set of valid slopes;
[0085] (3) Determine the neighborhood radius parameter ε and the minimum number of samples parameter MinPts of the DBSCAN algorithm according to the set of valid slopes;
[0086] (4) Perform density clustering calculation on the set of valid slopes through the neighborhood radius parameter ε and the minimum number of samples parameter MinPts to obtain the slope clustering result;
[0087] (5) According to the relative direction relationship with the insulator position, perform direction marking on the slope clustering result to distinguish the slope group in the same direction as the insulator and the slope group in the different direction from the insulator;
[0088] (6) Allocate the line segments in the candidate line segment set to the corresponding slope groups according to their slope values to form the wire direction grouping.
[0089] Specifically, first calculate the line segment slope values based on the endpoint coordinates of each line segment in the candidate line segment set to form a slope data set. The line segment slope calculation uses the endpoint coordinate difference ratio method. For each line segment in the candidate line segment set, its endpoint coordinates are the starting point coordinates and the ending point coordinates respectively, and the slope value is obtained by calculating the vertical direction coordinate difference divided by the horizontal direction coordinate difference. In actual calculation, the situation where the horizontal direction coordinate difference is zero needs to be specially processed. At this time, the line segment is a vertical line, and the slope is defined as infinity, but in program implementation, a sufficiently large value such as 1000 is usually given to represent it. The calculated slope data set is a one-dimensional array containing the slope values of all candidate line segments, and these slope values directly reflect the different direction characteristics of the wires in the power line. Perform outlier detection on the slope data set to remove the outlier slope values and obtain the set of valid slopes. The outlier detection uses the interquartile range (IQR) method. First, calculate the first quartile and the third quartile of the slope data set, which represent the values at the 25% and 75% positions after the slope data is sorted respectively. Then calculate the interquartile range, that is, the difference between the third quartile and the first quartile. Set the upper and lower boundaries to the third quartile plus 1.5 times the interquartile range and the first quartile minus 1.5 times the interquartile range. The slope values falling outside this range are considered outliers and are removed. Outliers usually come from image noise or the edges of non-wire structures. Removing these outliers helps to improve the accuracy of the subsequent clustering results. The set of valid slopes obtained after outlier detection can better reflect the true direction characteristics of the wires.
[0090] Determine the neighborhood radius parameter ε and the minimum number of samples parameter MinPts of the DBSCAN algorithm according to the effective slope set. DBSCAN is a density-based clustering algorithm that does not require specifying the number of clusters in advance and is suitable for discovering clusters of arbitrary shapes. The neighborhood radius parameter ε determines the distance threshold for judging a data point as a neighborhood point, and the minimum number of samples parameter MinPts defines the minimum number of points to form a density core. The determination of the parameter ε is usually based on the k-distance graph method. First, calculate the distance from each point in the effective slope set to its k-th nearest neighbor point, arrange these distances in ascending order and plot them as a graph, and find the "inflection point" in the curve as the value of ε. The parameter MinPts is usually set to twice the data dimension, but in one-dimensional data such as slope clustering, it is usually set to 3 to 5, and the value here is 3. The reasonable setting of these two parameters directly affects the accuracy and stability of the wire slope clustering. Perform density clustering calculation on the effective slope set through the neighborhood radius parameter ε and the minimum number of samples parameter MinPts to obtain the slope clustering result. The specific steps of the DBSCAN algorithm are as follows: First, randomly select an unvisited point, find all points within its ε neighborhood. If the number of points within the ε neighborhood is greater than or equal to MinPts, mark this point as a core point and start forming a new cluster centered on this point; then traverse all points within the ε neighborhood of this core point. If a point has not been visited, mark it as visited and add it to the current cluster. If this point is also a core point, add the points within its ε neighborhood to the list of points to be visited; repeat the above process until the current cluster no longer expands; finally, select another unvisited point and repeat the above process until all points have been visited. This algorithm is particularly effective for wire slope clustering because the directions of wires usually concentrate on several main directions, forming obvious density regions.
[0091] According to the relative direction relationship with the insulator position, perform direction marking on the slope clustering result to distinguish the slope group in the same direction as the insulator and the slope group in the different direction from the insulator. Insulators usually exhibit a certain directionality, and the main direction can be determined by the aspect ratio of the bounding box of the insulator obtained by the object detection model. Calculate the slope of the long axis direction of the insulator, and then compare each group in the slope clustering result with the insulator slope. If the absolute value of the slope difference between the two is less than the threshold (usually set to the slope difference corresponding to 30 degrees), it is marked as the slope group in the same direction as the insulator, otherwise it is marked as the slope group in the different direction from the insulator. This direction marking method utilizes the spatial correlation between wires and insulators in electrical equipment and helps to more accurately locate the wire position subsequently.
[0092] The line segments in the candidate line segment set are assigned to corresponding slope groups according to their slope values to form a grouping of the wire orientation. For each line segment in the candidate line segment set, calculate its slope value, then calculate the difference between this slope value and the central values of each slope group, and assign the line segment to the slope group with the smallest difference. In this way, all candidate line segments are classified into the line segment group in the same direction as the insulator or the line segment group in a different direction from the insulator, forming the final grouping of the wire orientation. This grouping method can effectively distinguish the wires in different directions of the power equipment and provide a basis for subsequent wire positioning and fault diagnosis.
[0093] Taking the line monitoring of a 110 kV substation as an example, a clamp and an insulator are detected in the temperature image captured by the infrared thermal imager. Through the aforementioned processing, 12 candidate line segments are obtained. Calculate the slope values of these line segments to obtain the slope data set: {0.85, 0.87, 0.91, -0.52, -0.55, -0.49, 5.2, 0.82, -0.58, 0.89, -5.1, 0.86}. Conduct interquartile range outlier detection on these slopes. Calculate the first quartile as -0.55, the third quartile as 0.89, the interquartile range as 1.44, the upper and lower boundaries as 2.88 and -2.71 respectively, and identify 5.2 and -5.1 as outliers and remove them to obtain the effective slope set: {0.85, 0.87, 0.91, -0.52, -0.55, -0.49, 0.82, -0.58, 0.89, 0.86}. Use the k-distance graph method to determine the neighborhood radius parameter ε of the DBSCAN algorithm as 0.08, and set the minimum sample number parameter MinPts as 3. Use these parameters to perform DBSCAN clustering on the effective slope set to obtain two obvious slope clusters: the first group has a central value of approximately 0.87 and contains slopes {0.85, 0.87, 0.91, 0.82, 0.89, 0.86}; the second group has a central value of approximately -0.53 and contains slopes {-0.52, -0.55, -0.49, -0.58}. The bounding box of the insulator obtained from the object detection is rectangular, with an aspect ratio of 3:1, and the slope of the main axis direction is calculated to be approximately 0.83. Compare the differences between the two slope groups and the slope of the insulator. The difference between the first group of slopes and the slope of the insulator is 0.04, which is much smaller than the difference of 1.36 between the second group of slopes and the slope of the insulator. Therefore, the first group is marked as the slope group in the same direction as the insulator, and the second group is marked as the slope group in a different direction from the insulator. Finally, the 12 candidate line segments are assigned to the corresponding slope groups according to their slopes to form a grouping of the wire orientation, where 7 line segments are classified into the line segment group in the same direction as the insulator, and 5 line segments are classified into the line segment group in a different direction from the insulator. This grouping result directly reflects the two main orientations of the wires in the power line and lays a foundation for subsequent wire positioning and fault diagnosis.
[0094] In a specific embodiment, the process of executing step S105 may specifically include the following steps:
[0095] (1) Extract the line segment group in the same direction as the insulator from the wire routing grouping, and obtain the set of line segment endpoint coordinates in the line segment group;
[0096] (2) Construct a least-squares linear fitting equation based on the set of line segment endpoint coordinates, and solve for the linear parameter coefficients;
[0097] (3) Determine the wire main body routing linear equation based on the linear parameter coefficients;
[0098] (4) Intercept the effective wire segment on the wire main body routing linear equation according to the minimum and maximum x coordinates in the set of line segment endpoint coordinates;
[0099] (5) Translate the power equipment frame 1.5 times the frame width distance along the direction of the effective wire segment to obtain the wire position coordinates;
[0100] (6) Extract the wire temperature value from the temperature matrix through the wire position coordinates, perform a difference calculation with the temperature value at the power equipment position coordinates, and determine that the power equipment has a fault when the temperature difference exceeds the preset threshold.
[0101] Specifically, extract the line segment group in the same direction as the insulator from the wire routing grouping, and obtain the set of line segment endpoint coordinates in the line segment group. The key point of this step is to screen out the line segments in the same direction as the insulator, because these line segments are more likely to represent the main wire routing connected to the insulator. Among the wire routing groupings obtained by the aforementioned DBSCAN clustering, two groups of line segments in the same direction and different directions from the insulator have been marked. Extract the line segment group in the same direction, and collect all the endpoint coordinates of these line segments to form an endpoint coordinate set. Each endpoint contains two coordinate values, x and y, and this set of points will be used to accurately fit the position of the wire in the subsequent steps.
[0102] Construct a least-squares linear fitting equation based on the set of line segment endpoint coordinates, and solve for the linear parameter coefficients. The least-squares method is a mathematical optimization technique that finds the best function match for the data by minimizing the sum of the squares of the errors. In wire positioning, assuming that the wire is approximately a straight line, linear least-squares fitting is used. Specifically, when implementing, all the points in the endpoint coordinate set are regarded as sample points to construct a linear equation. By minimizing the sum of the squares of the perpendicular distances from all sample points to the fitting line, the slope and intercept of the optimal linear equation are solved. During the calculation process, first calculate the average value of the x coordinates and the average value of the y coordinates of all points, then calculate the sum of the differences between the x coordinates of each point and the x mean multiplied by the differences between the y coordinates and the y mean, divide by the sum of the squares of the differences between the x coordinates and the x mean to obtain the slope, and finally substitute the average value point to calculate the intercept. This method takes into account the position information of all endpoints and can more accurately reflect the overall routing of the wire.
[0103] Determine the linear equation of the main direction of the wire based on the linear parameter coefficients. Substitute the slope and intercept obtained in the previous step into the linear equation to obtain the precise linear equation of the main direction of the wire. This linear equation represents the ideal position of the wire in the image, but since the actual wire may be bent or partially deviated, it is necessary to further determine the effective range of the wire. The accuracy of the linear equation directly affects the accuracy of the subsequent wire position coordinates. Therefore, in the fitting process, reasonable constraints are usually combined with the domain knowledge of power equipment, such as excluding abnormal points that are obviously deviated from the connection position of the power equipment.
[0104] According to the minimum and maximum x-coordinate values in the line segment endpoint coordinate set, the effective line segment of the wire is intercepted on the equation of the line where the main body of the wire is running. Determine the actual range of the wire in the image, rather than an infinitely extending straight line. In specific implementation, traverse the x-coordinates of all points in the endpoint coordinate set, find the minimum and maximum values, and then substitute these two values into the equation of the line where the main body of the wire is running, calculate the corresponding y values, and get two endpoints. The two points determine the range of the effective line segment of the wire. This interception method ensures the rationality of the wire length and avoids misjudging the edge that is too far away as part of the wire.
[0105] The power equipment frame is translated along the direction of the effective line segment of the wire by 1.5 times the frame width to obtain the wire position coordinates. The purpose of this step is to determine the possible fault point location on the wire. The power equipment frame refers to the bounding box of the wire clamp or other connecting equipment detected by the target detection model. The translation direction is along the direction of the effective line segment of the wire, and the distance is 1.5 times the width of the power equipment frame. This distance setting is based on power engineering experience and can usually cover the area near the device connection point where temperature anomalies are most likely to occur. The translation calculation uses vector operations. First, the effective line segment of the wire is converted into a unit direction vector, and then multiplied by 1.5 times the width of the equipment frame to obtain the translation vector. Finally, the coordinates of the center point of the power equipment frame are added to the translation vector to obtain the wire position coordinates. This coordinate point represents the area of the wire where the temperature needs to be monitored.
[0106] Extract the wire temperature value from the temperature matrix based on the wire position coordinates, calculate the difference from the temperature value at the power equipment position coordinates, and determine that the power equipment is faulty when the temperature difference exceeds the preset threshold. The temperature matrix is the original data collected by the infrared temperature sensor, recording the temperature value corresponding to each pixel point in the image. According to the wire position coordinates, extract the temperature value at the corresponding position from the temperature matrix, and at the same time extract the temperature value at the equipment from the power equipment position coordinates, and calculate the temperature difference between the two. Under normal circumstances, the temperature difference between the wire and the connected equipment should be within a certain range. If there is an abnormal temperature difference, it usually indicates that there are faults such as poor contact, looseness or oxidation at the connection point. The preset threshold is usually determined according to the equipment type and operating environment. For example, for some high-voltage line connectors, the temperature difference threshold may be set to 2°C to 5°C. When the temperature difference exceeds the threshold, it is determined that the power equipment is faulty and subsequent maintenance processing is required.
[0107] In a specific embodiment, the process of executing step S106 may specifically include the following steps:
[0108] (1) Obtain the original temperature data collected by the infrared temperature sensor and construct a temperature distribution matrix;
[0109] (2) Calculate the maximum temperature value and the minimum temperature value in the temperature distribution matrix to determine the temperature range interval;
[0110] (3) Perform a linear normalization transformation on the temperature distribution matrix according to the temperature range interval to map the temperature value into the interval [0,1] to obtain a normalized temperature matrix;
[0111] (4) Numerically amplify the normalized temperature matrix to map the numerical range into the integer interval [0,255] to obtain a gray value mapping matrix;
[0112] (5) Smooth the gray value mapping matrix through a Gaussian function to suppress noise interference and obtain a smoothed gray matrix;
[0113] (6) Based on the smoothed gray matrix, construct a pixel dot matrix in row and column order to form a temperature gray image.
[0114] Specifically, the primary step of the power equipment wire positioning and fault diagnosis method based on temperature vision is temperature data preprocessing, which involves obtaining the original temperature data collected by infrared temperature sensors and constructing a temperature distribution matrix. Infrared temperature sensors are non-contact temperature measurement devices that can capture the infrared radiation emitted by the target object and convert it into temperature data. In the monitoring of power equipment, infrared temperature sensors are usually arranged in an array to form a thermal imager, which scans the entire power equipment area and outputs two-dimensional temperature data. These original data are organized into a temperature distribution matrix according to the spatial arrangement of the sensors. Each element in the matrix represents the temperature value at the corresponding position in space, with the unit of degrees Celsius. The size of the temperature distribution matrix depends on the resolution of the sensor, usually in specifications such as 640×480 or 320×240. The higher the resolution, the richer the details of the temperature distribution, but the corresponding data volume also increases.
[0115] Calculate the maximum temperature value and the minimum temperature value in the temperature distribution matrix to determine the temperature range interval. This step is achieved by traversing all the elements in the temperature distribution matrix to find the temperature points with the maximum and minimum values, thereby determining the temperature dynamic range of the entire scene. Due to different materials, loads, and heat dissipation conditions, the temperature distribution of power equipment varies greatly. The temperature of a normally operating device may be between 20°C and 80°C, while the temperature at the fault point may exceed 100°C. Accurately obtaining the temperature extreme values is crucial for subsequent normalization processing, as it determines the mapping relationship from temperature to grayscale and affects the significance of temperature anomaly points in the image. The temperature range interval consists of the minimum temperature value and the maximum temperature value.
[0116] Perform a linear normalization transformation on the temperature distribution matrix according to the temperature range interval to map the temperature values into the [0,1] interval, obtaining a normalized temperature matrix. Linear normalization is a commonly used data preprocessing method, aiming to convert data of different scales to the same scale for comparison and analysis.
[0117] For each element in the temperature distribution matrix, calculate its normalized value. After normalization, the value of the lowest temperature point is 0, the value of the highest temperature point is 1, and the remaining temperature points are mapped proportionally between 0 and 1. This processing makes the temperature data of different scenarios and different devices comparable and also prepares for the subsequent grayscale image conversion. The normalized temperature matrix maintains the relative relationship of the original temperature distribution but eliminates the differences in absolute temperature values. Numerically amplify the normalized temperature matrix and map the numerical range to the integer interval [0, 255] to obtain the grayscale value mapping matrix. This step is to convert the normalized temperature data into the standard 8-bit grayscale image format, facilitating the application of subsequent image processing algorithms. The specific implementation is to multiply each element in the normalized temperature matrix by 255 and round it to an integer to obtain the corresponding grayscale value. After conversion, the lowest temperature point corresponds to the grayscale value 0 (black), the highest temperature point corresponds to the grayscale value 255 (white), and the intermediate temperatures correspond to the corresponding grayscale levels in a linear proportion. The grayscale value mapping matrix is essentially a visual representation of temperature, enabling the human eye to intuitively distinguish different temperature regions and also meeting the input requirements of most image processing algorithms.
[0118] Smooth the grayscale value mapping matrix through the Gaussian function to suppress noise interference and obtain the smoothed grayscale matrix. Gaussian smoothing is an image filtering method based on the Gaussian function, which can effectively reduce the noise and details in the image. The Gaussian function is a two-dimensional normal distribution function, and the function value decays exponentially as the distance from the center point increases. In practical applications, Gaussian smoothing is achieved by convolving a predefined Gaussian kernel with the image. The Gaussian kernel is a small matrix, usually 5×5 or 3×3 in size, and the element values in the matrix are calculated according to the Gaussian distribution, with the largest weight at the center point and the weights of the surrounding points decreasing as the distance increases. For each pixel in the grayscale value mapping matrix, take its surrounding neighborhood pixels, multiply them by the values at the corresponding positions of the Gaussian kernel, and sum them to obtain the smoothed result of this point. Gaussian smoothing can retain the main structural features of the image while suppressing the random fluctuations caused by factors such as sensor noise and environmental interference, providing a more stable data basis for subsequent edge detection and feature extraction.
[0119] Construct a pixel lattice in row and column order based on the smoothed grayscale matrix to form a temperature grayscale image. This step is a process of converting a numerical matrix into a visual image. Each element in the smoothed grayscale matrix corresponds to a pixel point in the image, and the element value determines the grayscale level of the pixel. According to the row and column order of the matrix, each element is mapped to the corresponding position in the image to construct a complete temperature grayscale image. This sequential construction method ensures that the spatial relationship of the original temperature distribution is accurately expressed in the image. The final temperature grayscale image is a standard 8-bit grayscale image and can be operated using conventional image processing libraries such as OpenCV. The temperature grayscale image intuitively shows the temperature distribution of the power equipment. The high-temperature area appears bright, the low-temperature area appears dark, and the area with obvious temperature gradient changes forms a clear edge. These features provide an important basis for subsequent wire positioning and fault diagnosis.
[0120] Taking the monitoring of a 110kV transmission line joint as an example, an infrared thermal imager captures a temperature image data containing clamps, insulators, and connecting wires. The original temperature data is a temperature matrix with a resolution of 320×240, and the numerical range is between 22.5°C and 75.8°C. First, determine the temperature range interval as [22.5, 75.8], and the temperature span is 53.3°C. Then perform linear normalization on each temperature point. For example, if the temperature of a certain point is 45.3°C, the normalization calculation is (45.3 - 22.5) / (75.8 - 22.5) = 0.427. Perform the same operation on the entire temperature matrix to obtain a normalized temperature matrix with a value range of [0, 1]. Then multiply the normalized value by 255 and round it. The grayscale value of this point is 0.427×255≈109. After all conversions, a grayscale value mapping matrix with a value range of [0, 255] is obtained. Subsequently, use a 5×5 Gaussian kernel with a standard deviation of 1.2 to smooth the grayscale matrix to eliminate the noise caused by temperature fluctuations. For example, the central grayscale value of a certain 5×5 area in the original grayscale matrix is 120, and the surrounding points are 118, 122, 119, 121, etc. After Gaussian weighted averaging, the new grayscale value of this point becomes 119, and the noise is effectively suppressed. Finally, organize the smoothed grayscale values in row and column order to generate a 320×240 temperature grayscale image. In the image, the clamp part shows a relatively bright gray (about 180 grayscale), the wire shows a medium brightness (about 130 grayscale), and the background area is darker (below 60 grayscale). This preprocessing method highlights the temperature distribution characteristics of the power equipment.
[0121] The above describes the method for wire positioning and fault diagnosis of power equipment based on temperature vision in the embodiments of the present application. Next, the system for wire positioning and fault diagnosis of power equipment based on temperature vision in the embodiments of the present application will be described. Please refer to Figure 2 , an embodiment of the system for wire positioning and fault diagnosis of power equipment based on temperature vision in the embodiments of the present application includes:
[0122] A mapping module, configured to perform normalization mapping processing on the temperature matrix collected by the infrared temperature sensor to obtain a temperature grayscale image;
[0123] A detection module, configured to perform edge detection processing on the temperature grayscale image through the Canny algorithm to obtain an edge detection image;
[0124] A processing module, configured to perform magnification processing on the device frame according to the power equipment position coordinates obtained by the target detection model to obtain an extended equipment area, and the extended equipment area is extended by 0.8 times the original size of the device frame in both the length direction and the width direction;
[0125] An extraction module, configured to perform line segment extraction processing on the extended equipment area in the edge detection image through probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the device frame;
[0126] A clustering module, configured to perform clustering grouping processing on the slopes of the line segments in the candidate line segment set according to the DBSCAN clustering algorithm to obtain wire orientation groupings, and the wire orientation groupings include a line segment group in the same direction as the insulator and a line segment group in a different direction from the insulator;
[0127] A fitting module, configured to perform fitting processing on the line segments in the wire orientation groupings based on the least squares method to obtain wire position coordinates, and determine whether there is a fault in the power equipment by comparing the temperature values of the wire position coordinates and the power equipment position coordinates.
[0128] Through the collaborative cooperation of the above-mentioned various components, through the normalization mapping process of the temperature grayscale image, the unified standardization of temperature data in different scenarios and devices is achieved, enhancing the adaptability and comparability of the method, while retaining the key feature information of the original temperature distribution; the Canny algorithm is used for edge detection, combined with multi-stage processing such as Gaussian filtering, non-maximum suppression, and double-threshold method, ensuring the accurate extraction of the edges of power equipment and wires, laying a solid foundation for subsequent line segment recognition; the device frame is enlarged and extended by 0.8 times according to the position coordinates of the power equipment obtained by the object detection model, effectively covering the area where wires may be connected around the device, while avoiding the interference information caused by excessive expansion; line segments are extracted from the extended device area through probabilistic Hough transform, and the line segment length threshold is set to one-fourth of the smaller value of the width and height of the device frame, effectively filtering out the interference of short line segments and retaining the effective line segments representing wires; according to the DBSCAN clustering algorithm, the slopes of the line segments in the candidate line segment set are clustered and grouped to adaptively discover the main trend characteristics of the wires, without the need to preset the number of clusters, adapting to complex wire distribution scenarios; based on the least squares method, the line segments in the wire trend group are fitted to obtain the wire position coordinates, and fault diagnosis is carried out by comparing the temperature difference between the wire and the device, realizing the accurate identification of faults such as poor contact, looseness, or oxidation at the connection points. The contribution of this method in the application of artificial intelligence algorithms is particularly significant. The application of the object detection model solves the problem of automatic positioning of power equipment and reduces the workload of manual annotation; the DBSCAN algorithm, as a density clustering method, its self-adaptability enables the system to cope with the changes in wire trends in different power scenarios without manual intervention to adjust parameters; the least squares fitting provides high-precision wire position coordinates while ensuring computational efficiency, improving the accuracy of fault diagnosis. This method organically combines computer vision and artificial intelligence technologies and applies them to the field of power equipment fault diagnosis, realizing the full-process automation from temperature image acquisition to wire positioning and then to fault diagnosis, greatly improving the efficiency and accuracy of power equipment monitoring, providing a strong guarantee for the safe and stable operation of the power system, while reducing the workload and potential risks of manual inspection.
[0129] Referring to Figure 3 , in the embodiment of the present invention, a computer device is further provided. The computer device may be a server, and its internal structure may be as Figure 3As shown in the figure. The computer device includes a processor, a memory, a display screen, an input device, a network interface, and a database connected via a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above method is implemented.
[0130] Those skilled in the art can understand that Figure 3 the structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0131] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0132] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium provided by the present invention and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.
[0133] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems, systems, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0135] As described above, the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for locating and fault diagnosing the electric wires of power equipment based on temperature vision, characterized in that, The method for positioning and fault diagnosis of power equipment wires based on temperature vision includes: Performing normalization mapping processing on the temperature matrix collected by the infrared temperature sensor to obtain a temperature grayscale image; Performing edge detection processing on the temperature grayscale image through the Canny algorithm to obtain an edge detection image; Performing magnification processing on the equipment frame according to the position coordinates of the power equipment obtained by the target detection model to obtain an extended equipment area, and the extended equipment area is extended by 0.8 times the original size of the equipment frame in both the length direction and the width direction; Performing line segment extraction processing on the extended equipment area in the edge detection image through probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the equipment frame; Performing clustering grouping processing on the slopes of the line segments in the candidate line segment set according to the DBSCAN clustering algorithm to obtain wire orientation groupings, and the wire orientation groupings include a line segment group in the same direction as the insulator and a line segment group in a different direction from the insulator; Performing fitting processing on the line segments in the wire orientation groupings based on the least squares method to obtain wire position coordinates, and judging whether there is a fault in the power equipment by comparing the temperature values of the wire position coordinates and the power equipment position coordinates.
2. The method for positioning and fault diagnosis of power equipment wires based on temperature vision according to claim 1, characterized in that, The step of performing normalization mapping processing on the temperature matrix collected by the infrared temperature sensor to obtain a temperature grayscale image includes: Extracting the clamp equipment frame and the insulator equipment frame according to the position coordinates of the power equipment; Magnifying both ends of the clamp equipment frame along the length direction by 0.8 times the original length of the equipment frame to obtain a length extended area; Magnifying both ends of the clamp equipment frame along the width direction by 0.8 times the original width of the equipment frame to obtain a width extended area; Performing merging processing on the length extended area and the width extended area to obtain an enlarged clamp component frame; Performing region intercepting processing on the edge detection image according to the enlarged clamp component frame to obtain an edge clamp area, and pasting the edge clamp area onto a same-size picture with all pixel points being 0; Performing a process of setting the pixel values of the area where the insulator is located in the same-size picture to 0 according to the position coordinates of the insulator equipment frame to obtain the extended equipment area.
3. The method for positioning and fault diagnosis of electric power equipment wires based on temperature vision according to claim 1, characterized in that, The step of performing edge detection processing on the temperature grayscale image through the Canny algorithm to obtain an edge detection image includes: Performing Gaussian filtering processing on the temperature grayscale image to obtain a noise suppression image; Calculating the gradient values in the horizontal and vertical directions of the image according to the noise suppression image to obtain a gradient intensity matrix and a gradient direction matrix; Performing non-maximum suppression processing based on the gradient intensity matrix and the gradient direction matrix to obtain a preliminary edge contour; Performing threshold screening on the preliminary edge contour through a double-threshold method to obtain a strong edge point set and a weak edge point set; Performing hysteresis edge connection processing on the weak edge point set according to the strong edge point set to obtain a continuous edge contour; Performing morphological processing on the continuous edge contour to obtain the edge detection image.
4. The method for positioning and fault diagnosis of electric power equipment wires based on temperature vision according to claim 1, wherein The position coordinates of the power equipment obtained according to the target detection model are used to magnify the equipment frame to obtain an extended equipment area. The extended equipment area is extended by 0.8 times the original size of the equipment frame in both the length and width directions, including: Performing pixel point cumulative voting processing on the extended equipment area to obtain a Hough parameter space matrix; Performing threshold screening on the voting results according to the cumulative values in the Hough parameter space matrix to obtain a high cumulative value point set; Solving the straight line equation for the high cumulative value point set by the random sampling method to obtain a straight line parameter set; Performing line segment endpoint positioning on the original extended equipment area according to the straight line parameter set to obtain a line segment endpoint coordinate set; Calculating the length values of each line segment based on the line segment endpoint coordinate set, and removing line segments with lengths less than one-fourth of the smaller value of the width and height of the equipment frame to obtain an effective line segment set; Determining the intersection points of the line segments in the effective line segment set with the boundary of the power equipment frame, and retaining the line segments intersecting with the equipment frame to form the candidate line segment set.
5. The method for positioning and fault diagnosis of power equipment wires based on temperature vision according to claim 1, characterized in that, Performing line segment extraction processing on the extended equipment area in the edge detection image by probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the equipment frame, including: Calculating the line segment slope values based on the endpoint coordinates of each line segment in the candidate line segment set to form a slope data set; Performing outlier detection on the slope data set and removing the abnormal slope values to obtain an effective slope set; Determining the neighborhood radius parameter ε and the minimum sample number parameter MinPts of the DBSCAN algorithm according to the effective slope set; Performing density clustering calculation on the effective slope set by the neighborhood radius parameter ε and the minimum sample number parameter MinPts to obtain a slope clustering result; Performing direction marking on the slope clustering result according to the relative direction relationship with the insulator position to distinguish the slope group in the same direction as the insulator and the slope group in the different direction from the insulator; Assigning the line segments in the candidate line segment set to the corresponding slope groups according to their slope values to form the wire orientation grouping.
6. The method for positioning and fault diagnosis of electric power equipment wires based on temperature vision according to claim 1, wherein, Performing clustering grouping processing on the slopes of the line segments in the candidate line segment set by the DBSCAN clustering algorithm to obtain a wire orientation grouping, where the wire orientation grouping includes a line segment group in the same direction as the insulator and a line segment group in the different direction from the insulator, including: Extracting the line segment group in the same direction as the insulator from the wire orientation grouping to obtain the line segment endpoint coordinate set in the line segment group; Constructing a least squares linear fitting equation according to the line segment endpoint coordinate set and solving the straight line parameter coefficients; Determining the wire main body orientation straight line equation based on the straight line parameter coefficients; Intercepting on the wire main body orientation straight line equation according to the minimum and maximum x coordinates in the line segment endpoint coordinate set to obtain an effective wire segment; Translating the power equipment frame 1.5 times the frame width distance along the direction of the effective wire segment to obtain the wire position coordinates; Extract the wire temperature value from the temperature matrix according to the wire position coordinates, calculate the difference with the temperature value at the power equipment position coordinates, and determine that the power equipment has a fault when the temperature difference exceeds the preset threshold.
7. The method for positioning and fault diagnosis of power equipment wires based on temperature vision according to claim 1, characterized in that The method for fitting the line segments in the wire trend grouping based on the least squares method to obtain the wire position coordinates, and judging whether the power equipment has a fault by comparing the temperature values of the wire position coordinates and the power equipment position coordinates includes: Obtain the original temperature data collected by the infrared temperature sensor and construct a temperature distribution matrix; Calculate the maximum temperature value and the minimum temperature value in the temperature distribution matrix to determine the temperature range interval; Perform linear normalization conversion on the temperature distribution matrix according to the temperature range interval, map the temperature value to the interval [0, 1], and obtain a normalized temperature matrix; Amplify the normalized temperature matrix, map the numerical range to the integer interval [0, 255], and obtain a gray value mapping matrix; Perform smoothing processing on the gray value mapping matrix through a Gaussian function to suppress noise interference and obtain a smoothed gray matrix; Construct a pixel lattice based on the smoothed gray matrix in row and column order to form the temperature gray image.
8. A power equipment wire positioning and fault diagnosis system based on temperature vision, which is used to implement the power equipment wire positioning and fault diagnosis method based on temperature vision as described in any one of claims 1-7, and is characterized in that, The power equipment wire positioning and fault diagnosis system based on temperature vision includes: A mapping module for performing normalization mapping processing on the temperature matrix collected by the infrared temperature sensor to obtain a temperature gray image; A detection module for performing edge detection processing on the temperature gray image through the Canny algorithm to obtain an edge detection image; A processing module for magnifying the device frame according to the power equipment position coordinates obtained by the target detection model to obtain an extended device area, and the extended device area is extended by 0.8 times the original size of the device frame in both the length direction and the width direction; An extraction module for performing line segment extraction processing on the extended device area in the edge detection image through probabilistic Hough transform to obtain a candidate line segment set, where the length of the candidate line segment is greater than one-fourth of the smaller value of the width and height of the device frame; A clustering module for performing clustering grouping processing on the slopes of the line segments in the candidate line segment set according to the DBSCAN clustering algorithm to obtain a wire trend grouping, and the wire trend grouping includes a line segment group in the same direction as the insulator and a line segment group in a different direction from the insulator; A fitting module for performing fitting processing on the line segments in the wire trend grouping based on the least squares method to obtain wire position coordinates, and judging whether the power equipment has a fault by comparing the temperature values of the wire position coordinates and the power equipment position coordinates.
9. A computer device, characterized in that, It includes a memory and a processor, and the memory stores a computer program that can run on the processor. The characteristic is that when the processor executes the computer program, it implements the method for power equipment wire positioning and fault diagnosis based on temperature vision according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, and when the computer program is run by a processor, the processor is caused to execute the method for positioning and fault diagnosis of a power equipment wire based on temperature vision according to any one of claims 1 to 7.
Citation Information
Cited By
Intelligent detection method for power distribution line of power system
CN120747755A