Power equipment fault early warning method and device based on infrared image area expansion
By using infrared image area expansion technology, the Sobel operator and morphological methods are used to detect infrared thermal image sequences of power equipment and calculate the area change rate of closed curves. This solves the problem of identifying and warning of faults in obscured equipment in substations, and realizes timely and accurate early warning of power equipment faults.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN POWER EHV OVERHAUL
- Filing Date
- 2023-12-28
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies cannot effectively identify fault areas of blocked power equipment in substations, nor can they predict and warn of the gradual failure process of power equipment in a timely manner.
Infrared thermal image sequences of power equipment are acquired by infrared cameras, preprocessed using morphological methods, and edge detection is performed using the Sobel operator to extract the endpoints and vertices of closed curves. The area change rate of the closed curves is then calculated to achieve fault early warning.
It effectively, reliably, and promptly identifies power equipment faults, reduces the probability of obstructed equipment going undetected, advances fault detection time, and improves the accuracy of early warnings.
Smart Images

Figure CN117974561B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system operation and maintenance, and more specifically, to a method, device, terminal, and computer-readable storage medium for early warning of power equipment faults based on infrared image area expansion. Background Technology
[0002] Currently, with the adoption of remote viewing technology to achieve unmanned operation of substations, numerous cameras have been installed in substations, especially infrared temperature measurement cameras for critical power equipment. Although infrared temperature measurement cameras can determine whether to issue a fault warning based on the highest temperature they measure, the large number of devices within a substation means that some devices are obscured or partially obscured in the image of these cameras. These obscured parts obviously cannot be identified by the highest temperature measured by the infrared temperature measurement cameras during a fault occurrence, necessitating the use of other infrared image processing technologies.
[0003] Infrared images of power equipment faults typically exhibit the following basic characteristics: (1) the temperature of the fault area is higher than that of the normal area; (2) there is a certain transition area between the fault area and the non-fault area. In existing technologies, threshold segmentation mechanisms are often used when processing images based on these characteristics. However, threshold segmentation methods are easily affected by the environment and image content. Therefore, there are also methods that use the Otsu thresholding method to segment the fault area from the background; infrared image segmentation algorithms that combine cellular machines and improved Otsu thresholding; methods that use watershed segmentation algorithms and fuzzy clustering methods to segment infrared images; and segmentation methods that use Pulse Coupled Neural Network (PCNN) as the basis.
[0004] Furthermore, the image area of target devices in infrared images, as an important feature, can be calculated using image morphology. Several basic area operators in image morphology are area opening and closing, dilation, and erosion. By calculating the difference between adjacent sections, Pesaresi et al. (Pesaresi and Benediktsson, 2001) proposed the differential morphological profile (DMP), and then applied this method to high-resolution remote sensing image segmentation and classification. Tuia et al. (Tuia et al., 2009) also completed the classification of Quickbird panchromatic images by inputting the results of image standard opening and closing operations, black and white top-hat transformations, and opening and closing reconstructions into an SVM.
[0005] However, the aforementioned infrared image feature extraction techniques are largely limited to the pixel level of a single frame, neglecting the spatial information of the temperature field distribution in infrared thermal images and the temporal relationship between sequences of infrared thermal images. They also overlook the fact that power equipment failures are a gradual process. In particular, for power equipment within substations, existing technologies can only classify equipment into two categories: normal and faulty. When power equipment is partially obstructed, accurate alarms cannot be provided. Furthermore, as the gradual failure process of power equipment occurs, existing technologies cannot provide timely fault prediction and corresponding early warnings.
[0006] To address the aforementioned issues, there is an urgent need for a method, device, terminal, and computer-readable storage medium for early warning of power equipment faults based on infrared image area expansion. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a method, device, terminal, and computer-readable storage medium for power equipment fault early warning based on infrared image area expansion. The method involves acquiring infrared thermal image sequences of power equipment using an infrared camera, extracting feature points using the Sobel operator, target extraction method, and shortest distance method, and drawing closed curves. Finally, by calculating the area of the closed curves, the rate of change of the closed curves in space and time is studied to ultimately provide fault early warning.
[0008] The present invention adopts the following technical solution.
[0009] In a first aspect, this invention relates to a method for early warning of power equipment faults based on infrared image area expansion. The method includes the following steps: acquiring an infrared thermal image sequence of power equipment in a substation using an infrared camera; preprocessing the infrared thermal image sequence using morphological methods to solve for the difference image of the infrared thermal image sequence; performing edge detection on the two-dimensional matrix of the difference image using the Sobel operator to generate a new pixel two-dimensional matrix; scanning the new pixel two-dimensional matrix line by line to obtain a target region; extracting the endpoints and vertices of multiple contour curves from the target region; connecting the multiple contour curves based on the endpoint set and vertex set to obtain a closed curve; and solving for the area of the closed curve; and realizing early warning or alarm of power equipment faults based on the change in the area of the closed curve corresponding to the difference image.
[0010] Preferably, the method for solving the differential image of the infrared thermal image sequence further includes: mapping the maximum temperature measured by the infrared camera to the maximum gray value, normalizing the gray values of the infrared image sequence, and performing differential operations on the normalized infrared image sequence in adjacent order to obtain the differential image sequence.
[0011] Preferably, scanning the new pixel two-dimensional matrix line by line to obtain the target area further includes: finding the highest point, lowest point, leftmost point and rightmost point in the new pixel two-dimensional matrix to form a rectangle containing the target area; setting radial lines with the center point of the rectangle, obtaining the intersection of the radial lines with the target edge and using the intersection as the endpoint to cut radial line segments, wherein the midpoint of the longest radial line segment is the ideal center point of the target area.
[0012] Preferably, extracting the endpoints and vertices of multiple contour curves from the target region further includes: scanning the image line by line from the highest point down to the lowest point, judging any point on any contour curve, and obtaining the upper endpoint set, lower endpoint set, upper vertex set, and lower vertex set of the contour curve based on the judgment result; if the current point does not have a connecting point in the previous row in the target region, the current point is determined to be the upper endpoint of the current contour curve; if the current point does not have a connecting point in the next row in the target region, the current point is determined to be the lower endpoint of the current contour curve; if the current point has two connecting points in the previous row in the target region, the current point is determined to be the lower vertex of the current contour curve; if the current point has two connecting points in the next row in the target region, the current point is determined to be the upper vertex of the current contour curve.
[0013] Preferably, connecting the multiple contour curves based on the endpoint set and vertex set further includes: taking the union of the upper endpoint set and lower endpoint set of all contour curves, and sorting them based on the Y-axis coordinate values of all upper and lower endpoints to obtain the endpoint sequence List_Cy; and assigning any point L in the endpoint sequence List_Cy to... i Extracting adjacent points L of the sequence i+1 L i+2 and L i+3 If L i+2 and L i+3 If they belong to the same contour curve segment, then L i With L i+3 L i+1 With L i+2 Connect them and L i+3 Add as L i Find the lower vertex of the contour curve and update the lower vertex set; if L i+2 and L i+3 If they do not belong to the same contour curve, calculate L. i To L i+1 L i+2 and L i+3 Choose the distance with the smallest distance, L. x With L i Connect; repeatedly extract different L i This continues until all points in the endpoint sequence have been calculated.
[0014] Preferably, obtaining the closed curve further includes: connecting multiple contour curves based on the endpoint set and vertex set, performing an opening operation on the rectangle of the target region, setting the pixel value of the connected region with a pixel value of 1 whose area is less than a preset area threshold to 0; and then performing a closing operation on the rectangle of the target region, setting the pixel value of the connected region with a pixel value of 0 whose area is less than a preset area threshold to 1.
[0015] Preferably, the method for calculating the area of a closed curve further includes: arranging the vertices in the upper and lower vertex sets according to their Y-axis coordinate values from low to high, generating a vertex queue List_P; starting from the first node of queue List_P, searching downwards along the left and right sides of the closed curve, determining whether the pixels to the left and right of the first node exist in the vertex queue List_P; if not, calculating the difference in the X-axis coordinate values of the pixels to the left and right of the first node, adding it to the area of the closed curve, and moving to the next pixel on each side for re-evaluation; if yes, identifying whether the next pixel is adjacent to the previous pixel; if adjacent, the closed curve between the two pixels is monotonically decreasing; if not adjacent, the closed curve between the two pixels is non-monotonic, replacing the X-axis coordinate values of the non-monotonic pixels to calculate the area, and calculating the area of the non-monotonic region separately; until the calculation reaches the tail node of the vertex queue List_P, the area of the closed curve is completed.
[0016] Preferably, replacing the X-axis coordinate value of a non-monotonic pixel further includes: if the next pixel P j Compared to the previous pixel P i If they are not adjacent, then query P. i+1 To P j The X-axis coordinates of each pixel; if the next pixel P j If the pixel is located at the left boundary of the closed curve, then the next pixel P will be... j Replace the X-axis coordinate value with P i+1 To P j The maximum value among the X-axis coordinates of each pixel; if the next pixel P j If it is located on the right boundary of the closed curve, then the next pixel point P will be... j Replace the X-axis coordinate value with P i+1 To P j The minimum value among the X-axis coordinates of each pixel.
[0017] Preferably, calculating the area of the non-monotonic region separately further includes: when a non-monotonic region is detected, calculating the area of pixel P by scanning line by line upwards. i+1 With P j The area of the closed curve between them.
[0018] Preferably, the area of the closed curve in each differential image in the differential image sequence is calculated; if the area of the closed curve is greater than a preset area threshold, a power equipment fault warning signal is issued; or, if the rate of change of the area of the closed curve in the differential image sequence is greater than a preset area change rate threshold, a power equipment fault alarm signal is issued.
[0019] Preferably, the area of the closed curve in the future period is predicted based on the changing trend of the rate of change of the area of the closed curve in the differential image sequence; and a power equipment fault warning signal is issued based on the predicted area.
[0020] A second aspect of this invention relates to a power equipment fault early warning device based on infrared image area expansion. The device includes an acquisition module, an edge processing module, an extraction module, an area calculation module, and an early warning module. The acquisition module acquires infrared thermal image sequences of power equipment in a substation using an infrared camera, preprocesses the infrared thermal image sequences using morphological methods, and then solves for the difference image of the infrared thermal image sequences. The edge processing module performs edge detection on the two-dimensional matrix of the difference image using the Sobel operator to generate a new pixel two-dimensional matrix. The extraction module scans the new pixel two-dimensional matrix row by row to obtain a target region and extracts the endpoints and vertices of multiple contour curves from the target region. The area calculation module connects the multiple contour curves based on the endpoint set and vertex set to obtain a closed curve and calculates the area of the closed curve. The early warning module provides early warning of power equipment faults based on changes in the area of the closed curves corresponding to the difference image.
[0021] A third aspect of the present invention relates to a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of a power equipment fault early warning method based on infrared image area expansion according to a first aspect of the present invention.
[0022] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a power equipment fault early warning method based on infrared image area expansion according to the first aspect of the present invention.
[0023] The beneficial effects of this invention are that, compared with the prior art, the present invention provides a method and device for early warning of power equipment faults based on infrared image area expansion, a terminal, and a computer-readable storage medium. It acquires infrared thermal image sequences of power equipment through an infrared camera, extracts feature points using the Sobel operator, target extraction method, and shortest distance method, and realizes the drawing of closed curves. Finally, by calculating the area of the closed curves, it studies the rate of change of the area of the closed curves in space and time, and ultimately performs fault warning.
[0024] This invention is effective, reliable, timely and accurate. It repeatedly utilizes the thermodynamic area change characteristics of the fault location to achieve alarm and early warning of faults, greatly reducing the probability of faults being covered up and undetectable, and also significantly advancing the fault detection time. Attached Figure Description
[0025] Figure 1 This is a schematic diagram illustrating the steps of a power equipment fault early warning method based on infrared image area expansion according to the present invention.
[0026] Figure 2 Image 1 is an image from an infrared thermal image sequence in a power equipment fault early warning method based on infrared image area expansion according to the present invention.
[0027] Figure 3 Image 2 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention;
[0028] Figure 4 Image 3 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention;
[0029] Figure 5 Image 4 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention;
[0030] Figure 6 This is the edge detection result of the fault region on the infrared camera image in the power equipment fault early warning method based on infrared image area expansion of the present invention;
[0031] Figure 7 This is a schematic diagram of a fault contour region with notches and multiple vertices in a power equipment fault early warning method based on infrared image area expansion according to the present invention.
[0032] Figure 8 This is a schematic diagram of the gap closure and area calculation in a power equipment fault early warning method based on infrared image area expansion according to the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this invention are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments not described in this invention obtained by those skilled in the art based on the embodiments described in this invention without creative effort should fall within the protection scope of this invention.
[0034] Figure 1This is a schematic diagram illustrating the steps of a power equipment fault early warning method based on infrared image area expansion according to the present invention. Figure 1 As shown, the first aspect of the present invention relates to a method for early warning of power equipment faults based on infrared image area expansion. The method includes the following steps: acquiring an infrared thermal image sequence of power equipment in a substation using an infrared camera; preprocessing the infrared thermal image sequence using morphological methods to solve for the difference image of the infrared thermal image sequence; performing edge detection on the two-dimensional matrix of the difference image using the Sobel operator to generate a new pixel two-dimensional matrix; scanning the new pixel two-dimensional matrix line by line to obtain the target region; extracting the endpoints and vertices of multiple contour curves from the target region; connecting the multiple contour curves based on the endpoint set and vertex set to obtain a closed curve, and solving for the area of the closed curve; and realizing early warning or alarm of power equipment faults based on the change in the area of the closed curve corresponding to the difference image.
[0035] For a grayscale image from an infrared camera, there is a certain transition area between the faulty area and the non-faulty area, which reduces the sensitivity of edge detection for this image. However, after using differential images, because the fault is gradually expanding, the edge of the fault in the current image has extended into the non-faulty area of the previous image. The resulting differential effect is more obvious than the differential effect of the same image, which improves the edge detection sensitivity of the method used in this paper.
[0036] Furthermore, considering that the infrared thermal image sequence corresponds to different time periods, the sun will illuminate the substation from different angles during these periods, and the shading relationship and degree of shading of the equipment in the substation will change accordingly, resulting in variations in the surface temperature of the electrical equipment outside the substation. Analyzing the infrared thermal image sequence of a specific substation, it can be seen that two infrared thermal images with a 10-second interval are basically unchanged because the angle of sunlight illumination remains essentially constant during these 10 seconds. Figure 2 Image 1 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention. Figure 3 Image 2 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention. Figure 4 Image 3 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention. Figure 5 Image 4 is from the infrared thermal image sequence in the power equipment fault early warning method based on infrared image area expansion of the present invention. (See attached image.) Figure 2-5 As shown. Therefore, when the sampling period is 5 seconds, the difference between the two infrared images under normal conditions is relatively small.
[0037] Mathematical morphology is used to preprocess single infrared thermal images to enhance object structure (skeleton extraction, thinning, coarsening, convex hull, object labeling). Fault-causing electrical equipment is segmented from the infrared thermal images and quantitatively described (area, perimeter, projection, Euler-Poincaré features). Mathematical morphology is an image analysis discipline based on lattice theory and topology, and it forms the fundamental theory of mathematical morphological image processing. Its basic operations include: binary erosion and dilation (morphological), binary opening and closing operations, skeleton extraction, limit erosion, hit-and-miss transformation, morphological gradient, Top-hat transformation, particle analysis, watershed transformation, gray-value erosion and dilation, gray-value opening and closing operations, and gray-value morphological gradients. This invention allows for the selection of the above methods to perform morphological preprocessing on equipment images according to actual needs.
[0038] Preferably, the method for solving the differential image of the infrared thermal image sequence further includes: mapping the maximum temperature measured by the infrared camera to the maximum gray value, normalizing the gray values of the infrared image sequence, and performing differential operations on the normalized infrared image sequence in adjacent order to obtain the differential image sequence.
[0039] The infrared images captured by the infrared camera are grayscale images. That is, the maximum temperature (TMax) measured by the infrared camera corresponds to the maximum grayscale value (255), while other points (x... i ,y i Temperature value T (xi,yi) Then its corresponding gray value P (xi,yi) =T (xi,yi) *255 / TMax. If the time series from the beginning to the present is 0, 1, 2, ..., n, then the point (x... i ,y i The corresponding grayscale value is P. 0 (xi,yi) P 1 (xi,yi) ,
[0040] P 2 (xi,yi) , ..., P n (xi,yi) The difference value of the nth time is D. n (xi,yi) =P n (xi,yi) -P n-1 (xi,yi) Then point (x i ,y i The corresponding difference value is D. 1 (xi,yi) D2 (xi,yi) , ..., D n (xi,yi) .
[0041] Subsequently, this invention utilizes the Sobel operator to perform edge detection on the two-dimensional matrix of the difference image, generating a new two-dimensional pixel matrix B with the boundary of the target object. Technically, the Sobel operator is a discrete difference operator used to calculate the approximate gray value of the image brightness function. Applying this operator to any point in the image will produce the corresponding gray value vector or its normal vector. The operator contains two sets of 3x3 matrices, one horizontal and one vertical. Convolving these matrices with the image in a plane yields the approximate brightness difference values for the horizontal and vertical directions, respectively.
[0042] If A represents the original image, and Gx and Gy represent the grayscale values of the horizontal and vertical edge detection images, respectively, the formula is as follows:
[0043] Gx=(-1)*f(x-1,y-1)+0*f(x,y-1)+1*f(x+1,y-1)+(-2)*f(x-1,y)+0*f(x,y)+2*f(x+1,y)+(-1)*f(x-1,y+1)+0*f(x,y+1)+1*f(x+1,y+1)
[0044] =[f(x+1,y-1)+2*f(x+1,y)+f(x+1,y+1)]-[f(x-1,y-1)+2*f(x-1,y)+f(x-1,y+1)]
[0045] Gy=1*f(x-1,y-1)+2*f(x,y-1)+1*f(x+1,y-1)+0*f(x-1,y)0*f(x,y)+0*f(x+1,y)+(-1)*f(x-1,y+1)+(-2)*f(x,y+1)+(-1)*f(x+1,y+1)
[0046] =[f(x-1,y-1)+2f(x,y-1)+f(x+1,y-1)]-[f(x-1,y+1)+2*f(x,y+1)+f(x+1,y+1)]
[0047] Where f(x,y) represents the gray value of the point (x,y) in the image. Figure 6 The edge detection result of the fault region on the infrared camera image in the power equipment fault early warning method based on infrared image area expansion of the present invention is as follows: Figure 6As shown, it omits the other zero-value parts, leaving only the black bar next to the highest temperature. Although this black bar is a closed entity, considering the spatial layout of substation equipment and the location of faults in various devices, the boundary curve detected by edge detection may be discontinuous, such as... Figure 6 After edge detection, discontinuous boundaries appear.
[0048] The new pixel 2D matrix B is scanned line by line to find the continuous edge region of the fault contour. The contour edge is composed of curve segments. These curve segments are not connected and form multiple edge gaps. These edge gaps need to be closed by adding new curves to finally form a closed contour edge curve, so that the area within the contour can be calculated.
[0049] Preferably, the process of scanning the new pixel two-dimensional matrix line by line to obtain the target area further includes: finding the highest point, lowest point, leftmost point and rightmost point in the new pixel two-dimensional matrix to form a rectangle containing the target area; setting radial lines with the center point of the rectangle, obtaining the intersection of the radial lines with the target edge and using the intersection as the endpoint to cut radial line segments, wherein the midpoint of the longest radial line segment is the ideal center point of the target area.
[0050] The highest point in this area is P. t Lowest point P b Leftmost point P L And the rightmost point P r This forms a rectangle A containing the target area. The radial lines are rotated around the center point O of rectangle A, from 0 degrees to 180 degrees, with a rotation step of 1 degree. For each degree rotation, the set of intersection points between the radial lines and the target edge is recorded, and the longest distance between these intersection points is calculated, which is the longest distance of the radial line segment. The largest of these 180 longest distances is used as the diameter of the circle R enclosing the target edge area, and its center is the ideal center point R within the surface formed by the fault profile. c .
[0051] Preferably, extracting the endpoints and vertices of multiple contour curves from the target region further includes: scanning the image line by line from the highest point down to the lowest point, judging any point on any contour curve, and obtaining the upper endpoint set, lower endpoint set, upper vertex set, and lower vertex set of the contour curve based on the judgment result; if the current point does not have a connecting point in the previous row in the target region, the current point is determined to be the upper endpoint of the current contour curve; if the current point does not have a connecting point in the next row in the target region, the current point is determined to be the lower endpoint of the current contour curve; if the current point has two connecting points in the previous row in the target region, the current point is determined to be the lower vertex of the current contour curve; if the current point has two connecting points in the next row in the target region, the current point is determined to be the upper vertex of the current contour curve.
[0052] Perform a line-by-line scan again from rectangle A of the target region, starting from the highest point P. t Scan the image line by line downwards until the lowest point P. b For the contour curve segment C of the target rectangular region A i If a point on the image has no upper endpoint, then that point is the upper endpoint N of the contour curve segment. tci If it has no lower endpoint, then it is the lower endpoint N of the contour curve segment. bci If it has two lower endpoints, then that is the upper vertex P of the contour curve segment. tci If its two upper endpoints are the same as the lower vertex P of the contour curve segment. bci Therefore, the upper vertex P of the contour curve segment can be generated from this. tci The lower vertex P of the set and contour curve segment bci set.
[0053] Preferably, connecting multiple contour curves based on endpoint sets and vertex sets further includes: taking the union of the upper endpoint sets and lower endpoint sets of all contour curves, and sorting them based on the Y-axis coordinate values of all upper and lower endpoints to obtain the endpoint sequence List_Cy; and assigning any point L in the endpoint sequence List_Cy to... i Extracting adjacent points L of the sequence i+1 L i+2 and L i+3 If L i+2 and L i+3 If they belong to the same contour curve segment, then L i With L i+3 L i+1 With L i+2 Connect them and L i+3 Add as L i Find the lower vertex of the contour curve and update the lower vertex set; if L i+2 and L i+3 If they do not belong to the same contour curve, then calculate L.i To L i+1 L i+2 and L i+3 Choose the distance with the smallest distance, L. x With L i Connect; repeatedly extract different L i This continues until all points in the endpoint sequence have been calculated.
[0054] Figure 7 This is a schematic diagram of a fault contour region with notches and multiple vertices in a power equipment fault early warning method based on infrared image area expansion according to the present invention. Figure 7 As shown, the fault contour may have edge gaps during the aforementioned extraction process. The following preprocessing can be performed first for each contour curve segment C of the power equipment fault. i , and its upper endpoint N tci and lower endpoint N bci The y-coordinate values are queued to form List_Cy. Then, the connection method of the nodes is calculated using the method described above.
[0055] In another embodiment of the present invention, the distance L with the smallest value can also be selected. x At that time, i <x<i+4。
[0056] Since there is a certain difference between the partial connection method and the actual desired edge gap connection in the above process, the present invention also adjusts the process of obtaining the closed curve to overcome the deviation during connection.
[0057] Specifically, obtaining the closed curve also includes: connecting multiple contour curves based on the endpoint set and vertex set, performing an opening operation on the rectangle of the target region, and setting the pixel values of connected regions with a pixel value of 1 whose area is less than a preset area threshold to 0; then performing a closing operation on the rectangle of the target region, and setting the pixel values of connected regions with a pixel value of 0 whose area is less than a preset area threshold to 1.
[0058] This invention first performs an opening operation on rectangle A containing the fault target region to remove other parts outside the fault contour curve. Then, it performs a binary area closing operation to remove connected regions with pixel values of 0 whose area is less than a given area threshold a. Afterward, based on the image after the closing operation, the fault contour area is accumulated to solve for the area of the closed curve.
[0059] Preferably, the method for calculating the area of a closed curve further includes: arranging the vertices in the upper and lower vertex sets according to their Y-axis coordinates from low to high, generating a vertex queue List_P; starting from the first node of queue List_P, searching downwards along the left and right edges of the closed curve, determining whether the pixels to the left and right of the first node exist in the vertex queue List_P; if not, calculating the difference in the X-axis coordinates of the pixels to the left and right of the first node, adding it to the area of the closed curve, and moving to the next pixel on each side for re-evaluation; if yes, identifying whether the next pixel is adjacent to the previous pixel; if adjacent, the closed curve between the two pixels is monotonically decreasing; if not adjacent, the closed curve between the two pixels is non-monotonic, replacing the X-axis coordinates of the non-monotonic pixels to calculate the area, and calculating the area of the non-monotonic region separately; until the end of the vertex queue List_P is reached, the area of the closed curve is calculated.
[0060] Figure 8 This is a schematic diagram illustrating the gap closure and area calculation in a power equipment fault early warning method based on infrared image area expansion according to the present invention. It is understood that... Figure 8 As shown, starting from the first node of queue Li st_P (i.e., the highest point of the contour curve), the search proceeds downwards along the left and right edges, performing a loop. If the closed curve between two pixels is not monotonic, the area containing the bend can be identified, for example... Figure 8 The area inside the closed curve that is complementary to the shaded area.
[0061] Preferably, replacing the X-axis coordinate value of a non-monotonic pixel further includes: if the next pixel P j Compared to the previous pixel P i If they are not adjacent, then query P. i+1 To P j The X-axis coordinates of each pixel; if the next pixel P j If it is located on the left boundary of the closed curve, then the next pixel P will be... j Replace the X-axis coordinate value with P i+1 To P j The maximum value among the X-axis coordinates of each pixel; if the next pixel P j If it is located on the right boundary of the closed curve, then the next pixel point P will be... j Replace the X-axis coordinate value with P i+1 To P j The minimum value among the X-axis coordinates of each pixel.
[0062] Calculating the area of non-monotonic regions separately also includes: when non-monotonicity is detected, using an upward line-by-line scanning method to calculate pixel P. i+1 With Pj The area of the closed curve between them.
[0063] In another method of this invention, it is also supported to calculate the included angle characteristics of the left and right curved edges of each vertex in the queue List_P. If it is an interior angle, it means that the pixels to the right of the vertex rotated clockwise to the left are all within the contour; if it is an exterior angle, it means that the pixels to the right of the vertex rotated counterclockwise to the left are all within the contour. Therefore, the ideal center point R obtained through preprocessing is used... c Using this as a reference point, we can examine the characteristics of each of the other adjacent points on the closed curve to the left and right of this point. For example, if an adjacent point is to the right of the reference point, and we rotate clockwise to R... c During the process, if a vertex intersects with a pixel on its left, the angle characteristic of that vertex is an exterior angle; otherwise, if it does not intersect with a pixel on its left, the angle characteristic of that vertex is an interior angle.
[0064] Once the interior and exterior angles are determined, it can be confirmed whether the calculation of the shaded area is added to the area S of the contour curve or subtracted from the area S of the contour curve.
[0065] Preferably, the area of the closed curve in each differential image in the differential image sequence is calculated; if the area of the closed curve is greater than a preset area threshold, a power equipment fault warning signal is issued; or, if the rate of change of the area of the closed curve in the differential image sequence is greater than a preset area change rate threshold, a power equipment fault alarm signal is issued.
[0066] The above method, using area calculation, processes a series of periodically obtained infrared camera images to obtain the corresponding fault area S in each image. i (i = 0, 1, ..., n). Continue to calculate the area difference delt_S between the corresponding fault regions on the two images. k =S k+1 -S k (k = 0, 1, ..., n), when delt_S k An alarm signal will be issued when the area difference exceeds a given threshold, or when the ratio of the area difference to the total area exceeds a given threshold.
[0067] By using the rate of change of area, the problem of incomplete display of the fault area when power equipment is partially blocked can be overcome, ensuring the accuracy of alarms.
[0068] Preferably, the area of the closed curve in the future period is predicted based on the changing trend of the rate of change of the area of the closed curve in the differential image sequence; and a power equipment fault warning signal is issued based on the predicted area.
[0069] In this way, the present invention can predict the speed of fault occurrence and propagation before the alarm signal is actually issued, and predict the future development trend of the heating process and the area of the closed curve through a thermodynamic model, thereby providing an early warning before the actual alarm logic, ensuring that faults or potential faults can be identified at the first time.
[0070] A second aspect of this invention relates to a power equipment fault early warning device based on infrared image area expansion using the method of the first aspect of this invention. The device includes an acquisition module, an edge processing module, an extraction module, an area calculation module, and an early warning module. The acquisition module is used to acquire infrared thermal image sequences of power equipment in a substation using an infrared camera, preprocess the infrared thermal image sequences using morphological methods, and then solve for the difference image of the infrared thermal image sequences. The edge processing module is used to perform edge detection on the two-dimensional matrix of the difference image using the Sobel operator to generate a new pixel two-dimensional matrix. The extraction module is used to scan the new pixel two-dimensional matrix line by line to obtain a target region, and extract the endpoints and vertices of multiple contour curves from the target region. The area calculation module is used to connect multiple contour curves based on the endpoint set and vertex set to obtain a closed curve, and solve for the area of the closed curve. The early warning module is used to realize power equipment fault early warning based on the change in the area of the closed curve corresponding to the difference image.
[0071] It is understood that, in order to implement the various functions in the methods provided in the embodiments of this application, the apparatus includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0072] This application embodiment can divide the device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0073] The device includes at least one processor, a bus system, and at least one communication interface. The processor may consist of a central processing unit, a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or other hardware. The memory may consist of read-only memory (ROM), random access memory (RAM), etc. The memory may be independent and connected to the processor via a bus. Alternatively, the memory may be integrated with the processor. The hard disk may be a mechanical hard disk (HDD) or a solid-state drive (SSD), etc. This embodiment of the invention does not limit the specific implementation. The above embodiments are typically implemented using software and hardware. When implemented using software programs, they can be implemented in the form of a computer program product. This computer program product includes one or more computer instructions.
[0074] A third aspect of the present invention relates to a terminal, comprising a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the power equipment fault early warning method based on infrared image area expansion according to the first aspect of the present invention.
[0075] A fourth aspect of the present invention relates to a computer-readable storage medium having a computer program stored thereon, characterized in that, when executed by a processor, the program implements the steps of the power equipment fault early warning method based on infrared image area expansion according to the first aspect of the present invention.
[0076] When computer program instructions are loaded and executed on a computer, the corresponding functions are implemented according to the process provided in the embodiments of this invention. The computer program instructions involved may be assembly instructions, machine instructions, or code written in a programming language, etc.
[0077] The beneficial effects of this invention are that, compared with the prior art, the present invention provides a method and device for early warning of power equipment faults based on infrared image area expansion, a terminal, and a computer-readable storage medium. It acquires infrared thermal image sequences of power equipment through an infrared camera, extracts feature points using the Sobel operator, target extraction method, and shortest distance method, and realizes the drawing of closed curves. Finally, by calculating the area of the closed curves, it studies the rate of change of the area of the closed curves in space and time, and ultimately performs fault warning.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for early warning of power equipment faults based on infrared image area expansion, characterized in that, The method includes the following steps: Infrared thermal image sequences of power equipment in a substation are acquired using an infrared camera. After preprocessing the infrared thermal image sequences using morphological methods, the difference image of the infrared thermal image sequences is solved. The Sobel operator is used to perform edge detection on the two-dimensional matrix of the difference image to generate a new two-dimensional matrix of pixels; The target region is obtained by scanning the new pixel two-dimensional matrix line by line, and the endpoints and vertices of multiple contour curves are extracted from the target region. The endpoints and vertices of the multiple contour curves extracted from the target region also include: Scan the image line by line from the highest point down to the lowest point, judge any point on any contour curve, and obtain the upper endpoint set, lower endpoint set, upper vertex set, and lower vertex set of the contour curve based on the judgment result; If the current point has no connecting points in the previous row within the target area, then the current point is determined to be the upper endpoint of the current contour curve; if the current point has no connecting points in the next row within the target area, then the current point is determined to be the lower endpoint of the current contour curve; if the current point has two connecting points in the previous row within the target area, then the current point is determined to be the lower vertex of the current contour curve; if the current point has two connecting points in the next row within the target area, then the current point is determined to be the upper vertex of the current contour curve. Connect the multiple contour curves based on the endpoint set and vertex set to obtain the closed curve, and solve for the area of the closed curve; Based on the change in the area of the closed curve corresponding to the differential image, a fault early warning or alarm for power equipment can be achieved.
2. The method for early warning of power equipment faults based on infrared image area expansion according to claim 1, characterized in that: The process of solving the difference image of the infrared thermal image sequence further includes: The maximum temperature measured by the infrared camera is mapped to the maximum grayscale value, and the grayscale values of the infrared image sequence are normalized. The normalized infrared image sequence is subjected to differential operation according to the adjacent order to obtain a differential image sequence.
3. The method for early warning of power equipment faults based on infrared image area expansion according to claim 1, characterized in that: The step of scanning the new pixel two-dimensional matrix line by line to obtain the target region also includes: Find the highest, lowest, leftmost, and rightmost points in the new pixel 2D matrix to form a rectangle that includes the target region; Radial straight lines are set with the center point of the rectangle, and the intersection of the radial straight lines with the edge of the target is obtained. Radial line segments are then cut off with the intersection of the radial straight lines and the edge of the target as the endpoints. The midpoint of the longest radial line segment is the ideal center point of the target area.
4. The method for early warning of power equipment faults based on infrared image area expansion according to claim 1, characterized in that: The method of connecting the multiple contour curves based on the endpoint set and vertex set also includes: Find the union of the upper and lower endpoint sets of all contour curves, and sort them based on the Y-axis coordinates of all upper and lower endpoints to obtain the endpoint sequence List_Cy; Any point L in the endpoint sequence List_Cy i Extracting sequence adjacent points L i+1 , L i+2 and L i+3 ; If L i+2 and L i+3 If they belong to the same contour curve segment, then L i With L i+3 L i+1 With L i+2 Connect them and L i+3 Add as L i Find the lower vertex of the contour curve and update the lower vertex set; If L i+2 and L i+3 If they do not belong to the same contour curve, calculate L. i To L i+1 L i+2 and L i+3 Choose the distance with the smallest distance, L. x With L i Connected; Repeatedly extract different L i This continues until all points in the endpoint sequence have been calculated.
5. The method for early warning of power equipment faults based on infrared image area expansion according to claim 4, characterized in that: The method of obtaining the closed curve also includes: After connecting the multiple contour curves based on the endpoint set and vertex set, an opening operation is performed on the rectangle of the target area, and the pixel values of connected regions with a pixel value of 1 whose area is less than a preset area threshold are set to 0. Then, a closing operation is performed on the rectangle of the target area, and the pixel values of connected regions with an area less than the preset area threshold and a pixel value of 0 are set to 1.
6. The method for early warning of power equipment faults based on infrared image area expansion according to claim 5, characterized in that: The process of calculating the area of the closed curve also includes: The vertices in the upper and lower vertex sets are arranged in ascending order of their Y-axis coordinates to generate a vertex queue List_P. Starting from the first node of the queue List_P, search downwards for the left and right sides of the closed curve, and determine whether the left and right pixels of the first node, which are adjacent to the first node, exist in the vertex queue List_P. If not, calculate the difference between the X-axis coordinates of the pixels to the left and right of the first node, add it to the area of the closed curve, and move to the next pixel on both sides to re-evaluate. If so, then identify whether the next pixel is adjacent to the previous pixel. If they are adjacent, the closed curve between the two pixels decreases monotonically. If they are not adjacent, the closed curve between the two pixels is not monotonically monotonically monotonically monotonically. Then replace the X-axis coordinate value of the non-monotonic pixel to calculate the area, and calculate the area of the non-monotonic region separately. The area of the closed curve is calculated until the tail node of the vertex queue List_P is reached.
7. A method for early warning of power equipment faults based on infrared image area expansion according to claim 6, characterized in that: The replacement of the X-axis coordinate value of the non-monotonic pixel also includes: If the next pixel P j Compared to the previous pixel P i If they are not adjacent, then query P. i+1 To P j The X-axis coordinates of each pixel; If the next pixel P j If the pixel is located at the left boundary of the closed curve, then the next pixel P will be... j Replace the X-axis coordinate value with P i+1 To P j The maximum value among the X-axis coordinates of each pixel; If the next pixel P j If the pixel is located at the right boundary of the closed curve, then the next pixel P will be... j Replace the X-axis coordinate value with P i+1 To P j The minimum value among the X-axis coordinates of each pixel.
8. A method for early warning of power equipment faults based on infrared image area expansion according to claim 6, characterized in that: The separate calculation of the area of the non-monotonic region also includes: When a non-monotonic signal is detected, an upward line-by-line scanning method is used to calculate pixel P. i+1 With P j The area of the closed curve between them.
9. A method for early warning of power equipment faults based on infrared image area expansion according to claim 1, characterized in that: The area of the closed curve in each difference image in the difference image sequence is calculated. If the area of the closed curve is greater than a preset area threshold, a power equipment fault warning signal is issued. or, If the rate of change of the area of the closed curve in the differential image sequence is greater than a preset area change rate threshold, a power equipment fault alarm signal will be issued.
10. A method for early warning of power equipment faults based on infrared image area expansion according to claim 9, characterized in that: Based on the changing trend of the rate of change of the area of the closed curve in the differential image sequence, the area of the closed curve in the future time period is predicted. And issue early warning signals for power equipment failures based on predicted area.
11. A power equipment fault early warning device based on infrared image area expansion using the method of any one of claims 1-10, characterized in that: The device includes a data acquisition module, an edge processing module, an extraction module, an area calculation module, and an early warning module; wherein, The acquisition module is used to acquire infrared thermal image sequences of power equipment in the substation using an infrared camera, and then preprocess the infrared thermal image sequences using morphological methods to solve for the differential image of the infrared thermal image sequences. The edge processing module is used to perform edge detection on the two-dimensional matrix of the difference image using the Sobel operator to generate a new two-dimensional matrix of pixels; The extraction module is used to scan the new pixel two-dimensional matrix line by line to obtain the target region, and extract the endpoints and vertices of multiple contour curves from the target region; The endpoints and vertices of the multiple contour curves extracted from the target region also include: Scan the image line by line from the highest point down to the lowest point, judge any point on any contour curve, and obtain the upper endpoint set, lower endpoint set, upper vertex set, and lower vertex set of the contour curve based on the judgment result; If the current point has no connecting points in the previous row within the target area, then the current point is determined to be the upper endpoint of the current contour curve; if the current point has no connecting points in the next row within the target area, then the current point is determined to be the lower endpoint of the current contour curve; if the current point has two connecting points in the previous row within the target area, then the current point is determined to be the lower vertex of the current contour curve; if the current point has two connecting points in the next row within the target area, then the current point is determined to be the upper vertex of the current contour curve. The area calculation module is used to connect the multiple contour curves based on the endpoint set and vertex set to obtain a closed curve, and to solve for the area of the closed curve. The early warning module is used to realize early warning of power equipment faults based on the change in the area of the closed curve corresponding to the differential image.
12. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the power equipment fault early warning method based on infrared image area expansion according to any one of claims 1-10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the power equipment fault early warning method based on infrared image area expansion as described in any one of claims 1-10.