A method and device for detecting defects in power equipment based on image processing
By acquiring time-series images of power equipment, filtering and segmenting them, identifying the target edge contours of disconnecting switches, and extracting image features, the problem of low detection efficiency of disconnecting switches and insulators in existing technologies is solved, achieving efficient and accurate defect detection and improving the safety of power equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
- Filing Date
- 2025-05-13
- Publication Date
- 2026-07-17
AI Technical Summary
In existing technologies, the detection of disconnecting switches being closed and insulator damage relies on manual labor, which is inefficient and inaccurate. In particular, the accuracy of automatic detection is low in complex environments, making it difficult to efficiently and accurately identify defects in power equipment.
By acquiring time-series images of power equipment, filtering and segmenting the images, identifying the target edge contours of disconnect switches, extracting image features, and using image processing technology to determine the status of disconnect switches and insulators, anomaly alerts are output.
It improves the efficiency and accuracy of power equipment defect detection, ensures timely identification of the closed status of disconnecting switches and the appearance of insulators, and enhances the safety of power equipment.
Smart Images

Figure CN120598859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and in particular to a method and device for detecting defects in power equipment based on image processing. Background Technology
[0002] An isolating switch is a switching device used in power systems to isolate power sources or loads, playing a crucial role in the system. Because isolating switches lack arc-extinguishing devices, they cannot interrupt load current or short-circuit current. If the isolating switch is not fully closed, a strong electric arc will be generated at the disconnection point under high voltage, which is difficult to extinguish on its own and may even cause flashover, damaging equipment and endangering personal safety. Therefore, determining whether the isolating switch is fully closed is critical to the safety of power equipment. Furthermore, isolating switches are equipped with insulators for electrical insulation and mechanical support; timely detection of insulator damage is also essential. Currently, the detection of whether the isolating switch is fully closed and whether the insulators are damaged usually relies on manual methods, which are inefficient and costly. Although intelligent methods for detecting the status of isolating switches or insulators exist, the accuracy of automatic detection is low due to the complex environment in which power equipment operates. Therefore, there is an urgent need for a method that can efficiently and accurately detect isolating switches and insulators in power equipment. Summary of the Invention
[0003] The main purpose of this application is to provide a method and device for detecting defects in power equipment based on image processing, which aims to improve the efficiency of safety detection of power equipment.
[0004] In a first aspect, this application provides a method for detecting defects in power equipment based on image processing, the method comprising the following steps:
[0005] Acquire a time-series image of the power equipment, the time-series image including the disconnecting switch on the power equipment;
[0006] The time series images are filtered to obtain the target images in the time series images;
[0007] The target image is segmented to obtain at least one target sub-image corresponding to the disconnect switch;
[0008] Identify the target edge contour sub-image of the disconnector from the target sub-image;
[0009] The foreground image of the disconnector is determined based on the target edge contour sub-image, and features are extracted from the foreground image to obtain image features;
[0010] The first state of the disconnecting switch and the second state of the insulator on the disconnecting switch are identified based on the image features.
[0011] If at least one of the first state and the second state is abnormal, an error message will be output.
[0012] In some implementations, determining the foreground image of the disconnector based on the target edge contour sub-image includes:
[0013] The target edge contour sub-images are stitched together to obtain the target edge contour image;
[0014] The edge contour pixels corresponding to the target edge contour image are determined based on the pixel grayscale values in each target edge contour sub-image and a preset grayscale threshold.
[0015] The foreground image is obtained by filling the region based on the edge contour pixels.
[0016] In some implementations, determining the edge contour pixels corresponding to the target edge contour image based on the pixel grayscale values in each of the target edge contour sub-images and a preset grayscale threshold includes:
[0017] The preset threshold of the target edge contour sub-image is determined according to the following formula:
[0018]
[0019] Where T is the optimal value of the preset threshold, t is a candidate value of the preset threshold, Ω represents the target edge contour sub-image corresponding to the preset threshold, w(x) represents the preset weight function, and p i (x) represents the probability of gray value i in the target edge contour sub-image Ω, μ0(x) represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are less than or equal to the threshold t, μ1(x) represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are greater than the threshold t, μ(x) represents the average gray value of all pixels in the target edge contour sub-image Ω, and L represents the total number of gray value sizes;
[0020] Pixels with grayscale values greater than the preset threshold are identified as edge contour pixels.
[0021] In some implementations, determining pixels with grayscale values greater than the preset threshold as edge contour pixels includes:
[0022] The enhancement threshold is determined by multiplying the preset threshold by the preset coefficient;
[0023] Pixels with gray values greater than the preset threshold and less than the enhancement threshold are defined as weak edge contour pixels, and pixels with gray values greater than the enhancement threshold are defined as strong edge contour pixels.
[0024] The strong edge contour pixels and the weak edge pixels that are connected to the strong edge contour pixels are defined as the edge contour pixels.
[0025] In some implementations, the step of extracting features from the foreground image to obtain image features includes:
[0026] The foreground image is scaled a preset number of times to obtain a preset number of scaled images. Where scalefactor represents the scaling ratio, and nlevels represents the preset number of scaling operations;
[0027] Each of the scaled images is subjected to feature point identification to obtain candidate feature points on each of the scaled images;
[0028] Non-maximum suppression is performed on the candidate feature points in each of the scaled images to obtain the scaled feature points corresponding to each of the scaled images;
[0029] If the number of times a feature point of the same scale appears in each of the scaled images is greater than a preset number, the feature point of the scale is determined as a target feature point.
[0030] For each target feature point, the principal direction of the target feature point is determined based on the following formula. The target feature points are then normalized based on the main direction, where m 10 =∑ x,y∈A xI′(x,y), m 10 =∑ x,y∈A yI′(x,y), where A represents the pixel block corresponding to the target feature point, and x,y represent the pixels in pixel block A;
[0031] The target descriptor for each target feature point after normalization is determined based on the following formula:
[0032] Among them, WTA K This indicates the number of sample point pairs used to calculate the descriptor, pattern[j] = (p x [j],p y [j]) is used to specify the pixels around the target feature point that are used for descriptor calculation, (X,Y) represents the coordinates of the target feature point, and i represents the i-th target feature point in the scaled image I′.
[0033] In some embodiments, identifying the first state of the disconnecting switch and the second state of the insulators on the disconnecting switch based on the image features includes:
[0034] Calculate the Hamming distance between the target descriptor and the preset descriptor. If the Hamming distance is greater than a preset threshold, determine that at least one of the first state and the second state is abnormal.
[0035] In some implementations, identifying the target edge contour sub-image of the disconnector from the target sub-image includes:
[0036] Perform contour recognition on the target sub-image to obtain a first edge contour image in the target sub-image;
[0037] Perform contour recognition on the first edge contour image to obtain a second edge contour image of the first edge contour image;
[0038] The second edge contour image is used as a mask image to overlay the first edge contour image to obtain the target edge contour sub-image.
[0039] In some implementations, the step of filtering the time-series images to obtain target images from the time-series images includes:
[0040] Acquire time-series images within a preset time period, and classify the time-series images according to the shooting angle of the time-series images;
[0041] The target image is obtained by filtering the time-series images from each shooting angle.
[0042] In some implementations, the step of filtering the time-series images for each shooting angle to obtain the target image in the time-series images includes:
[0043] Calculate the peak signal-to-noise ratio and mean square error for each of the time series images;
[0044] The target image is determined from the time series image based on the peak signal-to-noise ratio and the mean square error.
[0045] Secondly, this application also provides an image processing-based power equipment defect detection device, which includes an imaging device for acquiring time-series images of power equipment, and a processor for executing the image processing-based power equipment defect detection method according to any one of the embodiments of this application.
[0046] This application provides a method and apparatus for defect detection in power equipment based on image processing. The method involves acquiring time-series images of the power equipment, including disconnecting switches on the equipment; filtering the time-series images to obtain target images; performing image segmentation on the target images to obtain at least one target sub-image corresponding to the disconnecting switch; identifying the target edge contour sub-image of the disconnecting switch from the target sub-image; determining the foreground image of the disconnecting switch based on the target edge contour sub-image, and extracting features from the foreground image to obtain image features; identifying a first state of the disconnecting switch and a second state of the insulators on the disconnecting switch based on the image features; and outputting an abnormality alert if at least one of the first and second states is abnormal. By identifying the disconnecting switch and insulators from multiple angles using target images, the method determines whether the disconnecting switch is in operation and whether the insulators have any abnormalities in appearance, thereby improving the efficiency and accuracy of defect inspection of power equipment and ultimately enhancing the safety of the power equipment. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 A flowchart illustrating an image processing-based defect detection method for power equipment, provided as an embodiment of this application;
[0049] Figure 2 This is a schematic block diagram of an image processing-based power equipment defect detection device provided by an embodiment of this application. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0052] This application provides a method and device for detecting defects in power equipment based on image processing.
[0053] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0054] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an image processing-based method for detecting defects in power equipment, provided as an embodiment of this application. This image processing-based method can be used in a terminal or server to identify the status of disconnecting switches and insulators in a target image of power equipment, promptly detecting abnormalities in these switches and insulators, thereby improving the safety of the power equipment. The terminal can be an electronic device such as a mobile phone, tablet, laptop, desktop computer, personal digital assistant, or wearable device; the server can be a standalone server, a server cluster, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0055] like Figure 1 As shown, the image processing-based power equipment defect detection method includes steps S101 to S107.
[0056] Step S101: Obtain a time-series image of the power equipment, the time-series image including the disconnecting switch on the power equipment.
[0057] For example, images are taken of disconnecting switches on power equipment to obtain time-series images. These time-series images represent image information acquired over time; for instance, a time-series image could be a series of video frames. This captures the dynamic changes of the disconnecting switch over a certain period, improving the comprehensiveness and accuracy of image processing-based power equipment defect detection methods.
[0058] Step S102: Filter the time series images to obtain the target images in the time series images.
[0059] For example, a large number of time-series images are filtered to obtain target images, which improves the accuracy of subsequent image processing-based defect detection of power equipment while reducing the computational load of defect detection. The process of obtaining the target image from the time-series images may also include grayscale processing.
[0060] In some implementations, the step of filtering the time-series images to obtain target images from the time-series images includes:
[0061] Acquire time-series images within a preset time period, and classify the time-series images according to the shooting angle of the time-series images;
[0062] The target image is obtained by filtering the time-series images from each shooting angle.
[0063] For example, the camera device for acquiring time-series images can be movable, specifically, it can reciprocate within a certain range to capture images of the disconnect switch from different angles, thereby improving the comprehensiveness of defect detection.
[0064] For example, a time-series image can be image information captured by a camera device as it changes angle. For instance, the camera device has a shooting angle range of 180°, and a time-series image is acquired every 15° within this angle range. The time-series images of the same shooting angle are grouped into one category, and the target image is obtained by filtering the time-series images of each shooting angle, ensuring that the target image can be obtained for each shooting angle.
[0065] In some implementations, the step of filtering the time-series images for each shooting angle to obtain the target image in the time-series images includes:
[0066] Calculate the peak signal-to-noise ratio and mean square error for each of the time series images;
[0067] The target image is determined from the time series image based on the peak signal-to-noise ratio and the mean square error.
[0068] For example, due to the complex environment in which power equipment is located, there may be factors in time series images that affect image quality, such as sand, rain, snow, animals, and other uncertain factors. In the power equipment defect detection method based on image processing provided in this application embodiment, time series images are filtered according to image quality.
[0069] Specifically, image quality is quantified using the Peak Signal-to-Noise Ratio (PSNR) and Mean Squared Error (MSE) of time-series images. A higher PSNR value indicates higher image quality, while a lower MSE value also indicates higher image quality. Image quality can be measured by weighting the PSNR and MSE values, assigning weights greater than 0 to PSNR and less than 0 to MSE. However, this approach is not limited to these methods and is not specified here.
[0070] Step S103: Perform image segmentation processing on the target image to obtain at least one target sub-image corresponding to the disconnecting switch.
[0071] For example, disconnect switches are usually densely distributed in power equipment. In order to ensure that no disconnect switches in the target image are missed, the target image is segmented before the disconnect switches are identified to obtain local target sub-images, so that the target sub-images can be identified separately, thereby improving the accuracy of defect detection.
[0072] For example, the target image is segmented based on a preset segmentation size. Of course, it is not limited to this. The segmentation size can also be determined based on the preliminary identification of the target image, which will not be elaborated here.
[0073] Step S104: Identify the target edge contour sub-image of the disconnector from the target sub-image.
[0074] For example, in order to separate the disconnector from the target sub-image in order to better determine whether the disconnector is closed, it is necessary to identify the edge contour of the object in the target sub-image to obtain a binary image representing the edge contour of the object, namely the target edge contour sub-image.
[0075] In some implementations, identifying the target edge contour sub-image of the disconnector from the target sub-image includes:
[0076] Perform contour recognition on the target sub-image to obtain a first edge contour image in the target sub-image;
[0077] Perform contour recognition on the first edge contour image to obtain a second edge contour image of the first edge contour image;
[0078] The second edge contour image is used as a mask image to overlay the first edge contour image to obtain the target edge contour sub-image.
[0079] For example, contour recognition of a target sub-image can be implemented based on the Sobel algorithm. By performing a convolution operation on each pixel with a preset convolution kernel, the gradient of each pixel is determined, and the pixels with larger gradients are identified as edge contours in the first edge contour image.
[0080] For example, the convolution kernel of the Sobel algorithm used in the embodiments of this application includes:
[0081]
[0082] By using convolution kernels in different directions, edge contours with different trends in the target sub-image are identified, improving the accuracy of the first edge contour. The gaze process of the Sobel algorithm will not be elaborated again.
[0083] For example, the edge contours in the first edge contour image identified by multiple convolution kernels can avoid omissions, but may also include some pixels that do not belong to the edge contours, resulting in the edge contour lines in the first edge contour image being too thick. A second edge contour image can be obtained by performing contour recognition on the first edge contour image, and the first edge contour image can be thinned based on the second edge contour image. The part that belongs to the edge contour in the second edge contour image is removed from the first edge contour image to obtain the target edge contour sub-image.
[0084] For example, the second edge contour image is used as a mask image overlaid on the first edge contour image, thereby eliminating the portion of the second edge contour image that belongs to the edge contour in the first edge contour image to obtain the target image. Specifically, the first edge contour image displays the first edge contour, and the second edge contour image displays the edge contour of the first edge contour. Eliminating the second edge contour from the first edge contour, that is, eliminating the edge contour of the first edge contour, makes the lines thinner and obtains a target edge contour sub-image that more accurately reflects the edge of the disconnector switch.
[0085] Step S105: Determine the foreground image of the disconnector based on the target edge contour sub-image, and extract features from the foreground image to obtain image features.
[0086] In some implementations, determining the foreground image of the disconnector based on the target edge contour sub-image includes:
[0087] The target edge contour sub-images are stitched together to obtain the target edge contour image;
[0088] The edge contour pixels corresponding to the target edge contour image are determined based on the pixel grayscale values in each target edge contour sub-image and a preset grayscale threshold.
[0089] The foreground image is obtained by filling the region based on the edge contour pixels.
[0090] For example, the foreground sub-images in the target sub-images can be extracted separately, and then the foreground sub-images can be stitched together to obtain the foreground image corresponding to the isolation switch; alternatively, the target edge contour images corresponding to the target sub-images can be stitched together to obtain the foreground image, and then the foreground image can be determined. No limitation is made here.
[0091] For example, the target edge contour image is a grayscale image that reflects the edge contour. The edge contour pixels are determined based on the grayscale of the pixels and a preset grayscale threshold. The foreground image is obtained by filling the edge contour pixels with a foreground extraction algorithm. The foreground extraction algorithm can be, for example, the floodFill function, etc., which will not be elaborated here.
[0092] In some implementations, determining the edge contour pixels corresponding to the target edge contour image based on the pixel grayscale values in each of the target edge contour sub-images and a preset grayscale threshold includes:
[0093] The preset threshold of the target edge contour sub-image is determined according to the following formula:
[0094]
[0095] Where T is the optimal value of the preset threshold, t is a candidate value of the preset threshold, Ω represents the target edge contour sub-image corresponding to the preset threshold, w(x) represents the preset weight function, and p i (x) represents the probability of gray value i in the target edge contour sub-image Ω, μ0(x) represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are less than or equal to the threshold t, μ1(x) represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are greater than the threshold t, μ(x) represents the average gray value of all pixels in the target edge contour sub-image Ω, and L represents the total number of gray value sizes;
[0096] Pixels with grayscale values greater than the preset threshold are identified as edge contour pixels.
[0097] For example, the preset threshold is determined separately for each target contour sub-image. Each target contour sub-image in the target contour image will have a preset threshold determined, thereby improving the accuracy of the preset threshold.
[0098] For example, a corresponding preset threshold is determined for each target edge contour sub-image. Specifically, the T value of each target edge contour sub-image is optimized using the above formula, where L represents the total number of grayscale values, which can be 255 in this scheme, representing 255 grayscale levels, and p iw(x) represents the probability of a pixel with gray value i (0 ≤ i ≤ 255) appearing in the target edge contour sub-image Ω, i.e., the proportion of the total number of pixels in that region. w(x) represents the weight of each pixel x in the target edge contour sub-image Ω. If all pixels are equally important, w(x) can be a constant, such as 1, indicating that each pixel has the same influence on the threshold determination. Alternatively, weights can be assigned based on texture features that contain specific texture information in local regions of the target edge contour sub-image. For example, regions with coarser textures may require higher weights to reflect their importance in image segmentation.
[0099] In some implementations, determining pixels with grayscale values greater than the preset threshold as edge contour pixels includes:
[0100] The enhancement threshold is determined by multiplying the preset threshold by the preset coefficient;
[0101] Pixels with gray values greater than the preset threshold and less than the enhancement threshold are defined as weak edge contour pixels, and pixels with gray values greater than the enhancement threshold are defined as strong edge contour pixels.
[0102] The strong edge contour pixels and the weak edge pixels that are connected to the strong edge contour pixels are defined as the edge contour pixels.
[0103] For example, to improve the accuracy of edge contour pixels, after calculating a preset threshold T, the preset threshold T is multiplied by a preset coefficient greater than 1 (e.g., 1.5) to obtain an enhancement threshold. Pixels with grayscale values greater than the preset threshold but less than the enhancement threshold are identified as weak edge contour pixels, and pixels with grayscale values greater than the enhancement threshold are identified as strong edge contour pixels. Strong edge contour pixels are edge contour pixels with higher accuracy and can be directly identified as edge contour pixels; while weak edge contour pixels need to be filtered based on their connection relationships with strong edge contour pixels. For example, if the number of strong edge contour pixels among the eight adjacent pixels of a weak edge contour pixel is greater than a preset number threshold (e.g., set to 4), then the weak edge contour pixel is identified as an edge contour pixel.
[0104] In some implementations, the step of extracting features from the foreground image to obtain image features includes:
[0105] The foreground image is scaled a preset number of times to obtain a preset number of scaled images. Where scalefactor represents the scaling ratio, and nlevels represents the preset number of scaling operations;
[0106] Each of the scaled images is subjected to feature point identification to obtain candidate feature points on each of the scaled images;
[0107] Non-maximum suppression is performed on the candidate feature points in each of the scaled images to obtain the scaled feature points corresponding to each of the scaled images;
[0108] If the number of times a feature point of the same scale appears in each of the scaled images is greater than a preset number, the feature point of the scale is determined as a target feature point.
[0109] For each target feature point, the principal direction of the target feature point is determined based on the following formula. The target feature points are then normalized based on the main direction, where m 10 =∑ x,y∈A xI′(x,y), m 10 =∑ x,y∈A yI′(x,y), where A represents the pixel block corresponding to the target feature point, and x,y represent the pixels in pixel block A;
[0110] The target descriptor for each target feature point after normalization is determined based on the following formula:
[0111] Among them, WTA J This indicates the number of sample point pairs used to calculate the descriptor, pattern[j] = (p x [j],p y [j]) is used to specify the pixels around the target feature point that are used for descriptor calculation, (X,Y) represents the coordinates of the target feature point, and i represents the i-th target feature point in the scaled image I′.
[0112] For example, multiple scaled images I' are obtained by scaling the foreground image multiple times to ensure that feature points of the foreground image at different scales are extracted. Feature point recognition can be based on algorithms such as FAST (Features from Accelerated Segment Test), which will not be elaborated here. Feature points with a confidence level greater than 80% in the scaled images are selected by non-maximum suppression. If the same feature point appears in scaled images at different scales, then the feature point is considered to be the target feature point.
[0113] Among them, WTA K This indicates the number of sample point pairs used to calculate the descriptor, pattern[j] = (p x [j],p x [j]) is used to specify the pixels around the target feature point that are used for descriptor calculation, and (x,y) represents the coordinates of the target feature point.
[0114] For example, WTA JThis is a parameter representing the number of sample point pairs used to compute the descriptor, defining how many sample point pairs need to be compared when computing each bit of the descriptor. (WTA) K The value could be, for example, 2, indicating that the calculation for each bit of the descriptor requires comparing the intensity differences between two pixel pairs and selecting the one with the largest difference. However, this is not the only possibility; WTA... K The value can also be other numerical values; the sign function is used to convert the comparison result to +1 or -1; This represents a local region around the target feature point (X,Y), with coordinates X+p. x [j],Y+p y The intensity value of the pixel [j]; This represents the local region surrounding the target feature point (X,Y), with coordinates Xp. x [j],Yp y The intensity value of the pixel [j]; pattern[j] includes a series of coordinate pairs (p x [j],p y [j]), these coordinates specify which pixels around the target feature point will be used for descriptor calculation.
[0115] Step S106: Identify the first state of the disconnecting switch and the second state of the insulator on the disconnecting switch based on the image features.
[0116] In some embodiments, identifying the first state of the disconnecting switch and the second state of the insulators on the disconnecting switch based on the image features includes:
[0117] Calculate the Hamming distance between the target descriptor and the preset descriptor. If the Hamming distance is greater than a preset threshold, determine that at least one of the first state and the second state is abnormal.
[0118] For example, a preset descriptor is pre-set based on the image of the insulating switch under normal conditions. If the target descriptor identified in the target image matches the preset descriptor, it indicates that the closing state of the insulating switch and the state of the insulator in the target image are both normal. Conversely, if the target descriptor identified in the target image does not match the preset descriptor, and the Hamming distance between the target descriptor and the preset descriptor is greater than a preset threshold, it indicates that at least one of the closing state of the insulating switch and the state of the insulator is abnormal.
[0119] Step S107: If at least one of the first state and the second state is abnormal, output an abnormal prompt.
[0120] For example, if the first status indicates that the disconnecting switch is not closed properly, or the second status indicates that the insulator of the disconnecting switch is damaged, an abnormality prompt will be output to remind the staff to inspect the disconnecting switch or repair or replace the insulator, so that problems in the power equipment can be detected and dealt with in a timely manner, thereby improving the safety of the power equipment.
[0121] Please see Figure 2 , Figure 2 This is a schematic block diagram illustrating the structure of an image processing-based power equipment defect detection method provided in an embodiment of this application. The image processing-based power equipment defect detection method can be a server or a terminal.
[0122] like Figure 2 As shown, the image processing-based power equipment defect detection method includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and internal memory.
[0123] The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any image processing-based method for detecting defects in power equipment.
[0124] The processor provides computing and control capabilities to support the operation of the entire image processing-based power equipment defect detection method.
[0125] The internal memory provides an environment for the execution of computer programs stored in the storage medium. When the computer program is executed by the processor, it enables the processor to execute any image processing-based method for detecting defects in power equipment.
[0126] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 2 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the image processing-based power equipment defect detection method applied thereto. Specific image processing-based power equipment defect detection methods may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0127] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0128] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:
[0129] Acquire a time-series image of the power equipment, the time-series image including the disconnecting switch on the power equipment;
[0130] The time series images are filtered to obtain the target images in the time series images;
[0131] The target image is segmented to obtain at least one target sub-image corresponding to the disconnect switch;
[0132] Identify the target edge contour sub-image of the disconnector from the target sub-image;
[0133] The foreground image of the disconnector is determined based on the target edge contour sub-image, and features are extracted from the foreground image to obtain image features;
[0134] The first state of the disconnecting switch and the second state of the insulator on the disconnecting switch are identified based on the image features.
[0135] If at least one of the first state and the second state is abnormal, an error message will be output.
[0136] In one embodiment, the processor is configured to, during the process of determining the foreground image of the disconnector based on the target edge contour sub-image, perform the following:
[0137] The target edge contour sub-images are stitched together to obtain the target edge contour image;
[0138] The edge contour pixels corresponding to the target edge contour image are determined based on the pixel grayscale values in each target edge contour sub-image and a preset grayscale threshold.
[0139] The foreground image is obtained by filling the region based on the edge contour pixels.
[0140] In one embodiment, the processor is used to implement the process of determining the edge contour pixels corresponding to the target edge contour image based on the pixel grayscale values in each of the target edge contour sub-images and a preset grayscale threshold, by:
[0141] The preset threshold of the target edge contour sub-image is determined according to the following formula:
[0142]
[0143] Where T is the optimal value of the preset threshold, t is a candidate value of the preset threshold, Ω represents the target edge contour sub-image corresponding to the preset threshold, w(x) represents the preset weight function, and p i (x) represents the probability of gray value i in the target edge contour sub-image Ω, μ0(x) represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are less than or equal to the threshold t, μ1(x) represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are greater than the threshold t, μ(x) represents the average gray value of all pixels in the target edge contour sub-image Ω, and L represents the total number of gray value sizes;
[0144] Pixels with grayscale values greater than the preset threshold are identified as edge contour pixels.
[0145] In one embodiment, the processor is configured to, in the process of determining pixels with grayscale values greater than the preset threshold as edge contour pixels, perform the following:
[0146] The enhancement threshold is determined by multiplying the preset threshold by the preset coefficient;
[0147] Pixels with gray values greater than the preset threshold and less than the enhancement threshold are defined as weak edge contour pixels, and pixels with gray values greater than the enhancement threshold are defined as strong edge contour pixels.
[0148] The strong edge contour pixels and the weak edge pixels that are connected to the strong edge contour pixels are defined as the edge contour pixels.
[0149] In one embodiment, the processor is used to perform the feature extraction of the foreground image to obtain image features, and is used to implement:
[0150] The foreground image is scaled a preset number of times to obtain a preset number of scaled images. Where scalefactor represents the scaling ratio, and nlevels represents the preset number of scaling operations;
[0151] Each of the scaled images is subjected to feature point identification to obtain candidate feature points on each of the scaled images;
[0152] Non-maximum suppression is performed on the candidate feature points in each of the scaled images to obtain the scaled feature points corresponding to each of the scaled images;
[0153] If the number of times a feature point of the same scale appears in each of the scaled images is greater than a preset number, the feature point of the scale is determined as a target feature point.
[0154] For each target feature point, the principal direction of the target feature point is determined based on the following formula. The target feature points are then normalized based on the main direction, where m 10 =∑ x,y∈A xI′(x,y), m 10 =∑ x,y∈A yI′(x,y), where A represents the pixel block corresponding to the target feature point, and x,y represent the pixels in pixel block A;
[0155] The target descriptor for each target feature point after normalization is determined based on the following formula:
[0156] Among them, WTA K This indicates the number of sample point pairs used to calculate the descriptor, pattern[j] = (p x [j],p y [j]) is used to specify the pixels around the target feature point that are used for descriptor calculation, (X,Y) represents the coordinates of the target feature point, and i represents the i-th target feature point in the scaled image I′.
[0157] In one embodiment, the processor is used to implement the process of identifying the first state of the disconnecting switch and the second state of the insulator on the disconnecting switch based on the image features, by:
[0158] Calculate the Hamming distance between the target descriptor and the preset descriptor. If the Hamming distance is greater than a preset threshold, determine that at least one of the first state and the second state is abnormal.
[0159] In one embodiment, the processor is configured to, during the process of identifying the target edge contour sub-image of the disconnector from the target sub-image, perform the following:
[0160] Perform contour recognition on the target sub-image to obtain a first edge contour image in the target sub-image;
[0161] Perform contour recognition on the first edge contour image to obtain a second edge contour image of the first edge contour image;
[0162] The second edge contour image is used as a mask image to overlay the first edge contour image to obtain the target edge contour sub-image.
[0163] In one embodiment, the processor is configured to, in the process of filtering the time-series images to obtain target images from the time-series images, perform the following:
[0164] Acquire time-series images within a preset time period, and classify the time-series images according to the shooting angle of the time-series images;
[0165] The target image is obtained by filtering the time-series images from each shooting angle.
[0166] In one embodiment, the processor is used to perform the process of filtering the time-series images for each shooting angle to obtain the target image in the time-series images, and is used to implement:
[0167] Calculate the peak signal-to-noise ratio and mean square error for each of the time series images;
[0168] The target image is determined from the time series image based on the peak signal-to-noise ratio and the mean square error.
[0169] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the image processing-based power equipment defect detection device described above can be referred to the corresponding process in the aforementioned embodiment of the image processing-based power equipment defect detection method, and will not be repeated here.
[0170] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to various embodiments of the image processing-based power equipment defect detection method of this application.
[0171] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0172] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0173] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0174] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting defects in power equipment based on image processing, characterized in that, The method includes: Acquire a time-series image of the power equipment, the time-series image including the disconnecting switch on the power equipment; The time series images are filtered to obtain the target images in the time series images; The target image is segmented to obtain at least one target sub-image corresponding to the disconnect switch; Identify the target edge contour sub-image of the disconnector from the target sub-image; The foreground image of the disconnector is determined based on the target edge contour sub-image, and features are extracted from the foreground image to obtain image features; The first state of the disconnecting switch and the second state of the insulator on the disconnecting switch are identified based on the image features. If at least one of the first state and the second state is abnormal, an error message will be output. The step of extracting features from the foreground image to obtain image features includes: The foreground image is scaled a preset number of times to obtain a preset number of scaled images. (k = 1, 2, ..., nlevels), where scalefactor represents the scaling ratio and nlevels represents the preset number of scaling operations; Each of the scaled images is subjected to feature point identification to obtain candidate feature points on each of the scaled images; Non-maximum suppression is performed on the candidate feature points in each of the scaled images to obtain the scaled feature points corresponding to each of the scaled images; If the number of times a feature point of the same scale appears in each of the scaled images is greater than a preset number, the feature point of the scale is determined as a target feature point. For each target feature point, the principal direction of the target feature point is determined based on the following formula. The target feature points are normalized based on the main direction, wherein... , A represents the pixel block corresponding to the target feature point, and x and y represent the pixels in pixel block A. The target descriptor for each target feature point after normalization is determined based on the following formula: , in, This indicates the number of sample point pairs used to calculate the descriptor. Used to specify the pixels around the target feature point used in the descriptor calculation, (X, Y) represents the coordinates of the target feature point, and i represents the scaled image. The i-th target feature point in the; The step of identifying the first state of the disconnecting switch and the second state of the insulator on the disconnecting switch based on the image features includes: Calculate the Hamming distance between the target descriptor and the preset descriptor. If the Hamming distance is greater than a preset threshold, determine that at least one of the first state and the second state is abnormal. The step of identifying the target edge contour sub-image of the disconnector from the target sub-image includes: Perform contour recognition on the target sub-image to obtain a first edge contour image in the target sub-image; Perform contour recognition on the first edge contour image to obtain a second edge contour image of the first edge contour image; The second edge contour image is used as a mask image to overlay the first edge contour image to obtain the target edge contour sub-image.
2. The image processing-based power equipment defect detection method according to claim 1, characterized in that, Determining the foreground image of the disconnector based on the target edge contour sub-image includes: The target edge contour sub-images are stitched together to obtain the target edge contour image; The edge contour pixels corresponding to the target edge contour image are determined based on the pixel grayscale values in each target edge contour sub-image and a preset grayscale threshold. The foreground image is obtained by filling the region based on the edge contour pixels.
3. The image processing-based power equipment defect detection method according to claim 2, characterized in that, The step of determining the edge contour pixels corresponding to the target edge contour image based on the pixel grayscale values in each of the target edge contour sub-images and a preset grayscale threshold includes: The preset threshold of the target edge contour sub-image is determined according to the following formula: Where T is the optimal value of the preset threshold, t is a candidate value of the preset threshold, Ω represents the target edge contour sub-image corresponding to the preset threshold, and w(x) represents the preset weight function. This represents the probability of grayscale value i in the target edge contour sub-image Ω. This represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are less than or equal to the threshold t. This represents the average gray value of all pixels in the target edge contour sub-image Ω whose gray values are greater than the threshold t. Ω represents the average gray value of all pixels in the target edge contour sub-image, and L represents the total number of gray values. Pixels with grayscale values greater than the preset threshold are identified as edge contour pixels.
4. The image processing-based power equipment defect detection method according to claim 3, characterized in that, The step of determining pixels with grayscale values greater than the preset threshold as edge contour pixels includes: The enhancement threshold is determined by multiplying the preset threshold by the preset coefficient; Pixels with gray values greater than the preset threshold and less than the enhancement threshold are defined as weak edge contour pixels, and pixels with gray values greater than the enhancement threshold are defined as strong edge contour pixels. The strong edge contour pixels and the weak edge pixels that are connected to the strong edge contour pixels are defined as the edge contour pixels.
5. The image processing-based power equipment defect detection method according to claim 1, characterized in that, The step of filtering the time series images to obtain the target images in the time series images includes: Acquire time-series images within a preset time period, and classify the time-series images according to the shooting angle of the time-series images; The target image is obtained by filtering the time-series images from each shooting angle.
6. The image processing-based power equipment defect detection method according to claim 5, characterized in that, The step of filtering the time-series images for each shooting angle to obtain the target image in the time-series images includes: Calculate the peak signal-to-noise ratio and mean square error for each of the time series images; The target image is determined from the time series image based on the peak signal-to-noise ratio and the mean square error.
7. A power equipment defect detection device based on image processing, characterized in that, The image processing-based power equipment defect detection device includes an imaging device for acquiring time-series images of power equipment, and a processor for executing the image processing-based power equipment defect detection method according to any one of claims 1-6.