An image processing-based automatic detection method for cable surface defects
By analyzing the three-dimensional histogram and weighted correlation coefficient of cable images in the HSV color space, the problem of distinguishing between burn marks and oxidation spots on the cable surface was solved, thus improving the accuracy of cable surface defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEIHAI GUANGMING ELECTRIC POWER SERVICE CO LTD
- Filing Date
- 2025-12-12
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies cannot accurately distinguish between burn marks and oxidation spots on cable surfaces, resulting in low accuracy in detecting cable surface defects.
By acquiring a three-dimensional histogram in the HSV color space of the cable image, the differences in the distribution of hue saturation and brightness are analyzed. Combined with the weighted correlation coefficient and frequency distribution, the defect confidence is calculated, and the real defect areas are screened out.
This improves the accuracy of cable surface defect detection, avoids confusion between oxidation spots and burn marks, and ensures the stability of cable operation.
Smart Images

Figure CN121685473B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image detection technology, and more specifically to an automatic detection method for cable surface defects based on image processing. Background Technology
[0002] In the field of cable surface defect detection, surface burn marks caused by corona discharge are key defects characterizing early deterioration of insulation materials. Failure to accurately identify such defects can lead to misjudgments of insulation condition and may even cause insulation breakdown due to intensified partial discharge, affecting the stable operation of the power system. Existing technologies typically use the maximum inter-class variance (MOV) method to identify burn marks on cable surfaces. This method identifies defect areas based on the difference in color characteristics between the burned area and the normal area. However, in real-world scenarios, cable surfaces are prone to natural oxide spots. Although these spots visually resemble burn marks in their yellowish-brown color, they are a result of natural oxidation and do not represent insulation degradation, having little impact on cable operation. The limitation of existing MOV methods lies in relying solely on independent thresholds for a single color feature, failing to capture the differences in color distribution between burn marks and oxide spots. This leads to confusion between oxide spots and burn marks, affecting the accuracy of cable surface defect detection. Summary of the Invention
[0003] To address the aforementioned technical problems, the present invention aims to provide an automatic detection method for cable surface defects based on image processing. The specific technical solution adopted is as follows:
[0004] Obtain candidate defect regions after preprocessing the cable image;
[0005] Based on the distribution characteristics of the defect candidate regions in the HSV color space, a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness are obtained; based on the discrete characteristics of high-frequency bins in the three-dimensional histogram, the color distribution difference is obtained; based on the frequency difference characteristics of high-frequency bins in the three-dimensional histogram, the frequency distribution difference is obtained; based on the color distribution difference and the frequency distribution difference, the fusion feature value of the three-dimensional histogram is obtained.
[0006] The weighted correlation coefficient is obtained based on the correlation features of different dimensions in the three-dimensional histogram; the defect confidence is obtained based on the fusion feature value and the weighted correlation coefficient of the same three-dimensional histogram; the defect degree of the defect candidate region is obtained based on the defect confidence corresponding to the two three-dimensional histograms.
[0007] The actual defect region is obtained from different defect candidate regions based on the degree of defect.
[0008] Further, the step of obtaining a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness based on the distribution characteristics of the defect candidate regions in the HSV color space includes:
[0009] The H (hue), S (saturation), and V (brightness) values in the HSV color space are each divided into different intervals. A three-dimensional histogram is constructed based on the number of pixels distributed in each interval. The X-axis of the hue / saturation three-dimensional histogram represents hue, the Y-axis represents saturation, and the Z-axis represents the number of pixels corresponding to the hue / saturation combination. The X-axis of the hue / brightness three-dimensional histogram represents hue, the Y-axis represents brightness, and the Z-axis represents the number of pixels corresponding to the hue / brightness combination.
[0010] Furthermore, the step of obtaining the color distribution difference degree based on the discrete features of the high-frequency bins in the three-dimensional histogram includes:
[0011] The heights of each bin in the three-dimensional histogram are sorted in descending order, and the first preset number of bins in the sort are taken as high-frequency bins; the average value of the Euclidean distance between the planar coordinates of any two high-frequency bins in the three-dimensional histogram is calculated to obtain the color distribution difference of the three-dimensional histogram.
[0012] Furthermore, the step of obtaining the frequency distribution difference degree based on the frequency difference characteristics of the high-frequency bins in the three-dimensional histogram includes:
[0013] Calculate the average of the absolute values of the differences between the frequencies of all high-frequency sub-boxes and the average frequency of the high-frequency sub-boxes to obtain the frequency distribution difference of the three-dimensional histogram.
[0014] Further, the step of obtaining the fusion feature value of the three-dimensional histogram based on the color distribution difference degree and the frequency distribution difference degree includes:
[0015] The color distribution difference is normalized and then multiplied by a preset first weight to obtain a first value; the frequency distribution difference is negatively correlated and then multiplied by a preset second weight to obtain a second value; the sum of the first value and the second value is calculated to obtain the fusion feature value of the three-dimensional histogram.
[0016] Furthermore, the step of obtaining the weighted correlation coefficient based on the association features of different dimensions in the three-dimensional histogram includes:
[0017] The frequency proportion of each bin in the three-dimensional histogram is used as the weight of the corresponding X-axis and Y-axis values. The absolute value of the weighted Pearson correlation coefficient of the X-axis and Y-axis values in the three-dimensional histogram is calculated and normalized to obtain the weighted correlation coefficient of the three-dimensional histogram.
[0018] Further, the step of obtaining the defect confidence level based on the fused feature values of the same three-dimensional histogram and the weighted correlation coefficient includes:
[0019] In the formula, F represents the defect confidence level. Indicates the fused feature value. This represents the weighted correlation coefficient.
[0020] 8. The automatic detection method for cable surface defects based on image processing according to claim 1, characterized in that the step of obtaining the defect degree of the defect candidate region based on the defect confidence scores corresponding to two three-dimensional histograms includes:
[0021] The defect level of the candidate region is obtained by calculating the average defect confidence score of the three-dimensional histograms of hue saturation and hue brightness.
[0022] Furthermore, the step of obtaining the actual defect regions in different defect candidate regions based on the defect severity includes:
[0023] The candidate defect regions whose defect severity exceeds a preset defect threshold are taken as the actual defect regions.
[0024] The present invention has the following beneficial effects:
[0025] In this invention, since the color mode distribution of the actual burn mark area and the pseudo-defect area of oxide spots differs in the HSV color space, obtaining a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness can improve the accuracy of defect detection by analyzing the joint features of hue saturation and hue brightness. Obtaining the color distribution difference degree can determine the probability that the candidate defect area is a real defect area based on the distribution characteristics of high-frequency bins in the three-dimensional histogram; obtaining the frequency distribution difference degree can determine the probability that the candidate defect area is a real defect area based on the frequency difference characteristics of high-frequency bins. By fusing feature values, the accuracy of determining whether the candidate defect area is a real defect area can be further improved. Obtaining the weighted correlation coefficient can analyze the region type that the candidate defect area matches based on the variation correlation features of different HSV channels; obtaining the defect confidence degree can comprehensively analyze the region type that the candidate defect area matches based on the fused feature values and the weighted correlation coefficient, improving the accuracy of defect detection. Obtaining the defect degree of the candidate defect area allows for multi-dimensional joint analysis of the characteristics of the candidate defect area, avoiding over-reliance on single-dimensional information, and enabling the defect degree to accurately screen for real defect areas. Ultimately, the actual defect areas in different defect candidate regions are obtained based on the degree of defect, which improves the accuracy of cable surface defect detection. Attached Figure Description
[0026] 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.
[0027] Figure 1 The flowchart illustrates an automatic detection method for cable surface defects based on image processing, as provided in one embodiment of the present invention. Detailed Implementation
[0028] 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 an image processing-based automatic detection method for cable surface defects 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.
[0029] 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.
[0030] The following description, in conjunction with the accompanying drawings, details the specific scheme of the automatic detection method for cable surface defects based on image processing provided by the present invention.
[0031] Please see Figure 1 The diagram illustrates a flowchart of an automatic cable surface defect detection method based on image processing, according to an embodiment of the present invention. The method includes the following steps:
[0032] Step S1: Obtain the defect candidate region after cable image preprocessing.
[0033] In this embodiment of the invention, the implementation scenario is to detect defect areas in cables and improve the accuracy of defect detection. First, candidate defect areas are acquired after preprocessing of the cable image. Cable images are captured using a high-resolution industrial camera. To ensure image quality, the shooting process is conducted under conditions with a bar light source to eliminate environmental reflections and shadow interference, and to ensure the cable surface is uniformly illuminated. After acquiring the cable image, preprocessing is performed. To reduce random noise introduced during image acquisition, Gaussian filtering is used to process the cable image. After denoising, an existing limited contrast adaptive histogram equalization algorithm is used to enhance the overall contrast of the image, thereby expanding the color and texture differences between the defect area and the intact insulation layer, increasing the feature differentiation between real burn marks and oxidation spots, and improving the sensitivity of subsequent defect identification. After image enhancement, an adaptive threshold segmentation algorithm is used to separate the cable body and background areas. The core cable area image is cropped to eliminate interference from irrelevant backgrounds on defect detection. The cropped image is converted to the HSV color space. Since the color features of burn marks are mainly distributed in red (approximately...) on the color wheel... arrive From yellow to yellow (approximately) arrive Therefore, the filtering range for the H tone channel is set to the range of ) . arrive This allows for the simultaneous coverage of reddish-brown carbonization traces and early minor burns that are orange-yellow. The implementer can determine the selection range according to the implementation scenario. After obtaining all pixel areas that match the color characteristics, morphological closing operations are performed to form different defect candidate areas with complete structures and clear outlines.
[0034] Step S2: Obtain a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness based on the distribution characteristics of the defect candidate region in the HSV color space; obtain the color distribution difference degree based on the discrete characteristics of the high-frequency bins in the three-dimensional histogram; obtain the frequency distribution difference degree based on the frequency difference characteristics of the high-frequency bins in the three-dimensional histogram; obtain the fusion feature value of the three-dimensional histogram based on the color distribution difference degree and the frequency distribution difference degree.
[0035] Global threshold segmentation based on the Otsu's method is a traditional detection method for determining burn mark regions. However, when oxide spots with similar characteristics to burn marks appear on the cable surface, a single color threshold cannot capture the difference between corona discharge carbonization and natural oxidation, easily including oxide spot regions in the defect set, resulting in low defect detection accuracy. This invention overcomes the limitations of traditional single color thresholds by analyzing the joint features of hue saturation and hue brightness to improve defect detection accuracy. First, based on the distribution characteristics of candidate defect regions in the HSV color space, a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness are obtained.
[0036] Preferably, in this embodiment of the invention, the step of obtaining a three-dimensional histogram includes: dividing the H (hue), S (saturation), and V (brightness) values in the HSV color space into different intervals on an average basis, and constructing a three-dimensional histogram based on the number of pixels distributed in each interval; in this embodiment of the invention, each is divided into 20 intervals on an average basis. The implementer can determine the number of intervals according to the implementation scenario, count the number of pixels contained in each interval in the defect candidate region, and construct a three-dimensional histogram. The X-axis of the hue / saturation three-dimensional histogram represents hue, the Y-axis represents saturation, and the Z-axis represents the number of pixels corresponding to the hue / saturation combination; the X-axis of the hue / brightness three-dimensional histogram represents hue, the Y-axis represents brightness, and the Z-axis represents the number of pixels corresponding to the hue / brightness combination. It should be noted that during the calculation of the three-dimensional histogram, the values on the X and Y axes are the median values of each interval. Since burn marks are caused by localized carbonization of insulating materials due to corona discharge, the causes and degrees of localized loss are similar, leading to a strong correlation between low saturation and low brightness in this area within a specific hue range. This strong correlation results in a concentrated and dense clustered distribution of high-frequency bins in the 3D histogram. Oxidation spots, as a natural aging phenomenon, occur at different rates and in different forms on the material surface. The formation process is mild and microscopically uneven, causing asynchronous changes in the H, S, and V dimensions of pixels within the same area, resulting in poor correlation and a discrete and disordered distribution of bins in the 3D histogram. Therefore, the probability that a candidate binning defect area is a real defect area can be determined based on the binning characteristics of the 3D histogram, and the color distribution difference can be obtained based on the discrete characteristics of high-frequency bins in the 3D histogram.
[0037] Preferably, in this embodiment of the invention, the step of obtaining the color distribution difference includes: sorting the heights of each bin in the three-dimensional histogram in descending order, and taking the top preset number of bins in the sort as high-frequency bins; in this embodiment of the invention, the preset number is the top 10% of the sorted bins, which can be determined by the implementer according to the implementation scenario; obtaining high-frequency bins aims to capture the most significant color patterns in the image, thereby focusing on analyzing the distribution pattern of the core color structure and improving the accuracy of defect detection. The average value of the Euclidean distance between the planar coordinates of any two high-frequency bins in the three-dimensional histogram is calculated to obtain the color distribution difference of the three-dimensional histogram. The planar coordinates are the coordinates composed of the median values of any interval on the XY-axis plane. This Euclidean distance measures the dispersion of significant color structures in the histogram; the greater the color distribution difference, the greater the average distance between high-frequency bins, the more dispersed the significant color structures are in the color space, the wider the pattern coverage, and the less similar the corresponding global color distribution; the smaller the color distribution difference, the denser the distribution of high-frequency bins, the more concentrated the significant color structures are in the color space, the more similar the global color distribution, and the more consistent it is with the color characteristics of the burn mark area.
[0038] Furthermore, the frequency distribution difference can be obtained based on the frequency difference characteristics of the high-frequency bins in the three-dimensional histogram. Preferably, in this embodiment of the invention, the step of obtaining the frequency distribution difference includes: calculating the average of the absolute values of the differences between the frequencies of all high-frequency bins and the average frequency of the high-frequency bins, to obtain the frequency distribution difference of the three-dimensional histogram. The frequency distribution difference reflects the overall fluctuation degree of the significant color pattern. When the frequency distribution difference is smaller, it means that the frequencies of each high-frequency bin in the three-dimensional histogram are closer, with no obvious prominent peaks, which is more consistent with the random color change characteristics of the oxide spot area. When the frequency distribution difference is larger, it means that the frequency difference of the bins in the three-dimensional histogram is larger, with significant peaks, and the significant color pattern in the area is more consistent, which is more consistent with the color characteristics of the burn mark area.
[0039] After obtaining the color distribution difference degree and frequency difference feature values corresponding to the three-dimensional histogram, the fusion feature value of the three-dimensional histogram can be obtained based on the color distribution difference degree and frequency distribution difference degree. Preferably, in this embodiment of the invention, the step of obtaining the fusion feature value includes: normalizing the color distribution difference degree and calculating the product with a preset first weight to obtain a first value; performing negative correlation mapping on the frequency distribution difference degree and calculating the product with a preset second weight to obtain a second value; calculating the sum of the first value and the second value to obtain the fusion feature value of the three-dimensional histogram. In this embodiment of the invention, the preset first weight and the preset second weight are both 0.5, which can be determined by the implementer according to the implementation scenario. When the fusion feature value is larger, it means that the distribution of high-frequency bins in the color space is more discrete and the frequency is closer, and the region is more in line with the characteristics of wide distribution and obvious differences of color patterns corresponding to natural aging such as oxidation spots; when the fusion feature value is smaller, it means that the distribution of high-frequency bins in the color space is more concentrated and the frequency difference is larger, and the region is more in line with the characteristics of concentrated color caused by burning and carbonization. The formula for obtaining the fusion feature value includes:
[0040]
[0041] In the formula, Indicates the fused feature value. This indicates the preset first weight. This indicates a preset second weight, where D represents the color distribution difference. Let R represent the hyperbolic tangent function, and let R represent the frequency distribution dissimilarity. This represents an exponential function with the natural constant as its base. Indicates the first value. This indicates the second numerical value.
[0042] Step S3: Obtain the weighted correlation coefficient based on the correlation features of different dimensions in the three-dimensional histogram; obtain the defect confidence based on the fusion feature value and weighted correlation coefficient of the same three-dimensional histogram; obtain the defect degree of the defect candidate region based on the defect confidence corresponding to the two three-dimensional histograms.
[0043] The fusion feature value is a statistical approach that comprehensively evaluates the distribution and frequency characteristics of high-frequency bins in a three-dimensional histogram, thereby capturing the distribution characteristics of significant color structures in the defect candidate region. To further improve the accuracy of defect detection, the linear dependence between channels in the HSV color space can be precisely quantified based on the correlation characteristics of color modes. Therefore, a weighted correlation coefficient is obtained based on the correlation characteristics of different dimensions in the three-dimensional histogram. Preferably, in this embodiment of the invention, the step of obtaining the weighted correlation coefficient includes: using the frequency proportion of each bin in the three-dimensional histogram as the weight of the corresponding X-axis and Y-axis values, calculating the absolute value of the weighted Pearson correlation coefficient of the X-axis and Y-axis values in the three-dimensional histogram and normalizing it to obtain the weighted correlation coefficient of the three-dimensional histogram. It should be noted that the calculation of the weighted Pearson correlation coefficient is an existing technology, and the specific steps will not be elaborated here. The larger the absolute value of the weighted Pearson correlation coefficient, the more obvious the correlation characteristics between the two. Because carbonization from burns often results in colors concentrated within a narrow hue range, accompanied by a synchronous and regular decrease in saturation and brightness, exhibiting a clear linear trend in frequency on the histogram. Therefore, a larger weighted correlation coefficient indicates a strong linear correlation between hue and saturation or brightness, more consistent with the characteristics of carbonized areas from burns. Conversely, oxidation generates various oxides with different structures, thicknesses, and optical properties, leading to a wider hue distribution, and the changes in saturation and brightness are inconsistent with the hue. Therefore, a smaller weighted correlation coefficient more closely matches the characteristics of oxide spot areas. The formula for obtaining the weighted correlation coefficient includes:
[0044]
[0045] In the formula, This represents the weighted correlation coefficient. Represents the hyperbolic tangent function. This indicates the weights of the X-axis and Y-axis values, where x represents the median of each interval on the X-axis and y represents the median of each interval on the Y-axis. Indicates the weighted covariance. This represents the weighted standard deviation corresponding to the X-axis. This represents the weighted standard deviation corresponding to the Y-axis.
[0046] After obtaining the fusion feature values and weighted correlation coefficients of the three-dimensional histograms, the defect confidence level is obtained based on the fusion feature values and weighted correlation coefficients of the same three-dimensional histograms; preferably, in this embodiment of the invention, the step of obtaining the defect confidence level includes:
[0047]
[0048] In the formula, F represents the defect confidence level. Indicates the fused feature value. This represents the weighted correlation coefficient. By obtaining the defect confidence level, the advantages of high-scoring features can be effectively amplified, while the interference of spurious defects with high scores in a single dimension can be suppressed. The higher the defect confidence level, the more likely the area is to be a burn mark; the lower the defect confidence level, the more likely the area is to be a naturally oxidized area.
[0049] Furthermore, after obtaining the defect confidence score corresponding to each 3D histogram, the defect severity of the candidate region can be obtained based on the defect confidence scores of the two 3D histograms. Specifically, this includes calculating the average defect confidence scores of the 3D histograms for hue saturation and hue brightness to obtain the defect severity of the candidate region. By combining the defect confidence scores of the two 3D histograms, the accuracy of identifying actual burn marks can be further enhanced, avoiding over-reliance on single-dimensional information during the judgment process. A higher defect severity means that the candidate region is more likely to be a real defect region.
[0050] Step S4: Obtain the actual defect area from different defect candidate areas based on the degree of defect.
[0051] After obtaining the defect severity of all candidate defect regions, the actual defect regions can be obtained from different candidate defect regions based on the defect severity. Specifically, this includes: taking candidate defect regions whose defect severity exceeds a preset defect threshold as actual defect regions. In this embodiment of the invention, the preset defect threshold is 0.6, which can be determined by the implementer according to the implementation scenario. After obtaining the actual defect regions, the implementer can further determine the degree of cable damage based on the characteristics of the actual defect regions, thereby analyzing the maintenance methods that should be implemented, which are not limited here.
[0052] In summary, this invention provides an automatic cable surface defect detection method based on image processing. It obtains three-dimensional histograms of hue saturation and hue brightness based on the distribution characteristics of defect candidate regions in the HSV color space; obtains color distribution difference and frequency distribution difference based on high-frequency binning in the three-dimensional histograms; obtains fusion feature values of the three-dimensional histograms based on color distribution difference and frequency distribution difference; obtains weighted correlation coefficients based on the correlation features of different dimensions in the three-dimensional histograms; and obtains defect confidence based on the fusion feature values and weighted correlation coefficients of the same three-dimensional histograms. This invention obtains the defect degree of defect candidate regions based on the defect confidence corresponding to two three-dimensional histograms; and obtains the actual defect regions in different defect candidate regions based on the defect degree, thereby improving the accuracy of cable surface defect detection.
[0053] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0054] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. An automatic detection method for cable surface defects based on image processing, characterized in that, The method includes the following steps: Obtain candidate defect regions after preprocessing the cable image; Based on the distribution characteristics of the defect candidate regions in the HSV color space, a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness are obtained; based on the discrete characteristics of high-frequency bins in the three-dimensional histogram, the color distribution difference is obtained; based on the frequency difference characteristics of high-frequency bins in the three-dimensional histogram, the frequency distribution difference is obtained; based on the color distribution difference and the frequency distribution difference, the fusion feature value of the three-dimensional histogram is obtained. The weighted correlation coefficient is obtained based on the correlation features of different dimensions in the three-dimensional histogram; the defect confidence is obtained based on the fusion feature value and the weighted correlation coefficient of the same three-dimensional histogram; the defect degree of the defect candidate region is obtained based on the defect confidence corresponding to the two three-dimensional histograms. Based on the degree of defect, the actual defect regions in different defect candidate regions are obtained; The steps of obtaining a three-dimensional histogram of hue saturation and a three-dimensional histogram of hue brightness based on the distribution characteristics of the defect candidate regions in the HSV color space include: The H (hue), S (saturation), and V (luminance) values in the HSV color space are each divided into different intervals. A three-dimensional histogram is constructed based on the number of pixels distributed in each interval. The X-axis of the hue / saturation histogram represents hue, the Y-axis represents saturation, and the Z-axis represents the number of pixels corresponding to the hue / saturation combination. Similarly, the X-axis of the hue / luminance histogram represents hue, the Y-axis represents luminance, and the Z-axis represents the number of pixels corresponding to the hue / luminance combination. The step of obtaining the color distribution difference degree based on the discrete features of the high-frequency bins in the three-dimensional histogram includes: The heights of each bin in the three-dimensional histogram are sorted in descending order, and the first preset number of bins in the sort are taken as high-frequency bins; the average value of the Euclidean distance between the planar coordinates of any two high-frequency bins in the three-dimensional histogram is calculated to obtain the color distribution difference of the three-dimensional histogram. The step of obtaining the frequency distribution difference degree based on the frequency difference characteristics of the high-frequency bins in the three-dimensional histogram includes: Calculate the average of the absolute values of the differences between the frequencies of all high-frequency sub-boxes and the average frequency of the high-frequency sub-boxes to obtain the frequency distribution difference of the three-dimensional histogram; The step of obtaining the fusion feature value of the three-dimensional histogram based on the color distribution difference and the frequency distribution difference includes: The color distribution difference is normalized and then multiplied by a preset first weight to obtain a first value; the frequency distribution difference is negatively correlated and then multiplied by a preset second weight to obtain a second value; the sum of the first value and the second value is calculated to obtain the fusion feature value of the three-dimensional histogram. The step of obtaining the weighted correlation coefficient based on the association features of different dimensions in the three-dimensional histogram includes: The frequency proportion of each bin in the three-dimensional histogram is used as the weight of the corresponding X-axis and Y-axis values. The absolute value of the weighted Pearson correlation coefficient of the X-axis and Y-axis values in the three-dimensional histogram is calculated and normalized to obtain the weighted correlation coefficient of the three-dimensional histogram. The step of obtaining the defect confidence level based on the fused feature values of the same three-dimensional histogram and the weighted correlation coefficient includes: In the formula, F represents the defect confidence level. Indicates the fused feature value. This represents the weighted correlation coefficient.
2. The automatic detection method for cable surface defects based on image processing according to claim 1, characterized in that, The step of obtaining the defect degree of the defect candidate region based on the defect confidence scores corresponding to the two three-dimensional histograms includes: The defect level of the candidate region is obtained by calculating the average defect confidence score of the three-dimensional histograms of hue saturation and hue brightness.
3. The automatic detection method for cable surface defects based on image processing according to claim 1, characterized in that, The step of obtaining the actual defect region among different defect candidate regions based on the defect severity includes: The candidate defect regions whose defect severity exceeds a preset defect threshold are taken as the actual defect regions.