Visual inspection method for appearance defects of electronic cable

By establishing a three-dimensional spatial coordinate system to separate multispectral image component layers and using a dynamic threshold model to reconstruct the topological network, the problems of spectral dependence and light interference sensitivity in the appearance inspection of electronic cables in the prior art are solved, enabling accurate classification and location of defects and improving the accuracy and stability of the inspection.

CN122023367APending Publication Date: 2026-05-12HENGYANG HONGFENG ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENGYANG HONGFENG ELECTRONIC TECHNOLOGY CO LTD
Filing Date
2026-02-05
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing visual inspection methods for defects in electronic cables rely on single spectral information, have fixed processing procedures, and are sensitive to changes in illumination, surface texture, or color interference, leading to false detections or missed detections. Furthermore, they lack adaptive defect discrimination thresholds and accurate topology reconstruction capabilities.

Method used

A three-dimensional spatial coordinate system is established by acquiring images of the cable surface, multispectral image component layers are separated, an adaptive defect discrimination threshold is generated using a dynamic threshold growth model, the morphological evolution path of the defect voxel set is tracked, the topological network is reconstructed, and defect category and location information are output.

Benefits of technology

It enhances the separability of defect features and the stability of detection, enabling accurate classification and localization of complex defects, and improving the accuracy and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023367A_ABST
    Figure CN122023367A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine vision detection, in particular to an electronic cable appearance defect vision detection method which comprises the following steps: acquiring a cable image and establishing a three-dimensional coordinate system; carrying out serialized frame decomposition and spectral response analysis, and separating image component layers with different physical characteristics; overlapping each component layer in a three-dimensional space to form an overlapped feature body, and extracting feature data through layered stripping; importing the data into a dynamic threshold growth model to iteratively generate an adaptive defect discrimination threshold; identifying defect voxels by using threshold scanning, and tracking morphological evolution paths of the defect voxels for communication and merging; and reconstructing a defect topological structure network, mapping the defect topological structure network back to the three-dimensional coordinate system, and outputting defect types and positions. According to the method, through multispectral component separation and adaptive topology analysis, the defect feature identification capability is enhanced, and the detection accuracy and the environmental adaptability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision inspection technology, and in particular to a visual inspection method for appearance defects in electronic cables. Background Technology

[0002] Conventional visual inspection methods for electronic cable appearance defects are mainly based on visible light imaging. They involve acquiring RGB images and then applying edge detection, threshold segmentation, or template matching algorithms for defect identification. These methods rely on single-spectral information, have fixed processing procedures, and are sensitive to changes in illumination, surface texture, or color interference, easily leading to false positives or false negatives. Existing technologies have introduced multispectral or hyperspectral imaging to obtain more physical information, but they typically involve directly fusing images or using fixed threshold processing, failing to effectively separate and utilize the independent features of different physical property component layers, thus limiting the ability to distinguish defects from the background.

[0003] In 3D spatial analysis, some techniques reconstruct 3D models of cable surfaces using laser scanning or structured light, and then combine this with image processing for defect detection. However, defect identification often relies on preset thresholds and lacks adaptive adjustments for specific cable characteristics, making it unable to handle complex morphological changes in defects. Existing methods for connectivity analysis of defect regions are mostly based on simple morphological operations or region growing, which struggles to accurately track the evolution of defects in the spatiotemporal dimensions. This results in inaccurate merging of scattered defect regions, coarse topological reconstruction, and affects the accuracy of defect classification and location.

[0004] To address the limitations of existing defect detection technologies, such as reliance on single-spectral information, fixed thresholds, and insufficient defect morphology analysis, it is necessary to separate independent physical characteristic component layers from multispectral images to enhance defect feature representation. Simultaneously, it is necessary to adaptively generate defect discrimination thresholds based on cable characteristics and achieve accurate topology reconstruction by analyzing the defect morphology evolution path, thereby improving the accuracy and robustness of detection. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and propose a visual inspection method for the appearance defects of electronic cables.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a visual inspection method for appearance defects in electronic cables, comprising: Acquire initial surface images of the electronic cable and establish a three-dimensional spatial coordinate system corresponding to the electronic cable; Perform serialized frame decomposition on the initial surface image to generate a set of frame images arranged in time sequence; Spectral response analysis is performed on each frame in the frame image set to separate image component layers containing different physical properties; Based on the coordinate information of the three-dimensional spatial coordinate system, multiple image component layers corresponding to each frame image are spatially superimposed to form the superimposed feature body of the electronic cable. A layer-by-layer peeling process is performed on the superimposed feature body to extract peeling feature data reflecting the surface state layer by layer; The stripping feature data is imported into a dynamic threshold growth model to iteratively generate a defect discrimination threshold for the current electronic cable. The superimposed feature volume is scanned using the defect discrimination threshold to identify the set of spatial voxels that meet the defect characteristics. The morphological evolution path of the spatial voxel set in the superimposed feature body is traced, and the dispersed voxel sets are connected and merged according to the morphological evolution path. Based on the connected and merged voxel sets, the topological network of surface defects in electronic cables is reconstructed. The topology network is mapped back to the three-dimensional spatial coordinate system, and the category and location information of surface defects of electronic cables are output.

[0007] As a further aspect of the present invention, the acquisition of the initial surface image of the electronic cable and the establishment of a three-dimensional spatial coordinate system corresponding to the electronic cable specifically includes: By arranging an array of optical sensors on both sides of the electronic cable transmission path, raw image streams from multiple sides of the electronic cable are captured simultaneously. Based on the physical position and angle parameters of each sensor in the optical sensor array, the spatial geometric relationship between each original image stream is calculated; Based on the aforementioned spatial geometric relationship, each original image stream is uniformly registered to a virtual three-dimensional space with the central axis of the electronic cable as the reference. Define the origin, axis, and scale in the virtual three-dimensional space to complete the establishment of the three-dimensional space coordinate system; The initial surface image is the initial representation of the multi-faceted image data after spatial registration in the three-dimensional spatial coordinate system.

[0008] As a further aspect of the present invention, the step of performing serialized frame decomposition on the initial surface image to generate a set of frame images arranged in time sequence specifically includes: Along the transmission direction of the electronic cable, the initial surface image is time-sliced ​​according to a preset sampling interval; The image data obtained from each time slice is encoded according to its axial position in the three-dimensional spatial coordinate system; The encoded image data is reassembled according to time order and axial position order to generate a frame image sequence with strict spatiotemporal order; Each frame in the frame image sequence is accompanied by a recording of its acquisition timestamp and its axial position information in the three-dimensional spatial coordinate system; The set of frame images is a data structure composed of the sequence of frame images and their accompanying information.

[0009] As a further aspect of the present invention, the step of performing spectral response analysis on each frame image in the frame image set to separate image component layers containing different physical properties specifically includes: For each frame of the image, analyze the spectral intensity distribution curve of its pixels; Based on a preset spectral feature library, identify the characteristic absorption peaks and reflection peaks in the spectral intensity distribution curve; Pixels corresponding to spectral curves with similar characteristic peaks are grouped into one category to form multiple pixel clusters; Extract all pixels belonging to the same pixel cluster from the original frame image and retain their original spatial positions to generate an image component layer. After each frame of the image is processed in this way, multiple independent image component layers are obtained, which together constitute the complete information of the original image.

[0010] As a further aspect of the present invention, the step of spatially superimposing multiple image component layers corresponding to each frame image according to the coordinate information of the three-dimensional spatial coordinate system to form a superimposed feature body of the electronic cable specifically includes: Read the axial position information in the three-dimensional spatial coordinate system attached to each frame of the image; All image component layers separated from the same frame image are placed at the corresponding axial positions in the three-dimensional spatial coordinate system according to the original coordinates of their pixels. All image component layers of all frames are stacked in the three-dimensional coordinate system according to their corresponding axial positions. The pixel data occupying the same spatial position after being stacked are fused and calculated to generate a dense three-dimensional data array. The superimposed features of the electronic cable constitute the three-dimensional data array, which fully characterizes the comprehensive state of the electronic cable surface in three-dimensional space and spectral dimension.

[0011] As a further aspect of the present invention, the step of performing a layered peeling process on the superimposed feature body, and extracting peeling feature data reflecting the surface state layer by layer, specifically includes: In the superimposed feature body, a series of virtual cutting surfaces are defined along a direction parallel to the surface of the electronic cable; Data is cut along each virtual cutting surface of the superimposed feature body in a sequence from the outside to the inside, and a surface layer slice is obtained each time the cut is performed. Analyze the data distribution pattern of each surface layer slice and calculate its texture continuity, density uniformity, and spectral consistency indices; The calculated texture continuity, density uniformity, and spectral consistency indices are bound to the depth information of the surface layer slices to form a feature data package. The stripping feature data is a sequence composed of feature data packets of all surface layer slices in the stripping order.

[0012] As a further aspect of the present invention, the step of importing the stripped feature data into a dynamic threshold growth model to iteratively generate a defect discrimination threshold for the current electronic cable specifically includes: The stripped feature data sequence is used as input and fed into a preset initial threshold model; The initial threshold model generates an initial defect discrimination threshold based on the feature value of the first feature data packet in the stripped feature data sequence; The initial defect discrimination threshold is used to pre-determine defects on the surface of the superimposed feature body to obtain the initially determined defect area; Based on the feature feedback of the initially determined defect area, the internal parameters of the initial threshold model are adjusted so that it outputs an updated defect discrimination threshold. The updated defect discrimination threshold is repeatedly used for prediction, and the model is adjusted based on feedback until the defect discrimination threshold output by the model tends to stabilize. The stable threshold is the final defect discrimination threshold for the current electronic cable.

[0013] As a further aspect of the present invention, the step of scanning the superimposed feature volume using the defect discrimination threshold to identify the set of spatial voxels that conform to the defect features specifically includes: The final defect discrimination threshold is compared with the feature value of each voxel in the superimposed feature body; If the feature value of a voxel exceeds the final defect discrimination threshold, the voxel is marked as a candidate defect voxel. In the three-dimensional space of the superimposed feature body, spatial neighborhood analysis is performed on all marked candidate defect voxels; Candidate defect voxels that are spatially adjacent to each other will be aggregated into a spatial voxel cluster; The spatial voxel set consists of all identified spatial voxel clusters, each cluster representing a potential defect region.

[0014] As a further aspect of the present invention, the step of tracing the morphological evolution path of the spatial voxel set in the superimposed feature body, and connecting and merging the dispersed voxel sets according to the morphological evolution path, specifically includes: For each spatial voxel cluster in the aforementioned spatial voxel set, analyze its morphological changes at different levels along the depth direction of the superimposed feature body; Record the continuous change trajectory of the morphological center, area, and outline of the spatial voxel cluster in the depth direction; this trajectory is the morphological evolution path. By comparing the morphological evolution paths of different spatial voxel clusters, if the paths intersect, approach each other in space, or have highly similar morphological characteristics, it can be determined that the spatial voxel clusters originate from the same physical defect. Multiple spatial voxel clusters determined to originate from the same physical defect are connected in three-dimensional space and merged into a unified defect body. Perform analysis, comparison, and merging operations on all spatial voxel clusters to form several independent and complete defect volume data.

[0015] As a further aspect of the present invention, the reconstructing of the topological network of surface defects of electronic cables based on the connected and merged voxel sets specifically includes: Each individual defect is treated as a topology node; Calculate the three-dimensional geometric features of each defect, including volume, surface area, principal axis direction and spatial bounding box, and use the three-dimensional geometric features as the attributes of the corresponding topological nodes; Analyze the relative positional relationship and geometric feature correlation between any two topological nodes in three-dimensional space. If the preset topological association rules are satisfied, then establish a connecting edge between the two nodes. All topological nodes and their connecting edges together constitute the topological network of the surface defects of the electronic cable; The spatial coordinates of each node in the topological network are transformed to the actual coordinates in the three-dimensional spatial coordinate system. Combined with its attributes, the category and location information of surface defects of electronic cables are output.

[0016] Compared with the prior art, the advantages and positive effects of the present invention are as follows: By performing spectral response analysis on frame images, image component layers containing different physical properties such as reflectivity, thermal radiation, or material absorption characteristics are separated. These independent image component layers each carry multi-dimensional physical information of the cable surface, allowing defect features to be focused and highlighted in one or more component layers strongly correlated with their own physical properties. This method overcomes the limitation of defect information being coupled with background noise in conventional visible light images, enhances the separability of defect features, and provides a data foundation with higher signal-to-noise ratio and purer features for subsequent processing.

[0017] The feature data obtained from the layer-by-layer stripping process is imported into a dynamic threshold growth model. Through iterative calculation, a defect discrimination threshold matching the current state of the specific cable is generated. This process achieves adaptive and dynamic threshold setting, avoiding systematic errors caused by using fixed thresholds due to individual cable differences, material variations, or environmental fluctuations. It allows the sensitivity and specificity of defect discrimination to be optimized based on the distribution characteristics of actual data, thereby maintaining the stability and accuracy of defect detection under complex operating conditions.

[0018] The morphological evolution path of the identified defect voxels is traced within the superimposed feature volume, and spatial voxels are connected and merged based on this path. The morphological evolution path, based on spatiotemporal continuity analysis, can accurately describe the growth, extension, and distribution patterns of defects in three-dimensional space. This allows even discretely distributed or morphologically complex defect regions to be correctly integrated into a whole based on their inherent evolutionary logic, thereby reconstructing a topological network that accurately reflects the true geometric shape and spatial relationships of the defects. This lays a reliable structured data foundation for the accurate classification and quantitative localization of defects. Attached Figure Description

[0019] Figure 1 This is a flowchart of the visual inspection method for appearance defects of electronic cables according to the present invention; Figure 2 A flowchart for decomposing serialized frames; Figure 3 A diagram illustrating defect prediction and parameter adjustment analysis for electronic cables; Figure 4 A scatter plot of three-dimensional defect features for electronic cable defect detection; Figure 5 A bar chart comparing the three-dimensional geometric features of defects in electronic cables. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0021] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0022] See Figure 1 A visual inspection method for surface defects in electronic cables is proposed. This method involves acquiring initial surface images of the electronic cables and establishing a corresponding three-dimensional spatial coordinate system. The initial surface images are then decomposed into a series of sequential frames. Spectral response analysis is performed on each frame to separate image component layers containing different physical properties. Based on the coordinate information of the three-dimensional spatial coordinate system, the image component layers corresponding to each frame are spatially superimposed to form a superimposed feature body of the electronic cable. Layer-by-layer peeling is performed on the superimposed feature body to extract peeled feature data. The peeled feature data is imported into a dynamic threshold growth model to iteratively generate a defect discrimination threshold. This threshold is used to scan the superimposed feature body and identify spatial voxel sets that match the defect characteristics. The morphological evolution path of the spatial voxel sets within the superimposed feature body is tracked. Based on this path, the dispersed voxel sets are connected and merged. The topological structure network of surface defects in the electronic cable is reconstructed based on the connected and merged voxel sets. Finally, the topological structure network is mapped back to the three-dimensional spatial coordinate system to output the category and location information of the surface defects of the electronic cable.

[0023] See Figure 2In one embodiment of the present invention, an optical sensor array arranged on both sides of the electronic cable transmission path synchronously captures original image streams from multiple sides of the electronic cable. The spatial geometric relationship between the original image streams is calculated based on the physical position and angle parameters of each sensor in the optical sensor array. Based on the spatial geometric relationship, the original image streams are uniformly registered to a virtual three-dimensional space with the central axis of the electronic cable as the reference. In this virtual three-dimensional space, the origin, axis, and scale are defined to establish a three-dimensional spatial coordinate system. The initial surface image is the initial representation of the multi-sided image data after spatial registration in the three-dimensional spatial coordinate system. The initial surface image is time-sliced ​​along the transmission direction of the electronic cable at a preset sampling interval. The image data obtained in each time slice is encoded according to its axial position in the three-dimensional spatial coordinate system. The encoded image data is recombined in chronological and axial position order to generate a frame image sequence with a strict spatiotemporal order. Each frame in the frame image sequence is accompanied by its acquisition timestamp and axial position information in the three-dimensional spatial coordinate system. The frame image set is a data structure composed of the frame image sequence and its accompanying information.

[0024] In practice, an optical sensor array arranged on both sides of the electronic cable transmission path synchronously captures the original image streams from multiple sides of the electronic cable. The optical sensor array consists of four line scan cameras, with two cameras arranged above the transmission path and two cameras arranged below the transmission path. The two cameras above are installed at a 60-degree angle with the central axis of the electronic cable as the axis of symmetry, and the two cameras below are also installed at a 60-degree angle with the central axis of the electronic cable as the axis of symmetry. Each line scan camera acquires image data at a frequency of 10,000 lines per second. The four cameras achieve synchronous exposure through hardware trigger signals, thereby obtaining the original image streams from the four sides of the electronic cable at the same moment. Based on the physical position and angle parameters of each sensor in the optical sensor array, the spatial geometric relationship between the original image streams is calculated. The position parameters include the three-dimensional coordinates of the center of each camera lens in a preset world coordinate system, and the angle parameters include the direction vector of the optical axis of each camera and the roll angle of the camera image sensor. Based on these parameters, a perspective projection model of each camera image is established. The model includes rotation matrices and translation vectors from the world coordinate system to the camera image coordinate system. By solving the relative relationships between these models, the spatial correspondence of corresponding pixels in different original image streams in the world coordinate system is obtained. Based on the spatial geometric relationship, the original image streams are uniformly registered to a virtual three-dimensional space with the central axis of the electronic cable as the reference. The centerline of the electronic cable in the transmission direction is defined as the Z-axis of the virtual three-dimensional space, the horizontal centerline perpendicular to the transmission direction is defined as the X-axis, and the vertical centerline perpendicular to the transmission direction is defined as the Y-axis. The calculated rotation matrices and translation vectors are used to transform the coordinates of the pixels in each original image stream to this virtual three-dimensional space coordinate system. For image overlap areas caused by different viewing angles, a bilinear interpolation algorithm is used for pixel value fusion. In the virtual three-dimensional space, the origin, axis and scale are defined to complete the establishment of the three-dimensional space coordinate system. The origin is set as the geometric center of the starting end face of the electronic cable detection. The positive direction of the Z axis is along the transmission direction of the electronic cable. The scale is set to each pixel represent 0.1 mm of actual physical size. The initial surface image is the initial expression of the multi-sided image data after spatial registration in the three-dimensional space coordinate system. The expression form is a three-dimensional data cube.

[0025] In some embodiments, the initial surface image is time-sliced ​​along the transmission direction of the electronic cable at a preset sampling interval. The sampling interval is set to collect slice data once per millimeter based on the transmission speed and detection accuracy requirements of the electronic cable. A two-dimensional image plane is extracted from the three-dimensional data cube represented by the initial surface image along the Z-axis at fixed spatial intervals. The spatial interval corresponds to the time-slicing interval. The image data obtained in each time slice is a two-dimensional image matrix containing all pixel information of the XY plane. The image data obtained in each time slice is encoded according to its axial position in the three-dimensional spatial coordinate system. The encoding rule is to multiply the Z-axis coordinate value by a fixed coefficient to convert it into an 8-bit string identifier. The first two bits of the string identifier represent the acquisition batch to which the image data belongs, and the last six bits represent the specific axial position sequence number. The encoded image data is reassembled according to the time order and axial position order to generate a frame image sequence with strict spatiotemporal order. The reassembly process is to arrange all two-dimensional image matrices with string identifiers in ascending order of the last six bits of the string identifier to form an ordered data list. Each frame in the frame image sequence is accompanied by its acquisition timestamp and axial position information in the three-dimensional spatial coordinate system. The acquisition timestamp is derived from the global clock of the image acquisition hardware, and the axial position information directly records the Z coordinate value of the center point of the frame image in the three-dimensional spatial coordinate system. The frame image set is a data structure composed of the frame image sequence and its accompanying information. The data structure is encapsulated by a custom class object, which contains three attributes: image data matrix, timestamp, and axial position.

[0026] It is understandable that the calculation of spatial geometric relationships can rely on a coordinate transformation formula, which is used to transform a point in a camera coordinate system to a virtual 3D spatial coordinate system. The formula is expressed as:

[0027] Where: symbol This represents the coordinate vector of a three-dimensional point in a virtual three-dimensional coordinate system (world coordinate system). Symbol This represents a 3x3 rotation matrix from the camera coordinate system to the virtual 3D space coordinate system. This matrix describes the pose of the camera coordinate system relative to the world coordinate system. (Symbol) This represents the coordinate vector of the same 3D point in the camera coordinate system. (Symbol) This represents a 3x1 translation vector from the camera coordinate system to the virtual 3D space coordinate system. This vector describes the position of the camera coordinate system origin in the world coordinate system. Using this formula, the spatial position of each pixel in the image captured by each camera in the world coordinate system can be calculated.

[0028] Optionally, the pixel data occupying the same spatial position after stacking are fused and calculated using a weighted average algorithm. The weights are dynamically determined based on the resolution of the source camera and the cosine of the angle between the pixel and the normal of the imaging surface. The coefficient of the fusion weight in the calculation formula is defined as a function of the sensor signal-to-noise ratio.

[0029] In one embodiment of the present invention, for each frame of image, the spectral intensity distribution curve of its pixels is analyzed, and characteristic absorption peaks and reflection peaks in the spectral intensity distribution curve are identified according to a preset spectral feature library. Pixels corresponding to spectral curves with similar characteristic peaks are grouped into multiple pixel clusters. All pixels belonging to the same pixel cluster are extracted from the original frame image and their original spatial positions are preserved to generate an image component layer. After this processing, each frame of image yields multiple independent image component layers that together constitute the complete information of the original image. The axial position information in the three-dimensional spatial coordinate system attached to each frame image is read, and all image component layers separated from the same frame image are placed at the corresponding axial positions in the three-dimensional spatial coordinate system according to the original coordinates of their pixels. All image component layers of all frames of image are stacked in the three-dimensional spatial coordinate system according to their corresponding axial positions. The pixel data occupying the same spatial position after stacking are fused and calculated to generate a dense three-dimensional data array. The superimposed feature body of the electronic cable is the three-dimensional data array, which fully characterizes the comprehensive state of the electronic cable surface in three-dimensional space and spectral dimensions.

[0030] In practice, for each frame of an image, the spectral intensity distribution curve of its pixels is analyzed. Each frame of an image originates from data acquired by a multispectral camera, which contains grayscale images of eight different wavelength bands. Each pixel corresponds to a spectral vector containing eight intensity values, and the spectral vectors are arranged in ascending order of wavelength to form the spectral intensity distribution curve. Based on a pre-set spectral feature library, characteristic absorption peaks and reflection peaks in the spectral intensity distribution curve are identified. The spectral feature library stores the reflection spectrum curves of common materials on the surface of electronic cables under a standard light source. These curves mark characteristic peaks at specific wavelengths. The identification process involves comparing the spectral intensity distribution curve of each pixel with each standard curve in the spectral feature library point by point, calculating the correlation coefficient in the region near the wavelength of the characteristic peak. The characteristic peak corresponding to the standard curve with a correlation coefficient exceeding 0.9 is identified as the characteristic absorption peak or reflection peak of that pixel. Pixels with similar characteristic peaks in their spectral curves are grouped into multiple pixel clusters. Similarity is determined by the consistency of the wavelength positions and relative intensities of the identified characteristic peaks in the pixel's spectral curves. A Euclidean distance-based clustering algorithm is used to group the spectral vectors of all pixels. Pixels within each group are considered to have similar characteristic peaks and are grouped into the same pixel cluster. All pixels belonging to the same pixel cluster are extracted from the original frame image, preserving their original spatial positions to generate an image component layer. The extraction operation involves creating a blank matrix of the same size as the original frame image for each identified pixel cluster. For each pixel belonging to the cluster, its grayscale values ​​in the eight bands of the original frame image are copied to the corresponding coordinate positions in the blank matrix. This data-filled matrix constitutes an image component layer. After this processing, each frame image yields multiple independent image component layers that collectively constitute the complete information of the original image. The number of image component layers equals the number of pixel clusters obtained by the clustering algorithm. Each image component layer represents the spatial distribution of the electronic cable surface under specific spectral characteristics.

[0031] In some embodiments, the axial position information in the three-dimensional spatial coordinate system attached to each frame image is read. The axial position information is stored in the axial position attribute of the frame image set data structure, and its value represents the coordinate of the center point of the frame image in the Z-axis direction of the three-dimensional spatial coordinate system. All image component layers separated from the same frame image are placed in the corresponding axial positions in the three-dimensional spatial coordinate system according to the original coordinates of their pixels. The placement operation converts the coordinates of each pixel in the image component layer matrix from its two-dimensional image coordinates to three-dimensional spatial coordinates. The row index of the two-dimensional image coordinates corresponds to the Y-axis coordinate of the three-dimensional spatial coordinates, the column index of the two-dimensional image coordinates corresponds to the X-axis coordinate of the three-dimensional spatial coordinates, and the Z-axis coordinate of the three-dimensional spatial coordinates uniformly uses the axial position information attached to the frame image. All image component layers of all frames images are stacked in the three-dimensional spatial coordinate system according to their corresponding axial positions. The stacking process follows the order of the Z-axis coordinates from smallest to largest. The three-dimensional point set obtained from the conversion of each image component layer is added to the same three-dimensional space in sequence to form a three-dimensional model composed of discrete point clouds. The pixel data occupying the same spatial position after being stacked are fused to generate a dense three-dimensional data array. The fusion calculation is performed on each integer coordinate position in the three-dimensional space to find all the pixel data falling at that position. These data may come from different image component layers of different frames. The maximum value synthesis algorithm is used to select the gray value with the strongest spectral feature response from these data as the value at that position, thereby generating a three-dimensional array with fixed-interval grid points in the X, Y and Z dimensions, i.e., a three-dimensional data array.

[0032] It's understandable that the process of classifying pixels can be based on a spectral similarity metric formula, which calculates the degree of similarity between the spectral curves of two pixels. The formula is expressed as:

[0033] Where: symbol This represents the spectral similarity score between pixel i and pixel j. (Symbol) Indicates the band index, iterating through all bands from 1 to N. Symbol This indicates the total number of spectral bands, specifically 8. (Symbol) This represents the weighting coefficient for the λ-th band, which is preset based on the importance of that band in distinguishing different materials. (Symbol) This represents the spectral intensity value of pixel i in the λ-th band. (Symbol) This represents the spectral intensity value of pixel j in the λ-th band. The result of this formula is used in clustering algorithms to determine whether pixels belong to the same category.

[0034] Optionally, the pixel data occupying the same spatial position after stacking can be fused. When a weighted average algorithm is used, the weight coefficients are dynamically adjusted according to the stability of the spectral features represented by the image component layer from which the pixel originates. The stability is quantified by the standard deviation of the corresponding feature peak in the spectral feature library in multiple calibrations.

[0035] In one embodiment of the present invention, a series of virtual cutting surfaces are defined in the superimposed feature body along a direction parallel to the surface of the electronic cable. Data is cut along each virtual cutting surface sequentially from the outside in, obtaining a surface layer slice each time. The data distribution pattern of each surface layer slice is analyzed to calculate its texture continuity, density uniformity, and spectral consistency indices. The calculated texture continuity, density uniformity, and spectral consistency indices are bound to the depth information of the surface layer slice to form a feature data package. The stripped feature data is a sequence composed of the feature data packages of all surface layer slices in the stripping order. The stripped feature data sequence is fed as input into a preset initial threshold model. The initial threshold model generates an initial defect discrimination threshold based on the feature value of the first feature data package in the stripped feature data sequence. The initial defect discrimination threshold is used to pre-determine defects on the surface of the superimposed feature body to obtain a preliminarily determined defect region. The internal parameters of the initial threshold model are adjusted according to the feature feedback of the preliminarily determined defect region to output an updated defect discrimination threshold. The updated defect discrimination threshold is repeatedly used for prediction, and the model is adjusted according to the feedback until the defect discrimination threshold output by the model tends to stabilize. The stable threshold is the final defect discrimination threshold for the current electronic cable.

[0036] In practice, a series of virtual cutting surfaces are defined in the superimposed feature body along a direction parallel to the surface of the electronic cable. The superimposed feature body is a three-dimensional data array whose coordinate axes are aligned with the physical orientation of the electronic cable. The normal direction of the virtual cutting surfaces is set to be consistent with the local normal direction of the electronic cable surface. The distance between the virtual cutting surfaces is set to a constant value according to the detection accuracy requirements, such as the thickness of one voxel unit. Data is cut along each virtual cutting surface of the superimposed feature body in a sequential order from the outside to the inside. Each cut obtains a surface layer slice. The order from the outside to the inside means starting from the largest coordinate index in the three-dimensional data array perpendicular to the normal direction of the virtual cutting surface and gradually moving towards the smallest coordinate index. Each cutting operation extracts all data points located at fixed coordinate values ​​in the normal direction of the current virtual cutting surface. These data points constitute a two-dimensional matrix, i.e., a surface layer slice. The data distribution pattern of each surface layer slice is analyzed to calculate its texture continuity, density uniformity, and spectral consistency indices. Texture continuity is calculated based on the gray-level co-occurrence matrix to analyze the spatial correlation of pixel gray values ​​in the surface layer slice. Density uniformity is evaluated by calculating the standard deviation and coefficient of variation of all pixel values ​​in the surface layer slice. The spectral consistency index is determined by comparing the cosine of the angle between the spectral vector of each pixel in the surface layer slice and the average spectral vector of the region. The calculated texture continuity, density uniformity, and spectral consistency indices are bound to the depth information of the surface layer slice to form a feature data package. The depth information is recorded as the virtual cutting plane number corresponding to this cut or its specific spatial coordinates in the three-dimensional coordinate system. The stripped feature data is a sequence composed of the feature data packages of all surface layer slices in the stripping order. This sequence is represented by an ordered list in the data structure. Each item in the list stores the depth information of a surface layer slice and its corresponding three feature index values.

[0037] In some embodiments, the stripped feature data sequence is input into a preset initial threshold model. The initial threshold model is a calculation function with adjustable parameters, the core parameters of which include a basic threshold constant and a sensitivity coefficient. The initial threshold model generates an initial defect discrimination threshold based on the feature value of the first feature data packet in the stripped feature data sequence. The generation method is to take the weighted sum of three index values—texture continuity, density uniformity, and spectral consistency—in the first feature data packet, multiply this weighted sum by the sensitivity coefficient of the initial threshold model, and add the basic threshold constant. The result is the initial defect discrimination threshold. The initial defect discrimination threshold is used to perform defect prediction on the surface layer of the superimposed feature body to obtain the initially determined defect region. The prediction process compares the comprehensive feature value of each pixel in the first surface layer slice of the superimposed feature body with the initial defect discrimination threshold. The comprehensive feature value is calculated in real time from the texture, density, and spectral data at that pixel. Pixels exceeding the threshold are marked and clustered to form the initially determined defect region. Based on the feature feedback of the initially determined defect area, the internal parameters of the initial threshold model are adjusted to output an updated defect discrimination threshold. The feature feedback includes the proportion of the initially determined defect area to the surface area and the average comprehensive feature value intensity of the defect area. The adjustment rule is to increase the basic threshold constant when the proportion of the defect area is too high and to decrease the sensitivity coefficient when the average intensity of the defect area is too low.

[0038] It is understandable that the texture continuity index of a surface layer slice can be calculated using a texture energy formula based on the gray-level co-occurrence matrix. The formula is expressed as:

[0039] Where: symbol This represents the calculated texture energy value, used to quantify texture continuity. (Symbol) This represents the total number of gray levels in a surface layer slice image. (Symbol) and These represent the row and column indices of the gray-level co-occurrence matrix, respectively. (Symbols) This represents the gray-level co-occurrence matrix calculated at a specified direction and distance, where the i-th element is the first element. Line 1 The column contains element values ​​that represent grayscale values ​​in the image. and grayscale value The probability of a pixel pair appearing in a specific spatial relationship. Texture energy value. A higher value indicates a more uniform and continuous texture in the image.

[0040] The updated defect discrimination threshold is repeatedly used for prediction, and the model is adjusted based on feedback until the defect discrimination threshold output by the model tends to stabilize. The criterion for stability is that the absolute change in the defect discrimination threshold in three consecutive iterations is less than a very small preset increment. The stable threshold is the final defect discrimination threshold for the current electronic cable, and this threshold will be used in the subsequent comprehensive scanning and defect identification process of the entire superimposed feature body.

[0041] Optionally, the pixel data occupying the same spatial position after stacking can be fused. When the data of the surface layer slice comes from multiple spectral component layers, the fusion calculation can use the median algorithm to suppress abnormal noise interference in individual channels, thereby obtaining more robust texture continuity, density uniformity and spectral consistency indicators.

[0042] See Figure 3 This is a chart analyzing defect prediction and parameter adjustment in electronic cables. The threshold is negatively correlated with the proportion of defective areas. As the defect discrimination threshold increases from 75 to 86, the proportion of surface defective areas continuously decreases from approximately 18% to approximately 5%. This indicates that the higher the threshold, the fewer areas are identified as defects, consistent with the detection logic: a higher threshold filters out more suspected defects, retaining only defective areas with more significant features. The threshold is positively correlated with the average intensity of defective areas. As the defect discrimination threshold increases from 75 to 86, the average comprehensive feature intensity of defective areas increases from approximately 65 to approximately 92. This indicates that the higher the threshold, the higher the feature intensity of the remaining defective areas, meaning that the defects in these areas are more obvious and representative.

[0043] In one embodiment of the present invention, the final defect discrimination threshold is compared with the feature value of each voxel in the superimposed feature body. If the feature value of a voxel exceeds the final defect discrimination threshold, the voxel is marked as a candidate defect voxel. Spatial neighborhood analysis is performed on all marked candidate defect voxels in the three-dimensional space of the superimposed feature body, and spatially adjacent candidate defect voxels are aggregated into a spatial voxel cluster. The spatial voxel set consists of all identified spatial voxel clusters, each cluster representing a potential defect region. The morphological changes of each spatial voxel cluster in the spatial voxel set at different levels along the depth direction of the superimposed feature body are analyzed, and the continuous change trajectory of the morphological center, area, and contour of the spatial voxel cluster in the depth direction is recorded; this trajectory is the morphological evolution path. The morphological evolution paths of different spatial voxel clusters are compared. If the paths intersect, approach, or have highly similar morphological features in space, it is determined that the spatial voxel clusters originate from the same physical defect. Multiple spatial voxel clusters determined to originate from the same physical defect are then connected and merged into a unified defect body in three-dimensional space. Perform analysis, comparison, and merging operations on all spatial voxel clusters to form several independent and complete defect volume data.

[0044] In practice, the final defect discrimination threshold is compared with the feature value of each voxel in the superimposed feature body. The superimposed feature body is represented as a three-dimensional data array, where each voxel stores a comprehensive feature value. This comprehensive feature value is derived from the weighted sum of texture continuity, density uniformity, and spectral consistency indices in the stripped feature data sequence. The comparison operation traverses the coordinate indices of all voxels in the three-dimensional data array, reads the comprehensive feature value stored at each voxel position, and compares it with the final defect discrimination threshold output by the dynamic threshold growth model. If the feature value of a voxel exceeds the final defect discrimination threshold, the voxel is marked as a candidate defect voxel. The marking method involves creating a Boolean type marker array in memory with the same dimension as the superimposed feature body, and setting the array position corresponding to the voxel to be judged to a logical true value. Spatial neighborhood analysis is performed on all marked candidate defect voxels in the three-dimensional space of the superimposed feature body. The spatial neighborhood analysis checks whether the adjacent voxels in the six directly adjacent directions in the three-dimensional space of each candidate defect voxel, namely the positive and negative X-axis, positive and negative Y-axis, and positive and negative Z-axis, are also marked as candidate defect voxels. Candidate defect voxels that are spatially adjacent are aggregated into a spatial voxel cluster. The aggregation process employs a 3D connected component labeling algorithm, which iterates through a Boolean label array and assigns a unique integer label to each connected component. All candidate defect voxels sharing the same integer label constitute a spatial voxel cluster. The spatial voxel set consists of all identified spatial voxel clusters, each representing a potential defect region. The spatial voxel set is represented as a list in the data structure, where each element records the set of 3D coordinates and integer labels of all voxels contained in a spatial voxel cluster.

[0045] In some embodiments, the morphological changes of each spatial voxel cluster in the spatial voxel set at different levels along the depth direction of the overlay feature are analyzed. The depth direction is defined as the Z-axis direction of the 3D data array of the overlay feature, and different levels refer to various 2D slice planes with different Z-coordinate values. The analysis process starts from the smallest Z-coordinate covered by the spatial voxel cluster and ends at the largest Z-coordinate, extracting all voxel projections of the spatial voxel cluster at the current Z-coordinate level layer by layer, with the thickness of a single voxel layer as the step size. The continuous change trajectory of the morphological center, area, and contour of the spatial voxel cluster in the depth direction is recorded. This trajectory is the morphological evolution path. The morphological center is obtained by calculating the arithmetic mean of the coordinates of the projected voxels in each layer, the area is obtained by counting the number of projected voxels in each layer, and the contour is obtained by extracting the sequence of outer boundary points of the projected voxels in each layer. The morphological evolution paths of different spatial voxel clusters are compared, including the distance between the center points of the corresponding depth levels, the area ratio, and the similarity of the contour polygons. If the morphological evolution paths intersect, converge, or have highly similar morphological features in space, then the spatial voxel clusters are determined to originate from the same physical defect. Intersection means that the morphological evolution paths of two spatial voxel clusters meet at a point in three-dimensional space. Convergence means that the distance between the morphological centers of two spatial voxel clusters monotonically decreases to below a threshold as the depth changes. High similarity means that the area ratio and contour similarity of two spatial voxel clusters in each layer are consistently higher than the set threshold. See Table 1.

[0046] Table 1: Comparison of Parameters for the Morphological Evolution Path of Spatial Voxel Clusters

[0047] It is understandable that determining whether the morphological evolution paths of two spatial voxel clusters are similar can be based on a path convergence formula. The formula is expressed as:

[0048] Where: symbol This represents the path convergence score between spatial voxel clusters a and b. (Symbol) This represents the total number of overlapping layers between two spatial voxel clusters in the depth direction. (Symbol) Indicates a depth-level index. (Symbol) This represents the morphological center coordinate vector of the spatial voxel cluster *a* at the *k*th depth level. (Symbol) This represents the morphological center coordinate vector of the spatial voxel cluster b at the k-th depth level. (Symbol) This indicates the calculation of the Euclidean distance between two vectors. (Symbol) This represents a distance scale normalization constant. When the convergence score... When the convergence threshold is greater than the preset threshold, the two morphological evolution paths are determined to be converging.

[0049] Multiple spatial voxel clusters identified as originating from the same physical defect are connected in three-dimensional space and merged into a unified defect volume. The data connectivity operation involves merging the coordinates of all voxels contained in each spatial voxel cluster into a new set and assigning a new, unique defect identifier to this new set. Analysis, comparison, and merging operations are performed on all spatial voxel clusters to form several independent and complete defect volume data sets. Each independent defect volume data set contains a set of voxel coordinates and a summary of the associated morphological evolution path.

[0050] Optionally, spatial neighborhood analysis can employ the 26-neighborhood connectivity rule, which examines the 26 adjacent voxels of each candidate defect voxel in all three-dimensional directions. This rule can more sensitively connect discrete defect voxel points and is suitable for electronic cable defect detection scenarios with rough surfaces or complex textures.

[0051] See Figure 4 This is a scatter plot of 3D defect features used for defect detection in electronic cables, showing the relationship between the projected area and contour complexity of defects at different depth levels. This plot is a key visualization tool for analyzing the morphological evolution path of defects, helping to determine whether defects at different depths originate from the same physical defect. If points at different depths show a continuous trend in projected area and contour complexity, it indicates that they belong to a continuous slice of the same defect; if the distribution of points is discrete and shows no continuous trend, it represents different independent defects. By observing the continuous trend of data points, it is possible to determine whether defect slices at different depths originate from the same physical defect, providing direct evidence for subsequent defect connectivity and classification.

[0052] In one embodiment of the present invention, each independent defect is treated as a topological node. The three-dimensional geometric features of each defect are calculated, including volume, surface area, principal axis direction, and spatial bounding box, and these three-dimensional geometric features are used as attributes of the corresponding topological node. The relative positional relationship between any two topological nodes in three-dimensional space and the correlation of their geometric features are analyzed. If a preset topological association rule is satisfied, a connection edge is established between the two nodes. All topological nodes and the connection edges between them together constitute the topological structure network of surface defects in electronic cables. The spatial coordinates of each node in the topological structure network are transformed to actual coordinates in a three-dimensional spatial coordinate system, and combined with its attributes, the category and location information of the surface defects in electronic cables are output.

[0053] In practice, each independent defect is treated as a topological node. These independent defects originate from several complete 3D data sets formed after connecting and merging spatial voxel sets. Each defect is assigned a globally unique identifier, which corresponds one-to-one with the topological node number. The 3D geometric features of each defect are calculated, including volume, surface area, principal axis direction, and spatial bounding box. These 3D geometric features are then used as attributes of the corresponding topological node. Volume is obtained by multiplying the total number of voxels contained in the defect by the physical volume of a single voxel. Surface area is obtained by multiplying the total number of exposed faces of all surface voxels in the defect by the physical area of ​​a single face. Principal axis direction is obtained by extracting the direction of the first principal component vector through principal component analysis of the coordinates of all voxels in the defect. The spatial bounding box is obtained by finding the maximum and minimum values ​​of the X, Y, and Z axes of the defect in the 3D spatial coordinate system to determine a minimum enclosing cuboid. All calculated 3D geometric features are encapsulated into a data structure and associated with the corresponding topological node in the form of key-value pairs.

[0054] In some embodiments, the relative positional relationship between any two topological nodes in three-dimensional space and their correlation with geometric features are analyzed. The relative positional relationship is quantified by calculating the Euclidean distance between the center points of the spatial bounding boxes of the defect bodies represented by the two topological nodes and the angle between the two principal axis directions. The correlation analysis also considers the similarity of three-dimensional geometric features, which is evaluated by comparing the volume ratio, surface area ratio, and length-width-height ratio of the spatial bounding boxes of the two defect bodies. If a preset topological correlation rule is satisfied, a connecting edge is established between the two nodes. The preset topological correlation rule is defined as a combination of a series of logical judgment conditions. For example, rule one is "the distance between the center points of the two defect bodies is less than 50% of the sum of the diagonal lengths of their spatial bounding boxes", and rule two is "the angle between the principal axis directions of the two defect bodies is less than 15 degrees and the volume ratio is between 0.8 and 1.2". When any pair of topological nodes simultaneously satisfies rule one and rule two, they are determined to satisfy the topological correlation rule. The creation of connecting edges involves adding an undirected edge record between two corresponding topological node indices in the graph data structure in memory. Weight information can also be attached to this edge, and the weight information can be calculated based on the strength of the association.

[0055] All topological nodes and their connecting edges together constitute the topological network of surface defects in electronic cables. This topological network is represented as a graph in the computer, where the set of vertices is all the topological nodes and the set of edges is all the connecting edges established according to association rules. The constructed graph structure can be traversed and queried to analyze the distribution patterns of defects, such as finding the core defect node with the most connecting edges or identifying completely isolated defect node groups. The spatial coordinates of each node in the topological network are transformed to their actual coordinates in a three-dimensional spatial coordinate system. Combined with its attributes, the category and location information of the surface defects in the electronic cables are output. The transformation process involves reading the coordinates of the center point of the spatial bounding box of the defect volume corresponding to each topological node. These coordinates are based on voxel indexing and need to be multiplied by the physical size resolution of the voxel and added to the origin offset of the three-dimensional spatial coordinate system to obtain the actual world coordinates.

[0056] It is understandable that the principal axis direction in a three-dimensional geometric feature can be obtained by performing eigenvalue decomposition on the point set of the defect body. Its calculation relies on a formula for solving the eigenvectors of a covariance matrix. The formula is expressed as:

[0057] Where: symbol This represents the 3x3 covariance matrix calculated from the coordinates of all voxels of the defective volume. (Symbol) This indicates the total number of voxels contained in the defective body. (Symbol) The index of the voxel is traversed from 1 to... All voxels. Symbol Indicates the first The coordinate vector of an individual element in a three-dimensional coordinate system. (Symbol) This represents the mean vector of all voxel coordinates. (Symbol) This represents the matrix transpose operation. The calculated covariance matrix is... The eigenvectors define the principal axis directions of the defect body, and the eigenvector corresponding to the largest eigenvalue is the direction of the first principal component.

[0058] Optionally, the preset topology association rules can be extended to include prior knowledge of defect categories. For example, when the system preclassifies a defect as a "scratch" or "dent" based on its three-dimensional geometric features, the association rules can be set to establish connection edges only between defect nodes of the same category or between nodes with a specific combination of categories.

[0059] See Figure 5This is a bar chart comparing the 3D geometric features of defects in electronic cables. It's a core analytical chart in the "Topology Network Construction" stage of the electronic cable defect detection process, used to quantitatively display the core physical properties of different defects. By using features such as the volume-to-surface-area ratio and principal axis angle, preliminary automatic defect classification can be achieved, providing data support for subsequent defect risk assessment. These geometric features are the core basis for determining the topological relationships between defects, providing a quantitative foundation for constructing the defect topology network. By comparing the feature differences of different defects, the accuracy of the defect detection algorithm can be verified, such as whether it can effectively distinguish defects of different sizes and shapes. This chart can serve as a tool for validating the effectiveness of the defect detection algorithm; by observing the rationality of the feature distribution, it can be determined whether the algorithm can effectively distinguish different types of defects.

[0060] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A visual inspection method for appearance defects in electronic cables, characterized in that, Includes the following steps: Acquire initial surface images of the electronic cable and establish a three-dimensional spatial coordinate system corresponding to the electronic cable; Perform serialized frame decomposition on the initial surface image to generate a set of frame images arranged in time sequence; Spectral response analysis is performed on each frame in the frame image set to separate image component layers containing different physical properties; Based on the coordinate information of the three-dimensional spatial coordinate system, multiple image component layers corresponding to each frame image are spatially superimposed to form the superimposed feature body of the electronic cable. A layer-by-layer peeling process is performed on the superimposed feature body to extract peeling feature data reflecting the surface state layer by layer; The stripping feature data is imported into a dynamic threshold growth model to iteratively generate a defect discrimination threshold for the current electronic cable. The superimposed feature volume is scanned using the defect discrimination threshold to identify the set of spatial voxels that meet the defect characteristics. The morphological evolution path of the spatial voxel set in the superimposed feature body is traced, and the dispersed voxel sets are connected and merged according to the morphological evolution path. Based on the connected and merged voxel sets, the topological network of surface defects in electronic cables is reconstructed. The topology network is mapped back to the three-dimensional spatial coordinate system, and the category and location information of surface defects of electronic cables are output.

2. The method for visual inspection of appearance defects in electronic cables according to claim 1, characterized in that, The acquisition of the initial surface image of the electronic cable and the establishment of a three-dimensional spatial coordinate system corresponding to the electronic cable specifically include: By arranging an array of optical sensors on both sides of the electronic cable transmission path, raw image streams from multiple sides of the electronic cable are captured simultaneously. Based on the physical position and angle parameters of each sensor in the optical sensor array, the spatial geometric relationship between each original image stream is calculated; Based on the aforementioned spatial geometric relationship, each original image stream is uniformly registered to a virtual three-dimensional space with the central axis of the electronic cable as the reference. Define the origin, axis, and scale in the virtual three-dimensional space to complete the establishment of the three-dimensional space coordinate system; The initial surface image is the initial representation of the multi-faceted image data after spatial registration in the three-dimensional spatial coordinate system.

3. The method for visual inspection of appearance defects in electronic cables according to claim 2, characterized in that, The step of performing serialized frame decomposition on the initial surface image to generate a set of frame images arranged in time sequence specifically includes: Along the transmission direction of the electronic cable, the initial surface image is time-sliced ​​according to a preset sampling interval; The image data obtained from each time slice is encoded according to its axial position in the three-dimensional spatial coordinate system; The encoded image data is reassembled according to time order and axial position order to generate a frame image sequence with strict spatiotemporal order; Each frame in the frame image sequence is accompanied by a recording of its acquisition timestamp and its axial position information in the three-dimensional spatial coordinate system; The set of frame images is a data structure composed of the sequence of frame images and their accompanying information.

4. The method for visual inspection of appearance defects in electronic cables according to claim 3, characterized in that, The step of performing spectral response analysis on each frame in the frame image set to separate image component layers containing different physical properties specifically includes: For each frame of the image, analyze the spectral intensity distribution curve of its pixels; Based on a preset spectral feature library, identify the characteristic absorption peaks and reflection peaks in the spectral intensity distribution curve; Pixels corresponding to spectral curves with similar characteristic peaks are grouped into one category to form multiple pixel clusters; Extract all pixels belonging to the same pixel cluster from the original frame image and retain their original spatial positions to generate an image component layer. After each frame of the image is processed in this way, multiple independent image component layers are obtained, which together constitute the complete information of the original image.

5. The method for visual inspection of appearance defects in electronic cables according to claim 4, characterized in that, The step of spatially superimposing multiple image component layers corresponding to each frame image based on the coordinate information of the three-dimensional spatial coordinate system to form a superimposed feature body of the electronic cable specifically includes: Read the axial position information in the three-dimensional spatial coordinate system attached to each frame of the image; All image component layers separated from the same frame image are placed at the corresponding axial positions in the three-dimensional spatial coordinate system according to the original coordinates of their pixels. All image component layers of all frames are stacked in the three-dimensional coordinate system according to their corresponding axial positions. The pixel data occupying the same spatial position after being stacked are fused and calculated to generate a dense three-dimensional data array. The superimposed features of the electronic cable constitute the three-dimensional data array, which fully characterizes the comprehensive state of the electronic cable surface in three-dimensional space and spectral dimension.

6. The method for visual inspection of appearance defects in electronic cables according to claim 5, characterized in that, The step of performing a layered peeling process on the superimposed feature body, extracting peeling feature data reflecting the surface state layer by layer, specifically includes: In the superimposed feature body, a series of virtual cutting surfaces are defined along a direction parallel to the surface of the electronic cable; Data is cut along each virtual cutting surface of the superimposed feature body in a sequence from the outside to the inside, and a surface layer slice is obtained each time the cut is performed. Analyze the data distribution pattern of each surface layer slice and calculate its texture continuity, density uniformity, and spectral consistency indices; The calculated texture continuity, density uniformity, and spectral consistency indices are bound to the depth information of the surface layer slices to form a feature data package. The stripping feature data is a sequence composed of feature data packets of all surface layer slices in the stripping order.

7. The method for visual inspection of appearance defects in electronic cables according to claim 6, characterized in that, The step of importing the stripped feature data into a dynamic threshold growth model to iteratively generate a defect discrimination threshold for the current electronic cable specifically includes: The stripped feature data sequence is used as input and fed into a preset initial threshold model; The initial threshold model generates an initial defect discrimination threshold based on the feature value of the first feature data packet in the stripped feature data sequence; The initial defect discrimination threshold is used to pre-determine defects on the surface of the superimposed feature body to obtain the initially determined defect area; Based on the feature feedback of the initially determined defect area, the internal parameters of the initial threshold model are adjusted so that it outputs an updated defect discrimination threshold. The updated defect discrimination threshold is repeatedly used for prediction, and the model is adjusted based on feedback until the defect discrimination threshold output by the model tends to stabilize. The stable threshold is the final defect discrimination threshold for the current electronic cable.

8. The method for visual inspection of appearance defects in electronic cables according to claim 7, characterized in that, The step of scanning the superimposed feature volume using the defect discrimination threshold to identify the set of spatial voxels that conform to the defect features specifically includes: The final defect discrimination threshold is compared with the feature value of each voxel in the superimposed feature body; If the feature value of a voxel exceeds the final defect discrimination threshold, the voxel is marked as a candidate defect voxel. In the three-dimensional space of the superimposed feature body, spatial neighborhood analysis is performed on all marked candidate defect voxels; Candidate defect voxels that are spatially adjacent to each other will be aggregated into a spatial voxel cluster; The spatial voxel set consists of all identified spatial voxel clusters, each cluster representing a potential defect region.

9. A visual inspection method for appearance defects in electronic cables according to claim 8, characterized in that, The step of tracing the morphological evolution path of the spatial voxel set within the superimposed feature body, and connecting and merging the dispersed voxel sets based on the morphological evolution path, specifically includes: For each spatial voxel cluster in the aforementioned spatial voxel set, analyze its morphological changes at different levels along the depth direction of the superimposed feature body; Record the continuous change trajectory of the morphological center, area, and outline of the spatial voxel cluster in the depth direction; this trajectory is the morphological evolution path. By comparing the morphological evolution paths of different spatial voxel clusters, if the paths intersect, approach each other in space, or have highly similar morphological characteristics, it can be determined that the spatial voxel clusters originate from the same physical defect. Multiple spatial voxel clusters determined to originate from the same physical defect are connected in three-dimensional space and merged into a unified defect body. Perform analysis, comparison, and merging operations on all spatial voxel clusters to form several independent and complete defect volume data.

10. A visual inspection method for appearance defects in electronic cables according to claim 9, characterized in that, The reconstruction of the topological network of surface defects in electronic cables based on the connected and merged voxel sets specifically includes: Each individual defect is treated as a topology node; Calculate the three-dimensional geometric features of each defect, including volume, surface area, principal axis direction and spatial bounding box, and use the three-dimensional geometric features as the attributes of the corresponding topological nodes; Analyze the relative positional relationship and geometric feature correlation between any two topological nodes in three-dimensional space. If the preset topological association rules are satisfied, then establish a connecting edge between the two nodes. All topological nodes and their connecting edges together constitute the topological network of the surface defects of the electronic cable; The spatial coordinates of each node in the topological network are transformed to the actual coordinates in the three-dimensional spatial coordinate system. Combined with its attributes, the category and location information of surface defects of electronic cables are output.