A cable interlayer structure detection method and system based on image processing
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHUNHUA KUNLUN YOUJIA CABLE CO LTD
- Filing Date
- 2026-04-09
- Publication Date
- 2026-07-21
Smart Images

Figure CN121998982B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method and system for detecting interlayer structure of cables based on image processing. Background Technology
[0002] As a critical carrier of power and information transmission, the manufacturing quality of cables directly impacts system safety. Within the cable's interlayer structure, the thickness and uniformity of the insulation layer are core quality indicators. This is because insufficient localized insulation thickness can create electric field concentration defects, making the cable susceptible to breakdown and failure under high voltage. Furthermore, uneven thickness reduces the cable's mechanical strength and aging resistance, shortening its service life. Therefore, in cable production quality control and subsequent non-destructive testing, it is typically necessary to analyze cross-sectional images of the cable to ensure uniform insulation thickness.
[0003] To achieve automatic detection of cable interlayer structures, visual analysis methods based on image segmentation and contour extraction are commonly used. For example, Chinese Patent CN120182257B discloses a method and system for detecting the cross-sectional area of building power supply and distribution cables. This method obtains the inner and outer contours of the conductor through cusp segmentation and iteratively infers the outer contour using a convolutional neural network to assess the conductor's roundness and quantity to determine its quality. However, when applied to insulation layer detection, this method relies on a pre-set geometric model and deep learning inference, making it difficult to directly apply to weak-contrast boundary extraction of non-conductive materials such as insulation layers. When the image is blurry or the interlayer grayscale difference is weak, it cannot effectively distinguish adjacent insulation interfaces, leading to boundary mismatches or missed detections.
[0004] To further improve boundary positioning accuracy, existing technologies generally employ active contour models for closed contour evolution. However, as shown in the aforementioned patent CN120182257B, its overall framework still uses fixed parameters to drive contour convergence. When there is interference such as blurriness or breakage in the cable cross-section image, the active contour model with fixed parameters is prone to leakage due to insufficient driving force, or loss of details due to excessive smoothing, resulting in the extracted boundary deviating from the real physical interface and affecting the accuracy of insulation layer thickness uniformity assessment. Summary of the Invention
[0005] To address the aforementioned technical problem of assessment accuracy, the present invention provides solutions in several aspects.
[0006] In a first aspect, the present invention provides a method for detecting cable interlayer structure based on image processing, comprising:
[0007] The cable cross-section image is preprocessed to obtain the target image; circular detection is performed on the target image to obtain the Region of Interest (ROI); based on the intensity of pixel grayscale changes, texture complexity, and spatial coherence characteristics of edge direction within the ROI region, the boundary confidence score of the pixels is obtained; according to the relationship between the boundary confidence score and a preset threshold, the suspected insulation layer boundary is obtained; the suspected insulation layer boundary is segmented to obtain several interlayer boundary bands; further, the internal constraint factor of the interlayer boundary band is obtained by combining the discreteness of pixels on each interlayer boundary band and the boundary confidence score; according to the internal constraint factor and preset basic model parameters, the dynamic model parameters of the active contour model are obtained; the dynamic model parameters are input into the active contour model to obtain the closed contour lines of the interlayer boundary bands; a group of closed contour lines is obtained based on the centroid spacing between the obtained closed contour lines; the quality index of the insulation layer is obtained based on the continuous thickness data of the closed contour line group at continuous angles; the quality index is compared with the quality threshold to evaluate the thickness uniformity of the insulation layer.
[0008] This invention performs multi-stage processing and analysis on cable cross-sectional images, including pixel boundary confidence score calculation, generation of internal constraint factors for interlayer boundary bands, and dynamic adjustment of active contour model parameters. It optimizes existing technologies with fixed-parameter active contour models that often suffer from contour leakage or excessive smoothing when handling weak contrast or fracture boundaries, thereby achieving boundary identification and localization. Furthermore, by evaluating the insulation layer thickness uniformity based on continuous thickness data from closed contour line groups, quality indicators are obtained, improving the accuracy and reliability of cable insulation layer thickness uniformity assessment.
[0009] Preferably, the acquisition of the ROI region includes:
[0010] Hough circle detection is used on the target image to detect circular contours, and the largest circle is taken as the ROI region.
[0011] Preferably, the boundary confidence scores of the pixels satisfy the following relationship:
[0012] ;
[0013] in, It is the target pixel located within the ROI region. Boundary confidence score; The target pixel within the ROI region The gradient magnitude; The target pixel within the ROI region Local neighborhood entropy; The target pixel within the ROI region The normalized gradient vector; Target pixels within the ROI region The unit vector obtained by normalizing the average value of all pixel gradient vectors in the local neighborhood; It is a preset micro value; It is a normalization function; It is a maximum value function; It is the Euclidean norm symbol for a vector.
[0014] This invention comprehensively calculates the gradient magnitude, local neighborhood entropy, and spatial coherence characteristics of the gradient direction of pixels within the ROI region, and fuses them to generate a boundary confidence score for each pixel. This effectively suppresses image noise and false edge interference, providing a reliable basis for subsequent binarization and segmentation of the insulation layer boundary. It also optimizes the shortcomings of existing simple edge detection methods, which are difficult to accurately distinguish weak contrast boundaries such as cable insulation layers and conductors or fillers, and are susceptible to noise interference, thus improving the robustness and accuracy of boundary detection.
[0015] Preferably, obtaining the suspected insulating layer boundary includes:
[0016] Set a threshold and binarize the boundary confidence scores of all pixels;
[0017] Pixels with a boundary confidence score greater than a preset threshold are set to 1 in the ROI region, and the rest are set to 0.
[0018] Extract all pixels with a value of 1 to form the suspected boundary of the insulating layer.
[0019] Preferably, obtaining the interlayer boundary zone includes:
[0020] The watershed algorithm is used to segment the suspected insulation layer boundary into regions, dividing it into a preset number of interlayer boundary zones.
[0021] Preferably, the internal constraint factors of the interlayer boundary zone satisfy the following relationship:
[0022] ;
[0023] in, It is the first Internal constraint factor of the interlayer boundary zone; It is the first The total area covered by pixels in the interlayer boundary band; It is the first The pixel length of the skeleton line obtained after skeletonizing the interlayer boundary band; It is the maximum value of the ratio of the total area covered by pixels in all interlayer boundary bands to the square of the skeleton line length; It is the first The mean boundary confidence score of all pixels on the interlayer boundary band; It is the standard threshold of the preset standard boundary confidence score; It is a minimum value function.
[0024] This invention generates an internal constraint factor by comprehensively calculating the pixel dispersion and the mean of the boundary confidence score of the interlayer boundary band; it achieves the characterization of quality attributes such as the geometric shape, integrity, and sharpness of the boundary band; it provides a basis for the adaptive adjustment of the parameters of the subsequent active contour model, supports the model's adaptability to boundaries of different quality and shape; it reduces the subjective dependence on fixed empirical parameters in the prior art and improves the intelligence level of parameter adjustment.
[0025] Preferably, obtaining the dynamic model parameters of the active contour model includes:
[0026] The dynamic external force weights of the active contour model are obtained by multiplying the preset basic external force weights by the difference between 1 and the internal constraint factor.
[0027] The dynamic stiffness coefficient of the active contour model is obtained by multiplying the preset basic stiffness coefficient by 1 plus the internal constraint factor.
[0028] Calculate the sum of 1 and the internal constraint factor, and multiply the sum by the preset basic rigidity coefficient to obtain the product result; calculate 1 and subtract the difference from the product result, and multiply it by the preset basic elasticity coefficient to obtain the dynamic elasticity coefficient.
[0029] This invention dynamically adjusts the external force weights, stiffness coefficients, and elasticity coefficients of the active contour model based on the internal constraint factors of the interlayer boundary zone. It achieves adaptive adjustment of model parameters to the actual shape and quality of the boundary zone. When the internal constraint factors indicate a clear boundary, the model reduces the external force weights and increases stiffness to reduce smoothing and retain details. When the boundary is blurred or broken, the model increases the external force weights and allows for greater local deformation to cross the gap. It supports accurate fitting of the contour lines to the real physical interface, improving the accuracy and robustness of boundary extraction.
[0030] Preferably, obtaining the closed contour line group includes:
[0031] Calculate the centroid of each closed contour line, and sort them in ascending order according to the distance from the centroid of each closed contour line to the center of the ROI region to obtain the centroid sequence;
[0032] The two closed contour lines corresponding to two adjacent centroids in the centroid sequence are taken as a closed contour line group.
[0033] Preferably, the quality indicators of the insulating layer are obtained by:
[0034] The average value of the two centroids of the closed contour line group is used as its reference center;
[0035] Launch along the reference center Intersections of the radial rays at intervals with the closed contour line group are obtained, and the distance between the two intersection points is taken as the local thickness of the insulating layer at that angle, thus obtaining the continuous thickness data of the insulating layer.
[0036] From the continuous thickness data, obtain the maximum and minimum thickness values of each insulating layer at all angles;
[0037] The quality index of the insulation layer is obtained by summing the differences between the maximum and minimum thickness values of the continuous thickness data of each insulation layer.
[0038] This invention uses the average value of the two centroids of a closed contour line group as a reference center and emits radial rays at fixed intervals to obtain local thickness data of each insulating layer at continuous angles. Based on this, the invention calculates the difference between the maximum and minimum thickness values of each insulating layer at all angles and sums these differences for all insulating layers to obtain the quality index of the insulating layer. This achieves an objective assessment of the overall thickness uniformity of the insulating layer, providing an objective evaluation basis and optimizing the problem in existing technologies that may rely on single-angle measurements or subjective judgments, making it difficult to detect local defects or overall non-uniformity.
[0039] Secondly, the present invention provides a cable interlayer structure detection system based on image processing, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned cable interlayer structure detection method based on image processing is implemented.
[0040] By adopting the above technical solution, a computer program is generated from the above-mentioned image processing-based cable interlayer structure detection method and stored in the memory so that it can be loaded and executed by the processor. In this way, a terminal device can be made based on the memory and the processor for convenient use.
[0041] The beneficial effects of this invention are as follows: This invention constructs a boundary confidence score by fusing pixel grayscale, texture, and edge direction consistency to support the recognition of weak-contrast boundaries; it generates internal constraint factors based on the geometry and sharpness of interlayer boundary bands, and dynamically adjusts the parameters of the active contour model accordingly; it optimizes the limitations of traditional fixed-parameter models in handling blurred or broken boundaries, achieving contour line alignment with the physical interface. Furthermore, this invention evaluates the uniformity of insulation layer thickness by calculating the sum of the thickness ranges of each insulation layer as a quality indicator; it improves the accuracy and automation level of cable interlayer structure inspection, supports applications under complex image conditions, and provides a reliable technical solution for industrial inspection. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating an image processing-based cable interlayer structure detection method according to the present invention. Detailed Implementation
[0043] This invention discloses a method for detecting interlayer cable structure based on image processing, referring to... Figure 1 This includes steps S100-S400:
[0044] S100: Acquire a cross-sectional image of the cable, convert it into a grayscale image, and denoise the grayscale image to obtain the target image; detect the target image based on Hough circle detection to obtain the ROI region.
[0045] It should be noted that since the differences in the interlayer structure of the cable are mainly manifested as grayscale changes rather than color changes, this invention converts the acquired original image into a grayscale image to eliminate color redundancy. Since the grayscale image is affected by sensor noise, this invention filters and denoises the grayscale image to suppress high-frequency noise and improve the image signal-to-noise ratio.
[0046] Specifically, an original image of the cable cross-section is acquired using an industrial camera; the original image is converted into a grayscale image; the grayscale image is then denoised, for example, by Gaussian filtering; the preprocessed image is obtained and is denoised as the target image. It should be noted that Gaussian filtering is existing technology and will not be elaborated upon here.
[0047] It should be noted that, since target images often contain background interference, this invention uses Hough circle detection to obtain the Region of Interest (ROI) containing the main interlayer structures of the cable, such as the cable insulation layer, filler, and conductor. Considering that there are also multiple circular regions of conductors and copper cores in the target image, this invention selects the largest circle detected by Hough circle as the ROI.
[0048] Preferably, Hough circle detection is used to detect circular contours in the target image, with the largest circle designated as the Region of Interest (ROI), and any pixel within the ROI recorded as a target pixel. It should be noted that the ROI includes the main interlayer structures of the cable, such as insulation, filler, and conductors.
[0049] At this point, the target image and ROI region have been obtained.
[0050] S200. Based on the intensity of grayscale changes, texture complexity, and spatial coherence characteristics of edge directions of target pixels within the ROI region, the boundary confidence score of the target pixels is obtained. According to the relationship between the boundary confidence score and a preset threshold, the target pixels in the ROI region are binarized to obtain suspected insulating layer boundaries. According to the spatial discontinuity of the suspected insulating layer boundaries, they are segmented to obtain several interlayer boundary bands. Combining the discreteness of pixels on each interlayer boundary band and the boundary confidence score, the internal constraint factor of the interlayer boundary band is obtained.
[0051] It should be noted that since the ROI region contains an insulating layer, filler, and conductor, they cannot be directly distinguished. Considering that pixels with more drastic grayscale changes and simpler textures in the ROI region correspond to clearer interlayer interfaces and are more likely to belong to the insulating layer boundary, this invention obtains the gradient magnitude and local neighborhood entropy of the target pixel to obtain the boundary strength of the target pixel, which can initially distinguish the insulating layer boundary from the conductor and filler. In addition, the gradient direction of pixels on the insulating layer boundary changes gently in the neighborhood, while the pseudo-edge direction is random and disordered. Therefore, this invention calculates the consistency between the gradient vector of the target pixel and the average gradient vector in its local neighborhood to suppress the interference of disordered directions. Finally, by combining the gradient magnitude, local neighborhood entropy, and local direction consistency, the boundary confidence score of the target pixel is obtained to characterize the confidence level of the pixel belonging to the insulating layer boundary.
[0052] Specifically, based on the intensity of grayscale changes, texture complexity, and spatial coherence characteristics of edge directions of target pixels within the ROI region, the boundary confidence score of target pixels within the ROI region is calculated, including:
[0053] Edge detection is performed on the Region of Interest (ROI) to obtain the gradient vector and gradient magnitude of the target pixels. It should be noted that the gradient vector represents the direction and intensity of the fastest grayscale change of the target pixel; the gradient magnitude is the magnitude of the gradient vector. It should also be noted that the edge detection uses the Sobel operator, which is existing technology and will not be elaborated upon here.
[0054] Obtain the local neighborhood entropy of the target pixel within the ROI region. For example, the size of the local neighborhood is set to... .
[0055] The average gradient vector of the target pixel is obtained by calculating the average gradient vector of all pixels in its local neighborhood. The boundary confidence score of the target pixel satisfies the following relationship:
[0056] ;
[0057] in, It is the target pixel located within the ROI region. Boundary confidence score; Target pixels within the ROI region The gradient magnitude; Target pixels within the ROI region Local neighborhood entropy; Target pixels within the ROI region The normalized gradient vector; Target pixels within the ROI region The unit vector obtained by normalizing the average value of all pixel gradient vectors in the local neighborhood; This is a preset microvalue used to prevent the denominator from being 0; it can be set to 0.001. It is a normalization function; It is a maximum value function; It is the Euclidean norm symbol for a vector.
[0058] in, This is the boundary strength of the target pixel. When the gradient magnitude of the target pixel is large and the local neighborhood entropy is small, the higher this value is, it indicates that the pixel has drastic grayscale changes and simple texture, which may be the boundary of the insulating layer. Conversely, when the gradient magnitude is small or the local neighborhood entropy is large, the lower this value is, which corresponds to the conductor or filler. It is the Euclidean distance between the normalized gradient vector and the unit vector of the target pixel. The smaller this value is, the more consistent the local gradient direction is. It refers to the local orientation consistency of the target pixels; the gradient vector of the insulating layer boundary is smooth and continuous in the local neighborhood. near When the conductor or filler is oriented randomly, this term approaches 1; however, when the conductor or filler is oriented randomly, this term decreases or approaches 0.
[0059] At this point, the boundary confidence scores of all pixels within the ROI region have been obtained.
[0060] It should be noted that since the boundary confidence scores of target pixels are continuous values, they cannot directly distinguish between insulating layer boundaries, fillers, and conductors. Considering that pixels belonging to insulating layer boundaries have higher boundary confidence scores and pixels belonging to conductors or fillers have lower boundary confidence scores, this invention sets a threshold and binarizes the target pixels in the ROI region, taking high-confidence pixels to form suspected insulating layer boundaries and eliminating weak response noise. However, there are multiple mutually separated insulating layer boundaries in the ROI region, which cannot be processed uniformly. Therefore, this invention performs regional segmentation on the suspected insulating layer boundaries to obtain unconnected interlayer boundary bands.
[0061] Preferably, a threshold is set. Binarize the boundary confidence scores of all pixels, and then convert the boundary confidence scores into a single value. Pixels with a value of 1 are set to 1 in the ROI region, and all other pixels are set to 0; all pixels with a value of 1 are extracted to form a suspected insulating layer boundary; the suspected insulating layer boundary is then segmented, for example, by using a watershed algorithm to divide it into a preset number of lines. The interlayer boundary bands. It should be noted that each interlayer boundary band corresponds to the outer or inner boundary of the insulating layer; the watershed algorithm is existing technology and will not be elaborated here.
[0062] It should be noted that the preset threshold The parameters can be pre-calibrated based on the statistical distribution of the boundary confidence scores of qualified cable samples; for example, a preset threshold can be used. Preset number of entries The number of insulation layers is determined based on the cable's product model.
[0063] Thus, the suspected insulating layer boundary and interlayer boundary zone were obtained.
[0064] It should be noted that, on the one hand, since a single interlayer boundary band is usually a long, narrow closed loop, the more concentrated its pixel distribution and the closer its width is to a single pixel, noise interference or false edges can cause the interlayer boundary band to expand or fragment. Therefore, this invention calculates the ratio of the total pixel area of the interlayer boundary band to the skeleton length, effectively characterizing the geometric rationality of each interlayer boundary band. On the other hand, the higher the boundary confidence score of the pixels on a single interlayer boundary band, the clearer and more stable the interlayer boundary band is. Therefore, this invention combines the ratio of the total pixel area of the interlayer boundary band to the skeleton length and the boundary confidence score to construct the internal constraint factor of the interlayer boundary band, enabling the subsequent active contour model to independently adjust its evolutionary behavior according to the actual shape and quality of each interlayer boundary band.
[0065] Preferably, the internal constraint factor of the interlayer boundary band is calculated based on the discreteness of the pixels in each interlayer boundary band and the boundary confidence score, including:
[0066] Calculate the total area covered by pixels on the interlayer boundary band; perform skeletonization processing on the interlayer boundary band, for example, using a morphological thinning algorithm; obtain several potentially broken 1-pixel-wide curve segments; record the total number of all non-zero pixels as the skeleton length of the interlayer boundary band. It should be noted that the morphological thinning algorithm is existing technology and will not be elaborated here.
[0067] Calculate the mean boundary confidence score of all pixels on the interlayer boundary band.
[0068] No. The internal constraint factors of the interlayer boundary zone satisfy the following relationship:
[0069] ;
[0070] in, It is the first Internal constraint factor of the interlayer boundary zone; It is the first The total area covered by pixels in the interlayer boundary band; It is the first The pixel length of the skeleton line obtained after skeletonizing the interlayer boundary band; It is the maximum value of the ratio of the total area covered by pixels in all interlayer boundary bands to the square of the skeleton line length, used for normalization processing; It is the first The mean boundary confidence score of all pixels on the interlayer boundary band; It is a preset standard threshold for the standard boundary confidence score, which can be obtained by statistically calibrating the average boundary confidence score of pixels in the interlayer boundary band of qualified cable sample images. It is a minimum value function.
[0071] In this relation, Indicates the first The geometric dispersion of the interlayer boundary band is low when the interlayer boundary band is a long, narrow closed loop with a width close to that of a single pixel, and the total area is relatively small relative to the pixel length. Conversely, if the boundary band expands or fragments due to noise or false edges, the value of this item increases. Indicates the first The quality level of the interlayer boundary band relative to the standard clear boundary. The larger this value is, the closer the interlayer boundary band is to the quality state of a typical interlayer boundary in a qualified cable. Indicates the first The clarity of the interlayer boundary zone is determined by the following: when the mean boundary confidence score is close to or exceeds the standard threshold, this item approaches 0, indicating that the interlayer boundary zone is clear and stable; conversely, if the mean boundary confidence score is lower than the standard threshold, this item increases, indicating that the interlayer boundary zone is blurred or severely disturbed.
[0072] Thus, the internal constraint factors of all interlayer boundary zones are obtained.
[0073] S300. Based on the internal constraint factor of the interlayer boundary zone and the basic model parameters of the active contour model, the dynamic model parameters of the active contour model are obtained; the dynamic model parameters are input into the active contour model to obtain the closed contour line of the interlayer boundary zone.
[0074] It should be noted that the internal constraint factor comprehensively reflects the actual shape and quality of each interlayer boundary zone. When the internal constraint factor is large, it indicates that the corresponding interlayer boundary zone has a compact structure and clear boundaries. In this case, the dynamic external force weight is reduced to weaken noise interference, while the dynamic stiffness coefficient is increased to enhance contour smoothness, and the dynamic elasticity coefficient is reduced to weaken the tendency of over-smoothing, making the contour more closely match the real boundary details. Conversely, when the internal constraint factor is small, it indicates that the corresponding interlayer boundary zone may have dispersion or fracture. In this case, the dynamic external force weight is increased to enhance the sensitivity to weak boundary response, the dynamic stiffness coefficient is reduced to allow the contour to adapt to local deformation, and the dynamic elasticity coefficient is increased to maintain overall continuity and prevent excessive contour distortion or splitting. Therefore, this invention adaptively generates its dynamic model parameters, including dynamic external force weight, dynamic stiffness coefficient, and dynamic elasticity coefficient, based on the internal constraint factor and basic model parameters of the interlayer boundary zone.
[0075] Specifically, according to the first The internal constraint factors and basic model parameters of the interlayer boundary zone are used to obtain the dynamic model parameters of the active contour model, including dynamic external force weights, dynamic stiffness coefficients, and dynamic elastic coefficients.
[0076] No. The dynamic model parameters of the active contour model of the interlayer boundary zone satisfy the following relationship:
[0077] ;
[0078] in, It is the first Dynamic model parameters of the active contour model corresponding to the interlayer boundary zone; It is the first The dynamic external force weights corresponding to the interlayer boundary zones; It is the first The dynamic stiffness coefficient corresponding to the interlayer boundary zone; It is the first The dynamic elastic coefficient corresponding to the interlayer boundary zone; It is the first Internal constraint factor of the interlayer boundary zone; It is the preset basic external force weight; It is the preset basic rigidity coefficient; It is the preset basic elastic coefficient.
[0079] In this relationship, when the internal constraint factor is large, it indicates that the interlayer boundary zone has a compact structure and clear boundaries. In this case, the dynamic external force weight is reduced to weaken noise interference, while the dynamic stiffness coefficient is increased to enhance the smoothness of the profile and the dynamic elastic coefficient is reduced to weaken the tendency of over-smoothing, so that the profile fits the real boundary details better. Conversely, when the internal constraint factor is small, it indicates that the interlayer boundary zone may have dispersion or fracture. In this case, the dynamic external force weight is increased to enhance the sensitivity to weak boundary response, the dynamic stiffness coefficient is reduced to allow the profile to adapt to local deformation, and the dynamic elastic coefficient is increased to maintain overall continuity and prevent the profile from being excessively distorted or split.
[0080] It should be noted that since the convergence performance of the active contour model depends on the model parameter settings, and there are certain differences in the clarity and geometric shape of the boundary bands between layers, it is difficult to simultaneously ensure the preservation of clear boundary details and the effective capture of weak boundaries if uniform model parameters are used. Therefore, this invention drives the independent evolution of the contour based on the dynamic model parameters determined by the internal constraint factor to achieve accurate fitting.
[0081] Preferably, the dynamic external force weights, dynamic stiffness coefficients, and dynamic elasticity coefficients are input into the active contour model. The active contour model iteratively evolves each initial contour independently, minimizing the total energy until convergence, ultimately achieving a precise fit to the first contour. The boundary of the cable interlayer structure corresponding to the interlayer boundary strip is obtained. The closed contour line of the interlayer boundary zone.
[0082] At this point, the closed contour lines of all interlayer boundary zones are obtained.
[0083] S400. Based on the distance between the centroids of the closed contour lines, a group of closed contour lines is obtained; based on the continuous thickness data of the closed contour line group at continuous angles, the quality index of the insulating layer is obtained; the quality index is compared with the quality threshold to evaluate the thickness uniformity of the insulating layer.
[0084] It should be noted that since each insulating layer consists of two adjacent material interfaces, one inner and one outer, and the closed contour line output by the active contour model corresponds to only a single interface, the closed contour lines need to be grouped first. Because each insulating layer is arranged radially from the inside out, the distance from the centroid of different interfaces to the center of the ROI shows a monotonically increasing sequence, and the distance between the inner and outer boundaries of the same layer is much smaller than the interlayer spacing; therefore, this invention sorts all closed contour lines according to their radial distance from their centroids, and then groups the closed contour lines corresponding to two centroids that are close in distance as closed contour line groups. Considering that the distance variation between closed contour line groups can reflect the thickness uniformity of the insulating layer, this invention emits radial rays along the reference center of the closed contour line group, so that each radial ray intersects the inner and outer contours simultaneously in a single angular direction, thereby obtaining the local thickness in that direction.
[0085] Specifically, obtaining continuous thickness data of the insulation layer includes:
[0086] Calculate the centroid of each closed contour line and sort them in ascending order according to the distance of the centroid to the center of the ROI region to obtain the centroid sequence;
[0087] The two closed contour lines corresponding to two adjacent centroids in the centroid sequence are taken as a closed contour line group, representing the inner and outer boundaries of the insulating layer; the average value of the two centroids of the closed contour line group is used as its reference center.
[0088] Radial rays are emitted along the reference center, and their intersections with the two closed contour lines are determined. The distance between these two points represents the local thickness of the insulating layer at that angle, thus obtaining continuous thickness data for the insulating layer. For example, the radial ray angle interval can be set to... .
[0089] At this point, continuous thickness data for all insulating layers were obtained.
[0090] It should be noted that the uniformity of insulation layer thickness directly affects its electrical insulation performance. Greater unevenness in thickness indicates potential defects such as eccentricity, localized excessive thinness, or material accumulation. The thinnest areas are prone to becoming regions of electric field concentration, significantly reducing breakdown voltage. Conversely, excessively thick areas may lead to internal stress concentration or material waste. Therefore, this invention calculates the range of continuous thickness data for all insulation layers to obtain the quality index of the insulation layer and evaluate the quality of the cable interlayer structure.
[0091] Preferably, based on the continuous thickness data of the insulation layer, the quality indicators of the insulation layer satisfy the following relationship:
[0092] ;
[0093] in, It is a quality indicator of the insulation layer; It refers to the number of insulation layers; It is the first An insulating layer at an angle Local thickness in the direction; and It is the first The maximum and minimum thickness values of an insulating layer at all angles; It is a maximum value function; It is a minimum value function.
[0094] In this relation, It is the first The thickness variation of the insulation layer is as follows: the larger the value, the more severe the eccentricity of the insulation layer or the more obvious the local defects; conversely, the smaller the value, the more uniform the thickness of the insulation layer and the higher the manufacturing quality. It is the sum of the thickness differences of all insulation layers; the larger the value, the worse the uniformity of the overall insulation layer of the cable, and the higher the risk of electrical failure; the smaller the value, the more uniform the overall insulation layer thickness distribution of the cable, and the better the product consistency.
[0095] Set quality threshold If the quality indicators If the cable insulation layer thickness uniformity is qualified, then the cable insulation layer thickness uniformity is deemed acceptable; if If the result is deemed unqualified, an alarm may be triggered or a re-inspection may be indicated.
[0096] It should be noted that the quality threshold can be obtained based on cable product standards or statistical calibration of qualified samples.
[0097] Thus, this invention realizes the entire process from cable cross-section images to automatic quantitative evaluation and qualification determination of insulation layer thickness uniformity.
[0098] This invention also discloses an image processing-based cable interlayer structure detection system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement an image processing-based cable interlayer structure detection method according to the present invention.
[0099] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0100] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A method for detecting interlayer structure of cables based on image processing, characterized in that, include: The target image is obtained by preprocessing the cable cross-section image; Perform circular detection on the target image to obtain the Region of Interest (ROI). Based on the intensity of pixel grayscale changes, texture complexity, and spatial coherence characteristics of edge directions within the ROI region, the boundary confidence score of each pixel is obtained. ;in, It is the target pixel located within the ROI region. Boundary confidence score; Target pixels within the ROI region The gradient magnitude; Target pixels within the ROI region Local neighborhood entropy; Target pixels within the ROI region The normalized gradient vector; Target pixels within the ROI region The unit vector obtained by normalizing the average value of all pixel gradient vectors in the local neighborhood; It is a preset micro value; It is a normalization function; It is a maximum value function; It is the Euclidean norm symbol of the vector; based on the relationship between the boundary confidence score and the preset threshold, the suspected insulating layer boundary is obtained; the suspected insulating layer boundary is segmented to obtain several interlayer boundary bands; further, combining the discreteness of pixels on each interlayer boundary band with the boundary confidence score, the internal constraint factor of the interlayer boundary band is obtained. ;in, It is the first Internal constraint factor of the interlayer boundary zone; It is the first The total area covered by pixels in the interlayer boundary band; It is the first The pixel length of the skeleton line obtained after skeletonizing the interlayer boundary band; It is the maximum value of the ratio of the total area covered by pixels in all interlayer boundary bands to the square of the skeleton line length; It is the first The mean boundary confidence score of all pixels on the interlayer boundary band; It is the standard threshold of the preset standard boundary confidence score; It is a minimum value function; Based on the internal constraint factors and the preset basic model parameters, the dynamic model parameters of the active contour model are obtained; the dynamic model parameters are input into the active contour model to obtain the closed contour line of the interlayer boundary zone. A closed profile group is obtained based on the centroid spacing between the obtained closed profiles; the quality index of the insulating layer is obtained based on the continuous thickness data of the closed profile group at continuous angles; the quality index is compared with the quality threshold to evaluate the thickness uniformity of the insulating layer.
2. The cable interlayer structure detection method based on image processing according to claim 1, characterized in that, The acquisition of the ROI region includes: Hough circle detection is used on the target image to detect circular contours, and the largest circle is taken as the ROI region.
3. The cable interlayer structure detection method based on image processing according to claim 1, characterized in that, The acquisition of the suspected insulating layer boundary includes: Set a threshold and binarize the boundary confidence scores of all pixels; Pixels with a boundary confidence score greater than a preset threshold are set to 1 in the ROI region, and the rest are set to 0. Extract all pixels with a value of 1 to form the suspected boundary of the insulating layer.
4. The cable interlayer structure detection method based on image processing according to claim 1, characterized in that, The acquisition of the interlayer boundary zone includes: The watershed algorithm is used to segment the suspected insulation layer boundary into regions, dividing it into a preset number of interlayer boundary zones.
5. The cable interlayer structure detection method based on image processing according to claim 1, characterized in that, The acquisition of the dynamic model parameters of the active contour model includes: The dynamic external force weights of the active contour model are obtained by multiplying the preset basic external force weights by the difference between 1 and the internal constraint factor. The dynamic stiffness coefficient of the active contour model is obtained by multiplying the preset basic stiffness coefficient by 1 plus the internal constraint factor. Calculate the sum of 1 and the internal constraint factor, and multiply the sum by the preset basic rigidity coefficient to obtain the product result; calculate 1 and subtract the difference from the product result, and multiply it by the preset basic elasticity coefficient to obtain the dynamic elasticity coefficient.
6. The cable interlayer structure detection method based on image processing according to claim 1, characterized in that, The acquisition of the closed contour line group includes: Calculate the centroid of each closed contour line, and sort them in ascending order according to the distance from the centroid of each closed contour line to the center of the ROI region to obtain the centroid sequence; The two closed contour lines corresponding to two adjacent centroids in the centroid sequence are taken as a closed contour line group.
7. The cable interlayer structure detection method based on image processing according to claim 1, characterized in that, Obtaining the quality indicators of the insulating layer includes: The average value of the two centroids of the closed contour line group is used as its reference center; By emitting radial rays along the reference center and finding their intersection points with the closed contour line group, the continuous thickness data of the insulating layer can be obtained. From the continuous thickness data, obtain the maximum and minimum thickness values of each insulating layer at all angles; The quality index of the insulation layer is obtained by summing the differences between the maximum and minimum thickness values of the continuous thickness data of each insulation layer.
8. A cable interlayer structure detection system based on image processing, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement a cable interlayer structure detection method based on image processing according to any one of claims 1-7.