Defect identification method for online power-taking movable intelligent anti-vibration hammer
By calculating the irregularity index and goodness of fit of the defect image of the vibration damper, and combining superpixel segmentation and cluster centers, the problem of inaccurate recognition caused by superpixel segmentation error is solved, and high-precision defect recognition is achieved.
Patent Information
- Application Number
- CN202310129204.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-02-17
AI Technical Summary
In existing technologies, the superpixel segmentation method for identifying defects in vibration dampers suffers from undersegmentation or oversegmentation, leading to inaccurate identification results.
By acquiring images of vibration damper defects, performing superpixel segmentation, calculating the irregularity index of pixels, determining the defect region based on the first and second coefficients, and combining the fitting degree of cluster center pixels for fine segmentation to identify the defect location.
It improves the accuracy of surface defect identification of vibration dampers, accurately identifies defect areas, and reduces segmentation errors.
Smart Images

Figure CN115984255B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, specifically to a defect identification method for an online energy-harvesting, movable, intelligent vibration damping hammer. Background Technology
[0002] In the construction of power transmission lines, high-voltage overhead lines are often positioned high on poles with large gaps between conductors. The stability of these conductors is easily affected by wind, posing a safety hazard to the high-voltage circuit. To eliminate this hazard, vibration dampers are suspended on high-voltage overhead lines to reduce conductor vibration and enhance conductor stability.
[0003] Because vibration dampers are constantly exposed to the elements, they are susceptible to corrosion from rain and other environmental factors, leading to defects on their surface and affecting their normal operation. Therefore, defect identification of vibration dampers on high-voltage power lines is crucial. Existing methods for defect identification using machine vision often employ superpixel segmentation. However, this method may suffer from under-segmentation or over-segmentation, resulting in segmentation errors and inaccurate superpixel segmentation results, which in turn affect the accuracy of the obtained defect locations on the vibration dampers. Summary of the Invention
[0004] To address the technical problem of inaccurate defect identification results in vibration damping hammers due to segmentation errors in superpixel segmentation, the present invention aims to provide a defect identification method for an online energy-harvesting, movable, intelligent vibration damping hammer. The specific technical solution adopted is as follows:
[0005] The image containing defects on the surface of the vibration damper is obtained by recognizing the image, and is recorded as the vibration damper defect image. The vibration damper defect image is segmented into superpixels to obtain at least two superpixel blocks. The irregularity index of the pixel is obtained based on the pixel difference between the pixel in the superpixel block and its neighboring pixels.
[0006] The pixels within a superpixel block are classified into at least two categories based on the irregularity index of the pixels. Within each superpixel block, a first coefficient is calculated based on the number of pixels in each category and the irregularity index of the pixels. Defect areas are determined based on the irregularity index of pixels in superpixel blocks whose first coefficient is less than or equal to a coefficient threshold and the index threshold. Superpixel blocks whose first coefficient is greater than the coefficient threshold are identified as marker pixel blocks. The edge pixels within the marker pixel blocks are traversed using a window of a set size. A second coefficient is calculated based on the number of pixels belonging to the marker pixel blocks within the window. The difference degree of the marker pixel blocks is obtained based on the first coefficient and the second coefficient.
[0007] The pixel blocks with a difference greater than the judgment threshold are marked as the pixel blocks to be analyzed. The cluster center pixel of the pixel block to be analyzed is obtained. The fitting degree of the pixel is obtained based on the difference in the irregularity index between the pixel points in the pixel block to be analyzed and the cluster center pixel. The pixel points are labeled according to the fitting degree to obtain the first mask image. The defect position of the vibration damper surface is obtained based on the first mask image and the defect area.
[0008] Preferably, the method for obtaining the first coefficient is as follows:
[0009] All pixels within the same category have the same irregularity index, and the irregularity index corresponding to the category is the irregularity index of the pixels within that category. For any superpixel block, obtain the irregularity index corresponding to each category and the number of pixels contained in each category. Calculate the product of the irregularity index corresponding to each category and the number of pixels contained in each category, and record it as the feature index of the category. Obtain the first coefficient based on the difference between the feature indices of each category within the superpixel block.
[0010] Preferably, the formula for calculating the first coefficient is as follows:
[0011]
[0012] in, This represents the first coefficient corresponding to superpixel block K. This represents the number of pixels contained within category m of the superpixel block. This represents the irregularity index corresponding to category m within a superpixel block. This represents the number of pixels contained within category n within a superpixel block. This represents the irregularity index corresponding to category n within a superpixel block. This represents all categories contained within superpixel block K. This represents the feature index of category m within a superpixel block. This represents the feature index of category n within a superpixel block.
[0013] Preferably, the method for obtaining the second coefficient is as follows:
[0014] The defect image of the vibration damper is meshed to obtain the size of the mesh; any marker pixel block is selected as the target superpixel block, and the edge pixels of the target superpixel block are obtained. The edge pixels in the target superpixel block are traversed using a window of the same size as the mesh. The ratio of the total number of pixels belonging to the target superpixel block in the window to the total number of pixels contained in the window is calculated. The difference between the set value and the ratio is recorded as the feature ratio, and the variance of the feature ratio is the second coefficient.
[0015] Preferably, the step of obtaining the difference degree of the marker pixel block based on the first coefficient and the second coefficient specifically involves:
[0016] The sum of the first coefficient and the second coefficient is calculated, and the sum is positively correlated to obtain the difference degree of the marker pixel block.
[0017] Preferably, the step of obtaining the irregularity index of a pixel based on the pixel difference between a pixel within a superpixel block and its neighboring pixels specifically involves:
[0018] The vibration damper defect image is an RGB image. The vibration damper defect image is converted from the RGB color space to the CIELAB color space. The channel values of each pixel in the converted image are obtained in the L, A, and B channels respectively. For any pixel in each superpixel block, the square of the difference between the pixel and its neighboring pixels in the L channel is calculated, the square of the difference between the pixel and its neighboring pixels in the A channel is calculated, and the square of the difference between the pixel and its neighboring pixels in the B channel is calculated. The sum of the squares of the corresponding differences of the pixel in the L, A, and B channels is used as the irregularity index of the pixel.
[0019] Preferably, the method for obtaining the degree of fit is as follows:
[0020] The superpixel blocks adjacent to the pixel block to be analyzed are obtained and denoted as adjacent pixel blocks. The cluster center pixels of the adjacent pixel blocks are obtained. The square of the difference between the irregularity index of the pixel point in the pixel block to be analyzed and the corresponding cluster center pixel point is calculated and denoted as the first feature value. The square of the difference between the irregularity index of the pixel point in the pixel block to be analyzed and the corresponding cluster center pixel point of the adjacent pixel block is calculated and denoted as the second feature value. The minimum value of the difference between the second feature value and the first feature value is used as the goodness of fit of the pixel point.
[0021] Preferably, the step of labeling the pixels according to the fitting degree to obtain the first mask image specifically involves:
[0022] Pixels with a fit greater than the fit threshold are labeled as the first value, and pixels with a fit less than or equal to the fit threshold are labeled as the second value, thus obtaining the first mask image.
[0023] Preferably, obtaining the defect location on the surface of the vibration damper based on the first mask image and the defect specifically involves:
[0024] Pixels within the defect area are labeled with a first value, and pixels not belonging to the defect area are labeled with a second value to obtain a second mask image. The first mask image and the second mask image are added together, and the image obtained by addition is multiplied with the vibration damper defect image to obtain a defect segmentation image. Edge detection is performed on the defect segmentation image, and the area formed by the detected closed edges is the defect part area on the vibration damper surface, thus obtaining the defect location on the vibration damper surface.
[0025] Preferably, the step of determining the defect region based on the irregularity index of pixels within a superpixel block whose first coefficient is less than or equal to a coefficient threshold and an index threshold specifically involves:
[0026] Superpixel blocks with a first coefficient less than or equal to the coefficient threshold are identified as preferred pixel blocks. The mean of the irregularity index of all pixels within the preferred pixel block is calculated. Preferred pixel blocks with a mean greater than the index threshold are identified as defective regions.
[0027] The embodiments of the present invention have at least the following beneficial effects:
[0028] This invention acquires images containing defects on the surface of a vibration damper by recognizing images, denoted as vibration damper defect images. The acquired image information undergoes preliminary processing to filter out images with defects for subsequent defect identification. Superpixel segmentation is performed on the vibration damper defect images. An irregularity index is obtained based on the pixel differences between pixels within a superpixel block and their neighboring pixels, considering the pixel distribution differences between a pixel and its neighboring pixels, reflecting the degree of irregularity in the pixel distribution around a pixel within a superpixel block. Pixels within the superpixel block are classified according to the degree of irregularity. A first coefficient is calculated based on the number of pixels in each category within the superpixel block and the pixel's irregularity index. The first coefficient characterizes the differences in pixel distribution features among pixels within the superpixel block. For superpixel blocks with smaller first coefficients, the differences in pixel distribution features among pixels are smaller, and the corresponding superpixel block segmentation results are more accurate. Finally, the irregularity index of pixels within superpixel blocks with first coefficients less than or equal to a coefficient threshold and an index threshold are used to determine... For defect regions, filtering superpixel blocks with a first coefficient less than or equal to a threshold yields relatively accurate defect regions. Superpixel blocks with a first coefficient greater than the threshold have less accurate segmentation results and require further analysis. A second coefficient is calculated based on the number of pixels belonging to the marker pixel block within the window. This second coefficient characterizes the difference between the shape distribution features and grid distribution of the superpixel blocks corresponding to the marker pixel block. Combining the first and second coefficients yields the difference degree of the marker pixel block. Based on this difference degree, the region corresponding to the defective part with segmentation error can be identified, i.e., the pixel block to be analyzed. This pixel block with segmentation error is then finely segmented. The fit degree of the pixel is obtained based on the difference in irregularity index between the pixels within the pixel block to be analyzed and the cluster center pixels. Considering the difference between the pixels within the pixel block to be analyzed and the cluster center pixels, the finely segmented defective part can be identified. Combined with the accurate defect region, a relatively accurate defect identification result can be obtained. This invention considers the case of over-segmentation error in superpixel segmentation, resulting in high accuracy in identifying the location of surface defects on the vibration damper. Attached Figure Description
[0029] 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.
[0030] Figure 1 This is a flowchart of a defect identification method for an online energy-harvesting, movable, intelligent vibration damping hammer according to the present invention. Implementation
[0031] 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 defect identification method for an online energy-harvesting movable intelligent vibration damping hammer proposed according to 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.
[0032] 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.
[0033] The following description, in conjunction with the accompanying drawings, details the specific scheme of the defect identification method for an online energy-harvesting movable intelligent vibration damper provided by the present invention. Example
[0034] Please see Figure 1 The diagram illustrates a method flowchart for defect identification of an online energy-harvesting movable smart vibration damper according to an embodiment of the present invention. The method includes the following steps:
[0035] Step 1: Obtain an image of the surface of the vibration damper containing defects by recognizing the image, and record it as the vibration damper defect image; perform superpixel segmentation on the vibration damper defect image to obtain at least two superpixel blocks, and obtain the irregularity index of the pixel based on the pixel difference between the pixel in the superpixel block and its neighboring pixels.
[0036] First, considering the high safety height of the vibration damper on the high-voltage overhead line, it is difficult to manually install a camera to identify and obtain the image of the vibration damper. Therefore, in this embodiment of the invention, a drone is used to obtain the surface image of the vibration damper on the high-voltage conductor. At the same time, the surface image of the vibration damper obtained by the drone is an RGB image.
[0037] Because the acquisition of surface images of vibration dampers using drones is affected by environmental factors, resulting in noise interference in the obtained images, denoising processing is necessary. Various methods exist for image denoising; in this embodiment of the invention, median filtering denoising technology is used to obtain the surface image of the vibration damper. Furthermore, median filtering denoising technology is a well-known technique and will not be described in detail here.
[0038] It should be noted that before accurately classifying and identifying corrosion defects on the surface of the vibration damper, a rough analysis of the vibration damper surface is required to screen out vibration dampers with surface corrosion defects. Specifically, the method for obtaining the vibration damper defect images involves acquiring a dataset of vibration damper surface images, using a neural network to identify defects in the dataset, and obtaining surface images of vibration dampers containing defects, denoted as vibration damper defect images.
[0039] Specifically, in this embodiment, a neural network is used to identify defects in the surface images of the vibration damper in the dataset. The neural network adopts the ResNet50 model. The implementer can choose according to the actual situation. For example, a DNN semantic segmentation network can also be selected to segment and identify corrosion defects in the surface images of the vibration damper.
[0040] The neural network-related content includes: the dataset used by the neural network is obtained by recognizing images to acquire surface images of the vibration damper; the labeling process for the training set is as follows: pixels labeled as 1 represent pixels in the vibration damper surface image that contain corrosion defects, and pixels labeled as 0 represent pixels in the vibration damper surface image that do not contain corrosion defects; the loss function of the neural network is the cross-entropy loss function.
[0041] Then, based on the output of the neural network classification model, it is determined whether each vibration damper surface image contains corrosion defects. Vibration damper surface images containing corrosion defects need to be further analyzed in detail. Therefore, vibration damper surface images containing corrosion defects are recorded as vibration damper defect images.
[0042] It should be noted that corrosion defects on the surface of vibration dampers are mostly caused by atmospheric corrosion or natural environmental factors such as rain and snow. These corrosion defects not only alter the original color of the vibration damper surface but also disrupt the smoothness of the entire surface area. Vibration damper defect images generally contain two types of pixels: pixels belonging to the corrosion defect area and pixels belonging to the non-corrosion defect area.
[0043] Then, the defect image of the vibration damper is segmented into multiple superpixel blocks using a superpixel segmentation algorithm. Superpixel segmentation refers to grouping pixels based on the similarity of features between pixels. In this embodiment, the k value in the superpixel segmentation algorithm is 200, and the implementer can set it according to the specific implementation scenario.
[0044] Because superpixel segmentation algorithms are prone to misclassifying pixels from different regions into the same superpixel block, or to undersegmenting or oversegmenting different types of pixels, accurate defect information requires analysis of the vibration damper defect image after superpixel segmentation. The edges of the superpixel blocks corresponding to defective regions differ significantly from those corresponding to normal regions. While the edges of the superpixel blocks in normal regions might be the edges of the vibration damper surface, corrosion defects disrupt these edge features, particularly the directional consistency of edge pixels, and also alter the original, relatively regular contour of the vibration damper. Therefore, the edges of the superpixel blocks corresponding to defective regions exhibit irregular lines. Furthermore, corrosion on the vibration damper surface also destroys its original color characteristics.
[0045] Considering the darker color characteristics of corrosion defects on the surface of the vibration damper, the defect image of the vibration damper was converted from the RGB color space to the CIELAB color space to obtain more obvious pixel information. The color space conversion is a well-known technique, and the specific process will not be described in detail.
[0046] The channel values of each pixel in the converted image are obtained in the L, A, and B channels respectively. For any pixel within each superpixel block, the difference in pixel value between that pixel and its neighboring pixels is obtained. This difference reflects the difference in color features between the pixel and its neighbors. In this embodiment, the pixels within the eight-neighborhood of the obtained pixel are denoted as neighboring pixels.
[0047] Specifically, for any pixel within each superpixel block, the square of the difference between the pixel and its neighboring pixels in the L channel is calculated, the square of the difference between the pixel and its neighboring pixels in the A channel is calculated, and the square of the difference between the pixel and its neighboring pixels in the B channel is calculated. The sum of the squares of the corresponding differences of the pixel in the L, A, and B channels is used as the irregularity index of the pixel.
[0048] The irregularity index of the pixel is expressed by the formula:
[0049]
[0050] in, This represents the irregularity index of the i-th pixel. This represents the difference in channel values of the i-th pixel and its j-th neighboring pixel in the L channel. This represents the difference in channel value of the i-th pixel and its j-th neighboring pixel in channel A. This represents the difference in channel value of the i-th pixel and its j-th neighboring pixel in the B channel. This represents the number of neighboring pixels within the neighborhood of the i-th pixel, which is 8 in this embodiment.
[0051] , and This reflects the difference between the channel values of the i-th pixel and its j-th neighboring pixel in the three channels. The larger the difference, the greater the difference in color distribution between the i-th pixel and its surrounding pixels, and the larger the value of the irregularity index corresponding to the i-th pixel. Conversely, the smaller the difference, the smaller the difference in color distribution between the i-th pixel and its surrounding pixels, and the smaller the value of the irregularity index corresponding to the i-th pixel.
[0052] The irregularity index characterizes the degree of irregularity in the color distribution around a pixel within a superpixel block, reflecting the difference in color distribution between a pixel and its neighboring pixels. The larger the value of the irregularity index, the greater the degree of irregularity in the color distribution around the pixel, indicating a greater difference in color distribution between the pixel and its neighboring pixels. Conversely, the smaller the value of the irregularity index, the smaller the degree of irregularity in the color distribution around the pixel, indicating a smaller difference in color distribution between the pixel and its neighboring pixels.
[0053] Step 2: Classify the pixels within a superpixel block according to the irregularity index of the pixels to obtain at least two categories. Within each superpixel block, calculate a first coefficient based on the number of pixels in each category and the irregularity index of the pixels. Defect areas are determined based on the irregularity index of pixels in superpixel blocks whose first coefficient is less than or equal to a coefficient threshold and the index threshold. Superpixel blocks whose first coefficient is greater than the coefficient threshold are recorded as marker pixel blocks. The pixels within each marker pixel block are traversed using a window of a set size. A second coefficient is calculated based on the number of pixels belonging to the marker pixel block within the window. The difference degree of the marker pixel block is obtained based on the first coefficient and the second coefficient.
[0054] First, following the scheme in step one, the irregularity index of all pixels within each superpixel block is calculated. This irregularity index is then used as a category indicator. In the vibration damper defect image converted to the CIELAB color space, the pixels within the superpixel block are classified, resulting in at least two categories. Within each category, all pixels have the same irregularity index; that is, one category corresponds to one value for the irregularity index. In this embodiment, the k-means clustering algorithm is used for pixel classification, but the implementer can choose an alternative based on the specific circumstances.
[0055] It should be noted that although pixels within a superpixel block have similar characteristics, undersegmentation or oversegmentation may still occur. Therefore, further analysis is needed for superpixel blocks with segmentation errors.
[0056] Then, the categories of all pixels within each superpixel block and the number of pixels within each category are counted. The distribution of pixels within a superpixel block can be categorized into four types: Scenario 1: The superpixel block is located inside a normal region of the image. In this case, the pixels within the superpixel block have similar characteristics, the color distribution difference between the pixel and its surrounding pixels is small, and the corresponding irregularity index is also small. Additionally, the proportion of pixels belonging to the normal region within the superpixel block is relatively large. Scenario 2: The superpixel block is located inside a defective region of the image. In this case, the pixels within the superpixel block also have similar characteristics, the color distribution difference between the pixel and its surrounding pixels is small, and the corresponding irregularity index is also small. Additionally, the proportion of pixels belonging to the defective region within the superpixel block is relatively large.
[0057] Case 3 involves pixels within a superpixel block that include both normal and defective regions. Case 4 involves pixels within a superpixel block that include defective regions with varying degrees of erosion. In cases 3 and 4, the features of pixels within the superpixel block are less similar, and the color distribution of a pixel differs significantly from that of its surrounding pixels. Consequently, the irregularity index is also greater, and the proportion of pixels with significant color distribution differences within the superpixel block is relatively small.
[0058] Based on this, all pixels within the same category have the same irregularity index, and the irregularity index corresponding to the category is the irregularity index of the pixels within that category. For any superpixel block, obtain the irregularity index corresponding to each category and the number of pixels contained in each category, calculate the product of the irregularity index corresponding to each category and the number of pixels contained in each category, and record it as the feature index of the category. Obtain the first coefficient based on the difference between the feature indices of each category within the superpixel block.
[0059] Since the irregularity index of pixels within each category is the same, each category corresponds to one irregularity index. The product of the irregularity index corresponding to a category and the number of pixels contained in that category represents the sum of the irregularity indices of all pixels within that category. In other words, the feature index of a category can reflect the overall irregularity index value of pixels within that category. By obtaining the difference between the feature indices of each category within a superpixel block, the differences in the irregularity indices of pixels from different categories within the superpixel block are reflected.
[0060] The specific formula for calculating the first coefficient is as follows:
[0061]
[0062] in, This represents the first coefficient corresponding to superpixel block K. This represents the number of pixels contained within category m of the superpixel block. This represents the irregularity index corresponding to category m within a superpixel block. This represents the number of pixels contained within category n within a superpixel block. This represents the irregularity index corresponding to category n within a superpixel block. This represents all categories contained within superpixel block K. This represents the feature index of category m within a superpixel block. This represents the feature index of category n within a superpixel block.
[0063] The larger the value of , the more pixels belonging to category m are within the superpixel block. The larger the value of the corresponding irregularity index, the greater the color distribution difference between the pixels of category m within the superpixel block and their surrounding pixels. The smaller the value of , the fewer the number of pixels belonging to category m within the superpixel block. The smaller the value of the corresponding irregularity index, the smaller the color distribution difference between the pixels of category m within the superpixel block and the surrounding pixels. Analysis of the changes in the value of The changes in the value of are similar.
[0064] This represents the difference between the feature indices corresponding to category m and category n. The larger the difference, the greater the difference between the irregularity index of the pixels contained in category m and the irregularity index of the pixels contained in category n within the superpixel block. In this case, the feature similarity between the pixels within the superpixel block is smaller. The larger the value of the corresponding first coefficient, the more likely the superpixel block is to have undersegmentation or oversegmentation.
[0065] The first coefficient characterizes the differences in color distribution features among pixels within a superpixel block. A larger value for the first coefficient indicates a greater difference in color distribution features among pixels within the superpixel block, suggesting that the superpixel block is more likely to be under-segmented or over-segmented. Conversely, a smaller value for the first coefficient indicates a smaller difference in color distribution features among pixels within the superpixel block, suggesting that the superpixel block is less likely to be under-segmented or over-segmented.
[0066] A coefficient threshold is set. Different vibration damper surfaces may have varying color characteristics, so the coefficient threshold value varies depending on the surface color characteristics of the vibration damper. Implementers can set it according to the actual situation. Defect areas can be determined based on the irregularity index of pixels within superpixel blocks whose first coefficient is less than or equal to the coefficient threshold, and the index threshold. Specifically, superpixel blocks with a first coefficient less than or equal to the coefficient threshold are designated as preferred pixel blocks. The color distribution characteristics between pixels within preferred pixel blocks are relatively small, resulting in more accurate segmentation and eliminating the need for further analysis. Further filtering of preferred pixel blocks can yield more accurately segmented defect areas. The mean value of the irregularity index of all pixels within a preferred pixel block is calculated. Preferred pixel blocks with a mean value greater than the index threshold are designated as defect areas. The index threshold value varies depending on the degree of corrosion defects on the vibration damper surface, and implementers can set it according to the actual situation.
[0067] Furthermore, superpixel blocks with a first coefficient greater than the coefficient threshold are designated as marker pixel blocks. If the color distribution characteristics of pixels within a marker pixel block differ significantly, it indicates that the marker pixel block is more likely to be under-segmented or over-segmented. Therefore, further analysis of the marker pixel block is required.
[0068] A superpixel block is a pixel block formed by grouping pixels that have a certain degree of similarity to a seed point. After meshing an image, if the superpixel block is obtained by segmenting pixels within a normal region, the edge of the superpixel block will fit the edge of the mesh well, regardless of the size of the superpixel block. However, if the superpixel block is obtained by segmenting pixels within a defective region, the edge of the superpixel block will fit the edge of the adjacent mesh well, regardless of the degree of defect.
[0069] Based on this, the defect image of the vibration damper after conversion to the CIELAB color space is meshed, the size of the mesh is obtained, any one of the marker pixels is selected as the target superpixel block, the edge pixels of the target superpixel block are obtained, and the edge pixels in the target superpixel block are traversed using a window of the same size as the mesh. The ratio between the total number of pixels belonging to the target superpixel block in the window and the total number of pixels contained in the window is calculated. The difference between the set value and the ratio is recorded as the feature ratio, and the variance of the feature ratio is the second coefficient.
[0070] Meanwhile, when traversing the edge pixels of the marker pixel block using a window of a set size, one edge pixel corresponds to one window, and therefore one edge pixel corresponds to one feature ratio. In this embodiment, the set size of the window is the same as the size of the grid. The specific method for traversing the edge pixels is to use each edge pixel as the center point of the window, starting from the edge pixel at the top left corner of the marker pixel block, and traversing each edge pixel in a left-to-right and top-to-bottom order. The implementer can also set it according to the actual situation.
[0071] The area of the window is represented by the total number of pixels contained within the window, and the area of the marker pixel block within the window is represented by the total number of pixels belonging to the marker pixel block. Thus, the ratio between the area of the marker pixel block and the total area of the window can be obtained. The difference between the set value and the ratio is calculated to obtain the feature ratio. In this embodiment, the set value is 1, so the feature ratio corresponding to the edge pixel can reflect the degree of fitting between the edge pixel of the marker pixel block and the grid.
[0072] The specific formula for calculating the second coefficient is as follows:
[0073]
[0074]
[0075] in, This represents the second coefficient corresponding to the marker pixel block P. Indicates the first pixel of the marker pixel block P l The feature ratio corresponding to each edge pixel. Indicates the first l The total number of pixels within the window corresponding to each edge pixel that belong to the marker pixel block P. Indicates the first l The total number of pixels contained within the window corresponding to each edge pixel. This represents the mean of the feature ratios corresponding to all edge pixels of the marker pixel block P. This indicates the total number of edge pixels contained in the marker pixel block P.
[0076] This represents the ratio of the area of the marker pixel block within the window to the window area. This ratio reflects the degree of fit between the edge of the marker pixel block and the grid edge at the edge pixel points. The larger the ratio, the smaller the feature ratio, indicating that the feature ratio is closer to the first pixel. l The greater the fit between the edge of the marker pixel block at the nth edge pixel and the grid edge, the better the fit at the nth edge pixel. l The more regular the edge of the pixel block at each edge pixel point, the better.
[0077] The variance of the feature ratios corresponding to all edge pixels of the marker pixel block is represented by this value. The larger the variance, the larger the value of the second coefficient, indicating that the feature ratios corresponding to the edge pixels of the marker pixel block are more volatile. This means that the degree of fit between the edge of the marker pixel block and the grid edge is more volatile at the edge pixels. The more irregular the edge of the marker pixel block is, the greater the possibility that there are defective parts in the marker pixel block.
[0078] Finally, the first coefficient characterizes the difference in color distribution features among pixels within the superpixel block corresponding to the marker pixel block, and the second coefficient characterizes the difference in shape distribution features and grid distribution between the superpixel block and the marker pixel block. Then, considering both the color distribution differences among pixels within the superpixel block and the fitting degree between the superpixel block edge and the grid edge, the difference degree of the superpixel block is obtained based on the first and second coefficients. This is achieved by calculating the sum of the first and second coefficients and performing a positive correlation mapping on the sum to obtain the difference degree of the marker pixel block, expressed by the formula:
[0079]
[0080] in, This indicates the degree of difference corresponding to the marker pixel block P. This represents the first coefficient corresponding to the marker pixel block P. This represents the second coefficient corresponding to the marker pixel block P, and exp() represents an exponential function with the natural constant e as the base.
[0081] Generally, the differences between non-seed point pixels within a superpixel block are small. However, if the superpixel block corresponding to the marker pixel block is under-segmented or over-segmented, the distribution differences between pixels within the marker pixel block will be large, and the corresponding first coefficient will... The larger the value of the second coefficient, the greater the difference in the marker pixel blocks; The larger the value, the greater the fluctuation in the fitting degree between the edge of the superpixel block corresponding to the marker pixel block and the grid edge. The more likely the marker pixel block is to be a region with defects, and the greater the difference between the corresponding marker pixel blocks.
[0082] The difference in the marker pixel block reflects the differences in color distribution characteristics between pixels within the marker pixel block, as well as the differences between the marker pixel block edge and the grid edge. The greater the difference in the marker pixel block, the greater the differences in color distribution characteristics between pixels within the marker pixel block, and the greater the differences between the marker pixel block edge and the grid edge.
[0083] Step 3: Mark the pixel blocks with a difference greater than the judgment threshold as the pixel blocks to be analyzed, obtain the cluster center pixel of the pixel blocks to be analyzed, obtain the fitting degree of the pixel points based on the difference in irregularity index between the pixel points in the pixel blocks to be analyzed and the cluster center pixel, label the pixel points based on the fitting degree to obtain the first mask image, and obtain the defect position on the surface of the vibration damper based on the first mask image and the defect area.
[0084] First, a judgment threshold is set. In this embodiment, the judgment threshold is the average difference of all superpixel blocks. The implementer can set it according to the actual situation. The larger the difference value of the marker pixel block, the more likely it belongs to the region corresponding to the defective part with segmentation error. Therefore, it is necessary to analyze the marker pixel blocks with a difference value greater than the judgment threshold and record the superpixel blocks with a difference value greater than the judgment threshold as the pixel blocks to be analyzed. Then, it is necessary to refine the pixel blocks to be analyzed. This is because the size of the region corresponding to the defective part is different, and under-segmentation is easy to occur during superpixel segmentation. Some isolated pixels are divided into edge points of superpixel blocks.
[0085] Each superpixel block corresponds to a cluster center pixel. The superpixel segmentation algorithm groups pixels with image features similar to the cluster center pixel into a single superpixel block. Therefore, a pixel should have high similarity to the cluster center pixel of its superpixel block and low similarity to other cluster center pixels. It should be noted that the cluster centers change continuously during the superpixel segmentation process. To facilitate the analysis of the differences between pixels within a superpixel block and the cluster centers, in this embodiment, the pixel corresponding to the last cluster center during the superpixel segmentation iteration of the vibration damper defect image is selected as the cluster center pixel.
[0086] In step two, for cases three and four, the similarity between the edge pixels of the defect region and the cluster center pixels should satisfy the following condition: the pixel should have a high similarity to the cluster center pixels of its own superpixel block, and a low similarity to the cluster center pixels of other superpixel blocks. Based on this, a pixel fitting degree is constructed, which can characterize the degree of similarity between the edge pixels of a superpixel block and the cluster center pixels.
[0087] Specifically, the superpixel blocks adjacent to the pixel block to be analyzed are denoted as adjacent pixel blocks, and the cluster center pixels of the adjacent pixel blocks are obtained. The square of the difference between the irregularity index of the pixel point in the pixel block to be analyzed and the corresponding cluster center pixel point is calculated and denoted as the first feature value. The square of the difference between the irregularity index of the pixel point in the pixel block to be analyzed and the corresponding cluster center pixel point of the adjacent pixel block is calculated and denoted as the second feature value. The minimum value of the difference between the second feature value and the first feature value is taken as the goodness of fit of the pixel point, which is expressed by the formula:
[0088]
[0089] in, This represents the goodness of fit of pixel x, which is located within the inner edge of the pixel block w to be analyzed. This represents the irregularity index of pixel x. This represents the irregularity index of the cluster center pixel corresponding to the pixel block w to be analyzed. This represents the irregularity index of the cluster center pixel corresponding to adjacent pixel block o. This represents all superpixel blocks contained in the image, and min() represents the function to find the minimum value.
[0090] This represents the difference between the irregularity index of pixel x and the cluster center pixel of the pixel block to be analyzed. The smaller the difference, the more likely pixel x belongs to the pixel block to be analyzed. This represents the difference between the irregularity index of pixel x and the cluster center pixel of the adjacent pixel block. The larger the difference, the greater the difference between pixel x and the adjacent superpixel block, and the more likely pixel x belongs to the pixel block w to be analyzed.
[0091] The larger the value of , the better. The smaller the value, the better. The larger the value of , the greater the similarity between pixel x and the cluster center pixel of its superpixel block, and the smaller the similarity between pixel x and its neighboring superpixel blocks. Therefore, choosing The minimum value is used as the goodness of fit for pixel x. When the minimum value is also greater than the fitting threshold, it indicates that the pixel x is more likely to belong to the superpixel block corresponding to the pixel block to be analyzed.
[0092] Furthermore, the fitting degree is calculated for the edge pixels of each pixel block to be analyzed, and a fitting threshold is set. The value of the fitting threshold varies depending on the degree of surface defects of the vibration damper, and the implementer can set it according to the actual situation. When the fitting degree of a pixel is greater than the fitting threshold, it is considered that the pixel and the corresponding cluster center pixel of its superpixel block belong to the same class of pixels. Pixels with a fitting degree greater than the fitting threshold are labeled with a first value, and pixels with a fitting degree less than or equal to the fitting threshold are labeled with a second value, thus obtaining the first mask image. The part labeled with the first value in the first mask image is the defect part processed by fine segmentation.
[0093] The pixels within the defect area are labeled with a first value, and the pixels not belonging to the defect area are labeled with a second value to obtain a second mask image; then the part labeled with the first value in the second mask image is the defect part that does not need to be refined for segmentation.
[0094] Both the first mask image and the second mask image are binary images. In this embodiment, the first value is 1 and the second value is 0. The purpose is to obtain a binary image based on the fitting degree. The implementer can set the values of the first and second values according to the actual situation.
[0095] The first mask image and the second mask image are added together. The resulting image is all the defect parts contained on the surface of the vibration damper. The resulting image is multiplied with the defect image of the vibration damper to obtain a defect segmentation image. Edge detection is performed on the defect segmentation image. The area formed by the detected closed edges is the defect area, and the defect location on the surface of the vibration damper is obtained.
[0096] The defect segmentation image contains accurate edges of the defect region, thus allowing the identification of the area with corrosion defects and the corresponding location of the defective portion of the vibration damper. Specifically, edge detection is performed on the defect segmentation image; the regions formed by the detected closed edges are the defective portions of the vibration damper surface, thus revealing the defect location on the vibration damper surface.
[0097] The vibration damper is inspected and repaired based on the location of defects on its surface. For example, the area of the defective region is obtained, and an area threshold is set. If the area of the defective region is greater than the area threshold, the vibration damper cannot be repaired. Vibration dampers that cannot be repaired are replaced, and anti-corrosion materials are sprayed according to the geographical location of the high-voltage conductor and the specific materials of the vibration damper.
[0098] If the area of the defective region is less than or equal to the area threshold, the vibration damper can be repaired. Repair is carried out manually according to the location of the defective region, and anti-corrosion material is sprayed onto the vibration damper after repair.
[0099] The area threshold value varies depending on the surface area of the vibration damper, and the implementer can set it according to the actual situation.
[0100] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A defect identification method for an online power-taking movable intelligent anti-vibration hammer, characterized in that, The method includes the following steps: The image containing defects on the surface of the vibration damper is obtained by recognizing the image, and is recorded as the vibration damper defect image. The vibration damper defect image is segmented into superpixels to obtain at least two superpixel blocks. The irregularity index of the pixel is obtained based on the pixel difference between the pixel in the superpixel block and its neighboring pixels. The pixels within a superpixel block are classified into at least two categories based on the irregularity index of the pixels. Within each superpixel block, a first coefficient is calculated based on the number of pixels in each category and the irregularity index of the pixels. Defect areas are determined based on the irregularity index of pixels in superpixel blocks whose first coefficient is less than or equal to a coefficient threshold and the index threshold. Superpixel blocks whose first coefficient is greater than the coefficient threshold are identified as marker pixel blocks. The edge pixels within the marker pixel blocks are traversed using a window of a set size. A second coefficient is calculated based on the number of pixels belonging to the marker pixel blocks within the window. The difference degree of the marker pixel blocks is obtained based on the first coefficient and the second coefficient. The pixel blocks with a difference greater than the judgment threshold are marked as the pixel blocks to be analyzed. The cluster center pixel of the pixel block to be analyzed is obtained. The fitting degree of the pixel is obtained based on the difference of the irregularity index between the pixel points in the pixel block to be analyzed and the cluster center pixel. The pixel points are labeled according to the fitting degree to obtain the first mask image. The defect position of the vibration damper surface is obtained based on the first mask image and the defect area. The method for obtaining the first coefficient is as follows: All pixels within the same category have the same irregularity index, and the irregularity index corresponding to the category is the irregularity index of the pixels within that category. For any superpixel block, obtain the irregularity index corresponding to each category and the number of pixels contained in each category. Calculate the product of the irregularity index corresponding to each category and the number of pixels contained in each category, and record it as the feature index of the category. Obtain the first coefficient based on the difference between the feature indices of each category within the superpixel block. The specific formula for calculating the first coefficient is as follows: wherein, denotes the first coefficient corresponding to the superpixel block K, denotes the number of pixels contained in the class m within the superpixel block, denotes the irregular index corresponding to the class m within the superpixel block, denotes the number of pixels contained in the class n within the superpixel block, denotes the irregular index corresponding to the class n within the superpixel block, denotes all classes contained in the superpixel block K, denotes the characteristic index of the class m within the superpixel block, denotes the characteristic index of the class n within the superpixel block. The method for obtaining the second coefficient is as follows: The defect image of the vibration damper is meshed to obtain the size of the mesh; any marker pixel block is selected as the target superpixel block, and the edge pixels of the target superpixel block are obtained. The edge pixels in the target superpixel block are traversed using a window of the same size as the mesh. The ratio of the total number of pixels belonging to the target superpixel block in the window to the total number of pixels contained in the window is calculated. The difference between the set value and the ratio is recorded as the feature ratio, and the variance of the feature ratio is the second coefficient. The irregularity index of a pixel is obtained based on the pixel difference between a pixel within a superpixel block and its neighboring pixels, specifically as follows: The vibration damper defect image is an RGB image, the vibration damper defect image is converted from an RGB color space to a CIELAB color space, channel values of each pixel point in the image obtained after the conversion are obtained in L, A and B three channels, for any one pixel point in each superpixel block, squares of difference values between the pixel point and neighborhood pixel points of the pixel point in the L channel are calculated, squares of difference values between the pixel point and neighborhood pixel points of the pixel point in the A channel are calculated, squares of difference values between the pixel point and neighborhood pixel points of the pixel point in the B channel are calculated, and the sum of the squares of the corresponding difference values of the pixel point in the L, A and B three channels is taken as the irregularity index of the pixel point.
2. The defect identification method of the online energy-taking movable intelligent anti-vibration hammer according to claim 1, characterized in that, The difference degree of the mark pixel block obtained according to the first coefficient and the second coefficient is specifically: The sum of the first coefficient and the second coefficient is calculated, and the sum is positively correlated to obtain the difference degree of the mark pixel block.
3. The defect identification method of the online energy-taking movable intelligent anti-vibration hammer according to claim 1, characterized in that, The fitting degree is obtained by the following method: Adjacent superpixel blocks of the pixel block to be analyzed are obtained and recorded as adjacent pixel blocks, and the clustering center pixel points of the adjacent pixel blocks are obtained, squares of difference values between the pixel points in the pixel block to be analyzed and the corresponding clustering center pixel points are calculated and recorded as first characteristic values; Squares of difference values between the pixel points in the pixel block to be analyzed and the corresponding clustering center pixel points of the adjacent pixel blocks are calculated and recorded as second characteristic values; The minimum value between the second characteristic value and the first characteristic value is taken as the fitting degree of the pixel point.
4. The defect identification method of an online energy-taking movable intelligent anti-vibration hammer according to claim 1, characterized in that, The first mask image is obtained by marking the pixel points according to the fitting degree, and the method is specifically: The pixel points with the fitting degree greater than a fitting threshold are marked as a first value, and the pixel points with the fitting degree less than or equal to the fitting threshold are marked as a second value, to obtain the first mask image.
5. The defect identification method of an online energy-taking movable intelligent anti-vibration hammer according to claim 1, characterized in that, The defect position of the vibration damper surface is obtained according to the first mask image and the defect, and the method is specifically: The pixel points in the defect area are marked as the first value, and the pixel points not belonging to the defect area are marked as the second value, to obtain a second mask image; the first mask image and the second mask image are added, the image obtained by the addition is multiplied by the vibration damper defect image, to obtain a defect segmentation image, and the closed edge detected by edge detection of the defect segmentation image constitutes a defect partial area of the vibration damper surface, to obtain the defect position of the vibration damper surface.
6. The defect identification method of an online energy-taking movable intelligent anti-vibration hammer according to claim 1, characterized in that, The defect area is determined according to the irregularity index of the pixel point in the superpixel block with the first coefficient less than or equal to a coefficient threshold and an index threshold, and the method is specifically: The superpixel block with the first coefficient less than or equal to the coefficient threshold is obtained and recorded as an optimal pixel block, the mean value of the irregularity indexes of all pixel points in the optimal pixel block is calculated, and the optimal pixel block with the corresponding mean value greater than the index threshold is recorded as the defect area.
Citation Information
Patent Citations
Damper fault detection method and system based on intelligent pattern recognition
CN114581692A
Mechanical part casting quality evaluation method and system
CN115578374A