A high-voltage electrical equipment surface defect recognition method based on image processing

By employing multi-source image acquisition and sophisticated image processing techniques, the problem of poor robustness in identifying surface defects of high-voltage electrical equipment using traditional methods has been solved. This approach effectively addresses complex lighting and background interference, thereby improving identification accuracy.

CN120953292BActive Publication Date: 2026-01-23CHINA THREE GORGES PROJECTS DEV CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional image processing techniques are not robust enough for identifying surface defects in high-voltage electrical equipment and are difficult to handle complex lighting conditions and background interference, resulting in high false detection and false negative rates.

Method used

Multi-source image acquisition and image processing methods are used to acquire front, left and right light source images of the surface of high-voltage electrical equipment. Weights are calculated by gradient analysis, structural tensor, local texture intensity and anisotropy coefficients. Combined with Laplacian filtering and Gaussian kernel filtering, a defect saliency map is generated to identify surface defects.

Benefits of technology

It improves the accuracy of surface defect identification in high-voltage electrical equipment, effectively identifying minute defects and reducing false positives and false negatives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953292B_ABST
    Figure CN120953292B_ABST
Patent Text Reader

Abstract

The application 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 a pixel point in a to-be-analyzed image of a to-be-detected region on the surface of 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 Laplace filtering by using the weight of each pixel point in the to-be-analyzed image to obtain a first feature map; calculating the local standard deviation of each pixel point in the to-be-analyzed image to further 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 and second feature maps of the to-be-analyzed image to obtain a defect saliency map of the to-be-analyzed image; and identifying the surface defect region of the high-voltage electrical equipment based on the defect saliency map of each to-be-analyzed image. The application can improve the accuracy of high-voltage electrical equipment surface defect identification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a high-voltage electrical equipment surface defect identification method based on image processing. BACKGROUND

[0002] High-voltage electrical equipment, such as generator circuit breakers (GCBs), disconnectors, current transformers, insulators, etc., is an indispensable key equipment in the power system, and its operating state is directly related to the safety and stability of the power grid. These devices are exposed to complex working conditions for a long time and bear the combined effects of electricity, heat, mechanics, and environment, and their surfaces will gradually develop various defects, such as rust, cracks, coating peeling, corona burns, component loosening or displacement, etc. These surface defects are not only an intuitive manifestation of equipment aging, but also a precursor of potential internal faults. Therefore, regular and efficient inspection and defect identification of the surface state of high-voltage electrical equipment is of great significance for realizing predictive maintenance of the equipment, preventing fault expansion, and ensuring the reliability of power supply.

[0003] Traditional methods usually use a single global image processing technique, such as global threshold segmentation, edge detection (Canny, Sobel, etc.), or template matching. However, the high-voltage equipment field environment is complex and variable, with strong uneven lighting (such as changes in light and shade caused by factory shadows, cloud cover), equipment surface reflections, and background clutter, etc. The traditional algorithm has poor robustness when faced with these disturbances: the global threshold method is easily affected by light and produces a large number of false positives or false negatives; the edge detection operator is sensitive to noise and difficult to distinguish between real defect edges and texture, reflective edges. Although there are some improved methods, such as using adaptive thresholding, their effectiveness is still limited for early-stage defects with very low contrast and complex lighting scenes. SUMMARY

[0004] To solve the above technical problems, the purpose of the present application is to provide a high-voltage electrical equipment surface defect identification method based on image processing, and the technical solution adopted is as follows:

[0005] One embodiment of the present application provides a high-voltage electrical equipment surface defect identification method based on image processing, which comprises:

[0006] Obtain the front light source image, left light source image and right light source image of the surface of the high-voltage electrical equipment to be detected, and collectively referred to as the to-be-analyzed image; obtain the gradient amplitude of each pixel point in each to-be-analyzed image;

[0007] The local texture intensity of a pixel point in the image to be analyzed is obtained based on the gradient amplitude of each pixel point in a window centered on the pixel point; the structure tensor is constructed based on the horizontal direction gradient and the vertical direction gradient of a pixel point and the pixel points in the neighborhood of the pixel point; the local anisotropy coefficient of the pixel point is obtained based on the eigenvalue of the structure tensor corresponding to the pixel point;

[0008] The weight of a pixel point is obtained based on the local texture intensity and the local anisotropy coefficient of the pixel point; the gray value of each pixel point in the image to be analyzed is weighted to obtain the first feature map.

[0009] The standard deviation of the gray value of each pixel point in a window centered on a pixel point in the image to be analyzed is calculated as the local standard deviation of the pixel point; the first parameter and the second parameter are obtained based on the local standard deviation of each pixel point in the image to be analyzed; two Gaussian kernels are constructed based on the first parameter and the second parameter to filter the image to be analyzed to obtain the second feature map.

[0010] 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.

[0011] Preferably, the front light source image, the left light source image and the right light source image of the surface to be detected of the high-voltage electrical equipment are obtained respectively, comprising:

[0012] The annular white LED annular light source is installed around the camera lens, and two groups of independently controllable LED strip light sources are symmetrically installed on both sides of the surface of the high-voltage electrical equipment; the image of the region to be detected is captured with the LED strip light sources turned off, and is recorded as a first image; the image of the region to be detected is captured with the LED annular light source turned off and the left LED strip light source turned on, and is recorded as a second image; the image of the region to be detected is captured with the LED annular light source turned off and the right LED strip light source turned on, and is recorded as a third image; the first image, the second image and the third image are aligned and registered, and then the registered images are grayed to obtain the front light source image, the left light source image and the right light source image corresponding to the first image, the second image and the third image respectively.

[0013] Preferably, the local texture intensity of a pixel point in the image to be analyzed is obtained based on the gradient amplitude of each pixel point in a window centered on the pixel point, comprising:

[0014] The mean value of the gradient amplitudes of all pixel points in a window centered on a pixel point in the image to be analyzed is calculated to obtain the local texture intensity of the pixel point.

[0015] Preferably, the structure tensor is constructed according to the horizontal direction gradient and the vertical direction gradient of a pixel point and the pixel points in the neighborhood of the pixel point, comprising:

[0016] Specifically, the sum of the squares of the horizontal direction gradients of the pixel point and the pixel points in the neighborhood of the pixel point is calculated and denoted as a first element; the sum of the squares of the vertical direction gradients of the pixel point and the pixel points in the neighborhood of the pixel point is calculated and denoted as a second element; the product of the horizontal direction gradient and the vertical direction gradient of each of the pixel point and the pixel points in the neighborhood of the pixel point is calculated respectively, and the sum of the products is calculated to obtain a third element; and the structure tensor of the pixel point is constructed according to the first element, the second element and the third element.

[0017] Preferably, the local anisotropy coefficient of a pixel point is obtained based on the eigenvalues of the structure tensor corresponding to the pixel point, comprising:

[0018] The two eigenvalues of the structure tensor corresponding to a pixel point are denoted as a first eigenvalue and a second eigenvalue respectively; the square of the difference between the first eigenvalue and the second eigenvalue is divided by the square of the sum of the first eigenvalue and the second eigenvalue to obtain the local anisotropy coefficient of the pixel point.

[0019] Preferably, the weight of a pixel point is obtained according to the local texture intensity and the local anisotropy coefficient of the pixel point, comprising:

[0020] The product of the first preset value, the first adjustment constant and the local texture intensity of a pixel point, and the product of the second adjustment constant and the local anisotropy coefficient of the pixel point are multiplied to obtain the weight of the pixel point by taking the reciprocal of the product.

[0021] Preferably, the first feature map is obtained by weighting the gray values of the pixel points in the Laplace filtered to-be-analyzed image using the weights of the pixel points in the to-be-analyzed image, comprising:

[0022] The gray values of the pixel points in the Laplace filtered to-be-analyzed image are multiplied by the weights of the pixel points in the to-be-analyzed image respectively to obtain the first feature map.

[0023] Preferably, the first parameter and the second parameter are obtained according to the local standard deviations of the pixel points in the to-be-analyzed image, comprising:

[0024] A histogram is established according to the local standard deviations of the pixel points in a to-be-analyzed image, the mode in the histogram is obtained as a background texture intensity; the target intensity is obtained by comparing the background texture intensity with the first coefficient; the first parameter is obtained by comparing the third adjustment constant with the target intensity; and the second parameter is obtained by multiplying the second coefficient and the first parameter.

[0025] Preferably, the defect saliency map of the to-be-analyzed image is obtained by fusing the first and second feature maps of the to-be-analyzed image, comprising:

[0026] The gray values of each pixel point in the first feature map and the second feature map of the image to be analyzed are normalized and then weighted and fused to obtain a defect saliency map of the image to be analyzed.

[0027] Preferably, the surface defect area of the high-voltage electrical apparatus is identified based on the defect saliency map of each image to be analyzed, comprising:

[0028] The defect saliency map corresponding to one image to be analyzed is uniformly divided into different image blocks, and the local threshold of each image block is obtained by using the OTSU algorithm; the initial defect binary mask in each image block is obtained by binarizing each image block by using the local threshold of each image block; the final defect binary mask in the defect saliency map corresponding to one image to be analyzed is obtained by performing morphological processing on all image blocks in the defect saliency map corresponding to the image to be analyzed and having obtained the initial defect binary mask; the final defect binary mask in the defect saliency map corresponding to other images to be analyzed is obtained in the same way; if a connected region appears in the final defect binary mask in the defect saliency map corresponding to at least two images to be analyzed, the connected region is the surface defect area of the high-voltage electrical apparatus.

[0029] The embodiment of the present application has at least the following beneficial effects: the front light source image, the left light source image and the right light source image of the surface to-be-detected area of the high-voltage electrical apparatus are obtained as the images to be analyzed, and then the gradient of each pixel point in the image to be analyzed is analyzed to obtain the weight of each pixel point, and then the gray value of each pixel point in the image to be analyzed filtered by the Laplacian filter is weighted by using the weight of each pixel point in the image to be analyzed to obtain the first feature map, so as to capture the tiny defects, so that the surface defect identification of the high-voltage electrical apparatus is more accurate; further, the local standard deviation of each pixel point in the image to be analyzed is obtained, and then the first parameter and the second parameter are obtained based on the local standard deviation of each pixel point in the image to be analyzed, and two Gaussian kernels are constructed to filter the image to be analyzed to obtain the 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 the defect saliency map of each image to be analyzed, and then the surface defect area of the high-voltage electrical apparatus is identified based on the defect saliency map of each image to be analyzed, so as to improve the accuracy of the surface defect identification of the high-voltage electrical apparatus. BRIEF DESCRIPTION OF DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art and the advantages thereof, a brief introduction will be given to the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without any creative effort.

[0031] Figure 1 A method flow chart of a high-voltage electrical equipment surface defect recognition method based on image processing is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined object, the specific implementation, structure, features and effects of a high-voltage electrical equipment surface defect recognition method based on image processing according to the present application are described in detail as follows in combination with the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.

[0033] 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 the present application belongs.

[0034] The specific scheme of the high-voltage electrical equipment surface defect recognition method based on image processing provided by the present application is specifically described below in combination with the drawings.

[0035] Embodiment:

[0036] The main application scenario of the present application is: the present application mainly acquires the image of the surface of the high-voltage electrical equipment, and then processes and recognizes the defects on the surface of the high-voltage electrical equipment.

[0037] Please refer to Figure 1 which shows a method flow chart of a high-voltage electrical equipment surface defect recognition method based on image processing provided by an embodiment of the present application, which includes the following steps:

[0038] Step S1, respectively acquire the front light source image, the left light source image and the right light source image of the surface of the high-voltage electrical equipment to be detected, and collectively referred to as the to-be-analyzed image; acquire the gradient amplitude of each pixel point in each to-be-analyzed image.

[0039] Since the real defect is physically existing, it will show consistency under different lightings, while the light and shadow interference is the product of lighting geometry, which will change or disappear with the change of light source angle, therefore, in order to accurately acquire the surface defect of the high-voltage electrical equipment, image acquisition is performed through multi-light source distribution.

[0040] The front light source image, the left light source image and the right light source image of the surface to be detected area of the high-voltage electrical equipment are acquired respectively. Specifically, the industrial camera and the lighting system are fixed on a free adjustment frame, and are aligned with the surface to be detected area of the high-voltage electrical equipment, such as the surface of the circuit breaker porcelain sleeve of the GCB (generator outlet circuit breaker), the outer shell of the mechanism box, etc. The working distance of each acquisition is fixed by the laser range finder. The camera uses 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 lighting for acquiring overall surface information. In addition, two groups of independently controllable LED strip lights are symmetrically installed on both sides of the surface to be detected of the high-voltage electrical equipment at a very low angle (less than 15°). This lighting method can make the tiny concave-convex, scratches and other defects stand out as bright features due to scattered light, while the flat areas appear dark field due to light reflection away from the lens.

[0041] Further, the LED ring light source is turned on, the LED strip light source is turned off, and the image of the surface to be detected is captured, which is recorded as a first image. The LED ring light source is turned off, the left LED strip light source is turned on, and the image of the surface to be detected is captured, which is recorded as a second image. The LED ring light source is turned off, the right LED strip light source is turned on, and the image of the surface to be detected is captured, which is recorded as a third image. The images captured three times may have a slight mechanical displacement. Therefore, the SIFT algorithm is used to align the first image, the second image and the third image, and then the aligned images are grayed to obtain the front light source image , the left light source image and the right light source image corresponding to the first image, the second image and the third image respectively. The three images are a group of images aligned at the pixel level and with the same resolution. The front light source image , the left light source image and the right light source image are collectively referred to as the images to be analyzed. In addition, the high-voltage electrical equipment may be relatively large, and the surface needs to be divided into multiple detection areas. When capturing the image of each detection area, the free adjustment frame can be moved according to the position of the grid point corresponding to each detection area for point-by-point acquisition. The images captured for each detection area are processed according to the above method to obtain the images to be analyzed for each detection area.

[0042] There are textures on the surface of the high-voltage electrical equipment. The textures belong to high-frequency information. The inherent textures of the high-voltage equipment surface usually have specific direction and scale rules (such as longitudinal casting texture and uniform grain feeling). The real defects (such as micro-cracks and electric erosion pits) are usually "abnormal destruction" of such regular patterns, and their direction and scale are different from the background. Therefore, the local texture intensity and anisotropy are acquired and quantified, and the response of the Laplace operator is adaptively adjusted.

[0043] Therefore, gradient information of each pixel point needs to be acquired first. Taking a to-be-analyzed image as an example, specifically, the Sobel operator is used to calculate the horizontal direction gradient and the vertical direction gradient of each pixel point in the to-be-analyzed image. Then, the gradient amplitude of the pixel point is acquired according to the horizontal direction gradient and the vertical direction gradient of the pixel point in the to-be-analyzed image. It should be noted that the acquisition of the pixel point gradient is prior art, and therefore will not be described in detail here. Thus, the horizontal direction gradient , the vertical direction gradient and the gradient amplitude of each pixel point can be acquired.

[0044] In step S2, the local texture intensity of a pixel point in the to-be-analyzed image is acquired based on the gradient amplitudes of the pixel points in the window centered on the pixel point; the structure tensor is constructed according to the horizontal direction gradient and the vertical direction gradient of the pixel point and the pixel points in the neighborhood of the pixel point; and the local anisotropy coefficient of the pixel point is acquired based on the eigenvalues of the structure tensor corresponding to the pixel point.

[0045] The gradient amplitudes of the pixel points are acquired by the above steps, and further, the local texture intensity of the pixel point is calculated according to the gradient amplitude of each pixel point. Specifically, the local texture intensity of a pixel point in a to-be-analyzed image is calculated by calculating the mean value of the gradient amplitudes of all the pixel points in the window centered on the pixel point , wherein i represents the i-th pixel point in a to-be-analyzed image; in addition, the size of the window is w x w, and the reference value of w is 15. The window size should be large enough to contain sufficient background texture periods, but should not be too large to smooth out defects. Thus, the local texture intensity of each pixel point in the to-be-analyzed image can be obtained. The higher the local texture intensity value of a pixel point is, the rougher the surrounding area of the pixel point is, and the more edges the pixel point has.

[0046] Further, the local anisotropy coefficient of each pixel point needs to be analyzed and calculated, and the purpose is to quantify the direction consistency of the local texture, that is, whether all directions have edges or mainly concentrate in one direction. The background texture often has anisotropy, that is, the energy concentrates in one direction, while the defects exhibit isotropy, that is, the energy is relatively uniform in all directions.

[0047] Firstly, a structure tensor is constructed according to the horizontal direction gradient and the vertical direction gradient of a pixel point and the pixel points in the neighborhood of the pixel point; specifically, the sum of the squares of the horizontal direction gradients of the pixel point and the pixel points in the neighborhood of the pixel point is calculated, denoted as a first element; the sum of the squares of the vertical direction gradients of the pixel point and the pixel points in the neighborhood of the pixel point is calculated, denoted as a second element; the sum of the products of the horizontal direction gradient and the vertical direction gradient of each pixel point in the pixel point and the pixel points in the neighborhood of the pixel point is calculated, denoted as a third element; and the structure tensor of the pixel point is constructed according to the first element, the second element and the third element.

[0048] The specific model of the structure tensor is as follows:

[0049] wherein J represents the structure tensor of a pixel point; represents the square of the horizontal direction gradient of the a-th pixel point in the pixel point and the pixel points in the neighborhood of the pixel point, the neighborhood being an eight-neighborhood, that is, the square of the horizontal direction gradient of the a-th pixel point in the nine pixel points of the eight-neighborhood and the pixel point itself, being the first element; and represent the horizontal direction gradient and the vertical direction gradient of the a-th pixel point in the pixel point and the pixel points in the neighborhood of the pixel point, respectively, representing the third element; represents the square of the vertical direction gradient of the a-th pixel point in the pixel point and the pixel points in the neighborhood of the pixel point, being the second element.

[0050] The eigenvalues of the structure tensor J are calculated by solving the characteristic equation , wherein , that is wherein I is an identity matrix, and the calculation formula for solving the eigenvalues is as follows: , wherein tr is a trace (sum of diagonals) and det is a determinant. Two eigenvalues are obtained by solving, denoted as .

[0051] Then, the local anisotropy coefficient of the pixel point is obtained by calculating according to the eigenvalues of the structure tensor of the pixel point. Specifically, the two eigenvalues of the structure tensor corresponding to the pixel point are denoted as a first eigenvalue and a second eigenvalue, respectively; and the local anisotropy coefficient of the pixel point 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.

[0052] The calculation model of the local anisotropy coefficient is as follows:

[0053] ​​

[0054] wherein A represents a local anisotropy coefficient of a pixel point, A=0 represents complete isotropy (uniform energy in each direction), and A=1 represents complete anisotropy (energy is completely concentrated in one direction); respectively represent a first eigenvalue and a second eigenvalue, represents gradient energy of a main direction, represents gradient energy of a vertical direction.

[0055] Further, Laplace filtering is needed to be performed on the image to be analyzed, specifically, a Laplace kernel is used to perform convolution operation with the image to be analyzed, the Laplace kernel adopts , and the purpose is to obtain high-frequency components including defects and textures, and the image to be analyzed after Laplace filtering is denoted as .

[0056] In step S3, a weight of a pixel point is obtained according to a local texture intensity and a local anisotropy coefficient of the pixel point; and a first feature map is obtained by weighting the gray value of each pixel point in the image to be analyzed after Laplace filtering according to the weight of each pixel point in the image to be analyzed.

[0057] The local texture intensity and the local anisotropy coefficient of each pixel point are obtained, and the image to be analyzed after Laplace filtering is obtained, and thus the weight of each pixel point can be obtained according to the local texture intensity and the local anisotropy coefficient of each pixel point, and then the image to be analyzed after Laplace filtering is weighted and corrected according to the weight to obtain the first feature map.

[0058] Specifically, the weight of a pixel point is obtained by multiplying the product of a first preset value, a first adjustment constant and the local texture intensity of the pixel point, the product of a second adjustment constant and the local anisotropy coefficient of the pixel point, and then taking the inverse. Thus, the weight of each pixel point in an image to be analyzed can be obtained.

[0059] The calculation model of the weight of a pixel point is specifically as follows:

[0060] ;

[0061] wherein represents the weight of the i th pixel point in an image to be analyzed; represents the local texture intensity of the weight of the i th pixel point in the image to be analyzed; represents the local anisotropy coefficient of the weight of the i th pixel point in the image to be analyzed; respectively represent a first adjustment constant and a second adjustment constant, and are used to control the importance of the local texture intensity and the local anisotropy coefficient in the weight calculation, and the empirical value is taken as The first preset value is 1, and the purpose is to ensure that the denominator is not 0, and the maximum value of the weight is 1.

[0062] After obtaining the weight of each pixel point in the to-be-analyzed image, the gray value of each pixel point in the to-be-analyzed image subjected to Laplace filtering is multiplied by the weight of each pixel point in the to-be-analyzed image to obtain a first feature map.

[0063] The specific calculation model is as follows:

[0064]

[0065] Among them, The weight of the i-th pixel point in a to-be-analyzed image is represented as Wi; The gray value of the i-th pixel point in the to-be-analyzed image subjected to Laplace filtering is represented as Ii; The gray value of the i-th pixel point in the first feature map is represented as F1i.

[0066] Thus, the first feature map of each to-be-analyzed image equal to the original image (to-be-analyzed image) can be obtained.

[0067] In step S4, the standard deviation of the gray values of the pixel points in the window centered on a pixel point in the to-be-analyzed image is calculated as the local standard deviation of the pixel point; the first parameter and the second parameter are obtained according to the local standard deviations of the pixel points in the to-be-analyzed image; and two Gaussian kernels are constructed based on the first parameter and the second parameter to filter the to-be-analyzed image to obtain a second feature map.

[0068] After the above operation, the first feature map is obtained, which strengthens the edges, spots, isolated points, and fine lines in the image to a certain extent. Moreover, the part of the defect features is highlighted. In the image, it contains information of different scales. Large scale (low frequency) represents slow-changing background, illumination gradient, and the general shape of an object. Small scale (high frequency) usually represents noise, pixel-level random fluctuations, and very fine texture. Medium scale (medium frequency) usually represents the defect features that we care about, such as scratches, cracks, rust spots, and pits. These features are neither the overall light and dark changes of the entire image (large scale) nor irrelevant noise (small scale). The significance of the medium band filter enhancement lies in acting as a feature filter, which is designed to only allow information within a certain scale range to pass and be enhanced, while suppressing information of other scales.

[0069] Therefore, it is necessary to analyze the change of the pixel points around a pixel point in the to-be-analyzed image. Specifically, the standard deviation of the gray values of the pixel points in the window centered on a pixel point in the to-be-analyzed image is calculated as the local standard deviation of the pixel point.

[0070] ​Further, the first parameter and the second parameter are obtained according to the local standard deviation of each pixel point in the image to be analyzed.

[0071] Specifically, a histogram is established according to the local standard deviation of each pixel point in an image to be analyzed, and the mode in the histogram is obtained as the background texture intensity; the target intensity is obtained by comparing the background texture intensity with the first coefficient; the first parameter is obtained by comparing the third adjustment constant with the target intensity; and the second parameter is obtained by multiplying the second coefficient with the first parameter.

[0072] The first coefficient is Δk, and the reference value is 2. The purpose of introducing the first coefficient is to enhance the features whose texture intensity is about half of the background intensity (i.e. more subtle and more sharp features); the first parameter and the second parameter are Gaussian kernel standard deviations, which are 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 needed to smooth it out. Therefore, the first parameter is obtained by comparing the third adjustment constant with the target intensity Sta. The third adjustment constant is c, which is used to map the numerical range of Sta to a suitable range of Gaussian kernel standard deviation. The value range of c is c∈[10,20]. Further, the second coefficient γ (1.4<γ<1.8) is introduced to control the bandwidth of the DOC filter, and thus the second parameter is obtained by multiplying the second coefficient with the first parameter.

[0073] The calculation model of the first parameter obtained by the above process is:

[0074] ;

[0075] ;

[0076] wherein, is the first parameter, c represents the third adjustment constant, ΔS represents the background texture intensity corresponding to the image to be analyzed, Δk is the first coefficient, and Sta is the target intensity (Sta=ΔS / 2). γ is the second coefficient.

[0077] Thus, two key parameters (the first parameter and the second parameter) of the DOC (Gaussian Difference) are obtained, and two Gaussian kernels are constructed according to to filter an image to be analyzed, for example, a front light source image , that is:

[0078] ;

[0079] wherein, represents a Gaussian kernel with a standard deviation of (the first parameter) and the front light source image , to obtain a blurred image. This operation will remove the features in the image that are higher than the background texture intensity, and the features that are lower than the background texture intensity will be retained. representing smaller details (high frequency information), preserving more features than representing standard deviation (second parameter) of a Gaussian kernel and the positive face light image , obtaining a blurred image which is more blurred than the one obtained via preserving more coarse scale features than the one obtained via preserving relatively high frequency details (scales in the neighborhood), while preserving relatively low frequency details (scales in the neighborhood), after subtraction, the low frequency part common to both is cancelled and what remains is the features with scales in between and , i.e. the mid-band. Taking the absolute value gives Dm, the mid-band enhanced image, i.e. the second feature map.

[0080] So far, the first feature map and the second feature map of each image to be analyzed are obtained.

[0081] Step S5, 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; identifying the surface defect area of the high-voltage electrical apparatus based on the defect saliency map of each image to be analyzed.

[0082] After the above operation, the first feature map and the second feature map of each image to be analyzed are obtained, the places with high pixel values in the first feature map correspond to the regions with sharp changes in gray scale in the image, i.e. the edges of suspected defects, the second feature map can effectively enhance defects such as scratches and small rusts, while smoothing more subtle noises and larger background changes, therefore, by weighted fusion, the results of different scale enhancement are combined into a saliency map containing full-scale defect information.

[0083] Thus, 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. Specifically, the gray scale values of each pixel point in the first and second feature maps of the image to be analyzed are normalized and then weighted fused to obtain the defect saliency map of the image to be analyzed.

[0084] The specific calculation model is:

[0085] ;

[0086] wherein the Norm function normalizes the gray scale values of the pixel points in the first and second feature maps to In the range, the weight coefficients a and b (a+b=1) can be adjusted according to the emphasis of the defect type, for example, more attention is paid to microcracks, a=0.6 and b=0.4 are set, and thus the output fused defect saliency map is obtained, and the brighter the area in the map, the greater the possibility of defects, represents the first feature map, represents the second feature map.

[0087] Finally, the 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 analyzed to identify the surface defect area of the high-voltage electrical equipment.

[0088] Specifically, the defect saliency map corresponding to one image to be analyzed is uniformly divided into different image blocks, and the local threshold of each image block is obtained by OTSU algorithm; the initial defect binary mask in each image block is obtained by binarizing each image block using the local threshold of each image block; the final defect binary mask in the defect saliency map corresponding to one image to be analyzed is obtained by morphological processing on all image blocks in the defect saliency map corresponding to one image to be analyzed; the final defect binary mask in the defect saliency map corresponding to other images to be analyzed is obtained in the same way; if a connected region appears in the final defect binary mask in the defect saliency map corresponding to at least two images to be analyzed, the connected region is the surface defect area of the high-voltage electrical equipment.

[0089] The morphological processing is specifically: using the closing operation (first dilation and then erosion) to connect the disconnected defect edges, and then using the opening operation (first erosion and then dilation) to remove noise points with small areas to obtain the final binary defect mask.

[0090] Since the real defect is physically existing, it will show consistency under different illuminations; and the light and shadow interference is the product of the lighting geometry, which will change or disappear with the change of the light source angle, so the determination of the defect area by combining the final binary defect masks in the defect saliency maps corresponding to three images to be analyzed can improve the accuracy of the surface defect recognition of the high-voltage electrical equipment.

[0091] It should be noted that the above-mentioned order of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The above describes a specific embodiment of the present application. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or may be advantageous.

[0092] Each embodiment in the present specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other, and each embodiment mainly describes the difference from other embodiments.

[0093] The above merely provides the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

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 grayscale values ​​of all pixels 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 a first parameter and a second parameter based on the local standard deviations of all pixels in the image to be analyzed, including: constructing a histogram based on the local standard deviations of all pixels in the image to be analyzed, obtaining the mode of the histogram as the background texture intensity; comparing the background texture intensity with a first coefficient to obtain the target intensity; comparing a third adjustment constant with the target intensity to obtain the first parameter; multiplying the second coefficient by the first parameter to obtain the second parameter; and constructing two Gaussian kernels based on the first and second parameters to filter the image to be analyzed to obtain a second feature map, specifically: ; in, The standard deviation is the first parameter. Gaussian kernel and front light source image Perform a convolution operation to obtain a blurred image; The standard deviation is the second parameter. Gaussian kernel and front light source image Perform a convolution operation to obtain a blurred image. and After subtraction, the absolute value is taken to obtain Dm, which is the image after midband enhancement, also known as 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 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.

9. 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