Vortex spinning yarn defect detection method and system based on computer vision
By simultaneously acquiring bright and dark field images and air pressure signals of yarn using computer vision technology, and performing multi-dimensional analysis, the problem of single detection dimension and insufficient defect attribution ability in yarn defect detection is solved, thus achieving high-precision defect detection and process optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUJIANG XINFENG WEAVING
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-28
AI Technical Summary
Existing yarn defect detection methods have limited detection dimensions, insufficient defect attribution capabilities, and lack of multi-source data fusion, resulting in low detection accuracy, high false positive rates, and an inability to achieve precise process adjustments and closed-loop optimization.
A computer vision-based eddy current spinning yarn defect detection method is adopted. By simultaneously acquiring bright field and dark field image sequences, yarn position and air pressure signals, trajectory modeling, inter-frame displacement compensation, and airflow fiber carrying characteristic analysis are performed to construct a dual-channel feature map, determine the direction of defect causes, and generate process parameter adjustment suggestions.
It enables multi-dimensional collaborative analysis of yarn surface geometry and internal airflow state, significantly improving the comprehensiveness and accuracy of defect detection, forming a complete closed loop from defect detection to process adjustment, and improving the intelligence level and adaptive control capability of the production process.
Smart Images

Figure CN121937405A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quality control and image recognition technology in the textile industry, and in particular to a method and system for detecting defects in eddy current spinning yarn based on computer vision. Background Technology
[0002] In the vortex spinning process, real-time detection and causal analysis of yarn defects are crucial for yarn quality and production efficiency. Currently, most yarn defect detection systems still employ traditional single-vision inspection methods, such as relying solely on images under bright-field illumination for surface defect identification. These methods cannot effectively capture changes in the internal fiber state of the yarn under the influence of airflow, resulting in low detection rates for latent defects such as airflow turbulence and abnormal fiber aggregation. Furthermore, existing systems often remain at the level of simply determining the presence or absence of defects, lacking targeted analysis of defect causes (such as abnormal mechanical drafting or airflow fluctuations), making it difficult to achieve real-time, precise feedback and adjustment of process parameters. In addition, traditional methods typically process image information separately from equipment operating parameters (such as yarn position and air pressure signals), failing to establish a spatiotemporal fusion correlation of multi-source data, leading to detection lag, high false positive rates, and the inability to form a closed-loop process optimization mechanism.
[0003] Specifically, the shortcomings of existing technologies are mainly reflected in the following aspects: the detection dimension is singular, relying solely on geometric morphology analysis and ignoring the impact of airflow fiber carrying state on yarn quality; the defect attribution ability is weak, and it is impossible to distinguish between defect types caused by mechanical factors and airflow factors; the system has poor closed-loop performance, and there is a lack of real-time, quantitative correlation feedback between detection results and process adjustments, making it difficult to achieve dynamic optimization and adaptive control of the production process. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] To address the shortcomings of existing technologies, this invention provides a computer vision-based method and system for detecting defects in eddy current spinning yarns. The aim is to solve the problems of low detection accuracy, high false positive rate, and inability to achieve precise process adjustment and closed-loop optimization caused by the single detection dimension, insufficient defect attribution ability, lack of multi-source data fusion, and incomplete process feedback loop in existing yarn defect detection methods.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the present invention provides a method for detecting defects in eddy current spinning yarn based on computer vision, comprising the following steps:
[0008] S1: Acquire the bright field image sequence of the same segment of moving yarn under bright field orthophoto illumination and the dark field image sequence under dark field lateral diffused light illumination, and acquire the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field.
[0009] S2: Based on spinning position signal and air pressure pulsation signal, trajectory modeling and inter-frame displacement compensation are performed on bright field image sequence to generate yarn structured displacement image;
[0010] S3: Perform airflow fiber-carrying feature analysis on the dark field image sequence, calculate the gradient and entropy value of the intensity distribution of lateral scattered light in the image, and construct an airflow fiber-carrying feature map;
[0011] S4: Spatial registration and fusion of the yarn structured displacement image and the airflow fiber-carrying feature map in the encoder spatial coordinate system are performed to obtain a dual-channel feature map;
[0012] S5: Extract the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and perform correlation verification based on the eddy current spinning physical model to generate defect cause directional judgment instructions.
[0013] S6: Based on the defect information from the defect cause directional judgment command, mark the defect location and generate a process parameter adjustment suggestion signal;
[0014] S7: Link the defect cause determination instructions, process parameter adjustment suggestion signals and key parameters of the eddy current field at the time of occurrence to construct a defect-process feedback sample set.
[0015] Furthermore, the acquisition of a bright-field image sequence of the same segment of moving yarn under bright-field orthophoto illumination and a dark-field image sequence under dark-field lateral diffused light illumination, and the acquisition of the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field, includes:
[0016] The first industrial camera and the second industrial camera are simultaneously exposed by a synchronous trigger signal. The first industrial camera acquires the image frame of the spinning yarn under bright field orthophoto illumination, and the second industrial camera acquires the image frame of the spinning yarn under dark field side-scattered light illumination.
[0017] The acquired image frames are arranged and stored according to the triggering sequence to generate a bright field image sequence corresponding to the first industrial camera and a dark field image sequence corresponding to the second industrial camera.
[0018] The pulse signal output by the encoder at the exposure time of the image frame is acquired, and the pulse signal is counted and decoded to generate the yarn position signal;
[0019] The analog signal output by the barometric pressure sensor at the exposure time of the image frame is collected, and the analog signal is converted from digital to analog to generate a barometric pressure pulsation signal.
[0020] Furthermore, the step of performing trajectory modeling and inter-frame displacement compensation on the brightfield image sequence based on the spinning position signal and air pressure pulsation signal to generate a yarn structured displacement image includes:
[0021] The circumference of the rotating shaft of the yarn traction device and the number of pulses per revolution of the encoder are obtained. The pulse count value of the yarn position signal is multiplied by the ratio of the circumference to the number of pulses per revolution to calculate the linear displacement of the yarn during the image acquisition time period and generate the yarn reference displacement sequence.
[0022] The air pressure pulsation signal is bandpass filtered with the characteristic frequency of the eddy current field as the center, and the air pressure-displacement conversion coefficient determined by the calibration experiment is used to convert the filtered air pressure fluctuation amplitude into the lateral displacement of the yarn, thereby generating an air pressure disturbance displacement sequence.
[0023] The yarn reference displacement sequence and the air pressure disturbance displacement sequence are superimposed with the same sampling timestamp to generate the yarn composite displacement sequence;
[0024] Based on the displacement difference between adjacent image frames calculated from the yarn composite displacement sequence, pixel translation operation is performed on each frame of the bright field image sequence to align the yarn positions in the image sequence, generating a position-aligned bright field image sequence.
[0025] The edge detection algorithm is used to extract the yarn contour of each frame in the position-aligned bright field image sequence, and the yarn center line is extracted based on the skeletonization algorithm to generate the yarn geometric contour and center line sequence.
[0026] Calculate the yarn diameter, centerline curvature, and lateral offset relative to the centerline of the first frame in the yarn geometric profile and centerline sequence to generate a yarn geometric distortion feature sequence.
[0027] From the yarn geometric distortion feature sequence, extract the lateral offset of each pixel on the yarn center line in each frame image relative to the corresponding position in the first frame;
[0028] Using the spatial pixel coordinates of the yarn centerline as column indices and the acquisition time sequence of image frames as row indices, a two-dimensional matrix with an initial value of zero is constructed.
[0029] The extracted horizontal offset of each frame and each pixel is filled into the corresponding row and column index positions in the two-dimensional matrix to generate a yarn structured displacement image.
[0030] Furthermore, the step of performing airflow fiber-carrying feature analysis on the dark field image sequence, calculating the gradient and entropy values of the intensity distribution of lateral scattered light in the image, and constructing an airflow fiber-carrying feature map includes:
[0031] Gaussian filtering is applied to each frame of the dark field image sequence to remove high-frequency noise, generating a preprocessed dark field image sequence.
[0032] The Sobel operator is used to calculate the first derivative of each frame in the preprocessed dark field image sequence in the horizontal and vertical directions, and then merge them into a gradient magnitude image to generate a dark field image gradient magnitude sequence.
[0033] To preprocess each frame of the dark field image sequence, Shannon entropy of the pixel grayscale value in each window is calculated by traversing within a fixed sliding window, and the result is assigned to the center pixel of the window to generate a local entropy value sequence of the dark field image.
[0034] The gradient magnitude sequence of the dark field image is superimposed at the pixel level with the frames corresponding to the spatiotemporal positions in the local entropy sequence of the dark field image to generate an initial dual-channel image sequence.
[0035] The initial dual-channel image sequence is subjected to Z-score-based channel normalization to generate a normalized airflow fiber-carrying feature map.
[0036] Furthermore, the step of spatially registering and fusing the yarn structured displacement image and the airflow fiber-carrying feature map in the encoder spatial coordinate system to obtain a dual-channel feature map includes:
[0037] Based on the yarn position signal and the calibration results of the intrinsic and extrinsic parameters of the first industrial camera, the pixel coordinates of the yarn centerline in the bright field image sequence are transformed to a physical coordinate system with the yarn traction direction as the axis.
[0038] Based on the coordinate relationship in the yarn physical coordinate system and the pose transformation matrix of the second industrial camera relative to the first industrial camera, perspective projection transformation is performed on each frame of the airflow fiber carrying feature map to generate the initially registered airflow fiber carrying feature sequence.
[0039] Bilinear interpolation resampling is performed on each frame of the initially registered airflow fiber-carrying feature sequence to align its pixel grid with the spatial grid of the yarn structured displacement image, thereby generating a spatially aligned airflow fiber-carrying feature sequence.
[0040] Data from the gradient amplitude channel is extracted from the spatially aligned airflow fiber-carrying feature sequence to generate an airflow gradient feature sequence;
[0041] The yarn structured displacement image and the airflow gradient feature sequence are spatially aligned in the physical coordinate system to obtain aligned yarn structured displacement data and aligned airflow gradient feature data.
[0042] For each time point, the aligned yarn structured displacement data and the aligned airflow gradient feature data are stacked along the channel dimension to generate a dual-channel feature map.
[0043] Furthermore, the step of extracting the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and performing correlation verification based on the eddy current spinning physical model to generate a defect cause-oriented judgment instruction includes:
[0044] Perform a first-order difference operation on the first channel data of the dual-channel feature map, and generate an instantaneous geometric distortion intensity sequence by taking the absolute value;
[0045] The instantaneous geometric distortion intensity sequence is squared, averaged, and then squared within a sliding time window to obtain the root mean square value of the geometric distortion intensity within the window. The root mean square values of all windows are normalized by dividing by the maximum value to generate a geometric distortion confidence vector.
[0046] A first-order difference operation is performed on the second channel data of the dual-channel feature map along the time dimension, and the absolute value is taken to generate an instantaneous fiber perturbation intensity sequence.
[0047] Calculate the arithmetic mean of all values in the instantaneous fiber disturbance intensity sequence within the sliding time window, normalize by dividing the arithmetic mean of all windows by the maximum value, and generate a fiber anomaly confidence vector.
[0048] The values of the same time index in the geometric distortion confidence vector and the fiber anomaly confidence vector are combined to form a data pair. The mean of the product of all data pairs is calculated, the product of the means of the two vectors is subtracted, and then divided by the product of the standard deviations of the two vectors to generate the Pearson correlation coefficient.
[0049] The Pearson correlation coefficient was compared with the preset lower limit of the mechanical stretching anomaly correlation coefficient threshold and the upper limit of the airflow field turbulence correlation coefficient threshold.
[0050] If the correlation coefficient is below the lower limit, a judgment command indicating abnormal mechanical stretching is generated; if the correlation coefficient is above the upper limit, a judgment command indicating turbulent airflow is generated; if it is between the two limits, a judgment command indicating a combined cause is generated.
[0051] Furthermore, the step of calculating the mean of the product of all data pairs, subtracting the product of the individual means of the two vectors, and then dividing by the product of the standard deviations of the two vectors to generate the Pearson correlation coefficient includes:
[0052] Calculate the arithmetic mean of all elements in the geometric distortion confidence vector, and denote it as the first mean;
[0053] Calculate the arithmetic mean of all elements in the fiber anomaly confidence vector, and denote it as the second mean;
[0054] Calculate the sum of squares of the differences between each element of the geometric distortion confidence vector and the first mean, divide by the total number of elements, and take the square root to obtain the first standard deviation.
[0055] Calculate the sum of squares of the differences between each element of the fiber anomaly confidence vector and the second mean, divide by the total number of elements, and take the square root to obtain the second standard deviation.
[0056] The product of the geometric distortion confidence vector and the fiber anomaly confidence vector is summed and then divided by the total number of elements to obtain the mean of the product.
[0057] The covariance is obtained by subtracting the product of the first and second means from the mean of the products.
[0058] The Pearson correlation coefficient is obtained by dividing the covariance by the product of the first and second standard deviations.
[0059] Furthermore, the defect location is marked based on the defect cause-oriented judgment instruction, and a process parameter adjustment suggestion signal is generated, including:
[0060] At the moment the defect cause directional judgment instruction is generated, the yarn position pulse count value output by the encoder at this moment is read and stored;
[0061] Multiply the stored pulse count value by the ratio of the circumference of the yarn traction device's rotating shaft to the number of pulses per encoder revolution to calculate the starting position coordinates of the defect point on the physical length of the yarn, thus generating the defect position coordinates.
[0062] Centered on the coordinates of the defect location, a fixed length of yarn physical coordinate interval is extended forward and backward. Based on the ratio of the image acquisition frame rate to the yarn speed, all image frames covering the physical coordinate interval are determined and extracted from the bright field image sequence to generate the target image frame set.
[0063] In each frame of the target image frame set, the pixel coordinates of the defect point in the image are determined according to the transformation relationship between the defect location coordinates and the image space coordinates. A rectangle is drawn with the pixel coordinates as the center to generate a defect image set with visual markings.
[0064] The storage path of the defect cause directional judgment instruction type text, defect location coordinates, and visually marked defect image set is stored and recorded to generate a structured defect log.
[0065] Based on the type of instruction determined by the cause of the defect, process parameter adjustment data is retrieved and read from the database that stores the correspondence between traction speed compensation and eddy current pressure adjustment.
[0066] The severity coefficient is the arithmetic mean of the maximum values of the geometric distortion confidence vector and the fiber anomaly confidence vector during the defect occurrence period.
[0067] The retrieved process parameter adjustment data is multiplied by the severity coefficient to generate a process parameter adjustment suggestion signal.
[0068] Furthermore, the associated record of defect cause determination instructions, process parameter adjustment suggestion signals, and key parameters of the eddy current field at the time of occurrence is used to construct a defect-process feedback sample set, including:
[0069] At the moment when the defect cause determination instruction is generated, the system clock timestamp of that moment is recorded as the defect event timestamp.
[0070] At the moment when the process parameter adjustment suggestion signal is generated, the system clock timestamp at that moment is recorded as the adjustment event timestamp;
[0071] Subtract the timestamp of the defect event from the timestamp of the adjustment event. If the absolute value of the time difference is less than twice the image acquisition cycle, mark the corresponding defect cause determination instruction and process parameter adjustment suggestion signal as the same event association pair.
[0072] For each event pair, using the timestamp of its defect event as the reference point, extract the air pressure data of N sampling points before and after the reference point from the stored historical data array of air pressure pulsation signals, and generate the corresponding vortex field air pressure parameter fragment for that event.
[0073] Based on the yarn position signal, calculate the average speed of the yarn within a fixed time period before and after the reference point time.
[0074] The type identifier of the defect cause directional judgment instruction in the event association pair, the traction speed compensation amount and eddy air pressure adjustment amount contained in the process parameter adjustment suggestion signal, as well as the corresponding eddy field air pressure parameter segment and yarn average speed, are combined into a sample data record.
[0075] The newly generated sample data is recorded and appended to a spreadsheet file to construct a defect-process closed-loop feedback sample set.
[0076] A computer vision-based eddy current spinning yarn defect detection system includes;
[0077] Image acquisition module: used to acquire the same segment of moving yarn under bright field orthophoto illumination and under dark field side-scattered light illumination, and to acquire the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field.
[0078] Displacement Image Module: Used to perform trajectory modeling and inter-frame displacement compensation on bright field image sequences based on spinning position signals and air pressure pulsation signals, generating structured yarn displacement images;
[0079] Airflow fiber carrying map module: used to perform airflow fiber carrying feature analysis on dark field image sequences, calculate the gradient and entropy value of the intensity distribution of lateral scattered light in the image, and construct an airflow fiber carrying feature map;
[0080] Feature map module: used to spatially register and fuse the yarn structured displacement image and the airflow fiber carrying feature map in the encoder spatial coordinate system to obtain a dual-channel feature map;
[0081] Defect instruction module: used to extract the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and perform correlation verification based on the eddy current spinning physical model to generate defect cause directional judgment instructions;
[0082] Adjustment signal module: used to mark the defect location based on the defect information of the defect cause direction judgment command, and generate process parameter adjustment suggestion signal;
[0083] Sample set module: Used to associate and record defect cause directional judgment instructions, process parameter adjustment suggestion signals and key parameters of the eddy current field at the time of occurrence, and construct a defect-process feedback sample set.
[0084] (III) Beneficial Effects
[0085] The computer vision-based eddy current spinning yarn defect detection method and system provided by this invention have the following advantages:
[0086] 1. This invention achieves multi-dimensional collaborative analysis of yarn surface geometry and internal airflow fiber-carrying state by simultaneously acquiring bright-field and dark-field dual-channel image sequences and combining yarn position signals with vortex field air pressure pulsation signals. This method can accurately identify airflow-related defects that are difficult to detect using traditional single-vision methods, significantly improving the comprehensiveness and accuracy of defect detection. Simultaneously, the system achieves directional judgment of defect causes through correlation verification of dual-channel feature maps, providing a clear basis for process adjustments.
[0087] 2. This invention achieves precise alignment and comprehensive analysis of multi-source heterogeneous data in a unified coordinate system by constructing a spatial registration and fusion mechanism between yarn structured displacement images and airflow fiber-carrying feature maps. Based on defect cause-oriented judgment commands, the system can not only visually mark defect locations but also automatically generate process parameter adjustment suggestion signals, which are then associated and stored with key parameters of the real-time eddy current field, forming a defect-process feedback sample set. This realizes a complete closed loop from defect detection and cause analysis to process adjustment, significantly improving the intelligence level, adaptive control capability, and product quality consistency of the eddy current spinning production process. Attached Figure Description
[0088] Figure 1 This is a schematic flowchart of the eddy current spinning yarn defect detection method based on computer vision of the present invention.
[0089] Figure 2This is a functional block diagram of the eddy current spinning yarn defect detection system based on computer vision of the present invention. Detailed Implementation
[0090] 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.
[0091] Please see Figure 1 This invention provides a computer vision-based method for detecting defects in eddy current spun yarn, comprising the following steps:
[0092] S1: Acquire the bright field image sequence of the same segment of moving yarn under bright field orthophoto illumination and the dark field image sequence under dark field lateral diffused light illumination, and acquire the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field.
[0093] In this embodiment, acquiring the bright-field image sequence of the same segment of moving yarn under bright-field orthophoto illumination and the dark-field image sequence under dark-field lateral diffused light illumination, and collecting the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field, includes:
[0094] The first industrial camera and the second industrial camera are simultaneously exposed by a synchronous trigger signal. The first industrial camera acquires the image frame of the spinning yarn under bright field orthophoto illumination, and the second industrial camera acquires the image frame of the spinning yarn under dark field side-scattered light illumination.
[0095] The acquired image frames are arranged and stored according to the triggering sequence to generate a bright field image sequence corresponding to the first industrial camera and a dark field image sequence corresponding to the second industrial camera.
[0096] The pulse signal output by the encoder at the exposure time of the image frame is acquired, and the pulse signal is counted and decoded to generate the yarn position signal;
[0097] The analog signal output by the barometric pressure sensor at the exposure time of the image frame is collected, and the analog signal is converted from digital to analog to generate a barometric pressure pulsation signal.
[0098] Preferably, the process of acquiring a bright field image sequence of the same segment of moving yarn under bright field orthophoto illumination and a dark field image sequence under dark field lateral diffused light illumination, and simultaneously acquiring the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field, is achieved through the following strict timing control and multi-source data alignment steps.
[0099] In detail, the first step is to construct a synchronous triggering and control system centered on a high-precision hardware clock. To achieve instantaneous multimodal sensing of the same physical position of a high-speed moving yarn, it is necessary to ensure that the exposure of two industrial cameras, the reading of encoder pulses, and the sampling of air pressure signals occur synchronously within microsecond time errors. Specifically, a high-stability crystal oscillator is used to generate a reference clock, and a field-programmable gate array (FPGA) or a high-performance microcontroller serves as the synchronous triggering controller.
[0100] The controller operates a precise timing cycle. At the beginning of each cycle, it performs two operations simultaneously: first, it sends a rising edge trigger pulse that conforms to the standard protocol requirements to the trigger input ports of the first and second industrial cameras. The amplitude of this pulse is typically between 3.3V and 4.3V, and the pulse width must be greater than the minimum value required by the camera technology to ensure reliable identification; second, it sends a synchronous sampling command to the sample-and-hold circuit of the high-speed analog-to-digital converter (ADC).
[0101] More specifically, upon receiving a valid trigger pulse, the two industrial cameras do not immediately output an image. Instead, they activate their image sensors to perform a global exposure or a rolling shutter exposure. "Simultaneous exposure" means that the start time of exposure for both cameras is precisely controlled by the same physical trigger signal. The timing jitter depends on the delay between the trigger signal and the camera's internal circuitry; this delay is deterministic and can be compensated for through calibration. Simultaneously, as the cameras complete exposure and begin transmitting image data to the host computer via interfaces such as CameraLink or USB 3.0, the cameras provide a "trigger ready" level signal. This signal is fed back to the synchronous trigger controller to ensure that the camera has completed the transmission of the previous data before the next trigger, thus avoiding missed triggers due to camera busyness. This is crucial for achieving stable continuous acquisition over long periods.
[0102] Preferably, the second step involves latching and reading the instantaneous state values of the encoder and the pressure sensor at the precise moment the synchronization trigger pulse is emitted, generating a time-aligned physical signal. Specifically, for the yarn position signal, the encoder (usually an incremental rotary encoder) continuously outputs two quadrature pulses, A and B, as the yarn traction shaft rotates. The counting operation of the pulse signal is implemented by a dedicated counting chip (such as HCTL-2020) installed on the encoder interface circuit or a counter module inside the FPGA. Upon receiving the sampling command from the synchronization controller, the counter module immediately latches its current 32-bit or 48-bit count value into an output register.
[0103] Decoding the pulse signal involves two aspects: first, determining the direction of yarn movement by judging the phase difference between phases A and B; second, calculating the corresponding linear displacement increment using hardware circuitry or subsequent software by combining the latched original count value with the known parameter of the number of pulses generated per revolution of the encoder. This displacement increment value latched at strictly identical moments is the yarn position signal corresponding to the current trigger moment.
[0104] Meanwhile, for pressure pulsation signals, the pressure sensor (such as a piezoresistive or capacitive micro-differential pressure sensor) outputs a continuous analog voltage signal. The acquisition of the analog signal output by the pressure sensor is performed by a high-speed, high-precision analog-to-digital converter (ADC) circuit. Specifically, the analog-to-digital conversion of the analog signal involves the ADC's sample-and-hold circuit immediately capturing and holding the instantaneous voltage value at the sensor output when the synchronous sampling command arrives; subsequently, the ADC core converts this voltage value into a digital quantity at a preset sampling rate (e.g., 100kSPS) and resolution (e.g., 16 bits). The key technology here is that the ADC's sampling clock is from the same source as the synchronous triggering system's clock, and each sampling command is strictly synchronized with the camera's trigger pulse, thus ensuring that each frame corresponds to a precise digital value of the pressure at a given moment, generating synchronous data points in the pressure pulsation signal sequence.
[0105] Preferably, the third step involves time-stamping and structured storage of all synchronously acquired multimodal data to generate a fused dataset for subsequent processing. Specifically, arranging and storing the acquired image frames according to their trigger sequence requires addressing the real-time reception and buffering of high-throughput image data streams generated by industrial cameras. Specifically, in the host computer, each camera is equipped with an independent memory buffer or an efficient circular buffer queue structure is used to continuously receive image data from the acquisition card via direct memory access technology.
[0106] When each frame of image data is received, the driver software assigns it a precise timestamp, sourced from the same hardware clock source as the synchronization trigger controller. Generating the bright-field image sequence corresponding to the first industrial camera involves writing the timestamped bright-field image frames sequentially, in lossless or low-loss compression format (such as TIFF or specifically encoded H.264), to a high-speed solid-state drive array. The dark-field image sequence is generated in the same manner.
[0107] More specifically, the synchronous acquisition system generates four sets of data streams that are strictly aligned on the time axis: a bright-field image sequence, a dark-field image sequence, a yarn position signal sequence (each position value corresponds to an image exposure time), and a pressure pulsation signal sequence (each pressure value corresponds to an image exposure time). This spatiotemporal alignment is ensured through a consistent hardware synchronization clock, precise trigger pulses, and a unified timestamp system based on this clock. These four sets of data together form the high-fidelity and unambiguous raw data foundation for subsequent yarn trajectory modeling, airflow characteristic analysis, and multi-source information fusion.
[0108] S2: Based on spinning position signal and air pressure pulsation signal, trajectory modeling and inter-frame displacement compensation are performed on bright field image sequence to generate yarn structured displacement image;
[0109] In this embodiment, the step of performing trajectory modeling and inter-frame displacement compensation on the brightfield image sequence based on the spinning position signal and air pressure pulsation signal to generate a yarn structured displacement image includes:
[0110] The circumference of the rotating shaft of the yarn traction device and the number of pulses per revolution of the encoder are obtained. The pulse count value of the yarn position signal is multiplied by the ratio of the circumference to the number of pulses per revolution to calculate the linear displacement of the yarn during the image acquisition time period and generate the yarn reference displacement sequence.
[0111] The air pressure pulsation signal is bandpass filtered with the characteristic frequency of the eddy current field as the center, and the air pressure-displacement conversion coefficient determined by the calibration experiment is used to convert the filtered air pressure fluctuation amplitude into the lateral displacement of the yarn, thereby generating an air pressure disturbance displacement sequence.
[0112] The yarn reference displacement sequence and the air pressure disturbance displacement sequence are superimposed with the same sampling timestamp to generate the yarn composite displacement sequence;
[0113] Based on the displacement difference between adjacent image frames calculated from the yarn composite displacement sequence, pixel translation operation is performed on each frame of the bright field image sequence to align the yarn positions in the image sequence, generating a position-aligned bright field image sequence.
[0114] The edge detection algorithm is used to extract the yarn contour of each frame in the position-aligned bright field image sequence, and the yarn center line is extracted based on the skeletonization algorithm to generate the yarn geometric contour and center line sequence.
[0115] Calculate the yarn diameter, centerline curvature, and lateral offset relative to the centerline of the first frame in the yarn geometric profile and centerline sequence to generate a yarn geometric distortion feature sequence.
[0116] From the yarn geometric distortion feature sequence, extract the lateral offset of each pixel on the yarn center line in each frame image relative to the corresponding position in the first frame;
[0117] Using the spatial pixel coordinates of the yarn centerline as column indices and the acquisition time sequence of image frames as row indices, a two-dimensional matrix with an initial value of zero is constructed.
[0118] The extracted horizontal offset of each frame and each pixel is filled into the corresponding row and column index positions in the two-dimensional matrix to generate a yarn structured displacement image.
[0119] Preferably, in this embodiment, the process of performing trajectory modeling and inter-frame displacement compensation on the bright field image sequence based on the spinning position signal and the air pressure pulsation signal to generate a yarn structured displacement image is a multi-stage calculation process that integrates mechanical kinematics, fluid dynamics and image processing technologies.
[0120] In detail, the first step is to calculate the axial reference displacement of the yarn under ideal rigid transmission. Specifically, this involves obtaining the circumference of the rotating shaft of the yarn traction device and the number of encoder pulses per revolution. The circumference of the rotating shaft is obtained by measuring the outer diameter of the traction roller and multiplying it by pi (π). The number of encoder pulses per revolution is a fixed technical parameter of the selected incremental encoder. Multiplying the pulse count value of the yarn position signal by the ratio of the circumference to the number of pulses per revolution, the physical meaning of this operation is to convert the encoder pulse count latched at each image acquisition moment into the cumulative linear displacement length of the yarn from the acquisition start point. Calculating the linear displacement of the yarn within the image acquisition time period means arranging the displacement length values calculated at all moments into a time series array according to the image frame timestamp order, generating a yarn reference displacement sequence. This sequence represents the expected uniform motion trajectory of the yarn under the condition of ignoring all disturbances.
[0121] More specifically, the second step is to quantify the lateral disturbance displacement of the yarn caused by the air pressure pulsations in the eddy current field. The air pressure pulsation signal is bandpass filtered around the characteristic frequency of the eddy current field; this operation is implemented using a digital filter. The characteristic frequency of the eddy current field is determined by acquiring air pressure signals under normal and stable spinning conditions, performing Fast Fourier Transform spectral analysis, and selecting the frequency point where energy dominates. The passband range of the bandpass filter is typically set to a few Hertz plus or minus this characteristic frequency to preserve the dominant disturbance and suppress other frequency band noise such as mechanical vibration. Based on the air pressure-displacement conversion coefficient determined by calibration experiments—which are conducted under yarn running conditions—periodic air pressure disturbances of known amplitude are applied to the eddy current field, while a high frame rate camera is used to capture images from the side to accurately measure the resulting lateral sway amplitude of the yarn.
[0122] Linear regression analysis was used to establish the proportional relationship between the amplitude of air pressure fluctuations and the amplitude of yarn lateral displacement; this proportionality coefficient is the air pressure-displacement conversion coefficient. Converting the filtered air pressure fluctuation amplitude into yarn lateral displacement involves multiplying the instantaneous value of the filtered air pressure signal at each sampling moment by this conversion coefficient, yielding an estimated value of the yarn lateral displacement caused by the inferred airflow disturbance at that moment. All estimated values were arranged in chronological order to generate an air pressure disturbance displacement sequence, which characterizes the lateral force effect of the dynamic instability of the airflow field on the yarn.
[0123] Preferably, the third step is to synthesize the theoretical motion of the yarn and the airflow disturbance to reconstruct its true two-dimensional motion trajectory. The yarn reference displacement sequence and the air pressure disturbance displacement sequence are superimposed at the same sampling timestamp. This "superposition" is a vector synthesis, using the axial reference displacement value at the same moment as the X-axis coordinate and the lateral disturbance displacement value as the Y-axis coordinate, forming a two-dimensional coordinate point. Generating the yarn composite displacement sequence is equivalent to generating an array of two-dimensional coordinate points aligned with these timestamps. This sequence describes the two-dimensional motion path of the yarn parallel to the camera's imaging plane, with its origin being the yarn position at the moment the first frame of the image was acquired.
[0124] In detail, the fourth step is to perform digital image stabilization on the original brightfield image sequence using the reconstructed motion trajectory to eliminate inter-frame jitter. The displacement difference between adjacent image frames calculated based on the yarn composite displacement sequence refers to calculating the difference between two adjacent two-dimensional coordinate points in the sequence to obtain a two-dimensional displacement vector. Performing pixel translation operation on each frame of the brightfield image sequence refers to using affine transformation techniques in image processing. Specifically, using the first frame image as the reference coordinate system, for the k-th frame image, the composite displacement vector from frame 1 to frame k is calculated.
[0125] A bilinear interpolation algorithm is used to perform a global translation transformation on the k-th frame image based on the displacement vector. If the displacement vector is not an integer pixel, bilinear interpolation calculates the new pixel value of the sub-pixel position by weighted averaging of the surrounding four pixels, ensuring geometric accuracy. The yarn's position is aligned within the image sequence, with the goal of ensuring that the image coordinates of the main yarn portion in each frame after translation correction coincide as closely as possible with the first frame. A sequence of aligned brightfield images is generated, where the yarn image position changes primarily arise from its own deformation rather than rigid body motion, providing a stable benchmark for subsequent static geometric analysis.
[0126] Specifically, the fifth step is to extract precise yarn geometric representations from the stabilized image sequence. An edge detection algorithm is used to extract the yarn contours of each frame in the position-aligned bright-field image sequence. The Canny edge detector is used here, and its application includes first smoothing the image with a Gaussian filter to reduce noise; then calculating the gradient magnitude and direction of the image; then applying non-maximum suppression to refine the edges; and finally using double threshold detection and edge connection to output continuous, single-pixel-wide yarn contour boundaries.
[0127] Extracting the yarn centerline based on the skeletonization algorithm involves applying the Zhang-Suen parallel thinning algorithm to the obtained binary contour image. This iteratively erodes the contour boundary pixels until a single-pixel-wide line is obtained; this line is the yarn centerline. Generating the yarn geometric contour and centerline sequence means storing the extracted contour pixel coordinate set and centerline pixel coordinate set from each frame in frame order.
[0128] More specifically, the sixth step is to calculate key indicators characterizing the dynamic changes in yarn morphology based on the geometric sequence. This involves calculating the yarn diameter for each frame in the yarn geometric contour and centerline sequence. At each pixel on the centerline, the search proceeds along the normal direction to both sides until it intersects the contour line; the distance between these two points is the local diameter at that point. The average or median value for the entire frame is taken as the yarn diameter for that frame. The centerline curvature is calculated using the centerline pixel coordinates, estimating the curvature at each centerline point using the three-point circle method or by calculating the rate of change of the direction angle between adjacent line segments.
[0129] Calculating the lateral offset relative to the center line of the first frame requires establishing a correspondence between the center line points of the first and current frames. Using the arc length of the center line of the first frame as a reference coordinate, the center line of the current frame is mapped to the arc length coordinates of the center line of the first frame through dynamic time warping or a nearest neighbor search method. Then, at the same arc length coordinate points, the pixel coordinate difference between the two center lines in the image row direction is calculated. Generating the yarn geometric distortion feature sequence involves forming three independent temporal feature sequences from the diameter value, average curvature value, and average lateral offset calculated for each frame.
[0130] Preferably, the seventh step focuses on the most sensitive lateral distortion and extracts the pixel-level spatiotemporal offset field. From the yarn geometric distortion feature sequence, the lateral offset of each pixel on the yarn centerline in each frame relative to its corresponding position in the first frame is extracted. This operation utilizes the centerline point correspondence established in the sixth step. For each frame, each pixel on its centerline is traversed, and based on its mapping relationship with the centerline of the first frame, its "corresponding position" pixel in the first frame is found. The difference in pixel coordinates between the two in the horizontal direction of the image is calculated, and this difference is the lateral offset of that point in that frame.
[0131] In detail, the final step is to encode the pixel-level spatiotemporal offset field into a structured two-dimensional matrix image. The spatial pixel coordinates of the yarn centerline are used as column indices; here, the "spatial pixel coordinates" are uniformly mapped to the normalized coordinates of the arc length of the centerline of the first frame to ensure consistent column index meaning across different frames. The image frames are numbered chronologically based on their acquisition time. A two-dimensional matrix with an initial value of zero is constructed, where the number of rows equals the total number of image frames, and the number of columns equals the total number of pixels on the centerline of the first frame.
[0132] The extracted lateral offset of each frame and each pixel is filled into the corresponding row and column indices of the two-dimensional matrix. Specifically, the data point is filled into the corresponding cell based on its frame number and the arc length coordinate of its center line in the first frame. This generates a structured yarn displacement image, where each element represents the degree of lateral geometric distortion at a specific time and location on the yarn, with the value in pixels. This image compresses and encodes the deformation history of the one-dimensional yarn over a period of time into a standard two-dimensional data block that can be directly analyzed by subsequent image processing or deep learning models, thus realizing the transformation from temporal signals to spatially structured features.
[0133] S3: Perform airflow fiber-carrying feature analysis on the dark field image sequence, calculate the gradient and entropy value of the intensity distribution of lateral scattered light in the image, and construct an airflow fiber-carrying feature map;
[0134] In this embodiment, the step of performing airflow fiber-carrying feature analysis on the dark field image sequence, calculating the gradient and entropy values of the side-scattered light intensity distribution in the image, and constructing an airflow fiber-carrying feature map includes:
[0135] Gaussian filtering is applied to each frame of the dark field image sequence to remove high-frequency noise, generating a preprocessed dark field image sequence.
[0136] The Sobel operator is used to calculate the first derivative of each frame in the preprocessed dark field image sequence in the horizontal and vertical directions, and then merge them into a gradient magnitude image to generate a dark field image gradient magnitude sequence.
[0137] To preprocess each frame of the dark field image sequence, Shannon entropy of the pixel grayscale value in each window is calculated by traversing within a fixed sliding window, and the result is assigned to the center pixel of the window to generate a local entropy value sequence of the dark field image.
[0138] The gradient magnitude sequence of the dark field image is superimposed at the pixel level with the frames corresponding to the spatiotemporal positions in the local entropy sequence of the dark field image to generate an initial dual-channel image sequence.
[0139] The initial dual-channel image sequence is subjected to Z-score-based channel normalization to generate a normalized airflow fiber-carrying feature map.
[0140] Preferably, in this embodiment, the airflow fiber-carrying feature analysis of the dark field image sequence aims to quantify the stability and distribution uniformity of fibers carried by airflow in the vortex field by calculating the gradient and statistical entropy of the image texture, thereby constructing a standardized airflow fiber-carrying feature map. This method is based on the following physical principle: under dark field side-scattered light illumination, the grayscale changes in the yarn image mainly reflect the intensity of light scattering by the fibers. When the airflow is stable and the fiber distribution is uniform, the intensity of scattered light changes smoothly in space and exhibits strong statistical regularity; when the airflow becomes turbulent or the fibers become clustered or sparse, it can lead to abrupt changes in local scattered light intensity or an increase in the randomness of the distribution.
[0141] In detail, the first step is to perform adaptive Gaussian filtering preprocessing on the original dark-field images to suppress noise while preserving key texture features. Gaussian filtering is applied to each frame in the dark-field image sequence, using a two-dimensional zero-mean Gaussian function as the convolution kernel. Gaussian filtering effectively removes Gaussian white noise introduced by camera sensor thermal noise and ambient stray light. When selecting the key parameter, the standard deviation σ of the Gaussian filter, a trade-off must be made: too small a σ value results in incomplete noise removal; too large a σ value leads to over-smoothing of the texture edges to be detected, formed by the fine aggregation or dispersion of fibers.
[0142] In this application scenario, the standard deviation σ is determined based on the pixel width of the yarn in the image, and is typically set to 1 / 30 to 1 / 50 of the width of the yarn image in pixels. For example, if the yarn is about 30 pixels wide in the image, σ can be set to 1. Through Gaussian convolution operation with this parameter, high-frequency noise is suppressed while the texture information representing the fiber distribution state is well preserved, generating a preprocessed dark field image sequence.
[0143] More specifically, the second step is to calculate the gradient magnitude of the preprocessed image to sensitively capture abrupt changes in fiber bundle edges and sharp local density variations caused by airflow disturbances. The Sobel operator is used to calculate the first derivatives in the horizontal and vertical directions for each frame of the preprocessed dark-field image sequence. Specifically, for each frame, 3×3 Sobel convolution kernels are applied in both the horizontal and vertical directions to obtain approximate gradient values Gx and Gy along the X and Y axes at each pixel.
[0144] Merging into a gradient magnitude image means calculating the gradient magnitude for each pixel position (i,j) in the image. In this amplitude image, the bright areas correspond to edges with drastic grayscale changes in the original image. In the dark-field yarn image, these edges may correspond to fiber bundle boundaries, sudden increases in fuzz, or local fiber density anomalies caused by airflow impact. Generating a gradient amplitude sequence of dark-field images yields a series of images with gradient amplitude values as pixel values. This sequence visually reflects the drastic spatial changes in the intensity of scattered light on and inside the yarn surface.
[0145] Preferably, the third step is to calculate the local Shannon entropy of the image to measure the disorder or uncertainty of the intensity distribution of scattered light on the cross-section of the yarn, thereby indirectly characterizing the uniformity of the fiber distribution. For each frame in the preprocessed dark-field image sequence, the Shannon entropy of the pixel grayscale values within each window is calculated by traversing a fixed sliding window. The "fixed sliding window" here is a key parameter; its size W (e.g., 5×5 pixels or 7×7 pixels) is determined based on the fact that it should be larger than the imaging scale of a single fiber's scattering spot in the image (typically 1-3 pixels) to cover enough fibers for statistical analysis; at the same time, it should be significantly smaller than the overall imaging width of the yarn to ensure that the calculated statistical characteristics are "local".
[0146] Define a square sliding window of size W×W, traversing the entire image with a step size of 1 pixel. For each local image patch covered by the window, calculate the probability distribution P of the gray values of all pixels within it, and then calculate the Shannon entropy of the window. A higher entropy value indicates a more uniform and random grayscale distribution within the window, potentially corresponding to a loose and disordered fiber distribution. Conversely, a lower entropy value indicates a more concentrated and ordered grayscale distribution, potentially corresponding to a tightly clustered or missing fiber distribution. The result is assigned to the center pixel of the window, replacing its original grayscale value with the calculated entropy value H. After traversing the entire image, a sequence of local entropy values for the dark field image is generated. This sequence constitutes an "entropy map," whose pixel values directly quantify the texture complexity and statistical randomness of each local region of the image.
[0147] Specifically, the fourth step involves spatially aligning and fusing two complementary features representing local mutations (gradients) and regional disorder (entropy), respectively, to construct a comprehensive feature representation. This is achieved by pixel-level overlay of the gradient magnitude sequence of the dark-field image with the frames corresponding to their spatiotemporal positions in the local entropy sequence of the dark-field image. This operation assumes that both sequences originate from the same original frame and have already undergone spatiotemporal alignment as described in the preceding steps.
[0148] "Pixel-level overlay" refers to creating a new data structure for the gradient magnitude image of the k-th frame that perfectly corresponds to the spatiotemporal location. and the local entropy value image of the kth frame Generate a new two-channel image Channel 1 storage Channel 1 stores all pixel values of H_k, and Channel 2 stores all pixel values of H_k. An initial dual-channel image sequence is generated. The technical purpose of this fusion operation is to integrate two features with different physical meanings but complementary features—gradient (capturing abrupt edges) and entropy (capturing texture chaos)—in the same pixel coordinate system, providing a rich, pixel-aligned fusion feature data source for subsequent steps to analyze the spatiotemporal correlation between "geometric distortion" and "fiber anomaly".
[0149] More specifically, the fifth step is to standardize the fused dual-channel feature data to eliminate differences in units and numerical ranges between different features, and to reduce the overall brightness differences between frames caused by slight fluctuations in illumination, making the feature data suitable for accurate numerical comparison and subsequent analysis. The initial dual-channel image sequence undergoes Z-score-based channel standardization. This process is performed independently for each channel within the entire sequence. Specifically, firstly, all dual-channel images in the sequence are expanded along the channel dimension. For the first channel (gradient magnitude channel), the arithmetic mean of this channel over all pixels in all frames of the entire sequence is calculated. and overall standard deviation .
[0150] Then, for each pixel value in that channel Using formula Perform the transformation. Repeat this independent process for the second channel (local entropy channel), using its own global mean. and overall standard deviation Standardization is performed. Standardized airflow-carrying fiber characteristic maps are generated. After this processing, the data for each channel conforms to a standard normal distribution with a mean of 0 and a standard deviation of 1. This brings two core benefits: first, it makes the gradient magnitude and local entropy, two features that originally had vastly different dimensions and numerical ranges, directly comparable in numerical value; second, it eliminates the systematic influence of non-uniform illumination or small drifts in camera response on the absolute values of features, ensuring the stability of the feature sequence over time, thus more realistically reflecting the relative changes in features caused by changes in airflow and fiber state.
[0151] S4: Spatial registration and fusion of the yarn structured displacement image and the airflow fiber-carrying feature map in the encoder spatial coordinate system are performed to obtain a dual-channel feature map;
[0152] In this embodiment, the step of spatially registering and fusing the yarn structured displacement image and the airflow fiber-carrying feature map in the encoder spatial coordinate system to obtain a dual-channel feature map includes:
[0153] Based on the yarn position signal and the calibration results of the intrinsic and extrinsic parameters of the first industrial camera, the pixel coordinates of the yarn centerline in the bright field image sequence are transformed to a physical coordinate system with the yarn traction direction as the axis.
[0154] Based on the coordinate relationship in the yarn physical coordinate system and the pose transformation matrix of the second industrial camera relative to the first industrial camera, perspective projection transformation is performed on each frame of the airflow fiber carrying feature map to generate the initially registered airflow fiber carrying feature sequence.
[0155] Bilinear interpolation resampling is performed on each frame of the initially registered airflow fiber-carrying feature sequence to align its pixel grid with the spatial grid of the yarn structured displacement image, thereby generating a spatially aligned airflow fiber-carrying feature sequence.
[0156] Data from the gradient amplitude channel is extracted from the spatially aligned airflow fiber-carrying feature sequence to generate an airflow gradient feature sequence;
[0157] The yarn structured displacement image and the airflow gradient feature sequence are spatially aligned in the physical coordinate system to obtain aligned yarn structured displacement data and aligned airflow gradient feature data.
[0158] For each time point, the aligned yarn structured displacement data and the aligned airflow gradient feature data are stacked along the channel dimension to generate a dual-channel feature map.
[0159] Preferably, in this embodiment, the core purpose of spatially registering and fusing the yarn structured displacement image and the airflow fiber-carrying feature image in the encoder spatial coordinate system is to map two feature data with different perspectives and different physical meanings onto the same two-dimensional reference plane based on the real physical space of the yarn, thereby generating dual-channel fused data that can be used for spatiotemporal correlation analysis, based on the principle of multi-view geometry.
[0160] In detail, the first step is to establish a precise mapping from the pixel coordinates of the brightfield image to the physical coordinate system of the yarn traction direction, providing a unified spatial reference for all data. Based on the yarn position signal and the calibration results of the intrinsic and extrinsic parameters of the first industrial camera, the intrinsic parameters (such as focal length, principal point, and distortion coefficient) are obtained through standard camera calibration procedures such as the Zhang Zhengyou calibration method; the extrinsic parameters (rotation matrix R1, translation vector T1) define the transformation relationship from the first camera coordinate system to the world coordinate system. In this invention, the world coordinate system is defined as a physical coordinate system with the yarn traction direction as its axis. The origin O of this coordinate system is set at a fixed reference point on the yarn path. The X-axis is parallel to the yarn traction direction and points towards the exit, the Y-axis is perpendicular to the vertical plane where the yarn is located and points upwards, and the Z-axis is determined according to the right-hand rule.
[0161] The process of transforming the pixel coordinates of the yarn centerline in a brightfield image sequence to the physical coordinate system involves, specifically, transforming the pixel coordinates of a point on the centerline... First, distortion correction is performed using camera intrinsic parameters to obtain normalized camera coordinates. Subsequently, combining the yarn position signal at the frame time of the pixel (i.e., the linear displacement of the yarn on the X-axis, and assuming that the yarn is mainly located in a plane approximately perpendicular to the Y-axis), its three-dimensional coordinates can be estimated as follows: And by constraining its Y and Z coordinates to a reasonable range, combined with known... This process calculates the most probable three-dimensional spatial point. This step assigns a true physical coordinate (x, z) to each data point in the yarn structured displacement image, where x is the axial position and z is the lateral position.
[0162] More specifically, the second step utilizes the principle of binocular vision to map the airflow feature map data acquired by the second camera onto the same physical coordinate system plane. Based on the coordinate relationship in the yarn physical coordinate system and the pose transformation matrix of the second industrial camera relative to the first industrial camera, this pose transformation matrix (including the rotation matrix R and translation vector T) is pre-calculated through binocular camera calibration. A perspective projection transformation is performed on each frame of the airflow fiber-carrying feature map. This "transformation" is not a direct deformation of the image, but rather a process of coordinate back-projection and reprojection. The specific logic is that it is assumed that the fiber scattering state reflected by the airflow features mainly occurs on the yarn surface, i.e., on the same approximate plane as the yarn observed in the bright-field image.
[0163] Therefore, for a target point in the physical coordinate system determined in the first step... Using the intrinsic parameters (K2) of the second camera and the extrinsic parameters (R, T) relative to the first camera, the projected coordinates of the point on the airflow characteristic map of the second camera are calculated. By traversing all target points, a mapping relationship between "physical coordinate points" and "pixels in the second camera image" can be established. Generating the initial registration airflow-carrying fiber feature sequence means assigning the feature values (gradient magnitude, entropy value) at coordinate p2 on the airflow feature map to the target points in the physical coordinate system based on this mapping relationship. Since p2 is typically a sub-pixel coordinate, bilinear interpolation is required in this step to obtain its feature values.
[0164] Preferably, the third step is to regularize the irregularly sampled initial registration data onto a unified physical space sampling grid for point-by-point computation. Bilinear interpolation resampling is performed on each frame of the initially registered airflow fiber-carrying feature sequence. This "resampling" is because the airflow feature values obtained through backprojection in the previous step are irregularly and sparsely distributed on the physical coordinate plane (distributed only in areas containing yarn).
[0165] Aligning the pixel grid with the spatial grid of the yarn structured displacement image involves establishing a regular two-dimensional matrix as a unified grid. Rows represent axial positions x (e.g., from 0 to yarn length, discrete at fixed intervals such as 0.1 mm), and columns represent time frames. Irregularly distributed initial registration data, based on its (x, time) coordinates, is calculated and filled into each cell of this regular matrix using a bilinear interpolation algorithm. This generates a spatially aligned airflow-carrying fiber feature sequence, resulting in a regular data matrix that corresponds perfectly one-to-one with the yarn structured displacement image in both the spatial (axial) and temporal dimensions.
[0166] In detail, the fourth step involves selecting the feature components most likely directly related to yarn geometric deformation from the airflow characteristics based on the physical model of defect cause analysis. The gradient amplitude channel data is separated from the spatially aligned airflow fiber-carrying feature sequence. This selection is based on the physical consideration that gradient amplitude characterizes abrupt changes in scattered light intensity in the image, directly corresponding to local fiber density abrupt changes or sharp edge changes caused by airflow turbulence; while local entropy tends to characterize the overall disorder of the region. In the vortex spinning model, instantaneous geometric distortions of the yarn (such as lateral sway) are more likely to be directly related to the intense impact of local airflow (high gradient) rather than to the overall statistical properties (entropy) of the region. Therefore, to focus on the core correlation, an airflow gradient feature sequence is generated for subsequent fusion analysis.
[0167] Specifically, the fifth step is to confirm the strict consistency of the two types of data on the spatiotemporal grid. The yarn structured displacement image and the airflow gradient feature sequence are spatially aligned in the physical coordinate system. Since the yarn structured displacement image itself is a matrix constructed based on the physical coordinate system (x, time), each element of its matrix is the lateral displacement z; and the airflow gradient feature sequence has also been normalized to the exact same (x, time) grid through the aforementioned steps, each element of its matrix is the gradient magnitude.
[0168] This step involves data dimension verification to ensure that the two matrices are exactly the same size (number of rows × number of columns), and that the physical location and time point represented by each row and column are strictly consistent. This results in aligned yarn structured displacement data and aligned airflow gradient characteristic data, which are two two-dimensional matrices with different numerical meanings but completely synchronized spatiotemporal indices.
[0169] More specifically, the final step is to synthesize the two spatiotemporally aligned features into a single multi-channel data block, providing a convenient data structure for subsequent pixel-level correlation analysis. For each time point, the aligned yarn structured displacement data and the aligned airflow gradient feature data are stacked along the channel dimension. In terms of data manipulation, this is represented by treating the two two-dimensional matrices as two "channels," and merging them into a three-dimensional data volume by adding a third dimension (channel dimension). .
[0170] In this model, channel=0 stores the lateral displacement value, and channel=1 stores the gradient magnitude. A dual-channel feature map is generated, ultimately resulting in a structured feature data cube. The significance of this data cube lies in the fact that for any axial position x on the yarn at any time t, a two-dimensional feature vector [displacement, gradient] can be directly obtained. This organization greatly facilitates the subsequent step (S5), which requires simultaneously traversing these two features to calculate their time-varying confidence vector and Pearson correlation coefficient, thus realizing the transformation from raw data to analyzable features.
[0171] S5: Extract the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and perform correlation verification based on the eddy current spinning physical model to generate defect cause directional judgment instructions.
[0172] In this embodiment, the step of extracting the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and performing correlation verification based on the eddy current spinning physical model to generate a defect cause-oriented judgment instruction includes:
[0173] Perform a first-order difference operation on the first channel data of the dual-channel feature map, and generate an instantaneous geometric distortion intensity sequence by taking the absolute value;
[0174] The instantaneous geometric distortion intensity sequence is squared, averaged, and then squared within a sliding time window to obtain the root mean square value of the geometric distortion intensity within the window. The root mean square values of all windows are normalized by dividing by the maximum value to generate a geometric distortion confidence vector.
[0175] A first-order difference operation is performed on the second channel data of the dual-channel feature map along the time dimension, and the absolute value is taken to generate an instantaneous fiber perturbation intensity sequence.
[0176] Calculate the arithmetic mean of all values in the instantaneous fiber disturbance intensity sequence within the sliding time window, normalize by dividing the arithmetic mean of all windows by the maximum value, and generate a fiber anomaly confidence vector.
[0177] The values of the same time index in the geometric distortion confidence vector and the fiber anomaly confidence vector are combined to form a data pair. The mean of the product of all data pairs is calculated, the product of the means of the two vectors is subtracted, and then divided by the product of the standard deviations of the two vectors to generate the Pearson correlation coefficient.
[0178] The Pearson correlation coefficient was compared with the preset lower limit of the mechanical stretching anomaly correlation coefficient threshold and the upper limit of the airflow field turbulence correlation coefficient threshold.
[0179] If the correlation coefficient is below the lower limit, a judgment command indicating abnormal mechanical stretching is generated; if the correlation coefficient is above the upper limit, a judgment command indicating turbulent airflow is generated; if it is between the two limits, a judgment command indicating a combined cause is generated.
[0180] Preferably, in this embodiment, the process of extracting the geometric distortion confidence vector and the fiber anomaly confidence vector from the dual-channel feature map and performing correlation verification based on the eddy spinning physical model aims to transform the spatiotemporally aligned yarn deformation and airflow disturbance characteristics into quantifiable, time-evolving anomaly probability indicators, and trace their common root causes through statistical correlation analysis, thereby generating directional defect cause judgment instructions.
[0181] In detail, the first step is to calculate the instantaneous change intensity of yarn geometric deformation and then smooth and standardize it based on the physical process time scale to generate a geometric distortion confidence vector. A first-order difference operation is performed on the first channel data of the dual-channel feature map, and the absolute value is taken to generate an instantaneous geometric distortion intensity sequence. This sequence reflects the abrupt change in the lateral position of the yarn at adjacent sampling times. The root mean square value of D(t) within the sliding time window is calculated by squaring, averaging, and then taking the square root. The length W1 of the sliding window is a key parameter, and its determination depends on the response characteristics caused by the inertia of the mechanical system during eddy current spinning.
[0182] Typically, W1 can be obtained by analyzing normal spinning process. The autocorrelation function or power spectral density of the sequence is set based on its principal period. For example, it can be set to 1 to 2 times the number of sampling points corresponding to the main vibration period of the mechanical system to ensure that meaningless random jitter is smoothed out while retaining real distortion events. This yields the results for each window. Then, generate the geometric distortion confidence vector. The normalization operation here is not division by the maximum value, but rather based on a large amount of historical normal sample data, collecting data over a long period of time under normal production conditions. For a sequence, calculate its statistical distribution, for example, using its 99th percentile as a reference. Then, the current real-time calculation and Comparison, The closer this value is to 1, the closer the current geometric distortion intensity is to or exceeds the upper limit of the normal range, and the higher the confidence level of an anomaly.
[0183] More specifically, the second step processes the airflow disturbance signal in a similar but physically different way to generate a fiber anomaly confidence vector. A first-order difference operation is performed along the time dimension on the second channel data of the dual-channel feature map, and the absolute value is taken to generate an instantaneous fiber disturbance intensity sequence. .calculate Arithmetic mean within the sliding time window The arithmetic mean was chosen over the root mean square because airflow disturbances are likely to manifest as a sustained rise in the average level rather than a brief high-energy pulse.
[0184] The determination of the sliding window length W2 differs from that of W1. It requires consideration of the characteristic time of airflow disturbances, which can be obtained through spectral analysis of the pressure pulsation signal to determine its period. W2 can be set to 1 to 2 times this period. (Generate fiber anomaly confidence vector.) Its normalization is also based on historical normal samples, obtaining data under normal conditions. The statistical distribution is used as a reference benchmark, with its 95th percentile. ,calculate .
[0185] Specifically, the third step is to calculate the Pearson correlation coefficient between the two confidence vectors to quantify the synchronicity of their changing trends. and Data pairs are formed by aligning the values to the time index. The standard formula for calculating the Pearson correlation coefficient r is to calculate the mean of the products of all data pairs, subtract the product of the individual means of the two vectors, and then divide by the product of the standard deviations of the two vectors. The Pearson correlation coefficient r is generated, with a range of [-1, 1]. In this application, the r value is typically calculated within a specific time interval before and after the suspected defective event, covering the entire process from the emergence of the anomaly to its stabilization.
[0186] More specifically, the fourth step involves interpreting the correlation coefficient based on thresholds obtained from physical models and statistical learning, and generating a defect cause judgment instruction. This involves comparing the Pearson correlation coefficient r with a preset lower limit for the mechanical stretching anomaly correlation coefficient threshold. and the upper limit of the correlation coefficient of airflow field turbulence The two thresholds are not set arbitrarily; their acquisition is key to this invention. They are obtained through statistical analysis of the defect-process feedback sample set (i.e., the sample set constructed in step S7).
[0187] In this sample set, the final determined cause (mechanical, airflow, or combined) of each confirmed defect event was recorded. The r-values corresponding to the defect events labeled as "pure mechanical stretching anomaly" and "pure airflow turbulence" were extracted separately, forming two statistical distributions. It can be set to the upper quartile of the r-value distribution of the mechanical anomaly group. This can be set as the lower quartile of the r-value distribution for the airflow turbulence group. Through learning from a large number of samples, a separation interval can be determined. If r < If r> If so, a judgment command indicating turbulent airflow is generated; if ≤r≤ This generates a judgment command indicating the combined causes of mechanical and airflow phenomena. This threshold setting method, based on historical data statistics, provides the basis for the judgment rules to be adaptive and continuously optimized.
[0188] In this embodiment, the step of calculating the mean of the product of all data pairs, subtracting the product of the individual means of the two vectors, and then dividing by the product of the standard deviations of the two vectors to generate the Pearson correlation coefficient includes:
[0189] Calculate the arithmetic mean of all elements in the geometric distortion confidence vector, and denote it as the first mean;
[0190] Calculate the arithmetic mean of all elements in the fiber anomaly confidence vector, and denote it as the second mean;
[0191] Calculate the sum of squares of the differences between each element of the geometric distortion confidence vector and the first mean, divide by the total number of elements, and take the square root to obtain the first standard deviation.
[0192] Calculate the sum of squares of the differences between each element of the fiber anomaly confidence vector and the second mean, divide by the total number of elements, and take the square root to obtain the second standard deviation.
[0193] The product of the geometric distortion confidence vector and the fiber anomaly confidence vector is summed and then divided by the total number of elements to obtain the mean of the product.
[0194] The covariance is obtained by subtracting the product of the first and second means from the mean of the products.
[0195] The Pearson correlation coefficient is obtained by dividing the covariance by the product of the first and second standard deviations.
[0196] Preferably, in this embodiment, the process of calculating the Pearson correlation coefficient is not a one-time calculation of all historical data, but rather a part of the defect cause analysis module, which focuses on analyzing the data within the event period after a suspected defect event is triggered.
[0197] Specifically, the first step is to determine the time frame for the computation and the data input. When an upstream step generates a trigger signal indicating a potential defect, the system will lock the start timestamp of that abnormal event. and end timestamp In this step, the "geometric distortion confidence vector" and the "fiber anomaly confidence vector" refer to the vectors derived from... arrive The input data for this step consists of two arrays of equal length, each representing a confidence value corresponding to all sliding windows within the specified time period. The total number of elements, N, is determined by the number of windows during which the event lasts and is a variable specific to the event.
[0198] Specifically, the second step is to calculate the basic statistics of the two vectors, which serve as the basis for calculating the correlation coefficient. The arithmetic mean of all elements in the geometric distortion confidence vector is calculated and denoted as the first mean. This operation is implemented in the software by summing the values of all N elements in the array and then dividing the sum by N. Using the exact same logic, the arithmetic mean of all elements in the fiber anomaly confidence vector is calculated to obtain the second mean. Next, calculate the first standard deviation. Create a loop that iterates through each element of the geometric distortion confidence vector, calculating the value of that element relative to the first mean. The difference is calculated by squarening the difference; after all elements have been traversed, all squared differences are summed to obtain the sum of squares; this sum of squares is divided by the total number of elements N to obtain the variance; finally, the square root of the squared difference is taken, and the result is... The second standard deviation of the confidence vector for fiber anomalies. It was calculated using the exact same algorithm.
[0199] More specifically, the third step is to calculate the covariance of the two vectors. The product of the geometric distortion confidence vector and the fiber anomaly confidence vector at the i-th element is accumulated, and then divided by the total number of elements N to obtain the mean of the product E. The software implementation of this operation is as follows: an accumulator variable is initialized to 0, and then loops from i=1 to i=N. In each loop, the values at the i-th position of the two vectors are multiplied, and the product is accumulated in the accumulator. After the loop ends, the final value of the accumulator is divided by N. The first mean is subtracted from the mean of the product E. Compared with the second mean The product of these factors yields the covariance. .
[0200] The fourth step is to calculate and output the final Pearson correlation coefficient. This will include the covariance. Divide by the first standard deviation Compared with the second standard deviation The product. In the code implementation, a protective check needs to be inserted before this step to check... or Is it zero (or less than a very small floating-point tolerance, such as 1e-10)? If any standard deviation is zero, it indicates that the corresponding signal has no fluctuation during the event period, and a meaningful linear correlation cannot be calculated. In this case, the correlation coefficient should be output as 0 (or a specific invalid identifier), and the correlation analysis should be marked as invalid. If all standard deviations are valid, a division operation is performed to obtain the Pearson correlation coefficient r.
[0201] The statistical significance of r, calculated from this, is that it quantifies the time period during which this specific suspected defect event occurred ( to Within this range, the strength of the overall linear correlation between the signal sequences of yarn geometric distortion confidence and fiber anomaly confidence is determined. This r-value serves as a key feature, immediately transmitted to the downstream decision-making module, and compared with a preset threshold to generate the final defect cause-oriented judgment instruction. By combining the calculation process with a specific event triggering mechanism and explicitly defining the dynamic sources of all parameters, this step is transformed from a theoretical formula into an algorithm module that can run stably in industrial control software.
[0202] S6: Based on the defect information from the defect cause directional judgment command, mark the defect location and generate a process parameter adjustment suggestion signal;
[0203] In this embodiment, the defect location is marked based on the defect cause-oriented judgment instruction, and a process parameter adjustment suggestion signal is generated, including:
[0204] At the moment the defect cause directional judgment instruction is generated, the yarn position pulse count value output by the encoder at this moment is read and stored;
[0205] Multiply the stored pulse count value by the ratio of the circumference of the yarn traction device's rotating shaft to the number of pulses per encoder revolution to calculate the starting position coordinates of the defect point on the physical length of the yarn, thus generating the defect position coordinates.
[0206] Centered on the coordinates of the defect location, a fixed length of yarn physical coordinate interval is extended forward and backward. Based on the ratio of the image acquisition frame rate to the yarn speed, all image frames covering the physical coordinate interval are determined and extracted from the bright field image sequence to generate the target image frame set.
[0207] In each frame of the target image frame set, the pixel coordinates of the defect point in the image are determined according to the transformation relationship between the defect location coordinates and the image space coordinates. A rectangle is drawn with the pixel coordinates as the center to generate a defect image set with visual markings.
[0208] The storage path of the defect cause directional judgment instruction type text, defect location coordinates, and visually marked defect image set is stored and recorded to generate a structured defect log.
[0209] Based on the type of instruction determined by the cause of the defect, process parameter adjustment data is retrieved and read from the database that stores the correspondence between traction speed compensation and eddy current pressure adjustment.
[0210] The severity coefficient is the arithmetic mean of the maximum values of the geometric distortion confidence vector and the fiber anomaly confidence vector during the defect occurrence period.
[0211] The retrieved process parameter adjustment data is multiplied by the severity coefficient to generate a process parameter adjustment suggestion signal.
[0212] Preferably, in this embodiment, the process of marking the defect location and generating a process parameter adjustment suggestion signal based on the defect cause-oriented judgment instruction takes as input a confirmed defect event output from the previous step. This event contains three core attributes: defect_type (defect type, such as "mechanical drawing abnormality"), event_interval (defect event time period [t_start, t_end]), and confidence_geo (geometric distortion confidence vector) and confidence_fiber (fiber abnormality confidence vector) aligned within that time period. This step aims to complete the visual archiving of the event and the generation of process intervention suggestions.
[0213] In detail, the first step is to calculate the physical location coordinates of the defect and extract the corresponding image evidence. When generating the defect cause-oriented judgment instruction, its logic corresponds to the start time of the defect event time period t_start. The yarn position pulse count value P_start output by the encoder at this moment is read and stored. P_start is multiplied by the ratio of the circumference L_per_rev of the yarn traction device's rotating shaft to the number of pulses per encoder revolution Pulses_per_rev, thus executing the command. The starting physical coordinates of the defect point, Pos_start (unit: millimeters), are generated.
[0214] Centered on Pos_start, extend a fixed length L_extension forward and backward to cover the potential impact range of the defect, forming the target physical interval [Pos_start-L_extension, Pos_start+L_extension]. The setting of L_extension needs to take into account the defect type and yarn speed. For example, it can be set to 100 mm for instantaneous defects and 300 mm for continuous defects. This value can be optimized based on historical data statistics.
[0215] More specifically, it is based on the ratio of the image acquisition frame rate (FPS) to the average yarn speed (V_yarn), which can be calculated from the position signal within the event_interval. Calculate the start and end image frame indices corresponding to the target physical interval. Retrieve and extract all image files within the frame index range from a strictly timestamped brightfield image sequence database to generate the target image frame set. In each image frame, determine the pixel coordinates of the defect points according to a preset mapping relationship between "yarn physical location - image pixel row coordinates".
[0216] This mapping relationship is pre-established through camera calibration and yarn linear motion model, and is typically a linear function: Where K and b are calibration coefficients. Centered on the calculated pixel coordinates, a fixed-size rectangle is drawn using a graphics drawing function (such as OpenCV's rectangle function), generating a set of defect images with visual markers.
[0217] Specifically, the second step is to generate a structured defect log and process parameter adjustment suggestion signals. The defect_type (text), Pos_start (floating-point number), event_interval (time pair), the storage path of the labeled image (string), and the original confidence vector data are written together into a database record or a structured file in JSON format to generate a structured defect log. This log is used for quality traceability and subsequent data analysis.
[0218] More specifically, based on defect_type, the corresponding basic adjustment amount is retrieved and read from the process parameter adjustment knowledge base. (such as traction speed compensation) and (e.g., eddy pressure adjustment). This knowledge base is built upon a large number of historical process experiments, expert rules, or high-fidelity process simulation models, recording the parameter adjustment directions and baseline amplitudes that are typically effective in correcting specific types of defects. Simultaneously, it calculates the severity coefficient (Severity) of this defect event.
[0219] Given that the peak intensity of a defect better reflects its instantaneous impact risk on yarn quality, Severity is calculated using: Subsequently, a process parameter adjustment suggestion signal is generated. This is not a simple linear multiplication, but rather processed through a predefined "severity-adjustment gain" mapping function f(). The f() function is typically defined within the range [0,1], for example, using a piecewise or saturation function, to ensure that fine-tuning is recommended for minor defects, and adjustments are recommended for severe defects but not exceeding the device's safety limits. The final output recommendation signal includes the adjustment parameter name, target value, and effective duration.
[0220] The aforementioned structured defect logs will be automatically stored in the central database and may trigger alarms on the host computer interface. Process parameter adjustment suggestions are sent to the human-machine interface for operator review and confirmation via standard industrial communication protocols (such as Modbus TCP and OPCUA), or directly to the PLC for execution. These suggestions and their effects (evaluated from subsequently collected data) will be recorded together and fed back as new samples to the "defect-process feedback sample set" (S7) for continuous optimization of the knowledge base and mapping function f(), thereby achieving an intelligent closed loop from detection to control.
[0221] S7: Link the defect cause determination instructions, process parameter adjustment suggestion signals and key parameters of the eddy current field at the time of occurrence to construct a defect-process feedback sample set.
[0222] In this embodiment, the associated record of defect cause determination instructions, process parameter adjustment suggestion signals, and key parameters of the eddy current field at the time of occurrence is used to construct a defect-process feedback sample set, including:
[0223] At the moment when the defect cause determination instruction is generated, the system clock timestamp of that moment is recorded as the defect event timestamp.
[0224] At the moment when the process parameter adjustment suggestion signal is generated, the system clock timestamp at that moment is recorded as the adjustment event timestamp;
[0225] Subtract the timestamp of the defect event from the timestamp of the adjustment event. If the absolute value of the time difference is less than twice the image acquisition cycle, mark the corresponding defect cause determination instruction and process parameter adjustment suggestion signal as the same event association pair.
[0226] For each event pair, using the timestamp of its defect event as the reference point, extract the air pressure data of N sampling points before and after the reference point from the stored historical data array of air pressure pulsation signals, and generate the corresponding vortex field air pressure parameter fragment for that event.
[0227] Based on the yarn position signal, calculate the average speed of the yarn within a fixed time period before and after the reference point time.
[0228] The type identifier of the defect cause directional judgment instruction in the event association pair, the traction speed compensation amount and eddy air pressure adjustment amount contained in the process parameter adjustment suggestion signal, as well as the corresponding eddy field air pressure parameter segment and yarn average speed, are combined into a sample data record.
[0229] The newly generated sample data is recorded and appended to a spreadsheet file to construct a defect-process closed-loop feedback sample set.
[0230] Preferably, in this embodiment, the process of associating defect cause determination instructions, process parameter adjustment suggestion signals, and key eddy current field parameters at the time of occurrence to construct a defect-process closed-loop feedback sample set has the core objective of generating high-quality, structured sample data that can be used for subsequent machine learning model training and optimization. Each sample needs to accurately record one confirmed defect event, the actual process intervention taken for the event, and key production status information before and after the intervention.
[0231] In detail, the first step is to accurately capture the time points of the two key events—defect determination and process adjustment—and logically correlate and filter them for validity. At the logical node where the software generates the defect cause determination instruction, a high-precision time function provided by the operating system or runtime environment is called to record the system clock timestamp at that moment, marking it as T_defect. Similarly, at the logical node where the process parameter adjustment suggestion signal is generated, the timestamp at that moment is recorded as T_suggestion. T_defect and T_suggestion are then subtracted, and the absolute value of the difference, Δt, is taken.
[0232] Here, the correlation criterion should not rely solely on the image acquisition cycle, but should instead use a more general "event correlation time window" T_window (e.g., 200 milliseconds) based on the typical system response delay. If Δt is less than T_window, it is preliminarily determined that the two events may belong to the same event. A more crucial step is verification; the system needs to listen for confirmation feedback signals from the process execution unit (e.g., PLC). Only when confirmation information confirms that the adjustment suggestion signal has been successfully issued and executed is the corresponding defect cause determination instruction and the process parameter adjustment suggestion signal formally marked as a valid event correlation pair. This step ensures that the sample set only includes cases where intervention was actually implemented.
[0233] More specifically, the second step is to extract key process parameter fragments before and after the occurrence of each valid event pair to characterize the production state at the time of the defect. Using the defect event timestamp T_defect as a reference point, the range of data points to be extracted is calculated from the chronologically stored historical data ring buffer or time-series database of air pressure pulsation signals, based on the signal sampling frequency Fs. The parameter N in "N sampling points before and after" needs to be determined according to the physical characteristics of the eddy current field disturbance; for example, it can be set to the number of sampling points covering the main fluctuation cycle of the eddy current field, such as... Where f_dominant is the dominant frequency of the air pressure signal. Based on the index range calculated from this, the air pressure data segment is precisely extracted to generate the corresponding vortex field air pressure parameter fragment for the event, which is usually saved as a one-dimensional array.
[0234] Simultaneously, based on synchronously acquired yarn position signals, indicators that more accurately reflect the process conditions during the defect occurrence period are calculated. The calculation interval is the actual duration of the defect event [t_start, t_end] (this information is obtained from previous steps), rather than a general "fixed time period before and after". Within this interval, the average yarn speed V_yarn_defect is calculated by dividing the change in position signal by the time difference. This speed is more representative of the actual traction conditions at the time of the defect than the average speed before and after.
[0235] Preferably, the third step is to combine all the associated information into a complete, structured sample record. This involves combining the type identifier of the defect cause determination instruction in the event association pair, the traction speed compensation amount ΔV and vortex pressure adjustment amount ΔP contained in the process parameter adjustment suggestion signal, the vortex field pressure parameter fragments (which can be stored as an array or have their characteristic values such as mean, variance, and dominant frequency encoded as a vector), the average yarn speed V_yarn_defect during the defect occurrence period, and the defect event timestamp T_defect and adjustment execution timestamp T_executed, into a single sample data record.
[0236] More specifically, the fourth step is to label the sample record with crucial results. During a predetermined observation period after the process adjustment is implemented (e.g., the subsequent 3-5 seconds), features characterizing the yarn condition (such as the rate of decrease in geometric distortion confidence or defect detection results in the newly generated image) are extracted from the sensor data, and a post-adjustment effectiveness evaluation value (Efficacy) is calculated. This evaluation value is then added to the sample record as the core supervisory signal.
[0237] This complete sample record, encompassing "initial state - intervention action - result feedback," is appended to and stored in a data structure specifically designed for machine learning. Instead of simple spreadsheet files, a more suitable storage method is used, such as writing to a specific set in a NoSQL database, a feature repository, or a version-controlled serialized file. This continuously builds and expands a high-quality, structured defect-process closed-loop feedback sample set, providing a reliable training and validation data foundation for subsequent data-driven adaptive optimization algorithms for process parameters.
[0238] Please see Figure 2 This invention provides a computer vision-based eddy current spinning yarn defect detection system, comprising:
[0239] Image acquisition module: used to acquire the same segment of moving yarn under bright field orthophoto illumination and under dark field side-scattered light illumination, and to acquire the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field.
[0240] Displacement Image Module: Used to perform trajectory modeling and inter-frame displacement compensation on bright field image sequences based on spinning position signals and air pressure pulsation signals, generating structured yarn displacement images;
[0241] Airflow fiber carrying map module: used to perform airflow fiber carrying feature analysis on dark field image sequences, calculate the gradient and entropy value of the intensity distribution of lateral scattered light in the image, and construct an airflow fiber carrying feature map;
[0242] Feature map module: used to spatially register and fuse the yarn structured displacement image and the airflow fiber carrying feature map in the encoder spatial coordinate system to obtain a dual-channel feature map;
[0243] Defect instruction module: used to extract the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and perform correlation verification based on the eddy current spinning physical model to generate defect cause directional judgment instructions;
[0244] Adjustment signal module: used to mark the defect location based on the defect information of the defect cause direction judgment command, and generate process parameter adjustment suggestion signal;
[0245] Sample set module: Used to associate and record defect cause directional judgment instructions, process parameter adjustment suggestion signals and key parameters of the eddy current field at the time of occurrence, and construct a defect-process feedback sample set.
[0246] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0247] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0248] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A computer vision-based method for detecting defects in eddy current spun yarn, characterized in that, Includes the following steps: S1: Acquire the bright field image sequence of the same segment of moving yarn under bright field orthophoto illumination and the dark field image sequence under dark field lateral diffused light illumination, and acquire the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field. S2: Based on spinning position signal and air pressure pulsation signal, trajectory modeling and inter-frame displacement compensation are performed on bright field image sequence to generate yarn structured displacement image; S3: Perform airflow fiber-carrying feature analysis on the dark field image sequence, calculate the gradient and entropy value of the intensity distribution of lateral scattered light in the image, and construct an airflow fiber-carrying feature map; S4: Spatial registration and fusion of the yarn structured displacement image and the airflow fiber-carrying feature map in the encoder spatial coordinate system are performed to obtain a dual-channel feature map; S5: Extract the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and perform correlation verification based on the eddy current spinning physical model to generate defect cause directional judgment instructions. S6: Based on the defect information from the defect cause directional judgment command, mark the defect location and generate a process parameter adjustment suggestion signal; S7: Link the defect cause determination instructions, process parameter adjustment suggestion signals and key parameters of the eddy current field at the time of occurrence to construct a defect-process feedback sample set.
2. The method for detecting defects in eddy current spinning yarn based on computer vision according to claim 1, characterized in that, The process of acquiring a sequence of bright-field images of the same segment of moving yarn under bright-field orthophoto illumination and a sequence of dark-field images under dark-field lateral diffused light illumination, and acquiring the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field, includes: The first industrial camera and the second industrial camera are simultaneously exposed by a synchronous trigger signal. The first industrial camera acquires the image frame of the spinning yarn under bright field orthophoto illumination, and the second industrial camera acquires the image frame of the spinning yarn under dark field side-scattered light illumination. The acquired image frames are arranged and stored according to the triggering sequence to generate a bright field image sequence corresponding to the first industrial camera and a dark field image sequence corresponding to the second industrial camera. The pulse signal output by the encoder at the exposure time of the image frame is acquired, and the pulse signal is counted and decoded to generate the yarn position signal; The analog signal output by the barometric pressure sensor at the exposure time of the image frame is collected, and the analog signal is converted from digital to analog to generate a barometric pressure pulsation signal.
3. The computer vision-based defect detection method for eddy current spinning yarn according to claim 1, characterized in that, The process of performing trajectory modeling and inter-frame displacement compensation on brightfield image sequences based on spinning position signals and air pressure pulsation signals to generate structured yarn displacement images includes: The circumference of the rotating shaft of the yarn traction device and the number of pulses per revolution of the encoder are obtained. The pulse count value of the yarn position signal is multiplied by the ratio of the circumference to the number of pulses per revolution to calculate the linear displacement of the yarn during the image acquisition time period and generate the yarn reference displacement sequence. The air pressure pulsation signal is bandpass filtered with the characteristic frequency of the eddy current field as the center, and the air pressure-displacement conversion coefficient determined by the calibration experiment is used to convert the filtered air pressure fluctuation amplitude into the yarn lateral displacement, thereby generating an air pressure disturbance displacement sequence. The yarn reference displacement sequence and the air pressure disturbance displacement sequence are superimposed with the same sampling timestamp to generate the yarn composite displacement sequence; Based on the displacement difference between adjacent image frames calculated from the yarn composite displacement sequence, pixel translation operation is performed on each frame of the bright field image sequence to align the yarn positions in the image sequence, generating a position-aligned bright field image sequence. The edge detection algorithm is used to extract the yarn contour of each frame in the position-aligned bright field image sequence, and the yarn center line is extracted based on the skeletonization algorithm to generate the yarn geometric contour and center line sequence. Calculate the yarn diameter, centerline curvature, and lateral offset relative to the centerline of the first frame in the yarn geometric profile and centerline sequence to generate a yarn geometric distortion feature sequence. From the yarn geometric distortion feature sequence, extract the lateral offset of each pixel on the yarn center line in each frame image relative to the corresponding position in the first frame; Using the spatial pixel coordinates of the yarn centerline as column indices and the acquisition time sequence of image frames as row indices, a two-dimensional matrix with an initial value of zero is constructed. The extracted horizontal offset of each frame and each pixel is filled into the corresponding row and column index positions in the two-dimensional matrix to generate a yarn structured displacement image.
4. The computer vision-based defect detection method for eddy current spinning yarn according to claim 1, characterized in that, The step of performing airflow fiber-carrying feature analysis on the dark field image sequence, calculating the gradient and entropy values of the lateral scattered light intensity distribution in the image, and constructing an airflow fiber-carrying feature map includes: Gaussian filtering is applied to each frame of the dark field image sequence to remove high-frequency noise, generating a preprocessed dark field image sequence. The Sobel operator is used to calculate the first derivative of each frame in the preprocessed dark field image sequence in the horizontal and vertical directions, and then merge them into a gradient magnitude image to generate a dark field image gradient magnitude sequence. To preprocess each frame of the dark field image sequence, Shannon entropy of the pixel grayscale value in each window is calculated by traversing within a fixed sliding window, and the result is assigned to the center pixel of the window to generate a local entropy value sequence of the dark field image. The gradient magnitude sequence of the dark field image is superimposed at the pixel level with the frames corresponding to the spatiotemporal positions in the local entropy sequence of the dark field image to generate an initial dual-channel image sequence. The initial dual-channel image sequence is subjected to Z-score-based channel normalization to generate a normalized airflow fiber-carrying feature map.
5. The computer vision-based defect detection method for eddy current spinning yarn according to claim 3, characterized in that, The process of spatially registering and fusing the yarn structured displacement image and the airflow fiber-carrying feature map in the encoder spatial coordinate system to obtain a dual-channel feature map includes: Based on the yarn position signal and the calibration results of the intrinsic and extrinsic parameters of the first industrial camera, the pixel coordinates of the yarn centerline in the bright field image sequence are transformed to a physical coordinate system with the yarn traction direction as the axis. Based on the coordinate relationship in the yarn physical coordinate system and the pose transformation matrix of the second industrial camera relative to the first industrial camera, perspective projection transformation is performed on each frame of the airflow fiber carrying feature map to generate the initially registered airflow fiber carrying feature sequence. Each frame of the initially registered airflow fiber-carrying feature sequence is resampled using bilinear interpolation to align its pixel grid with the spatial grid of the yarn structured displacement image, thereby generating a spatially aligned airflow fiber-carrying feature sequence. Data from the gradient amplitude channel is extracted from the spatially aligned airflow fiber-carrying feature sequence to generate an airflow gradient feature sequence; The yarn structured displacement image and the airflow gradient feature sequence are spatially aligned in the physical coordinate system to obtain aligned yarn structured displacement data and aligned airflow gradient feature data. For each time point, the aligned yarn structured displacement data and the aligned airflow gradient feature data are stacked along the channel dimension to generate a dual-channel feature map.
6. The computer vision-based defect detection method for eddy current spinning yarn according to claim 1, characterized in that, The step of extracting the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and performing correlation verification based on the eddy current spinning physical model to generate a defect cause-oriented judgment instruction includes: Perform a first-order difference operation on the first channel data of the dual-channel feature map, and generate an instantaneous geometric distortion intensity sequence by taking the absolute value; The instantaneous geometric distortion intensity sequence is squared, averaged, and then squared within a sliding time window to obtain the root mean square value of the geometric distortion intensity within the window. The root mean square values of all windows are normalized by dividing by the maximum value to generate a geometric distortion confidence vector. A first-order difference operation is performed on the second channel data of the dual-channel feature map along the time dimension, and the absolute value is taken to generate an instantaneous fiber perturbation intensity sequence. Calculate the arithmetic mean of all values in the instantaneous fiber disturbance intensity sequence within the sliding time window, normalize by dividing the arithmetic mean of all windows by the maximum value, and generate a fiber anomaly confidence vector. The values of the same time index in the geometric distortion confidence vector and the fiber anomaly confidence vector are combined to form a data pair. The mean of the product of all data pairs is calculated, the product of the means of the two vectors is subtracted, and then divided by the product of the standard deviations of the two vectors to generate the Pearson correlation coefficient. The Pearson correlation coefficient was compared with the preset lower limit of the mechanical stretching anomaly correlation coefficient threshold and the upper limit of the airflow field turbulence correlation coefficient threshold. If the correlation coefficient is below the lower limit, a judgment command indicating abnormal mechanical stretching is generated; if the correlation coefficient is above the upper limit, a judgment command indicating turbulent airflow is generated; if it is between the two limits, a judgment command indicating a complex cause is generated.
7. The computer vision-based defect detection method for eddy current spinning yarn according to claim 6, characterized in that, The calculation of the Pearson correlation coefficient involves subtracting the product of the means of the two vectors from the mean of all data pairs, and then dividing by the product of the standard deviations of the two vectors. Calculate the arithmetic mean of all elements in the geometric distortion confidence vector, and denote it as the first mean; Calculate the arithmetic mean of all elements in the fiber anomaly confidence vector, and denote it as the second mean; Calculate the sum of squares of the differences between each element of the geometric distortion confidence vector and the first mean, divide by the total number of elements, and take the square root to obtain the first standard deviation. Calculate the sum of squares of the differences between each element of the fiber anomaly confidence vector and the second mean, divide by the total number of elements, and take the square root to obtain the second standard deviation. The product of the geometric distortion confidence vector and the fiber anomaly confidence vector is summed and then divided by the total number of elements to obtain the mean of the product. The covariance is obtained by subtracting the product of the first and second means from the mean of the products. The Pearson correlation coefficient is obtained by dividing the covariance by the product of the first and second standard deviations.
8. The method for detecting defects in eddy current spinning yarn based on computer vision according to claim 1, characterized in that, The defect information based on the defect cause-oriented judgment instruction marks the defect location and generates a process parameter adjustment suggestion signal, including: At the moment the defect cause directional judgment instruction is generated, the yarn position pulse count value output by the encoder at this moment is read and stored; Multiply the stored pulse count value by the ratio of the circumference of the yarn traction device's rotating shaft to the number of pulses per encoder revolution to calculate the starting position coordinates of the defect point on the physical length of the yarn, thus generating the defect position coordinates. Centered on the coordinates of the defect location, a fixed length of yarn physical coordinate interval is extended forward and backward. Based on the ratio of the image acquisition frame rate to the yarn speed, all image frames covering the physical coordinate interval are determined and extracted from the bright field image sequence to generate the target image frame set. In each frame of the target image frame set, the pixel coordinates of the defect point in the image are determined according to the transformation relationship between the defect location coordinates and the image space coordinates. A rectangle is drawn with the pixel coordinates as the center to generate a defect image set with visual markings. The storage path of the defect cause directional judgment instruction type text, defect location coordinates, and visually marked defect image set is stored and recorded to generate a structured defect log. Based on the type of instruction determined by the cause of the defect, process parameter adjustment data is retrieved and read from the database that stores the correspondence between traction speed compensation and eddy current pressure adjustment. The severity coefficient is the arithmetic mean of the maximum values of the geometric distortion confidence vector and the fiber anomaly confidence vector during the defect occurrence period. The retrieved process parameter adjustment data is multiplied by the severity coefficient to generate a process parameter adjustment suggestion signal.
9. The computer vision-based defect detection method for eddy current spinning yarn according to claim 1, characterized in that, The associated records of defect cause determination instructions, process parameter adjustment suggestion signals, and key parameters of the eddy current field at the time of occurrence are used to construct a defect-process feedback sample set, including: At the moment when the defect cause determination instruction is generated, the system clock timestamp of that moment is recorded as the defect event timestamp. At the moment when the process parameter adjustment suggestion signal is generated, the system clock timestamp at that moment is recorded as the adjustment event timestamp; Subtract the timestamp of the defect event from the timestamp of the adjustment event. If the absolute value of the time difference is less than twice the image acquisition cycle, mark the corresponding defect cause determination instruction and process parameter adjustment suggestion signal as the same event association pair. For each event pair, using the timestamp of its defect event as the reference point, extract the air pressure data of N sampling points before and after the reference point from the stored historical data array of air pressure pulsation signals, and generate the corresponding vortex field air pressure parameter fragment for that event. Based on the yarn position signal, calculate the average speed of the yarn within a fixed time period before and after the reference point time. The type identifier of the defect cause directional judgment instruction in the event association pair, the traction speed compensation amount and eddy air pressure adjustment amount contained in the process parameter adjustment suggestion signal, as well as the corresponding eddy field air pressure parameter segment and yarn average speed, are combined into a sample data record. The newly generated sample data is recorded and appended to a spreadsheet file to construct a defect-process closed-loop feedback sample set.
10. A computer vision-based eddy current spinning yarn defect detection system, used for employing the method described in any one of claims 1 to 9, characterized in that, include: Image acquisition module: used to acquire the same segment of moving yarn under bright field orthophoto illumination and under dark field side-scattered light illumination, and to acquire the yarn position signal output by the encoder and the air pressure pulsation signal of the spindle vortex field. Displacement Image Module: Used to perform trajectory modeling and inter-frame displacement compensation on bright field image sequences based on spinning position signals and air pressure pulsation signals, generating structured yarn displacement images; Airflow fiber carrying map module: used to perform airflow fiber carrying feature analysis on dark field image sequences, calculate the gradient and entropy value of the intensity distribution of lateral scattered light in the image, and construct an airflow fiber carrying feature map; Feature map module: used to spatially register and fuse the yarn structured displacement image and the airflow fiber carrying feature map in the encoder spatial coordinate system to obtain a dual-channel feature map; Defect instruction module: used to extract the geometric distortion confidence vector and fiber anomaly confidence vector from the dual-channel feature map, and perform correlation verification based on the eddy current spinning physical model to generate defect cause directional judgment instructions; Adjustment signal module: used to mark the defect location based on the defect information of the defect cause direction judgment command, and generate process parameter adjustment suggestion signal; Sample set module: Used to associate and record defect cause directional judgment instructions, process parameter adjustment suggestion signals and key parameters of the eddy current field at the time of occurrence, and construct a defect-process feedback sample set.
Citation Information
Cited By
Industrial vision on-line fusion detection method for texture and defect of super-fine fiber coral fleece
CN122150257A