High-voltage electrical equipment surface defect identification method based on image processing

By employing multi-source image acquisition and feature fusion technology, the problem of poor robustness in identifying surface defects of high-voltage electrical equipment under complex lighting and background interference was solved, enabling accurate identification of minute defects.

CN120953292AActive Publication Date: 2025-11-14CHINA THREE GORGES PROJECTS DEV CO LTD +1

Patent Information

Application Number
CN202511492983.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2025-11-14
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Traditional image processing methods are not robust enough for identifying surface defects in high-voltage electrical equipment and are difficult to accurately identify minute defects under complex lighting and background interference.

Method used

Using multi-source image acquisition technology, combined with gradient analysis, structural tensor, local texture intensity and anisotropic coefficients, a defect saliency map is constructed by Laplacian filtering and Gaussian kernel filtering, and the feature map is fused for defect identification.

Benefits of technology

It improves the accuracy of surface defect identification in high-voltage electrical equipment and can effectively identify minute defects in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953292A_ABST
    Figure CN120953292A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a high-voltage electrical equipment surface defect identification method based on image processing. The method comprises the following steps: analyzing the gradient of pixel points in a to-be-analyzed image of a to-be-detected area on the surface of the high-voltage electrical equipment to obtain the weight of each pixel point; weighting the gray value of each pixel point in the to-be-analyzed image subjected to Laplacian filtering by using the weight of each pixel point of the to-be-analyzed image to obtain a first feature map; calculating a local standard deviation of each pixel point in the to-be-analyzed image so as to obtain a first parameter and a second parameter; constructing two Gaussian kernels based on the first parameter and the second parameter to filter the to-be-analyzed image to obtain a second feature map; fusing the first feature map and the second feature map of the to-be-analyzed image to obtain a defect saliency map of the to-be-analyzed image; and recognizing a surface defect area of the high-voltage electrical equipment based on the defect saliency map of each to-be-analyzed image. According to the invention, the accuracy of high-voltage electrical equipment surface defect identification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically to a method for identifying surface defects in high-voltage electrical equipment based on image processing. Background Technology

[0002] High-voltage electrical equipment, such as generator outlet circuit breakers (GCBs), disconnecting switches, current transformers, and insulators, are indispensable key components in power systems, and their operational status directly affects the safety and stability of the power grid. These devices are exposed to complex operating conditions for extended periods, enduring the combined effects of electrical, thermal, mechanical, and environmental stresses. Various defects gradually develop on their surfaces, such as corrosion, cracks, coating peeling, corona burns, and component loosening or displacement. These surface defects are not only direct signs of equipment aging but also precursors to potential internal faults. Therefore, regular and efficient inspection and defect identification of the surface condition of high-voltage electrical equipment is of great significance for enabling predictive maintenance, preventing fault escalation, and ensuring the reliability of power supply.

[0003] Traditional methods typically employ single global image processing techniques, such as global thresholding, edge detection (Canny, Sobel, etc.), or template matching. However, the environment at high-voltage equipment sites is complex and variable, with strong interference from uneven lighting (such as shadows from the factory building and variations in brightness caused by cloud cover), surface reflections, and cluttered backgrounds. Traditional algorithms exhibit extremely poor robustness to these interferences: global thresholding methods are easily affected by lighting conditions, resulting in numerous false positives or false negatives; edge detection operators are sensitive to noise and struggle to distinguish between real defect edges and textured or reflective edges. Although some improved methods exist, such as adaptive thresholding, their effectiveness remains limited for early defects with extremely low contrast and in complex lighting scenarios. Summary of the Invention

[0004] To address the aforementioned technical problems, the present invention aims to provide a method for identifying surface defects in high-voltage electrical equipment based on image processing. The specific technical solution adopted is as follows: One embodiment of the present invention provides a method for identifying surface defects in high-voltage electrical equipment based on image processing, the method comprising: The front light source image, left light source image, and right light source image of the area to be inspected on the surface of the high-voltage electrical equipment are acquired separately and collectively referred to as the image to be analyzed; the gradient magnitude of each pixel in each image to be analyzed is obtained; The local texture intensity of a pixel is obtained by taking the gradient magnitude of each pixel within a window centered on a pixel in the image to be analyzed; a structure tensor is constructed based on the horizontal and vertical gradients of a pixel and its neighboring pixels; and the local anisotropy coefficients of a pixel are obtained based on the eigenvalues ​​of the structure tensor corresponding to the pixel. The weight of a pixel is obtained based on its local texture intensity and local anisotropy coefficient; the gray values ​​of each pixel in the image to be analyzed are weighted using the weights of each pixel in the image to be analyzed after Laplacian filtering to obtain the first feature map; Calculate the standard deviation of the gray values ​​of each pixel within a window centered on a pixel in the image to be analyzed, and use this as the local standard deviation of that pixel; obtain the first parameter and the second parameter based on the local standard deviation of each pixel in the image to be analyzed; construct two Gaussian kernels based on the first parameter and the second parameter to filter the image to be analyzed and obtain the second feature map; The first and second feature maps of the image to be analyzed are fused to obtain the defect saliency map of the image to be analyzed; the surface defect areas of the high-voltage electrical equipment are identified based on the defect saliency map of each image to be analyzed.

[0005] Preferably, the front light source image, left light source image, and right light source image of the area to be inspected on the surface of the high-voltage electrical equipment are acquired respectively, including: A ring-shaped white LED light source is installed around the camera lens. Two independently controllable LED strip light sources are symmetrically installed on both sides of the surface of the high-voltage electrical equipment. The LED strip light source is turned off, and an image of the area to be inspected is captured, which is recorded as the first image. The LED ring light source is turned off, and the left LED strip light source is turned on, and an image of the area to be inspected is captured, which is recorded as the second image. The LED ring light source is turned off, and the right LED strip light source is turned on, and an image of the area to be inspected is captured, which is recorded as the third image. The first, second, and third images are registered and aligned. Then, the registered and aligned images are converted to grayscale to obtain the first image, the second image, and the corresponding front light source image, left light source image, and right light source image, respectively.

[0006] Preferably, obtaining the local texture intensity of a pixel based on the gradient magnitude of each pixel within a window centered on a pixel in the image to be analyzed includes: The local texture intensity of a pixel is obtained by calculating the mean of the gradient magnitudes of all pixels within a window centered on a pixel in the image to be analyzed.

[0007] Preferably, constructing a structure tensor based on the horizontal and vertical gradients of a pixel and its neighboring pixels includes: Specifically, the sum of the squares of the horizontal gradients of a pixel and its neighboring pixels is denoted as the first element; the sum of the squares of the vertical gradients of the pixel and its neighboring pixels is denoted as the second element; the product of the horizontal and vertical gradients of each pixel in the pixel and its neighboring pixels is calculated and summed to obtain the third element; the structure tensor of the pixel is constructed based on the first, second, and third elements.

[0008] Preferably, obtaining the local anisotropy coefficients of a pixel based on the feature values ​​of the structure tensor corresponding to that pixel includes: The two eigenvalues ​​of the structure tensor corresponding to a pixel are denoted as the first eigenvalue and the second eigenvalue, respectively. The local anisotropy coefficient of the pixel is obtained by dividing the square of the difference between the first eigenvalue and the second eigenvalue by the square of the sum of the first eigenvalue and the second eigenvalue.

[0009] Preferably, the weight of a pixel is obtained based on its local texture intensity and local anisotropy coefficient, including: The weight of a pixel is obtained by multiplying the first preset value, the first adjustment constant and the product of the local texture intensity of a pixel, and the second adjustment constant and the product of the local anisotropy coefficient of that pixel.

[0010] Preferably, a first feature map is obtained by weighting the gray values ​​of each pixel in the Laplacian-filtered image using the weights of each pixel, including: The first feature map is obtained by multiplying the gray value of each pixel in the image to be analyzed by the weight of each pixel in the image to be analyzed after Laplacian filtering.

[0011] Preferably, the first parameter and the second parameter are obtained based on the local standard deviation of each pixel in the image to be analyzed, including: A histogram is constructed based on the local standard deviation of each pixel in an image to be analyzed. The mode in the histogram is obtained as the background texture intensity. The background texture intensity is compared with the first coefficient to obtain the target intensity. The third adjustment constant is compared with the target intensity to obtain the first parameter. The second coefficient is multiplied by the first parameter to obtain the second parameter.

[0012] Preferably, the first and second feature maps of the image to be analyzed are fused to obtain a defect saliency map of the image to be analyzed, including: The gray values ​​of each pixel in the first and second feature maps of the image to be analyzed are normalized and then weighted and fused to obtain the defect saliency map of the image to be analyzed.

[0013] Preferably, identifying surface defect regions of high-voltage electrical equipment based on the defect saliency map of each image to be analyzed includes: The defect saliency map corresponding to an image to be analyzed is uniformly divided into different image blocks. The local threshold of each image block is obtained by the OTSU algorithm. The local threshold of each image block is used to binarize each image block to obtain the initial defect binary mask in each image block. Morphological processing is performed on all image blocks in the defect saliency map corresponding to an image to be analyzed to obtain the final defect binary mask in the defect saliency map corresponding to that image to be analyzed. Similarly, the final defect binary masks in the defect saliency maps corresponding to other images to be analyzed are obtained. If a connected region appears in the final defect binary masks in the defect saliency maps corresponding to at least two images to be analyzed, then the connected region is the surface defect region of the high-voltage electrical equipment.

[0014] The embodiments of the present invention have at least the following beneficial effects: This application acquires a front light source image, a left light source image, and a right light source image of the area to be inspected on the surface of high-voltage electrical equipment, and uses these as images to be analyzed. The gradient of each pixel in the images to be analyzed is then analyzed to obtain the weight of each pixel. The weights of each pixel in the images to be analyzed are then used to weight the gray values ​​of each pixel in the Laplacian-filtered images to obtain a first feature map, which is used to capture minute defects, making the identification of surface defects of high-voltage electrical equipment more accurate. Furthermore, the local standard deviation of each pixel in the images to be analyzed is obtained, and then a first parameter and a second parameter are obtained based on the local standard deviation of each pixel in the images to be analyzed. Two Gaussian kernels are then constructed to filter the images to be analyzed to obtain a second feature map. Finally, the first feature map and the second feature map of each image to be analyzed are weighted and fused to obtain a defect saliency map of each image to be analyzed. Based on the defect saliency map of each image to be analyzed, the surface defect area of ​​the high-voltage electrical equipment is identified, improving the accuracy of surface defect identification of high-voltage electrical equipment. Attached Figure Description

[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A flowchart of a method for identifying surface defects in high-voltage electrical equipment based on image processing, provided in an embodiment of the present invention. Detailed Implementation

[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a high-voltage electrical equipment surface defect identification method based on image processing proposed in accordance with the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0019] The following description, in conjunction with the accompanying drawings, details a specific scheme for a high-voltage electrical equipment surface defect identification method based on image processing provided by the present invention.

[0020] Example: The main application scenario of this invention is as follows: This application mainly involves acquiring images of the surface of high-voltage electrical equipment, and then processing the images to identify defects on the surface of the high-voltage electrical equipment.

[0021] Please see Figure 1 The diagram illustrates a method flowchart for identifying surface defects in high-voltage electrical equipment based on image processing, according to an embodiment of the present invention. The method includes the following steps: Step S1: Obtain the front light source image, left light source image, and right light source image of the area to be detected on the surface of the high-voltage electrical equipment, and collectively refer to them as the images to be analyzed; obtain the gradient magnitude of each pixel in each image to be analyzed.

[0022] Since real defects are physically existing and will exhibit consistency under different lighting conditions, while light and shadow interference is a product of lighting geometry and will change or disappear with the angle of the light source, in order to accurately obtain surface defects of high-voltage electrical equipment, image acquisition is carried out through the distribution of multiple light sources.

[0023] The system acquires front, left, and right light source images of the area to be inspected on the surface of high-voltage electrical equipment. Specifically, the industrial camera and lighting system are fixed on a freely adjustable frame and aimed at the area to be inspected on the high-voltage electrical equipment, such as the surface of the circuit breaker porcelain bushing of a GCB (Generator Outlet Circuit Breaker) or the outer casing of the mechanism box. A laser rangefinder ensures a fixed working distance for each acquisition. The camera is a high-resolution monochrome industrial camera, and the lighting system uses a high-brightness white LED ring light source, installed around the camera lens to provide uniform front illumination for acquiring overall surface information. In addition, two sets of independently controllable LED strip light sources are symmetrically installed at a very low angle (less than 15°) on both sides of the surface of the high-voltage electrical equipment being inspected. This lighting method makes minor defects such as dents and scratches stand out as bright features due to scattered light, while flat areas appear as dark fields due to light reflection away from the lens.

[0024] Furthermore, the LED ring light source is turned on, and the LED strip light source is turned off, and an image of the area to be detected is captured, recorded as the first image; the LED ring light source is turned off, and the left LED strip light source is turned on, and an image of the area to be detected is captured, recorded as the second image; the LED ring light source is turned off, and the right LED strip light source is turned on, and an image of the area to be detected is captured, recorded as the third image. Since there may be slight mechanical displacement in the three captured images, the SIFT algorithm is used to register and align the first, second, and third images. Then, the registered and aligned images are converted to grayscale to obtain the first image, the second image, and the corresponding frontal light source images for each image. Image of the light source on the left and the image of the light source on the right These three images are a set of pixel-aligned images at the same resolution, representing the frontal light source image. Image of the light source on the left and the image of the light source on the right These are collectively referred to as images to be analyzed. Additionally, high-voltage electrical equipment may be quite large, in which case the surface needs to be divided into multiple areas to be inspected. When photographing each area, the freely adjustable frame can be moved according to the position of the corresponding grid points in each area to collect images point by point. The images collected for each area are then processed according to the method described above to obtain the image to be analyzed for each area.

[0025] Textures exist on the surface of high-voltage electrical equipment. Textures are high-frequency information. The inherent textures on the surface of high-voltage equipment usually have specific directional and scale regularities (such as longitudinal casting textures and uniform granular textures). However, real defects (such as microcracks and electrolytic pits) are often "abnormal damage" to this regularity pattern. Their direction and scale are different from the background. Therefore, by acquiring and quantifying the local texture intensity and anisotropy, the response of the Laplacian operator can be adaptively adjusted.

[0026] Therefore, the first step is to obtain the gradient information of each pixel. Taking an image to be analyzed as an example, specifically, the Sobel operator is used to calculate the horizontal gradient of each pixel in the image to be analyzed. and vertical gradient Then, based on the gradient of a pixel in the image to be analyzed in the horizontal and vertical directions (horizontal gradient)... and vertical gradient Get the gradient magnitude of this pixel. It should be noted that the pixel gradient acquisition is a current technology, and therefore will not be elaborated upon here. This allows us to obtain the horizontal gradient of each pixel. Vertical gradient and gradient magnitude .

[0027] Step S2: Obtain the local texture intensity of a pixel based on the gradient magnitude of each pixel within a window centered on a pixel in the image to be analyzed; construct a structure tensor based on the horizontal and vertical gradients of a pixel and its neighboring pixels; obtain the local anisotropy coefficients of a pixel based on the eigenvalues ​​of the structure tensor corresponding to the pixel.

[0028] The above steps obtain the gradient magnitude of each pixel. Further, the local texture intensity of each pixel is calculated based on its gradient magnitude. Specifically, the local texture intensity of a pixel is obtained by calculating the mean of the gradient magnitudes of all pixels within a window centered on a given pixel in the image to be analyzed. , This represents the local texture intensity of the i-th pixel in an image to be analyzed. The window size is w×w, with a reference value of 15 for w. The window size should be large enough to contain sufficient background texture periods, but not so large that defects are smoothed out. This allows us to obtain the local texture intensity of each pixel in the image to be analyzed. A higher local texture intensity value indicates a coarser surrounding area and more edges.

[0029] Furthermore, it is necessary to analyze and calculate the local anisotropy coefficients of each pixel. The purpose is to quantify the directional consistency of the local texture, whether there are edges in all directions or mainly concentrated in one direction. Background textures often exhibit anisotropy, that is, energy is concentrated in one direction, while defects are characterized by isotropy, that is, energy is relatively uniform in all directions.

[0030] First, construct a structure tensor based on the horizontal and vertical gradients of a pixel and its neighboring pixels. Specifically, calculate the sum of the squares of the horizontal gradients of the pixel and its neighboring pixels, denoted as the first element; calculate the sum of the squares of the vertical gradients of the pixel and its neighboring pixels, denoted as the second element; calculate the product of the horizontal and vertical gradients of each pixel in the pixel and its neighboring pixels, and sum them to obtain the third element; construct the structure tensor of the pixel based on the first, second, and third elements.

[0031] The specific model of the structure tensor is as follows: ; Where J represents the structure tensor of a pixel; This represents the square of the horizontal gradient of the given pixel and the a-th pixel in its neighborhood. The neighborhood is an eight-neighborhood, meaning it's the square of the horizontal gradient of the a-th pixel among the nine pixels in the eight-neighborhood plus the pixel itself. The first element; and Let represent the horizontal gradient and vertical gradient of the given pixel and the a-th pixel in its neighborhood, respectively. Indicates the third element; This represents the square of the vertical gradient of the pixel and the a-th pixel in its neighborhood. It is the second element.

[0032] The eigenvalues ​​of the structure tensor J are calculated by solving the characteristic equation. ,in ,Right now Where I is the identity matrix, the formula for calculating the eigenvalues ​​is: Where tr is the trace (the sum of the diagonals) and det is the determinant. Two eigenvalues ​​are obtained by solving, denoted as... .

[0033] Next, the local anisotropy coefficients of a pixel are calculated based on the eigenvalues ​​of the structure tensor. Specifically, the two eigenvalues ​​of the structure tensor corresponding to a pixel are denoted as the first eigenvalue and the second eigenvalue, respectively; the local anisotropy coefficients of the pixel are obtained by dividing the square of the difference between the first eigenvalue and the second eigenvalue by the square of the sum of the first eigenvalue and the second eigenvalue.

[0034] The specific calculation model for the local anisotropy coefficient is as follows: ; Where A represents the local anisotropy coefficient of a pixel, A=0 indicates complete isotropy (uniform energy in all directions), and A=1 indicates complete anisotropy (energy is completely concentrated in one direction). These represent the first eigenvalue and the second eigenvalue, respectively. The gradient energy represents the principal direction. This represents the gradient energy in the vertical direction.

[0035] Furthermore, Laplacian filtering is required on the image to be analyzed. Specifically, a convolution operation is performed between the Laplacian kernel and the image to be analyzed. The Laplacian kernel uses... The purpose is to obtain high-frequency components, including defects and textures, and to denote the Laplacian-filtered image to be analyzed as follows: .

[0036] Step S3: Obtain the weight of a pixel based on its local texture intensity and local anisotropy coefficient; use the weights of each pixel in the image to be analyzed to weight the gray values ​​of each pixel in the Laplacian-filtered image to obtain the first feature map.

[0037] The above obtains the local texture intensity and local anisotropy coefficient of each pixel, as well as the image to be analyzed after Laplacian filtering. Therefore, the weight of each pixel can be obtained based on the local texture intensity and local anisotropy coefficient of each pixel. Then, the Laplacian-filtered image to be analyzed is weighted and corrected according to the weight to obtain the first feature map.

[0038] Specifically, the weight of a pixel is obtained by multiplying the first preset value, the first adjustment constant, and the product of the local texture intensity of a pixel, and the second adjustment constant and the local anisotropy coefficient of that pixel. This yields the weight of each pixel in the image to be analyzed.

[0039] The specific model for calculating the weight of a pixel is as follows: ; in, This represents the weight of the i-th pixel in an image to be analyzed. This represents the local texture intensity representing the weight of the i-th pixel in the image to be analyzed. The local anisotropy coefficient represents the weight of the i-th pixel in the image to be analyzed. These represent the first and second adjustment constants, respectively, used to control the importance of local texture intensity and local anisotropy coefficients in the weight calculation. Empirical values ​​are taken as... The first preset value is 1, the purpose of which is to ensure that the denominator is not 0 and the maximum weight is 1.

[0040] After obtaining the weights of each pixel in the image to be analyzed, the gray values ​​of each pixel in the image to be analyzed after Laplacian filtering are multiplied by the weights of each pixel in the image to be analyzed to obtain the first feature map.

[0041] The specific calculation model is presented as follows: ; in, This represents the weight of the i-th pixel in an image to be analyzed. The gray value of the i-th pixel in the image to be analyzed after Laplacian filtering. This represents the grayscale value of the i-th pixel in the first feature map.

[0042] This allows us to obtain the first feature map of each image to be analyzed, which is the same size as the original image (the image to be analyzed).

[0043] Step S4: Calculate the standard deviation of the gray values ​​of each pixel within a window centered on a pixel in the image to be analyzed, and use it as the local standard deviation of that pixel; obtain the first parameter and the second parameter based on the local standard deviation of each pixel in the image to be analyzed; construct two Gaussian kernels based on the first parameter and the second parameter to filter the image to be analyzed and obtain the second feature map.

[0044] After the above operations, the first feature map is obtained, which enhances edges, spots, isolated points, and thin lines in the image to a certain extent. It particularly emphasizes the enhancement of defect features. In an image, this enhancement contains information at different scales: large scale (low frequency) represents slowly changing backgrounds, lighting gradients, and the approximate shape of objects; small scale (high frequency) typically represents noise, pixel-level random fluctuations, and very subtle textures; and medium scale (medium frequency) typically represents the defect features we are interested in, such as scratches, cracks, rust spots, and dents. These features are neither the overall brightness variations of the entire image (large scale) nor irrelevant noise (small scale). The significance of mid-pass filter enhancement lies in acting as a feature filter; it is designed to allow information within a specific scale range to pass through and be enhanced, while suppressing information at other scales.

[0045] Therefore, it is necessary to analyze the changes of pixels around a pixel in the image to be analyzed. Specifically, the standard deviation of the gray values ​​of each pixel in the window centered on a pixel in the image to be analyzed is calculated as the local standard deviation of that pixel.

[0046] Furthermore, the first and second parameters are obtained based on the local standard deviation of each pixel in the image to be analyzed.

[0047] Specifically, a histogram is constructed based on the local standard deviation of each pixel in an image to be analyzed, and the mode in the histogram is obtained as the background texture intensity; the background texture intensity is compared with the first coefficient to obtain the target intensity; the third adjustment constant is compared with the target intensity to obtain the first parameter; the second coefficient is multiplied by the first parameter to obtain the second parameter.

[0048] The first coefficient is ∆k, with a reference value of 2. The purpose of introducing this first coefficient is to enhance features whose texture intensity is approximately half that of the background intensity (i.e., more subtle and sharper features). The first and second parameters are the standard deviations of the Gaussian kernel, denoted as... and The background texture intensity is inversely proportional to the Gaussian kernel standard deviation. The higher the intensity, the larger the Gaussian kernel standard deviation is required to smooth it out. Therefore, the third adjustment constant is compared with the target intensity Sta to obtain the first parameter. The third adjustment constant is c, which is used to map the numerical range of Sta to a suitable Gaussian kernel standard deviation range. Its value range is c∈[10,20]. Furthermore, a second coefficient γ (1.4<γ<1.8) is introduced to control the bandwidth of the DOC filter. Thus, the second coefficient is multiplied by the first parameter to obtain the second parameter.

[0049] The calculation model for the first parameter obtained from the above process is as follows: ; ; in, The first parameter is denoted by c, the third adjustment constant is denoted by ∆S, the background texture intensity of the image to be analyzed is ∆k is the first coefficient, and Sta is the target intensity. ); γ is the second coefficient.

[0050] This yields two key parameters of DOC (Difference of Gaussians) (the first and second parameters), based on... Two Gaussian kernels are constructed to filter an image to be analyzed, thus improving the image of a front-lit source. Taking filtering as an example, that is: ; in, The standard deviation is expressed as (First parameter) Gaussian kernel and frontal light source image This results in a blurred image; this operation removes elements from the image that are larger than the actual image. The smaller scale of the represented details (high-frequency information) is retained more than Major characteristics, similarly The standard deviation is expressed as (Second parameter) Gaussian kernel and frontal light source image This results in a blurred image, which is smaller than the image obtained via... The resulting blurred image is even more blurred, but retains features at a coarser scale. Relatively high frequency details were preserved (scale within) (nearby), and It preserved relatively low-frequency details (scale within) (Nearby), after subtraction, the low-frequency components shared by both are canceled out, leaving only the scale between and The characteristics between the two bands (i.e., the mid-frequency band). Taking the absolute value yields Dm, which is the image after mid-band enhancement, also known as the second feature map.

[0051] At this point, we can obtain the first and second feature maps for each image to be analyzed.

[0052] Step S5: The first and second feature maps of the image to be analyzed are fused to obtain the defect saliency map of the image to be analyzed; the surface defect area of ​​the high-voltage electrical equipment is identified based on the defect saliency map of each image to be analyzed.

[0053] After the above operations, the first feature map and the second feature map of each image to be analyzed are obtained. The high pixel value in the first feature map corresponds to the area with drastic gray-scale changes in the image, that is, the edge of the suspected defect. The second feature map can effectively enhance defects such as scratches and small pieces of rust, while smoothing out more subtle noise and greater background changes. Therefore, by weighted fusion, the results of enhancement at different scales are merged into a saliency map containing full-scale defect information.

[0054] Therefore, the first and second feature maps of the image to be analyzed are fused to obtain the defect saliency map of the image to be analyzed. Specifically, the gray values ​​of each pixel in the first and second feature maps of the image to be analyzed are normalized and then weighted and fused to obtain the defect saliency map of the image to be analyzed.

[0055] The specific calculation model is as follows: ; The Norm function normalizes the gray values ​​of pixels in the first and second feature maps to a certain value. The range, weighting coefficients α and β (α+β=1) can be adjusted according to the emphasis on the defect type. For example, if more attention is paid to microcracks, α=0.6 and β=0.4 are set. This outputs a fused defect saliency map, where the brighter the area, the greater the probability that it is a defect. Represents the first feature map. This represents the second feature map.

[0056] Finally, a defect saliency map corresponding to each image to be analyzed is obtained, and then the defect saliency map corresponding to each image to be analyzed is used to identify the surface defect areas of high voltage electrical equipment.

[0057] Specifically, the defect saliency map corresponding to an image to be analyzed is uniformly divided into different image blocks, and the local threshold of each image block is obtained by the OTSU algorithm. The local threshold of each image block is used to binarize each image block to obtain the initial defect binary mask in each image block. Morphological processing is performed on all image blocks in the defect saliency map corresponding to an image to be analyzed to obtain the final defect binary mask in the defect saliency map corresponding to that image to be analyzed. Similarly, the final defect binary masks in the defect saliency maps corresponding to other images to be analyzed are obtained. If a connected region appears in the final defect binary masks in the defect saliency maps corresponding to at least two images to be analyzed, then the connected region is the surface defect region of the high-voltage electrical equipment.

[0058] The morphological processing involves using a closing operation (dilation followed by erosion) to connect the broken defect edges, and then using an opening operation (erosion followed by dilation) to remove noise points with too small an area, resulting in the final binary defect mask.

[0059] Since real defects are physical entities, they will exhibit consistency under different lighting conditions; while light and shadow interference is a product of lighting geometry and will change or disappear with the angle of the light source. Therefore, by combining the final binary defect mask in the defect saliency map corresponding to the three images to be analyzed, the defect region can be determined, which can improve the accuracy of surface defect identification for high-voltage electrical equipment.

[0060] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0061] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for identifying surface defects in high-voltage electrical equipment based on image processing, characterized in that, The method includes: The front light source image, left light source image, and right light source image of the area to be inspected on the surface of the high-voltage electrical equipment are acquired separately and collectively referred to as the image to be analyzed; the gradient magnitude of each pixel in each image to be analyzed is obtained; The local texture intensity of a pixel is obtained by taking the gradient magnitude of each pixel within a window centered on a pixel in the image to be analyzed; a structure tensor is constructed based on the horizontal and vertical gradients of a pixel and its neighboring pixels; and the local anisotropy coefficients of a pixel are obtained based on the eigenvalues ​​of the structure tensor corresponding to the pixel. The weight of a pixel is obtained based on its local texture intensity and local anisotropy coefficient; the gray values ​​of each pixel in the image to be analyzed are weighted using the weights of each pixel in the image to be analyzed after Laplacian filtering to obtain the first feature map; Calculate the standard deviation of the gray values ​​of each pixel within a window centered on a pixel in the image to be analyzed, and use this as the local standard deviation of that pixel; obtain the first parameter and the second parameter based on the local standard deviation of each pixel in the image to be analyzed; construct two Gaussian kernels based on the first parameter and the second parameter to filter the image to be analyzed and obtain the second feature map; The first and second feature maps of the image to be analyzed are fused to obtain the defect saliency map of the image to be analyzed; the surface defect areas of the high-voltage electrical equipment are identified based on the defect saliency map of each image to be analyzed.

2. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The acquisition of front light source images, left light source images, and right light source images of the area to be inspected on the surface of the high-voltage electrical equipment includes: A ring-shaped white LED light source is installed around the camera lens. Two independently controllable LED strip light sources are symmetrically installed on both sides of the surface of the high-voltage electrical equipment. The LED strip light source is turned off, and an image of the area to be inspected is captured, which is recorded as the first image. The LED ring light source is turned off, and the left LED strip light source is turned on, and an image of the area to be inspected is captured, which is recorded as the second image. The LED ring light source is turned off, and the right LED strip light source is turned on, and an image of the area to be inspected is captured, which is recorded as the third image. The first, second, and third images are registered and aligned. Then, the registered and aligned images are converted to grayscale to obtain the first image, the second image, and the corresponding front light source image, left light source image, and right light source image, respectively.

3. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The step of obtaining the local texture intensity of a pixel based on the gradient magnitude of each pixel within a window centered on a pixel in the image to be analyzed includes: The local texture intensity of a pixel is obtained by calculating the mean of the gradient magnitudes of all pixels within a window centered on a pixel in the image to be analyzed.

4. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The construction of the structure tensor based on the horizontal and vertical gradients of a pixel and its neighboring pixels includes: Specifically, the sum of the squares of the horizontal gradients of a pixel and its neighboring pixels is denoted as the first element; the sum of the squares of the vertical gradients of the pixel and its neighboring pixels is denoted as the second element; the product of the horizontal and vertical gradients of each pixel in the pixel and its neighboring pixels is calculated and summed to obtain the third element; the structure tensor of the pixel is constructed based on the first, second, and third elements.

5. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The step of obtaining the local anisotropy coefficients of a pixel based on the feature values ​​of the structure tensor corresponding to that pixel includes: The two eigenvalues ​​of the structure tensor corresponding to a pixel are denoted as the first eigenvalue and the second eigenvalue, respectively. The local anisotropy coefficient of the pixel is obtained by dividing the square of the difference between the first eigenvalue and the second eigenvalue by the square of the sum of the first eigenvalue and the second eigenvalue.

6. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The step of obtaining the weight of a pixel based on its local texture intensity and local anisotropy coefficient includes: The weight of a pixel is obtained by multiplying the first preset value, the first adjustment constant and the product of the local texture intensity of a pixel, and the second adjustment constant and the product of the local anisotropy coefficient of that pixel.

7. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The first feature map is obtained by weighting the gray values ​​of each pixel in the Laplacian-filtered image using the weights of each pixel. The first feature map is obtained by multiplying the gray value of each pixel in the image to be analyzed by the weight of each pixel in the image to be analyzed after Laplacian filtering.

8. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The step of obtaining the first and second parameters based on the local standard deviation of each pixel in the image to be analyzed includes: A histogram is constructed based on the local standard deviation of each pixel in an image to be analyzed. The mode in the histogram is obtained as the background texture intensity. The background texture intensity is compared with the first coefficient to obtain the target intensity. The third adjustment constant is compared with the target intensity to obtain the first parameter. The second coefficient is multiplied by the first parameter to obtain the second parameter.

9. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The process of fusing the first and second feature maps of the image to be analyzed to obtain a defect saliency map of the image to be analyzed includes: The gray values ​​of each pixel in the first and second feature maps of the image to be analyzed are normalized and then weighted and fused to obtain the defect saliency map of the image to be analyzed.

10. The method for identifying surface defects in high-voltage electrical equipment based on image processing according to claim 1, characterized in that, The identification of surface defect regions of high-voltage electrical equipment based on the defect saliency map of each image to be analyzed includes: The defect saliency map corresponding to an image to be analyzed is uniformly divided into different image blocks. The local threshold of each image block is obtained by the OTSU algorithm. The local threshold of each image block is used to binarize each image block to obtain the initial defect binary mask in each image block. Morphological processing is performed on all image blocks in the defect saliency map corresponding to an image to be analyzed to obtain the final defect binary mask in the defect saliency map corresponding to that image to be analyzed. Similarly, the final defect binary masks in the defect saliency maps corresponding to other images to be analyzed are obtained. If a connected region appears in the final defect binary masks in the defect saliency maps corresponding to at least two images to be analyzed, then the connected region is the surface defect region of the high-voltage electrical equipment.

Citation Information

Patent Citations

  • Track defect detection method and system, electronic equipment and storage medium

    CN114648520A

  • Defect detection method based on pump machine metal shell

    CN116777916A

  • Toothpaste tube quality detection method and system based on machine vision

    CN120451161A

  • Defect identification method based on point cloud model

    CN120612628A

  • Method for restoring video data of drainage pipe based on computer vision

    US20220292645A1

Cited By

  • Defoaming sand washing monitoring method and system based on image analysis

    CN121582256A

  • Image-based inorganic veneer coating bubble identification method and system

    CN121616599A

  • A method and system for identifying bubbles in inorganic decorative panel coatings based on images.

    CN121616599B

  • Valve sealing surface defect detection method and system based on machine vision

    CN121810626A

  • A valve sealing surface defect detection method and system based on machine vision

    CN121810626B