Machine vision-based online inspection system for small sample sizes of surface defects in cable sheaths
The cable sheath inspection system, which combines multi-angle acquisition and illumination compensation with multi-scale texture decomposition and small sample feature comparison, achieves real-time and efficient detection of surface defects in cable sheaths. This solves the problems of low accuracy and insufficient real-time performance in small sample detection in existing technologies, and improves the quality control capabilities of cable production.
Patent Information
- Application Number
- CN202610216702.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-14
- Publication Date
- 2026-06-30
AI Technical Summary
Existing cable sheath defect detection systems rely on large-scale labeled samples, which cannot adapt to small sample scenarios, have low detection accuracy, and are difficult to achieve real-time online detection, thus failing to meet the high-speed transmission requirements of cable production.
An industrial camera array is used for multi-angle acquisition, and a lighting compensation device is used to eliminate reflective areas and shadow interference. Through multi-scale texture decomposition and defect feature enhancement, pixel-by-pixel similarity calculation is performed using a small sample feature comparison library to generate a three-dimensional defect morphology model and achieve real-time detection.
It enables efficient and accurate identification of surface defects in cable sheaths, adapts to the testing needs of cables of different materials, breaks through the bottleneck of large sample dependence, ensures the real-time and accuracy of testing, and improves the quality control level in the cable production process.
Smart Images

Figure REF-OBJ-1771058978683-000002 
Figure REF-OBJ-1771058978683-000007 
Figure REF-OBJ-1771058978683-000008
Abstract
Description
Technical Field
[0001] This invention relates to the field of cable inspection technology, specifically to a machine vision-based online inspection system for small-sample defects on the surface of cable sheaths. Background Technology
[0002] As a core carrier in the fields of power transmission and communication, the surface quality of the cable sheath directly affects the cable's insulation performance, mechanical strength, and service life. Defects such as cracks and pits can easily lead to insulation damage, water ingress, and moisture ingress during subsequent laying and use, potentially causing power leakage, signal interference, and even safety accidents. Therefore, online detection of surface defects in cable sheaths is an indispensable quality control step in the cable production process.
[0003] Traditional cable sheath defect detection mainly relies on manual visual sampling. Inspectors observe the cable surface condition with the naked eye, which is not only labor-intensive and inefficient, but also easily affected by subjective factors such as personnel experience and fatigue. It is difficult to achieve full-process, comprehensive quality monitoring, especially for hidden defects such as micro-cracks and shallow dents, where the missed detection rate is relatively high. With the advancement of industrial automation, some companies have introduced machine vision-based inspection solutions, but existing solutions still have many technical bottlenecks.
[0004] In the image acquisition stage, existing systems mostly use a single camera at a fixed angle, which is insufficient to fully cover the circumferential surface of the cable sheath, easily leading to missed defects due to blind spots in the shooting angle. Light source parameters are often fixed, failing to adapt to the varying reflective characteristics of different cable sheath materials, resulting in images frequently containing reflective areas and shadow interference, severely impacting the accuracy of subsequent feature extraction. Regarding feature processing, existing technologies mostly employ single-scale feature extraction methods, failing to consider both macroscopic surface conditions and microscopic defect details, leading to incomplete extracted feature information and an inability to accurately distinguish between defects and normal surface textures. Furthermore, defect feature enhancement methods are relatively simplistic; for low-contrast defect edges, it is difficult to form clear feature contours, increasing the difficulty of subsequent identification.
[0005] Existing machine vision inspection systems generally rely on large-scale labeled samples to build feature comparison libraries and train models with massive amounts of data to improve detection accuracy. However, in actual production, the number of defect samples for cable sheaths is often limited, especially for cables made of new materials or with special types of defects. This results in traditional detection systems that rely on large samples having insufficient generalization ability in small-sample scenarios, leading to a significant drop in detection accuracy and failing to meet the needs of production scenarios. Furthermore, existing systems have slow detection response speeds, making it difficult to match the high-speed transmission rhythm of cable production lines and preventing true online real-time detection, thus limiting their application in large-scale industrial production. Therefore, developing an online detection system for cable sheath surface defects that can adapt to small-sample conditions while balancing detection accuracy and real-time performance has become an urgent need in the current cable manufacturing industry. Summary of the Invention
[0006] The purpose of this invention is to provide a machine vision-based online inspection system for small-sample defects on the surface of cable sheaths, in order to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides a machine vision-based online inspection system for small-sample cable sheath surface defects, the system comprising:
[0008] Industrial camera arrays are used to acquire multi-angle surface images during cable production line transmission, forming a raw image sequence;
[0009] The illumination compensation device dynamically adjusts the incident angle and intensity of the light source according to the reflective characteristics of the cable sheath material, thereby eliminating reflective areas and shadow interference in the original image sequence.
[0010] The image feature extraction engine performs multi-scale texture decomposition on the original image sequence after illumination compensation, generating a primary feature set that includes local gray-level change rate, directional gradient histogram and spatial frequency distribution.
[0011] The defect feature enhancement module, based on the directional gradient histogram components in the primary feature set, enhances the edge continuity of surface cracks and pits through nonlinear filtering, generating an enhanced defect feature map.
[0012] A small sample feature comparison library stores a limited number of standard sheath surface feature templates and typical defect feature vectors. Each feature vector is associated with a geometric shape descriptor and a material attribute label.
[0013] The real-time defect detector performs pixel-by-pixel similarity calculations between the enhanced defect feature map and the standard sheath surface feature template in the small sample feature comparison library, and outputs a set of coordinates of abnormal areas where the difference exceeds the threshold.
[0014] Preferably, the industrial camera array is deployed as follows:
[0015] Three circular shooting stations are set up at equal intervals along the direction of cable transmission, and each station is equipped with four polarization cameras;
[0016] Each polarization camera is equipped with filters of different polarization directions at 45-degree intervals, and acquires four sets of polarization images after synchronous triggering.
[0017] The polarization reflection coefficient of each pixel on the sheath surface is calculated based on the intensity difference of the four sets of polarization images, and a diffuse reflection image sequence that eliminates specular reflection is generated.
[0018] Preferably, the illumination compensation device performs the following steps:
[0019] Analyze the material reflectance distribution of different regions on the surface of the sheath in the diffuse reflection image sequence, and establish a reflectance-light source intensity mapping table;
[0020] The brightness zones of the ring-shaped LED light source are dynamically adjusted according to the reflectivity-light source intensity mapping table, so that the illuminance fluctuation range at any position on the sheath surface is controlled within five lux.
[0021] Pulse width modulation technology is used to compensate for local illuminance attenuation caused by cable movement in real time, maintaining the brightness consistency of the image sequence.
[0022] Preferably, the workflow of the image feature extraction engine is as follows:
[0023] Gaussian pyramid decomposition was performed on the brightness uniformity image to obtain the low-frequency components and high-frequency residuals at five scale levels;
[0024] Calculate the spatial distribution matrix of the local gray-level change rate at each scale level, and merge the matrices at each level to form a multi-scale gray-level change feature.
[0025] Extract the directional gradient histogram from the high-frequency residuals, and calculate the cumulative gradient magnitude in eight directional intervals to generate a directional gradient distribution histogram.
[0026] By analyzing the spatial frequency energy spectrum of image patches using Fast Fourier Transform, the frequency bands with abnormally concentrated energy are identified.
[0027] Preferably, the operation of the defect feature enhancement module includes:
[0028] The gradient direction whose magnitude exceeds the average value in the directional gradient distribution histogram is selected as the main defect direction;
[0029] An adaptive threshold morphological closing operation is applied along the main defect direction to connect the fracture edges and form a continuous defect profile.
[0030] Anisotropic diffusion filtering is applied to pixels within the continuous defect contour to suppress noise while preserving edge sharpness.
[0031] Preferably, the method for constructing the small sample feature comparison library is as follows:
[0032] Five hundred sets of defect-free cable sheath surface images were collected, and multi-scale gray-level variation features and directional gradient distribution histograms were extracted to construct a standard feature template set.
[0033] Ten typical defect samples were manually labeled, including cracks, bubbles, impurities and mechanical damage, and the mean value of the geometric morphology descriptor for each type of defect was calculated.
[0034] The mean value of the geometric shape descriptor is bound to the corresponding material attribute label to form a retrieval index for the defect feature vector.
[0035] Preferably, the comparison logic of the real-time defect detector is as follows:
[0036] The enhanced defect feature map is divided into several detection units, and the size of each unit matches the sampling window of the standard feature template.
[0037] Calculate the cosine similarity between the multi-scale grayscale change features within the detection unit and the standard feature template, and mark abnormal units with similarity values lower than the preset value;
[0038] Perform a chi-square test on the directional gradient distribution histogram of the abnormal unit to confirm the statistical significance difference between the defect type and the labeled sample.
[0039] Preferably, the system further includes:
[0040] The 3D topography reconstruction module drives the structured light projector to scan the target section based on the coordinate set of the abnormal area, and obtains depth information of the sheath surface with millimeter-level accuracy.
[0041] Align the depth information with the spatial coordinates of the defect feature map to generate a three-dimensional defect morphology model that includes surface unevenness.
[0042] Preferably, the three-dimensional topography reconstruction module operates as follows:
[0043] Upon detecting an abnormal area, the line laser scanner is triggered to perform a cross-shaped scan centered on the abnormal area.
[0044] Analyze the laser stripe deformation to calculate the profile height curve of the sheath surface along the scanning line;
[0045] Spline interpolation was performed on the two sets of orthogonal profile height curves to reconstruct the three-dimensional point cloud data of the abnormal area.
[0046] Preferably, the system further includes:
[0047] The quality decision unit receives the set of abnormal region coordinates and the three-dimensional defect morphology model output by the real-time defect detector;
[0048] Based on the area ratio of abnormal regions and the maximum indentation depth of the three-dimensional defect morphology model, the cable sheath quality grade is classified.
[0049] When the quality level is lower than the set threshold, a sorting and rejection instruction is sent to the production line control system and the defect characteristics are recorded in the small sample feature comparison library.
[0050] Compared with the prior art, the beneficial effects of the present invention are:
[0051] The industrial camera array employs a multi-angle acquisition scheme, overcoming the limitations of traditional single-camera shooting angles. It can completely capture surface images of the cable sheath circumferentially, forming a continuous sequence of raw images. This ensures no blind spots and prevents missed defects due to missing image information, allowing for the effective capture of various surface defects. The illumination compensation device specifically addresses image interference caused by differences in the reflectivity of cable sheaths made of different materials. By dynamically adjusting the incident angle and intensity of the light source, it precisely eliminates reflective areas and shadows in the raw images, significantly improving image clarity and contrast. This provides a high-quality image foundation for subsequent feature extraction, ensuring that defect features are clearly presented in the image and preventing image quality issues from affecting the accuracy of subsequent inspection processes.
[0052] The image feature extraction engine employs multi-scale texture decomposition technology, enabling it to mine effective information from images across different dimensions. It generates a primary feature set containing local grayscale change rates, histograms of oriented gradients, and spatial frequency distributions. Compared to traditional single-scale feature extraction methods, this approach covers a more comprehensive range of features, capturing both macroscopic surface state changes and accurately extracting microscopic defect details, thus fully revealing the differences between defects and normal surface textures. The defect feature enhancement module, based on histogram of oriented gradients components, uses nonlinear filtering to enhance defect edges, improving the edge continuity of defects such as cracks and pits. This results in a clearly defined enhanced defect feature map, making previously low-contrast and blurry defect features easier to identify and reducing the confusion between defect and normal features.
[0053] The small-sample feature comparison library is designed to fully adapt to the scarcity of samples in actual production. By storing a limited number of standard sheath surface feature templates and typical defect feature vectors, and associating each feature vector with a geometric descriptor and material attribute label, effective feature comparison can be achieved without relying on a large number of labeled samples. This design not only reduces the system's dependence on the number of samples, but also enables targeted identification of different materials and types of defects through precise feature vector association information, thus broadening the system's adaptability. The real-time defect detector uses a pixel-by-pixel similarity calculation method, which can quickly compare the enhanced defect feature map with the standard template, accurately locate abnormal areas with differences exceeding the threshold, and output an accurate set of abnormal area coordinates to ensure the accuracy of the detection results.
[0054] The entire system's modules work closely together to form a complete closed loop from image acquisition, optimization, feature extraction, enhancement to final detection. It enables real-time online detection in high-speed cable production lines, allowing for quality monitoring without interrupting the production process. The system effectively identifies various types of cable sheath surface defects, such as cracks and dents, and is adaptable to the inspection needs of cables of different materials. It solves the problems of low efficiency and high subjectivity in traditional manual inspection, and overcomes the bottleneck of existing machine vision inspection systems' reliance on large sample sizes. This provides a more reliable technical solution for quality control in the cable production process, helping the cable manufacturing industry improve its quality control level and ensure the overall performance and safety of cable products. Attached Figure Description
[0055] Figure 1 Image showing surface defects in cable sheaths;
[0056] Figure 2 A flowchart for the execution of the illumination compensation device;
[0057] Figure 3 Flowchart for building a small sample feature comparison library;
[0058] Figure 4 This is a 3D topographic reconstruction and cross-sectional analysis diagram. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Please see Figure 1This invention provides a machine vision-based small-sample online detection system for surface defects in cable sheaths. The system includes: an industrial camera array acquiring multi-angle surface images during cable production line transmission to form an original image sequence; an illumination compensation device dynamically adjusting the incident angle and intensity of the light source according to the reflective characteristics of the cable sheath material to eliminate reflective areas and shadow interference in the original image sequence; an image feature extraction engine performing multi-scale texture decomposition on the illumination-compensated original image sequence to generate a primary feature set containing local grayscale change rate, directional gradient histogram, and spatial frequency distribution; a defect feature enhancement module enhancing the edge continuity of surface cracks and pits based on the directional gradient histogram components in the primary feature set through nonlinear filtering to generate an enhanced defect feature map; a small-sample feature comparison library storing a limited number of standard sheath surface feature templates and typical defect feature vectors, each feature vector being associated with a geometric morphology descriptor and a material attribute label; and a real-time defect detector performing pixel-by-pixel similarity calculation between the enhanced defect feature map and the standard sheath surface feature templates in the small-sample feature comparison library, outputting a set of coordinates of abnormal areas where the difference exceeds a threshold. The system achieves high-speed image acquisition and processing during continuous cable production. An industrial camera array is synchronously triggered at a fixed frame rate to capture dynamic images of the cable sheath surface. The illumination compensation device adjusts the brightness output of the ring LED light source by monitoring changes in ambient light in real time to ensure uniform illumination of the original image sequence. The image feature extraction engine adopts a parallel computing architecture to process multiple image data streams simultaneously, shortening the feature extraction time. The defect feature enhancement module integrates a GPU-accelerated algorithm to perform real-time convolution operations on the directional gradient histogram components, improving edge enhancement efficiency. The small-sample feature comparison library uses distributed storage technology to maintain a fast retrieval index for standard sheath surface feature templates. The real-time defect detector is based on a sliding window mechanism, traversing the entire defect feature map, generating a set of abnormal region coordinates, and transmitting it to downstream modules.
[0061] Example 1: See Figure 2The industrial camera array is deployed with three equidistant circular shooting stations along the cable transmission direction. Each circular shooting station is constructed with a high-strength aluminum alloy frame, the inner diameter of which is slightly larger than the maximum outer diameter of the cable sheath to allow for a safety gap. The frame is fixed to the production line base with anchor bolts to ensure mechanical stability. Each circular shooting station is equipped with four polarization cameras. The polarization cameras use a global shutter model to eliminate motion blur caused by high-speed cable movement. The focal length of the polarization camera lens is calculated and determined based on the working distance and field of view coverage. The four polarization cameras are evenly distributed around the circumference of the circular shooting station, with the azimuth angle between adjacent polarization cameras precisely at 45 degrees. A linear polarization filter with a specific polarization direction is installed in front of the lens of each polarization camera. The polarization directions of the four filters are set to 0 degrees, 45 degrees, 90 degrees, and 135 degrees, respectively. The polarization filters are mounted via a rotating bracket equipped with a fine-tuning knob for calibrating the polarization direction angle. The calibration process uses a standard polarizing lens as a reference. The industrial camera array is triggered and synchronized by a synchronization signal issued by the main control unit. This signal is distributed to all polarization cameras via opto-isolators. The exposure time of the polarization cameras is matched with the cable transmission speed to ensure continuous image acquisition without omissions. The four sets of polarization images acquired by the polarization cameras are transmitted to the image processing unit, which calculates the surface reflectance characteristics based on polarimetry.
[0062] The illumination compensation device analyzes the material reflectance distribution of different regions on the sheath surface in the diffuse reflection image sequence. Reflectance analysis is performed in the HSV color space, extracting pixel luminance components as a characterization of reflectance intensity. The sheath surface is divided into multiple analysis grids, each 50 pixels by 50 pixels, and the mean and variance of pixel luminance values within each grid are calculated. A reflectance-light source intensity mapping table is constructed to establish the correspondence between grid position, material type, and ideal illuminance. The mapping table is stored in non-volatile memory for fast lookup. The ring-shaped LED light source adopts a multi-zone independent control structure, with each zone containing a set of LED beads and an independent driving circuit. The zone layout is aligned with the spatial position of the analysis grid on the sheath surface. During dynamic adjustment, the reflectance-light source intensity mapping table is read in real time. The target illuminance value is queried based on the material type of the current position of the cable sheath. The target illuminance value is converted into a PWM duty cycle signal and sent to the LED driving circuit. Pulse width modulation (PWM) technology adjusts the LED current at a frequency of 20 kHz. The current adjustment amount is calculated based on the difference between the actual illuminance fed back by the photodiode and the target illuminance. This difference is converted into a PWM signal correction amount by a proportional-integral controller. Illuminance fluctuation control introduces a sliding window mean filter to filter out instantaneous fluctuations and maintain illuminance stability.
[0063] The polarization image acquisition of the industrial camera array and the brightness adjustment of the illumination compensation device are strictly time-dependent. The main control unit generates a synchronization timing diagram to coordinate the work of each module. The cable transmission encoder provides real-time feedback of position signals, which trigger the polarization camera exposure and LED brightness zone switching. The position signals are bound to the image acquisition points to ensure spatial consistency. The polarization image intensity difference is calculated using the Stokes vector method. The Stokes vector contains four parameters characterizing the polarization state of the light wave, which are derived from the pixel intensities of four sets of polarization images. The diffuse reflection image sequence generation process eliminates specular reflection components. Specular reflection elimination is based on the Fresnel reflection model, whose parameters include the refractive index of the sheath material and the incident angle. The brightness zone adjustment of the ring LED light source considers the superposition effect of illumination in adjacent zones. This superposition effect is compensated by a pre-calibrated illumination distribution matrix, which describes the contribution weight of each LED zone to the illuminance of each point on the sheath surface. The real-time compensation algorithm of the pulse width modulation technology includes a feedforward control loop. The feedforward quantity is predicted based on the cable movement speed and historical illuminance attenuation curves. The prediction model is trained using a linear regression method. The polarization camera image acquisition trigger is strictly synchronized with the cable position. Each encoder pulse corresponds to a fixed cable movement distance, and the rising edge of the pulse triggers the polarization camera exposure. Polarization filter angle calibration uses a standard light source with known polarization degree. The polarization filter is rotated until the camera output image intensity reaches an extreme value; the extreme value position corresponds to the filter polarization direction being parallel to the standard light source polarization direction. The Stokes vector calculation process registers four sets of polarization images. Registration is based on a feature point matching algorithm to eliminate mechanical installation errors; the feature points are selected from the inherent texture markings on the sheath surface. The reflectivity-light intensity mapping table update mechanism monitors long-term changes in ambient light. The ambient light sensor periodically collects ambient illuminance data, and when the data exceeds a threshold, it triggers recalibration of the mapping table. The LED driver circuit design includes over-temperature protection and constant current control. The driver chip integrates a temperature sensor; if the chip junction temperature exceeds a safe value, the output current is automatically reduced. The pulse width modulation signal duty cycle resolution reaches sixteen bits, allowing for fine adjustment of the illuminance output. The duty cycle adjustment step size is linearized based on the LED brightness-current characteristic curve.
[0064] The industrial camera array's mechanical structure incorporates vibration damping design. Rubber vibration damping pads are installed between the circular shooting station and the production line foundation to dampen the impact of vibration on image acquisition. The polarization camera lens is equipped with a dust cover and cleaning mechanism; compressed air periodically blows the lens surface to maintain optical cleanliness, with the cleaning cycle synchronized with the production line maintenance plan. The LED light source heat dissipation of the illumination compensation device uses a combination of an aluminum substrate and heat sink fins. Heat is dissipated through forced air cooling, and the fan speed automatically adjusts according to the LED brightness to maintain optimal heat dissipation efficiency. A cable sheath material change detection algorithm runs in real time; material changes are identified through abrupt changes in reflectivity distribution, and the detection result triggers a switch in the reflectivity-light source intensity mapping table. During system startup, a self-test process is executed, checking the polarization camera connection status, the function of each LED light source zone, and sensor readings. Any self-test anomalies are logged and alarms are triggered. The collaborative operation of the industrial camera array and the illumination compensation device is achieved through hardware interrupts. The interrupt service routine processes encoder signals and sensor data to ensure real-time response performance. Exposure time optimization during polarization image acquisition is based on the image grayscale histogram. The histogram statistically analyzes pixel brightness distribution; exposure time adjustments ensure the histogram peak is within the middle grayscale range. The algorithm for generating diffuse reflection image sequences employs a parallel computing architecture, with four sets of polarization images distributed across different computing cores for simultaneous processing. Processing results are shared and exchanged via memory. The zonal control of the ring-shaped LED light source incorporates a smooth transition strategy; when there is a significant difference in brightness between adjacent zones, a transition gradient is inserted to prevent obvious bright-dark boundaries on the sheath surface. The compensation algorithm for pulse width modulation (PWM) technology includes a noise suppression module, employing a digital filter to eliminate PWM frequency interference. The filter is designed with a finite-length unit impulse response structure. The industrial camera array uses Gigabit Ethernet protocol for network communication, and image data streams are transmitted via Jumbo frames to improve bandwidth utilization, with the transmission periodicity aligned with the processing period. The control loop sampling time of the illumination compensation device is set to one millisecond, shorter than the illuminance change period caused by cable movement. The sampled data undergoes Kalman filtering for smoothing.
[0065] The depth of field of the polarization camera lens covers the fluctuations in the cable sheath position. The depth of field is adjusted by aperture size and focal length, with aperture size balancing the relationship between depth of field and light intake. A polarization degree threshold in Stokes vector calculation is used to distinguish between diffuse and specular reflection; polarization degrees below the threshold are considered diffuse reflection components and retained, while polarization degrees above the threshold are considered specular reflection components and discarded. The construction of the reflectivity-light intensity mapping table includes a material learning mode. This mode collects sample images of sheaths with different materials, and the material types of these sample images are manually labeled to train the classifier. The brightness uniformity of the ring LED light source is improved by a diffuser plate made of milky white polycarbonate, which scatters light multiple times to achieve uniform illumination. Real-time compensation using pulse width modulation technology introduces adaptive gain adjustment; the gain coefficient is dynamically adjusted according to the rate of change of illuminance deviation, increasing the gain coefficient to accelerate response when the deviation rate is large. The clock synchronization of the industrial camera array uses a precision time protocol, and the network switch supports hardware timestamps, ensuring that the clock deviation between polarization cameras is less than one microsecond. The ambient light compensation module of the illumination compensation device monitors changes in ambient light intensity. The ambient light intensity is collected by a top-mounted ambient light sensor, and the collected data is used to correct the calculated target illuminance value.
[0066] Example 2: The workflow of the image feature extraction engine involves performing Gaussian pyramid decomposition on images with consistent brightness. Gaussian pyramid decomposition uses interleaved row and column downsampling to construct multi-scale image representations. The pyramid has five levels to balance computational complexity and the need to preserve feature details. The bottom layer is the original resolution image, and the image size is halved for each subsequent layer. The standard deviation of the Gaussian kernel convolution is set to one zero pixel, and the kernel size is a 7x7 template based on the principle of three times the standard deviation. Gaussian pyramid decomposition achieves a low-pass filtering effect in the frequency domain. High-frequency residuals are obtained through differential operations between adjacent layers, and these residuals contain image texture details and noise components. The spatial distribution matrix of local grayscale change rate is calculated based on Sobel gradient detection. The Sobel operator includes horizontal and vertical convolution kernels, with a kernel size of 3x3 pixels. The gradient magnitude at each scale level is calculated by taking the square root of the sum of the squares of the horizontal and vertical gradients. The gradient direction is solved using the arctangent function. The spatial distribution matrix stores the gradient magnitude of each pixel in a two-dimensional array. The merging of multi-scale grayscale variation features employs a pyramid-style upsampling and weighted superposition from the top to the bottom. Upper-layer features are upsampled to the lower-layer resolution and then fused with the lower-layer features. Weight coefficients are adaptively allocated according to the scale level. The directional gradient distribution histogram is extracted from the high-frequency residual image, which is segmented into several cell units. Each cell unit is 8 pixels by 8 pixels, with no overlap between them. The gradient direction and magnitude of each pixel are calculated within each cell unit. The gradient direction is quantized into eight intervals, each covering a 45-degree angle range. The gradient magnitudes are accumulated according to the directional intervals to generate an eight-dimensional directional gradient histogram. Adjacent cell units are combined to form a block structure, with a 2x2 layout within each block. Blocks overlap by sliding with a step size of one cell unit. Intra-block normalization uses the L2 norm normalization method. The normalized directional gradient distribution histograms are concatenated to form a long feature vector, the dimension of which is determined by the image size and the block division method. Fast Fourier Transform (FFT) analysis is performed on overlapping image patches, with each patch size set to 32 pixels by 32 pixels and a 16-pixel overlap between patches to ensure continuity in the frequency domain analysis. The Hanning window function is used to preprocess the edge pixels of the image patches to reduce spectral leakage. The spatial frequency energy spectrum is calculated using a two-dimensional FFT, and frequency bands with amplitude values exceeding three times the average energy are identified as anomalous.
[0067] The defect feature enhancement module selects gradient directions with amplitudes exceeding the average value in the directional gradient distribution histogram as the main defect direction. The main defect direction is determined based on the amplitude comparison of eight intervals in the directional gradient distribution histogram, with the direction corresponding to the interval with the largest amplitude being the main direction. The size of the structuring element in the adaptive threshold morphological closing operation is positively correlated with the continuity of the main defect direction. The structuring element shape is designed as a linear structure to match the geometric characteristics of crack-like defects. The morphological closing operation first performs a dilation operation to connect the fracture edge regions, then performs an erosion operation to restore the original edge width. The number of iterations for dilation and erosion operations is adaptively adjusted according to the local gradient continuity. Anisotropic diffusion filtering uses a Perona-Malik partial differential equation model, with the diffusion coefficient function chosen as a function of decreasing gradient amplitude. Regions with larger gradient amplitudes have smaller diffusion coefficients, preserving edge information. The filtering process is implemented through discrete iteration, with the iteration step size satisfying numerical stability conditions. The iteration termination condition is set to the image change between adjacent iterations being less than a threshold. After anisotropic diffusion filtering, pixels within the continuous defect contour are smoothed, while edge pixels remain sharp. The topological structure of the defect contour is extracted through connected component analysis. The Gaussian pyramid decomposition of the image feature extraction engine is implemented in parallel on the GPU. Convolution operations at each pyramid level are distributed to multiple computing cores for synchronous processing, and data transfer between pyramid levels is optimized through shared memory. The spatial distribution matrix calculation of local gray-level change rates is accelerated using the SIMD instruction set. Sobel operator convolution is transformed into a separable filtering form to reduce computation. Gradient magnitude and direction calculations use a lookup table method instead of floating-point operations. The merging process of multi-scale gray-level change features introduces a pyramid reconstruction algorithm. Laplacian pyramid reconstruction ensures energy conservation during feature fusion at different scales, and feature weighting coefficients are dynamically adjusted based on the signal-to-noise ratio index of each level. The generation of oriented gradient distribution histograms optimizes the cell unit processing pipeline. Gradient calculation and histogram statistics at the cell unit are pipelined, and block normalization operations are vectorized to improve throughput. Fast Fourier Transform analysis is implemented using FFTW library functions. Spatial frequency analysis of multiple image blocks is processed by multiple threads, and abnormal frequency band marking is based on a frequency domain saliency detection algorithm.
[0068] The defect feature enhancement module incorporates a direction-aware mechanism in its adaptive threshold morphological closing operation. Structural elements are placed perpendicular to the main defect orientation to maximize connectivity, and their lengths are determined based on the statistical distribution of defect fracture gaps. The anisotropic diffusion filter employs an additive operator splitting algorithm, decomposing the partial differential equation into multiple easily solvable subproblems, each efficiently solved using the Thomas algorithm. The generation of continuous defect contours combines an edge tracking algorithm, searching for contour paths along the gradient direction from a seed point, considering both gradient magnitude and direction constraints. The defect feature enhancement module and the image feature extraction engine exchange data via a double-buffering mechanism: one buffer stores input feature data while the other processes it, switching buffer roles after processing to reduce waiting time. The image feature extraction engine uses a single-channel grayscale image format with a 16-bit unsigned integer pixel depth, and the image size is standardized to 1200 pixels by 1000 pixels for unified processing. The Gaussian pyramid decomposition downsampling filter uses bidirectional linear interpolation, with interpolation weights calculated based on relative pixel positions, and scale transformation between pyramid levels maintaining image energy conservation. The spatial distribution matrix of local gray-level change rates is stored as a floating-point two-dimensional array. The array memory layout is optimized for row-major contiguous storage, and the memory access mode matches the CPU cache prefetch mechanism. Cell unit division of the directional gradient distribution histogram uses integer coordinate mapping, with cell unit boundaries aligned with the image pixel grid. Gradient direction quantization achieves fast mapping from floating-point angles to discrete intervals using a lookup table. Overlapping regions of image blocks analyzed by Fast Fourier Transform employ a symmetrical filling strategy. Filled pixel values are generated through interpolation between adjacent blocks, reducing spectral distortion at block boundaries.
[0069] The defect feature enhancement module introduces a multi-directional fusion strategy for main defect orientation detection. When the magnitudes of multiple gradient directions are close, multiple candidate directions are retained. Morphological closing operations are performed along each candidate direction and the results are merged. The threshold setting for the adaptive threshold morphological closing operation is based on the gradient statistical features within a local window. The threshold is linearly related to the mean and variance of the gradient magnitude, and the window size is adjusted according to the pyramid level. The diffusion coefficient function parameters of the anisotropic diffusion filter are obtained through training. The training samples contain typical edge patterns of various defects, and the parameter optimization objective function balances noise suppression and edge preservation. Topological analysis of continuous defect contours calculates the Euler number and hole number of the contour. Geometric features are used to filter false defect responses, and the contour pixel coordinates are transformed to the original image coordinate system. The output feature set of the image feature extraction engine contains multi-scale grayscale variation features, directional gradient distribution histograms, and spatial frequency features. These three types of features are concatenated into a unified feature vector for use by subsequent modules. The feature vector dimension is reduced through principal component analysis. After dimensionality reduction, the feature vector is stored in a circular buffer, and the buffer size adapts to the real-time data processing flow. The defect feature enhancement module generates an enhanced defect feature map, which contains enhanced edge information and noise-suppressed texture background. The defect feature map is stored in floating-point matrix format. The collaborative work between the image feature extraction engine and the defect feature enhancement module is achieved through task queue scheduling. The task queue manages the allocation of image patch processing tasks, and a dynamic load balancing algorithm allocates computing resources.
[0070] Example 3: See Figure 3The method for constructing a small-sample feature comparison library involves collecting 500 sets of defect-free cable sheath surface images. These images were acquired under standard lighting conditions, simulating the actual production line working environment. The cable sheath samples cover different production batches and material types. Multi-scale grayscale variation features and directional gradient distribution histograms are extracted from each defect-free image. The feature extraction parameters are consistent with the image feature extraction engine, and the extracted feature vectors are normalized to eliminate the influence of dimensions. A standard feature template set is constructed using a feature clustering algorithm. The clustering algorithm uses the K-means algorithm to divide the 500 sets of feature vectors into several categories, with the centroid vector of each category serving as the standard feature template for that category. Ten typical defect samples, including cracks, bubbles, impurities, and mechanical damage, are manually labeled. Fifty instances of each defect sample are collected, covering different sizes, shapes, and locations. Geometric morphology descriptors are calculated based on binary mask images of the defect region. The descriptors include parameters such as area, perimeter, roundness, and elongation. The mean of the geometric morphology descriptors for each defect category is calculated using an arithmetic mean. Material attribute labels record the type of the sheath substrate and the surface treatment process. The labeling system adopts a hierarchical coding structure, with the code containing information on the major material category and the sub-process. The retrieval index for defect feature vectors uses an inverted index structure. The index key is a combination of the mean of the geometric shape descriptor and the material attribute label, and the index value points to the storage address of the corresponding standard feature template.
[0071] The comparison logic of the real-time defect detector divides the enhanced defect feature map into several detection units. The size of each detection unit matches the sampling window of the standard feature template, and the sampling window size is set to 32 pixels by 32 pixels based on the minimum identifiable defect size. A sliding window mechanism is used for detection unit division; the window moves across the defect feature map with a fixed step size, set to half the window width, to achieve overlapping sampling. The cosine similarity between the multi-scale grayscale variation features within each detection unit and the standard feature template is calculated using the vector dot product formula. The cosine similarity value ranges from -1 to +1, with larger values indicating greater feature similarity. A preset threshold is determined through statistical analysis, ensuring that 95% of defect-free samples pass the detection. Detection units with similarity below the preset value are marked as abnormal units. Abnormal units undergo a chi-square test of the directional gradient distribution histogram. The chi-square test statistic measures the difference in distribution between the observed histogram and the standard histogram. The formula for calculating the chi-square statistic is:
[0072]
[0073] in: This represents the chi-square statistic. This represents the frequency of gradient magnitude observations for the anomaly unit in the i-th directional interval. The summation sign *i* represents the expected frequency of the gradient magnitude of the standard feature template in the *i*-th directional interval. The *i* sign iterates through the eight directional intervals from 1 to 8. The significance level of the chi-square test is set to 0.01; outlier units whose chi-square statistics exceed the critical value are confirmed as true defects. Defect type determination is based on chi-square statistic pattern recognition. Different defect types exhibit distinct statistical characteristics in their directional gradient distributions, and these statistical characteristics are classified using a discriminant analysis algorithm.
[0074] The standard feature template set of the small-sample feature comparison library is stored in a columnar database format. The database is partitioned by feature type, and each feature template is accompanied by a timestamp and quality score information. Robust statistical methods are introduced for calculating the mean of geometric morphology descriptors. The median and quartiles replace the mean and variance to describe the distribution center and dispersion. Outliers are removed using Tukey's Fences method. The defect feature vector retrieval index supports multi-condition queries. Query conditions support range filtering of geometric morphology descriptors and precise matching of material attribute tags. The index update uses a lazy loading strategy to reduce real-time write overhead. The detection unit partitioning algorithm of the real-time defect detector optimizes boundary processing. Detection units at image boundaries are expanded using a mirror filling method, and the filling pixel values are generated by interpolation based on neighboring pixels. Cosine similarity calculation utilizes the BLAS library to accelerate vector operations. Feature vector pre-alignment of memory addresses optimizes cache hit rate, and similarity calculation results are stored in shared memory to reduce redundant calculations. The expected frequency of the chi-square test is used. The expected frequency is calculated based on the histogram of the directional gradient distribution of the standard feature template. The frequency is normalized to the same sum as the observed frequency, thus eliminating the influence of sample size differences. A hypothesis testing framework is used to determine statistical significance. The null hypothesis is that the anomalous units are consistent with the standard template distribution, and the alternative hypothesis is that there is a significant difference in distribution. The statistical feature patterns of defect types are visualized through principal component analysis (PCA). The reduced feature space exhibits category clustering, and the boundaries of these clustered regions serve as the classification decision boundaries. The parallel processing architecture of the real-time defect detector divides the defect feature map into multiple regions, each processed by an independent thread. Threads communicate detection results via lock-free queues.
[0075] The construction process of the small-sample feature comparison library includes a quality assessment stage. The assessment metrics include the intra-class tightness and inter-class separation of feature templates, calculated based on Mahalanobis distance to measure the feature space distribution. The standard feature template set update mechanism supports incremental learning. Newly acquired defect-free images are validated, and features are extracted. The feature vectors are compared with the cluster centers of existing templates to determine whether to add new templates. The manually annotated defect sample database is version-managed, recording the annotation time, annotator, and validation results. The sample database is periodically backed up to offline storage. The real-time defect detector's preset threshold dynamic adjustment mechanism monitors changes in production line processes. The threshold fluctuates based on the average similarity of recent detection results, with the adjustment range constrained to avoid over-adaptation.
[0076] The calculation algorithm for geometric morphology descriptors is optimized for processing speed. Connectivity component analysis employs a two-pass scanning method to mark defect regions, and regional geometric attributes are quickly calculated using moment estimation. The material attribute labeling system supports semantic extension, and new material types are compatible through an extended coding system. The label mapping table maintains the correspondence between material codes and physical attributes. The index construction process for defect feature vector retrieval adopts a batch processing mode, with index construction performed during system idle periods. Index optimization operations merge scattered index entries to improve query efficiency. The detection unit division of the real-time defect detector considers multi-scale adaptation. Large-sized defects are identified by merging adjacent abnormal units, with merging rules based on unit spatial proximity and feature similarity. The chi-square test for statistical significance difference determination introduces multiple test corrections. Bonferroni correction controls the family-wise error rate, and the corrected significance level is adjusted according to the number of tests. The defect type confirmation process incorporates spatial context information, with neighboring detection units voting to determine the final classification result. The voting mechanism uses a weighted majority voting algorithm. The result verification module of the real-time defect detector performs sampling re-inspection. The re-inspected samples are presented to the operator for confirmation through a manual interface, and the confirmation results are fed back to the small sample feature comparison library to update the annotations. The system's operational status monitoring records detection statistics, including the proportion of abnormal units, defect type distribution, and processing latency. This monitoring data is used for system performance optimization and fault diagnosis. The storage structure of the small-sample feature comparison library supports rapid recovery, and the database log records all changes. Periodic checkpoints maintain a consistent state for easy reconstruction after a failure. The algorithm parameters of the real-time defect detector are managed through configuration files, including detection unit size, similarity threshold, and chi-square threshold. Parameter hot reloading allows for runtime adjustment without affecting detection continuity. The structured output of defect detection results includes defect location, type, size, and confidence level, and the output format uses the JSON standard for easy parsing and integration by downstream systems. The system resource management module monitors the computational load and dynamically adjusts the detection frame rate to maintain system stability when the load is too high. The load balancing strategy is adjusted based on queue length and processing latency feedback.
[0077] Example 4: The 3D topography reconstruction module drives a structured light projector to scan the target section based on the coordinate set of the abnormal region. The structured light projector uses a digital micromirror device to generate a sinusoidal grating pattern, and the grating phase is solved using a three-step phase-shifting method. The target section is determined based on the circumscribed rectangle of the abnormal region coordinate set. The circumscribed rectangle extends by 5 mm to cover the potential defect diffusion area, and the scanning range of the structured light projector matches the size of the circumscribed rectangle. The millimeter-precision depth information calculation of the sheath surface is based on the triangulation principle. The relative position of the structured light projector and the industrial camera array is precisely calibrated, and the calibration parameters are stored in the system configuration file. The spatial coordinate alignment of the depth information and the defect feature map is achieved using an affine transformation matrix. The matrix parameters are calculated using a feature point matching algorithm, and the feature points are selected from the inherent texture features of the sheath surface. The 3D defect topography model, including surface unevenness, is stored in the form of a triangular mesh. The mesh vertices contain 3D coordinates and normal vector information, and the mesh rendering uses a Phong shading model to visualize surface undulations. The 3D topography reconstruction module works by triggering a line laser scanner after detecting an abnormal region. The line laser scanner is mounted on a movable gimbal with a positioning accuracy of 0.01 mm. A cross-scan was performed centered on the anomaly area. The cross-scan path contained two orthogonal scan lines, the length of which covered the diagonal of the circumscribed rectangle of the anomaly area. The deformation of the laser stripes was analyzed to calculate the profile height curve of the sheath surface along the scan lines. The Steger algorithm was used to extract the center line of the laser stripes, and the algorithm located the sub-pixel precision center point based on the eigenvalues of the Hessian matrix. The profile height curve was calculated using laser triangulation. The laser plane equation was determined by calibration parameters, and the 3D point coordinates were solved by back-projecting the camera imaging points onto the laser plane. Spline interpolation was performed on the two sets of orthogonal profile height curves. The spline interpolation used a non-uniform rational B-spline surface fitting method, and the surface control points were adaptively distributed according to the profile data. The 3D point cloud data of the anomaly area was reconstructed, with a point cloud density of no less than one hundred points per square millimeter. Subsequent point cloud processing included outlier filtering and normal vector estimation.
[0078] The technical parameters of the structured light projector include projection resolution, brightness, and contrast. Projection resolution determines the ability to reproduce the details of the grating fringes, brightness affects the image signal-to-noise ratio, and contrast relates to the accuracy of phase calculation. The line laser scanner uses a 635nm red laser as its source wavelength, matching the peak photosensitivity of the industrial camera array. A laser power stabilizer maintains output power fluctuations of less than 3%. The path planning for the cross-scanning considers mechanical motion efficiency; the gimbal motion uses a Lissajous trajectory to optimize scanning time, and acceleration planning avoids mechanical vibration affecting measurement accuracy. The algorithm for analyzing laser fringe deformation includes three steps: image preprocessing, fringe extraction, and 3D reconstruction. Image preprocessing enhances fringe contrast, fringe extraction determines the centerline position, and 3D reconstruction calculates the coordinates of spatial points. The sampling interval for the profile height curve is set to 0.1 mm, the number of sampling points is dynamically adjusted according to the scan line length, and the curve smoothing uses a Savitzky-Golay filter to preserve true morphological features. The node vectors for non-uniform rational B-spline surface interpolation are determined based on the curvature distribution of the profile data. The nodes are dense in areas of high curvature and sparse in areas of low curvature, and the surface fitting error is controlled within 0.01 mm.
[0079] The hardware integration of the 3D topography reconstruction module includes a synchronization control unit, which coordinates the working timing of the structured light projector, line laser scanner, and industrial camera array. The coordinate set of abnormal areas is transmitted to the 3D topography reconstruction module to trigger scanning commands. These commands include area coordinates, size parameters, and priority markers. High-priority defects trigger scanning immediately, while low-priority defects are queued for processing. The structured light projector's sinusoidal grating phase encoding uses a three-frame phase-shift method with phase shifts of zero, 120 degrees, and 240 degrees, respectively. The phase calculation formula eliminates ambient light interference. The line laser scanner's pan-tilt motion control uses a closed-loop servo system. The encoder provides feedback comparing the actual position with the target position, and the PID controller adjusts the motor drive signal. Data acquisition and processing for the cross-scanning are performed in parallel; data is acquired on one scan line while data is processed on another. 3D point cloud data is stored using an octree structure. Spatial indexing accelerates point cloud querying and rendering, and point cloud compression algorithms reduce storage space usage.
[0080] The calibration process of the 3D topography reconstruction module uses a standard calibration target. The target surface contains feature patterns of known dimensions, which are used to calculate the intrinsic and extrinsic parameters of the structured light projector and camera. Calibration parameters include camera intrinsic parameters, distortion coefficients, and relative pose. Calibration accuracy is evaluated through reprojection error; an error value less than one pixel is considered valid. Laser plane equation calibration is achieved by scanning a standard step block with a known step height. The measured height is compared with the actual height to correct the plane equation parameters. The affine transformation matrix for spatial coordinate alignment is calculated using the least squares method, with at least ten pairs of matching feature points. The transformation residual is used as an evaluation index for alignment quality. The output format of the 3D defect topography model supports standard 3D file formats, including PLY and STL formats, allowing downstream systems to directly read the model data.
[0081] Table 1: Performance Parameters of the 3D Topography Reconstruction Module
[0082]
[0083] The grating period of the structured light projector is optimized based on the measurement distance. The period is inversely proportional to the depth measurement range; a smaller period results in a smaller measurement range and higher accuracy, while a larger period results in a larger measurement range and lower accuracy. The phase unfolding algorithm for phase calculation employs a quality-guided path tracking method. The algorithm determines the optimal unfolding path based on the phase quality map, avoiding jump error propagation. The scanning speed of the line laser scanner is balanced with the point cloud density. High-speed scanning reduces density, suitable for large-area initial scanning, while low-speed scanning increases density, suitable for fine measurement. The Steger algorithm parameters for laser stripe centerline extraction are optimized based on actual image features. The Gaussian smoothing coefficient is matched with the stripe width, and the Hessian matrix eigenvalue threshold is adjusted according to image contrast. The weighting factors for non-uniform rational B-spline surface interpolation are assigned based on point cloud quality. High-confidence points are given larger weights, and low-confidence points are given smaller weights. Surface smoothness is constrained by energy minimization. The environmental adaptability design of the 3D topography reconstruction module includes a temperature drift compensation mechanism. Temperature sensors monitor internal temperature changes, and measurement errors caused by temperature changes are corrected by a compensation model. Vibration isolation employs an active damping platform with a built-in accelerometer to detect vibrations, and actuators generate a counterforce to counteract the vibration effects. Changes in lighting conditions are addressed through adaptive exposure control, with exposure time dynamically adjusted based on the average grayscale of the image to ensure stable contrast in the striped image. Data transmission utilizes Gigabit Ethernet, with compressed point cloud data stream transmission; the compression algorithm preserves feature point accuracy with controllable loss. System reliability design includes self-diagnostic functionality, periodically monitoring the operational status of each component, logging abnormal states, and triggering alarms. The interface protocol between the 3D topography reconstruction module and the real-time defect detector defines a data exchange format, including header information and data body. The header information records timestamps, region identifiers, and data length. The structured light projector's raster patterns are pre-generated and stored in flash memory; pattern loading uses DMA transfer to reduce CPU usage, with pattern switching time less than one millisecond. The line laser scanner has a Class 2M laser safety rating, and its protective design includes interlocking devices and warning signs; opening the door during scanning immediately stops laser output. Data fusion for cross-scanning considers measurement uncertainties, represented by a covariance matrix, and the fusion algorithm uses Kalman filtering to optimize the estimates. The quality assessment of the 3D defect topography model is based on point cloud integrity and surface continuity. Evaluation metrics include the hole area ratio and curvature change rate; exceeding these limits triggers a rescan. The calibration and maintenance cycle of the 3D topography reconstruction module is determined by usage frequency, with a calibration cycle not exceeding three months. The calibration process uses standard parts to verify measurement accuracy. Maintenance operations include cleaning optical components, lubricating mechanical structures, and checking electrical connections. Maintenance records are electronically stored and traceable. Module power management employs dynamic power adjustment, automatically entering low-power mode during idle periods and waking up to full-power operation during scanning tasks. The user interface displays real-time scanning progress and the 3D model, supports viewpoint switching and profile analysis, and features hierarchical management of operation permissions.The data backup strategy includes local redundancy and off-site archiving. The backup cycle is set according to the importance of the data, and rapid data recovery is supported after system failure.
[0084] See Figure 4 This diagram showcases the 3D morphological reconstruction results and detailed cross-sectional analysis data of surface defects in cable sheaths. The upper 3D morphological reconstruction image, based on structured light projection and line laser scanning technology, accurately reconstructs the microscopic geometric features of the sheath surface. The image visually reflects the surface height distribution through variations in grayscale levels; darker gray areas represent surface depressions, while lighter gray areas represent surface protrusions. The irregular surface undulations caused by defects are clearly visible in the 3D model, and these undulations are crucial for assessing the severity of defects. The marked scan center point indicates the starting position of the cross-shaped laser scan, while the scattered dark point set precisely marks the distribution of the identified defect areas in 3D space. The lower cross-sectional analysis image shows the laser scan cross-sectional data along both the horizontal and vertical directions. Solid lines represent the horizontal cross-sectional height curve, and dashed lines represent the vertical cross-sectional height curve; the two curves are appropriately offset in the vertical direction for easy observation and comparison. The fluctuations in the cross-sectional curves reflect the height changes of the sheath surface along the scanning path, with significant depressions and protrusions corresponding to existing surface defect features. The dark dots marked in the figure indicate the defect points detected at the corresponding locations. The distribution of these points corroborates the defect areas in the 3D topographic image. Analysis of the profile curves allows for the quantitative assessment of geometric parameters such as defect depth and width, providing an accurate basis for classifying the quality grade of cable sheaths. The smoothing process of the profile data preserves the true morphological characteristics while effectively suppressing the influence of measurement noise.
[0085] Example 5: The quality decision unit receives the set of abnormal region coordinates and the 3D defect morphology model output by the real-time defect detector. The abnormal region coordinate set is represented in pixel coordinate format, with the origin located at the upper left corner of the image. Coordinate values converted to the world coordinate system require multiplication by a calibration transformation matrix. The 3D defect morphology model is stored in a triangular mesh data structure. Mesh vertices contain 3D spatial coordinates and normal vector information, and mesh patches record vertex connection relationships. The quality decision unit analyzes the abnormal region coordinate set to calculate defect geometric parameters, including the defect projected area, contour perimeter, and centroid position. The projected area is converted from pixel count to the actual area of a single pixel. The 3D defect morphology model provides surface unevenness data. The unevenness is calculated with a reference plane as the baseline for positive and negative deviations, and the maximum indentation depth is extracted from the point of minimum deviation. Quality grade classification is implemented based on a fuzzy logic system. The input variables of the fuzzy logic system are the proportion of abnormal region area and the maximum indentation depth, and the output variable is the quality grade. The cable sheath quality grade classification rules divide products into three grades: Grade 1 corresponds to superior products that allow minor defects; Grade 2 corresponds to qualified products with acceptable defects; and Grade 3 corresponds to substandard products that need to be rejected. The percentage of abnormal area is calculated as the ratio of the defect projection area to the total area of the sheath inspection area, expressed as a percentage. The total inspection area is dynamically calculated based on the cable diameter and inspection length. The maximum indentation depth is extracted from the 3D defect morphology model. The extraction process iterates through the depth values of all vertices in the defect area, recording the degree of surface indentation in millimeters. The fuzzy logic system for quality grade classification includes three components: fuzzification, inference engine, and defuzzification. Fuzzification converts precise input values into fuzzy set membership degrees. The inference engine applies fuzzy rules to calculate the output fuzzy set. Defuzzification converts the output fuzzy set into a precise quality grade.
[0086] When the quality level falls below a set threshold, a sorting and rejection instruction is sent to the production line control system. The set threshold is determined according to customer quality standards and is typically set as the boundary between level two and level three. The sorting and rejection instruction includes defect location, type, and level information. The instruction is transmitted to the production line PLC controller via the industrial Ethernet protocol, with a transmission cycle of less than ten milliseconds. The production line PLC controller parses the instruction and triggers the actuator, which includes a pneumatic pusher and a sorting track. The pneumatic pusher pushes the defective cable into the scrap channel. The process of recording defect features to a small sample feature comparison library extracts multi-scale grayscale variation features and directional gradient distribution histograms of the defect area. The feature vectors are normalized and added to the feature library. Newly recorded defect features are associated with quality level classification results and manual review markings. The feature vector storage format includes both feature data and metadata. The metadata records the acquisition time and detection parameters. The quality decision unit's quality level classification considers defect distribution characteristics. Distributed defects and centralized defects use different evaluation standards. Distributed defects are allowed a slightly larger area proportion, but the size of individual defects is limited. The analysis of the convexity and concavity of the 3D defect morphology model introduces a curvature change index. Curvature change reflects the severity of surface deformation; even shallow areas of severe deformation can affect sheath performance. The fuzzy set partitioning of the fuzzy logic system is optimized using expert knowledge. The fuzzy set for the area proportion of abnormal regions is defined as small, small, medium, large, and huge; the fuzzy set for the maximum indentation depth is defined as negligible, slight, moderate, severe, and dangerous. The fuzzy rule base contains twenty-five rules covering all input combinations. The rule format is: if the area proportion is A and the indentation depth is B, then the quality level is C. The rule weights are adjusted according to the defect type.
[0087] The reliability of sorting and rejection instructions is ensured through a retransmission mechanism. After an instruction is sent, it waits for a confirmation signal; if no confirmation is received within a timeout period, the instruction is automatically retransmitted. The response time of the production line control system is incorporated into the calculations of the quality decision unit. The total delay from instruction issuance to the execution mechanism's action is measured and recorded; if the delay exceeds a threshold, a system alarm is triggered. The update operation of the small sample feature comparison library adopts a transaction processing mechanism. Transactions ensure the atomicity and consistency of feature records, and feature indexes are updated synchronously to maintain query efficiency. Defect feature records contain complete processing flow information, including image acquisition time, feature extraction parameters, and classification decision process. This information is used for quality traceability and system optimization. The human-machine interface of the quality decision unit displays real-time quality assessment results. The interface uses color coding to distinguish quality levels: green for superior products, yellow for qualified products, and red for defective products. Operators can manually overwrite the classification results of the quality decision unit. Overwriting operations require permission verification and are recorded in the operation log, which includes the operator's identifier and the reason for overwriting. Historical quality data statistics generate daily and weekly reports, which include the quantity distribution of each quality level and defect type statistics. Trend analysis helps optimize production processes. The system's self-learning function monitors the classification accuracy of the quality decision-making unit. Accuracy is evaluated through periodic sampling and manual review; a decrease in accuracy triggers model parameter retraining. Preprocessing of the abnormal area coordinate set includes a unified coordinate transformation, converting the coordinate systems of different inspection stations to the production line's global coordinate system. The transformation matrix is obtained through manual and eye calibration. Quality assessment of the 3D defect morphology model is based on the point cloud integrity index; models with a point cloud missing rate exceeding 5% are marked as unreliable, triggering a rescan. Input variables of the fuzzy logic system are normalized to eliminate dimensional influences; the area ratio of abnormal areas is normalized to the zero-to-one range, and the maximum indentation depth is normalized based on the historical maximum depth value. The credibility of the quality grade classification results is calculated using fuzzy set membership degrees; the membership degree distribution of the output fuzzy set reflects the classification certainty, and results with low certainty require manual review.
[0088] Priority management for sorting and rejection instructions considers production line cycle time. High-priority defects trigger sorting immediately, while low-priority defects await unified processing at the cycle time point. Priority is dynamically allocated based on defect severity. The feature retrieval system in the small sample feature comparison library supports similarity queries. New defect features are compared with features in the library for similarity, and highly similar features are merged to reduce data redundancy. Data exchange between the quality decision unit and upstream modules adopts a publish-subscribe model. The real-time defect detector publishes abnormal area messages, the 3D morphology reconstruction module subscribes to these messages and publishes its morphology model, and the quality decision unit subscribes to both messages for decision-making. System clock synchronization uses the IEEE 1588 precision time protocol, and unified timestamps across modules facilitate data correlation analysis. Performance optimization for decision delays in the quality decision unit is achieved through pipelined processing. Abnormal area coordinate set processing and 3D defect morphology model parsing are executed in parallel, and the results are merged to trigger classification decisions. Special cases for cable sheath quality grade classification include boundary conditions. Buffer areas are set for boundary conditions to avoid frequent grade switching at equal intervals; the size of the buffer area is adjusted according to product standards. The rule base of the fuzzy logic system supports online editing, requiring engineer privileges. Rule modification history records support rollback operations. The standardized format of sorting and rejection instructions follows industry communication protocols, which include an instruction header, data body, and checksum. The checksum uses the CRC32 algorithm to ensure data transmission integrity. Feature vector dimensionality optimization for the small sample feature comparison library is achieved through principal component analysis (PCA), which retains 95% of the feature variance. Dimensionality reduction improves retrieval speed and storage efficiency. The quality decision unit's anomaly handling mechanism includes timeout detection and error recovery. Timeouts in inter-module communication trigger re-initialization, and data errors trigger a re-request of the data source. The system maintenance mode supports offline testing and calibration. In maintenance mode, the quality decision unit uses historical data to verify classification accuracy, and calibration results generate calibration reports. The user permission management system divides permissions into three levels: operator, engineer, and administrator. Permission control is based on a role-based access control model, and operation logs record all critical operations. The quality decision unit's performance monitoring displays processing throughput and decision accuracy in real time. Monitoring data is visualized to show the system's operating status, and abnormal states trigger early warnings to notify maintenance personnel. Cable sheath quality grade classification results are bound to production batch information, including material batch number, production time, and process parameters. This bound data is used for quality traceability analysis. The execution results of sorting and rejection instructions are fed back to the quality decision-making unit. The feedback information includes a success flag and the actual sorting time. The feedback data is used to optimize the instruction sending timing. The storage architecture of the small sample feature comparison library adopts a distributed database. The database supports horizontal scaling to cope with data volume growth, and a data backup strategy ensures the security of feature data.
[0089] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0090] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A machine vision-based online inspection system for surface defects in cable sheaths, characterized in that, include: Industrial camera arrays are used to acquire multi-angle surface images during cable production line transmission, forming a raw image sequence; The illumination compensation device dynamically adjusts the incident angle and intensity of the light source according to the reflective characteristics of the cable sheath material, thereby eliminating reflective areas and shadow interference in the original image sequence. The image feature extraction engine performs multi-scale texture decomposition on the original image sequence after illumination compensation, generating a primary feature set that includes local gray-level change rate, directional gradient histogram and spatial frequency distribution. The defect feature enhancement module, based on the directional gradient histogram components in the primary feature set, enhances the edge continuity of surface cracks and pits through nonlinear filtering, generating an enhanced defect feature map. A small sample feature comparison library stores a limited number of standard sheath surface feature templates and typical defect feature vectors. Each feature vector is associated with a geometric shape descriptor and a material attribute label. The real-time defect detector performs pixel-by-pixel similarity calculations between the enhanced defect feature map and the standard sheath surface feature template in the small sample feature comparison library, and outputs a set of coordinates of abnormal areas where the difference exceeds the threshold.
2. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 1, characterized in that, The deployment method of the industrial camera array is as follows: Three circular shooting stations are set up at equal intervals along the direction of cable transmission, and each station is equipped with four polarization cameras; Each polarization camera is equipped with filters of different polarization directions at 45-degree intervals, and acquires four sets of polarization images after synchronous triggering. The polarization reflection coefficient of each pixel on the sheath surface is calculated based on the intensity difference of the four sets of polarization images, and a diffuse reflection image sequence that eliminates specular reflection is generated.
3. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 2, characterized in that, The illumination compensation device performs the following steps: Analyze the material reflectance distribution of different regions on the surface of the sheath in the diffuse reflection image sequence, and establish a reflectance-light source intensity mapping table; The brightness zones of the ring-shaped LED light source are dynamically adjusted according to the reflectivity-light source intensity mapping table, so that the illuminance fluctuation range at any position on the sheath surface is controlled within five lux. Pulse width modulation technology is used to compensate for local illuminance attenuation caused by cable movement in real time, maintaining the brightness consistency of the image sequence.
4. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 1, characterized in that, The workflow of the image feature extraction engine is as follows: Gaussian pyramid decomposition was performed on the brightness uniformity image to obtain the low-frequency components and high-frequency residuals at five scale levels; Calculate the spatial distribution matrix of the local gray-level change rate at each scale level, and merge the matrices at each level to form a multi-scale gray-level change feature. Extract the directional gradient histogram from the high-frequency residuals, and calculate the cumulative gradient magnitude in eight directional intervals to generate a directional gradient distribution histogram. By analyzing the spatial frequency energy spectrum of image patches using Fast Fourier Transform, the frequency bands with abnormally concentrated energy are identified.
5. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 4, characterized in that, The operation of the defect feature enhancement module includes: The gradient direction whose magnitude exceeds the average value in the directional gradient distribution histogram is selected as the main defect direction; An adaptive threshold morphological closing operation is applied along the main defect direction to connect the fracture edges and form a continuous defect profile. Anisotropic diffusion filtering is applied to pixels within the continuous defect contour to suppress noise while preserving edge sharpness.
6. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 1, characterized in that, The method for constructing the small sample feature comparison library is as follows: Five hundred sets of defect-free cable sheath surface images were collected, and multi-scale gray-level variation features and directional gradient distribution histograms were extracted to construct a standard feature template set. Ten typical defect samples were manually labeled, including cracks, bubbles, impurities and mechanical damage, and the mean value of the geometric morphology descriptor for each type of defect was calculated. The mean of the geometric shape descriptor is bound to the corresponding material attribute label to form a retrieval index for the defect feature vector.
7. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 6, characterized in that, The comparison logic of the real-time defect detector is as follows: The enhanced defect feature map is divided into several detection units, and the size of each unit matches the sampling window of the standard feature template. Calculate the cosine similarity between the multi-scale grayscale change features within the detection unit and the standard feature template, and mark abnormal units with similarity values lower than the preset value; Perform a chi-square test on the directional gradient distribution histogram of the abnormal unit to confirm the statistical significance difference between the defect type and the labeled sample.
8. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 7, characterized in that, Also includes: The 3D topography reconstruction module drives the structured light projector to scan the target section based on the coordinate set of the abnormal area, and obtains depth information of the sheath surface with millimeter-level accuracy. Align the depth information with the spatial coordinates of the defect feature map to generate a three-dimensional defect morphology model that includes surface unevenness.
9. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 8, characterized in that, The working principle of the three-dimensional topography reconstruction module is as follows: Upon detecting an abnormal area, the line laser scanner is triggered to perform a cross-shaped scan centered on the abnormal area. Analyze the laser stripe deformation to calculate the profile height curve of the sheath surface along the scanning line; Spline interpolation was performed on the two sets of orthogonal profile height curves to reconstruct the three-dimensional point cloud data of the abnormal area.
10. The machine vision-based small-sample online inspection system for surface defects of cable sheaths according to claim 1, characterized in that, Also includes: The quality decision unit receives the set of abnormal region coordinates and the three-dimensional defect morphology model output by the real-time defect detector; Based on the area ratio of abnormal regions and the maximum indentation depth of the three-dimensional defect morphology model, the cable sheath quality grade is classified. When the quality level is lower than the set threshold, a sorting and rejection instruction is sent to the production line control system and the defect characteristics are recorded in the small sample feature comparison library.