A knitted fabric missed yarn detection system and method based on multispectral imaging

By combining multispectral imaging technology with ultraviolet and near-infrared light and dynamically adjusting the threshold judgment, the problem of low optical contrast between dark cotton yarn and semi-transparent spandex is solved, enabling accurate detection of missing yarn in knitted fabrics and improving the operational stability and efficiency of textile equipment.

CN122189936APending Publication Date: 2026-06-12JIANGSU LANDUO KNITTING & GARMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU LANDUO KNITTING & GARMENT CO LTD
Filing Date
2026-03-13
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing machine vision inspection systems have difficulty accurately separating dark cotton yarn from semi-transparent spandex in knitted fabrics. The low optical contrast makes it difficult to identify the spandex thread trajectory, and the fixed threshold judgment mechanism is prone to misjudging intact spandex under high tension as broken thread, which affects textile processing efficiency.

Method used

Multispectral imaging technology is used to extract the luminescent skeleton of spandex and the background features of cotton yarn by combining ultraviolet and near-infrared light. The luminescence judgment threshold is dynamically adjusted, and the tension state is identified by near-infrared transparent images to generate a threshold compensation coefficient. The luminescence judgment benchmark threshold is dynamically relaxed to avoid misjudgment.

Benefits of technology

It improves the accuracy of spandex yarn trajectory extraction, prevents misjudgments, ensures the reliability of the quality monitoring system and the operational stability of industrial equipment, reduces false alarms, and enhances the continuity of textile processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122189936A_ABST
    Figure CN122189936A_ABST
Patent Text Reader

Abstract

The application provides a knitted fabric missing yarn detection system and method based on multispectral imaging, wherein the detection method comprises the following steps: projecting ultraviolet and near-infrared band light on the knitted fabric; collecting a visible fluorescence image of the fabric under ultraviolet band irradiation and a near-infrared perspective image of the fabric under near-infrared band irradiation; extracting a spandex light-emitting skeleton in the visible fluorescence image, and performing primary missing yarn discrimination in combination with the background characteristics of cotton yarn in the near-infrared perspective image; extracting topological deformation parameters of cotton yarn loops in the near-infrared perspective image, identifying the current tension state of the fabric, and generating a threshold compensation coefficient; using the threshold compensation coefficient to dynamically adjust the light-emitting judgment reference threshold used for missing yarn discrimination; and using the adjusted reference threshold to check the primary missing yarn alarm and output the final detection result. The scheme effectively avoids the false judgment of normal yarns that are thinned under high tension as missing yarns.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and industrial defect detection technology, and in particular to a system and method for detecting missing yarn in knitted fabrics based on multispectral imaging. Background Technology

[0002] In the yarn-adding process of elastic knitted fabrics, the fabric is typically formed by blending main yarns and secondary yarns. The main yarn is generally made of natural cotton fibers and is dyed before weaving, forming a visually dark-colored base fabric. The secondary yarn is usually made of spandex filaments, which have high elastic deformation capacity and semi-transparent refractive properties. The yarn-adding process requires that the spandex filaments be pre-stretched and wrapped inside the dark base fabric or sandwiched inside the main yarn loops. Due to the low linear density and semi-transparent nature of spandex filaments, combined with the solid occlusion created by the dark cotton fibers in space, the optical contrast between the dark cotton yarns and the semi-transparent spandex is low when using conventional visible light imaging sensors to acquire fabric images. This limited contrast increases the difficulty of image processing for machine vision systems when separating the spandex yarn paths, making it difficult to accurately detect process conditions such as spandex breakage or missed feeding.

[0003] In the operation of a cylindrical continuous knitting machine, the fabric winding and traction device at the bottom continuously applies tension to the knitted fabric, causing it to be conveyed downwards in a longitudinally stretched state. This tension typically fluctuates dynamically at high frequencies during actual production. When the local tension reaches its peak, the highly elastic spandex undergoes axial stretching. Based on the Poisson's ratio effect in materials mechanics, the cross-sectional area of ​​the spandex contracts radially. This physical deformation passively reduces the volume of excitable fluorescence in that region, manifesting as a regional dimming of brightness along the continuous emission trajectory in the image acquisition.

[0004] Conventional machine vision inspection mechanisms typically perform pixel-level state comparisons based on preset fixed emission thresholds. When spandex dims due to increased mechanical tension, its local brightness easily drops below the set fixed threshold. This fixed threshold mechanism lacks a collaborative sensing logic for the instantaneous dynamic physical stretching state of knitted fabrics, making it difficult to adaptively tolerate the photoelectric signal attenuation effect caused by tension stretching. This fixed judgment logic easily misclassifies perfectly good spandex that is normally thinning under high tension as a broken thread or missing yarn defect, thus triggering unplanned equipment shutdowns and impacting the operational efficiency of continuous textile processing. Summary of the Invention

[0005] The purpose of this invention is to provide a system and method for detecting missing yarn in knitted fabrics based on multispectral imaging, so as to solve the problems mentioned in the background art.

[0006] In a first aspect, the present invention provides a knitted fabric yarn filling detection system based on multispectral imaging, applied to knitting equipment, including an illumination module, an imaging module, and a control module communicatively connected to the illumination module and the imaging module; The lighting module projects ultraviolet and near-infrared light onto the knitted fabric. The imaging module acquires visible fluorescence images of the knitted fabric under ultraviolet light irradiation and near-infrared transparent images under near-infrared light irradiation. The control module is configured to perform the following steps: The spandex luminescent skeleton is extracted from the visible fluorescent image, and the cotton yarn background features in the near-infrared transparent image are combined to perform yarn leakage detection and generate a primary yarn leakage alarm. Extract the topological deformation parameters of the cotton yarn loops in the near-infrared transmission image, and identify the current tension state of the knitted fabric based on the topological deformation parameters; A threshold compensation coefficient is generated based on the tensile tension state; The threshold compensation coefficient is used to dynamically relax and adjust the luminescence judgment benchmark threshold used for yarn leakage detection; The primary yarn leakage alarm is verified using the adjusted luminescence judgment benchmark threshold, and the final detection result is output.

[0007] Optionally, the illumination module includes an ultraviolet light source array with an output wavelength in the range of 365 nm to 395 nm, and a near-infrared light source array with an output wavelength in the range of 1600 nm to 2200 nm; the imaging module includes a visible light camera equipped with a 450 nm bandpass filter, and a near-infrared camera equipped with an indium gallium arsenide sensor.

[0008] Optionally, the control logic for extracting the spandex luminescent skeleton from the visible fluorescent image and combining it with the cotton yarn background features in the near-infrared transparent image to perform yarn leakage detection and generate a primary yarn leakage alarm is as follows: The central skeleton nodes of continuously bright pixels in the visible fluorescence image are extracted using a morphological thinning algorithm. When the scan reveals a continuous interruption in the central skeleton node and the interruption size exceeds a preset length threshold, the cotton yarn background density of the corresponding interruption coordinate region is extracted from the near-infrared transparent image. If the background density of the cotton yarn is within the normal setting range, a yarn breakage is confirmed and the primary yarn leakage alarm is generated.

[0009] Optionally, the control module is also configured with dual yarn feeding fault identification logic: The horizontal display width and luminous intensity of the spandex light-emitting skeleton are statistically analyzed in real time. When the horizontal display width value or the luminous intensity value increases to a multiple of the normal reference value, a re-yarn fault signal is output.

[0010] Optionally, the control module has a built-in substrate adaptive calibration module; Before starting batch testing of the target batch of fabrics, the substrate adaptive calibration module controls the imaging module to scan the qualified reference sample fabric and extract the reference background response values ​​of the standard sample fabric in the ultraviolet and near-infrared bands. The reference background response value is used to initialize the luminescence determination reference threshold and the normal setting range.

[0011] Optionally, the logical steps for extracting the topological deformation parameters of the cotton yarn loops in the near-infrared transmission image and identifying the current tension state of the knitted fabric based on the topological deformation parameters are as follows: A topology recognition algorithm is used to locate the set of pixels with mesh-like apertures formed by interwoven cotton yarns within the near-infrared transmissive image; Calculate the vertical span value of the grid aperture pixel set in the vertical stretching direction and the horizontal span value in the horizontal arrangement direction; The ratio of the longitudinal span value to the transverse span value is used as the topological deformation parameter, and the topological deformation parameter is compared with the standard tension ratio range to classify the tensile tension state.

[0012] Optionally, the logical step of generating the threshold compensation coefficient based on the tensile tension state includes: When the tension state is such that the topological deformation parameter exceeds the upper limit of the standard tension ratio range, the knitted fabric is determined to be in a high-tension taut state. Based on the Poisson's ratio effect of fiber stress, the reduction rate of excitable fluorescence volume caused by the shrinkage of cross-sectional area of ​​spandex under the high tension tight state is calculated. The excitable fluorescence volume reduction ratio is converted into the threshold compensation coefficient, such that the threshold compensation coefficient and the topological deformation parameter have a positive correlation mapping relationship.

[0013] Optionally, the logical steps for dynamically relaxing and adjusting the luminescence judgment benchmark threshold used for yarn leakage judgment using the threshold compensation coefficient are as follows: Multiply the emission determination benchmark threshold by the threshold compensation coefficient to reduce the determination condition requirements; By lowering the judgment criteria, the optical luminescence darkening effect caused by physical stretching and thinning is compensated, preventing unbroken spandex from being mistakenly judged as yarn breakage.

[0014] Optionally, the control module is further configured to monitor the pulling tension state within a plurality of consecutive scanning cycles: If the pulling tension state continuously remains in the high-tension tight state or the low-tension relaxation state, and the duration exceeds the upper limit of the mechanical anomaly confirmation time, a traction speed adjustment instruction including a rotational speed correction parameter is generated; The traction speed adjustment instruction is sent to the drive motor of the take-up device supporting the knitting device to adjust the fabric take-up and traction speed in a closed loop until the topological deformation parameter returns to the standard tension ratio range.

[0015] In a second aspect, the present invention provides a method for detecting missing yarn addition in knitted fabrics based on multispectral imaging, which is applied to the multispectral imaging-based knitted fabric missing yarn addition detection system according to any item in the first aspect, and is characterized by including the following control steps: Project ultraviolet band light and near-infrared band light onto the knitted fabric; Collect the visible fluorescence image generated by the knitted fabric under the irradiation of the ultraviolet band light and the near-infrared perspective image generated under the irradiation of the near-infrared band light; Extract the spandex luminous skeleton in the visible fluorescence image, and perform missing yarn discrimination by combining the cotton yarn background characteristics in the near-infrared perspective image to generate a primary missing yarn alarm; Extract the topological deformation parameter of the cotton yarn coil in the near-infrared perspective image, and identify the current pulling tension state of the knitted fabric according to the topological deformation parameter; Generate a threshold compensation coefficient based on the pulling tension state; Dynamically relax and adjust the luminous determination reference threshold used for the missing yarn discrimination by using the threshold compensation coefficient; Verify the primary missing yarn alarm by using the adjusted luminous determination reference threshold, and output the final detection result.

[0016] The present invention has achieved the following beneficial effects: This invention provides a system and method for detecting missing yarn in knitted fabrics based on multispectral imaging. By simultaneously projecting ultraviolet and near-infrared light onto the knitted fabric, the system utilizes ultraviolet light to excite visible fluorescence in the spandex and near-infrared light to penetrate dark cotton yarns to obtain the underlying spatial arrangement topology. This improves the low optical contrast when dark main yarns and semi-transparent secondary yarns interweave, and enhances the accuracy of spandex tracking while eliminating interference from cotton fiber obstruction. Addressing the localized dimming of fluorescence caused by fabric tension fluctuations, this invention calculates the current tension state of the fabric by extracting the topological deformation parameters of the cotton yarn loop grid in the near-infrared imaging and generating a corresponding threshold compensation coefficient based on the Poisson's ratio effect of the material force. The detection system uses this threshold compensation coefficient to dynamically adjust the emission judgment threshold, objectively restoring and compensating for the optical brightness attenuation caused by the thinning of the spandex due to tension at the algorithm's underlying layer. By using the adjusted dynamic threshold to verify the primary yarn leakage alarm, the situation of misjudging intact yarn under high tension as yarn leakage and breakage when using a fixed threshold is effectively avoided. This also suppresses false alarms caused by tension fluctuations during normal production, ensuring the reliability of the quality monitoring system and the operational stability of industrial equipment under complex weaving conditions.

[0017] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a structural block diagram of a knitted fabric yarn filling detection system based on multispectral imaging provided in an embodiment of the present invention. Figure 2 This is a flowchart of steps S100 to S300 in the yarn filling detection method provided in the embodiment of the present invention; Figure 3 The flowchart is a process flow of steps S400 to S600 in the yarn filling detection method provided in the embodiment of the present invention; Figure 4 The flowchart shows steps S700 to S1000 in the yarn filling detection method provided in the embodiment of the present invention. Detailed Implementation

[0020] The following section provides a technical analysis of the multispectral imaging-based knitted fabric yarn filling detection system and method involved in this application, considering industrial application scenarios, control logic, and the operating conditions of physical machinery. The embodiments provided herein are intended to clarify the sensing link, data processing memory flow mechanism, detection mathematical model configuration, and feature extraction algorithm code execution logic of the detection system, and are not intended to limit the scope of protection of this application.

[0021] This application provides a multispectral imaging-based system for detecting missing yarn in knitted fabrics, applied to online quality monitoring and closed-loop servo control within knitting equipment. In industrial textile settings, knitting equipment is specifically a cylindrical continuous knitting machine. The hardware structure of this machine consists of a yarn guiding and combing support unit, a circular needle array mechanism, and a bottom fabric winding and traction device. During operation, multiple yarns of different materials and linear densities are simultaneously fed into the middle-layer circular needle array under the tension control of an active yarn feeder. Through the reciprocating motion of the needles, the action of sinkers, and the interlocking of yarns, the discrete yarns are knitted into a cylindrical knitted fabric. Under the constant tension of the bottom fabric winding and traction device, the knitted fabric is longitudinally stretched and conveyed downwards to the fabric roll.

[0022] In the yarn-adding process of elastic knitted fabrics, the fabric is formed by interweaving main yarns and secondary yarns. The main yarn is spun from natural cotton fibers and dyed with indigo before weaving, forming a visually dark-colored base fabric. The secondary yarn uses spandex filaments of a specific specification. The core component of spandex is a polyurethane block copolymer, which has high elastic deformation capacity and semi-transparent refractive properties. In the yarn-adding process, the spandex filaments are pre-stretched and wrapped inside the dark base fabric or sandwiched inside the main yarn loops. Due to the low linear density and semi-transparent nature of the spandex filaments, combined with the spatial obstruction of the dark cotton fibers, there is insufficient optical contrast between the dark cotton yarns and the semi-transparent spandex when acquiring fabric images using a visible light vision sensor. This lack of contrast makes it difficult for conventional single-channel imaging systems to separate the spandex yarn tracks, making it impossible to detect process defects such as spandex breakage, missed feeding, or double stacking.

[0023] To address the challenges of optical sensing extraction, the detection system incorporates a multispectral excitation and infrared transmission fusion mechanism. For hardware architecture details, please refer to the appendix. Figure 1 As shown, the detection system includes an illumination module, an imaging module, and a control module.

[0024] The control module is built on a heterogeneous system-on-a-chip (SoC) architecture, integrating a dual-core ARM Cortex-A53 central processing unit and an Artix-7 field-programmable gate array (FPGA). The central processing unit runs the FreeRTOS real-time operating system and is responsible for upper-layer algorithm scheduling, network communication, and PID closed-loop calculation. The FPGA is responsible for low-level image sensor interface control, DMA (direct memory access) data transfer, and hardware-level image preprocessing. The control module is equipped with 4GB of DDR4 synchronous dynamic random access memory for caching high frame rate image matrices and 64MB of QSPI Flash for non-volatile storage of firmware code and calibration parameters.

[0025] The control module establishes a bidirectional data channel with the imaging module via the GigEVision gigabit Ethernet bus; synchronously, it outputs PWM (pulse width modulation) signals to the lighting module driver board via an RS-485 bus to control the light source power and activation timing. The lighting and imaging modules are encapsulated within an IP65-rated aluminum alloy sensor probe, which is fixed to the outside of the fabric travel path between the circular knitting array and the bottom traction device via a damping shock-absorbing bracket. The front of the lens maintains a working distance of 50 mm to 80 mm from the fabric surface. This topology ensures that the main optical axis of the light-emitting component and the main optical axis of the camera are aligned with the fabric surface under tension.

[0026] The lighting module is configured to synchronously or alternately project ultraviolet and near-infrared light onto the fabric surface. The module includes an ultraviolet LED light source array with a center wavelength of 365nm to 395nm and a near-infrared LED light source array with a center wavelength of 1600nm to 2200nm. The ultraviolet LED light source array uses a matrix-type surface-mount package, bonded to a finned heat sink via an aluminum-based copper-clad laminate, and utilizes thermally conductive silicone grease to reduce thermal resistance. A photoluminescence excitation threshold based on the polyurethane molecular chain is set for the 365nm to 395nm wavelength band. When high-energy ultraviolet photons irradiate the polyurethane lattice, they trigger electronic energy level transitions in the aromatic chromophores. Based on the Stokes shift effect, spandex is excited to release visible fluorescence with wavelengths concentrated in the 420nm to 480nm range. The underlying cotton fibers do not possess the corresponding energy level transition characteristics, and the indigo dye exhibits absorption and attenuation characteristics for both ultraviolet and visible light. Under ultraviolet excitation, the cotton yarn presents a dark background, while the spandex transforms into a foreground entity radiating outward fluorescence.

[0027] The near-infrared light source array is set to an output wavelength range of 1600nm to 2200nm, based on the characteristic infrared absorption spectrum of cellulose and the infrared transmission characteristics of indigo dye. After near-infrared light penetrates the surface indigo dye, some infrared photons are absorbed by the carbon-hydrogen bonds and hydroxyl covalent bonds within the cotton fibers, while unabsorbed photons undergo diffuse reflection and transmission on the yarn surface. The near-infrared light source reduces color interference on the fabric surface and detects the spatial arrangement topology and interlacing gaps of the underlying yarns. The lighting module driver board adopts a constant current source topology with an integrated N-channel MOSFET switch. The MOSFET receives the PWM trigger signal from the control module and completes gate charge charging and discharging within 50 nanoseconds, achieving microsecond-level strobe driving of the LED array.

[0028] The imaging module employs a dual-channel linear array scanning architecture, simultaneously acquiring visible fluorescence image matrices and near-infrared transmission image matrices under ultraviolet excitation. The module includes a visible light camera equipped with a 450nm center wavelength bandpass filter and a near-infrared camera equipped with an InGaAs (indium gallium arsenide) sensor. The bandpass filter's transmission bandwidth is limited to ±10nm to isolate ambient diffuse light and original photons reflected from the ultraviolet light. The visible light camera uses a global shutter CMOS sensor, outputting a visible fluorescence image matrix that includes the emission characteristics of spandex. The near-infrared camera uses an InGaAs sensor with high quantum efficiency in the 1600nm to 2200nm wavelength range. To reduce dark current shot noise in indium gallium arsenide materials at room temperature, a thermoelectric semiconductor cooler (TEC) is integrated within the near-infrared camera. The TEC maintains the physical temperature of the sensor's focal plane array at a constant -15 degrees Celsius through the Peltier effect. In the near-infrared transmission image matrix, densely packed cotton yarn areas exhibit low grayscale, while sparsely porous fiber areas exhibit high grayscale.

[0029] To ensure synchronized shooting timing, the control module receives quadrature pulse signals from the rotary encoder of the main drive shaft via the GPIO interface. The timer inside the control module calculates the instantaneous travel linear velocity based on the pulse frequency and the device's transmission ratio, and generates a corresponding PWM strobe drive signal. This strobe drive signal is distributed to the lighting module and the hardware trigger inputs of the dual cameras via a 6N137 high-speed optocoupler isolation circuit. Under the control of the rising edge of the signal, the light source's emission action is hardware synchronized with the camera's global shutter exposure timeline.

[0030] To address the spatial parallax caused by the side-by-side installation of two cameras, the control module incorporates dual-channel perspective projection affine transformation logic on the FPGA side to perform coordinate registration. The control module reads the 3×3 floating-point affine transformation matrix parameters stored in Flash memory, performs translation, rotation, and scaling operations on the near-infrared perspective image matrix coordinate system, and combines this with bilinear interpolation to resample non-integer coordinate points. The registration operation achieves pixel-level alignment of the dual-channel images in the memory-mapped space.

[0031] To meet the bandwidth requirements of high frame rate multispectral imaging, a VDMA (Video Direct Memory Access) IP core is instantiated within the FPGA to handle data transfer between the video bus and DDR4 memory. The memory space is divided into a Ping-Pong dual-ring buffer structure. When the VDMA controller bursts and transmits the current frame's pixel data to the first buffer, the ARM processing unit simultaneously reads the preceding image data from the second buffer to execute the algorithm. The read / write pointers alternate between the two buffers, effectively reducing the idle time the processor spends waiting for data loading.

[0032] Within the FreeRTOS system architecture, the software is divided into four core tasks: image acquisition, detection algorithm, communication protocol, and PID closed-loop control. The image acquisition task has the highest priority and is triggered by a frame end interrupt from the FPGA; the detection algorithm task has the next highest priority and receives the starting address pointer of the image buffer through a message queue; the PID closed-loop control task runs at a fixed cycle; and the communication protocol task is responsible for interacting with the outside world.

[0033] The detection method is applied to a multispectral imaging-based system for detecting missing yarn in knitted fabrics. (See attached document.) Figure 2 As shown, the control module executes the following process steps: Step S100: Perform dual-channel dark field correction and photoresponse non-uniformity correction (PRNU).

[0034] After the control module powers on and completes the bus handshake, it enters the calibration mode. The ultraviolet and near-infrared light source arrays are shut down, blocking the current output circuit of the power supply drive control board. The control module drives the visible light camera and near-infrared camera to continuously acquire 50 frames of background aerial image matrix under zero-illuminance physical conditions. The processing unit performs an arithmetic mean operation on the 50 frames of background aerial image matrix according to the pixel's two-dimensional coordinates, generating a fixed-dimensional dark-field background matrix for the visible light channel and the near-infrared channel. During the online detection cycle, the FPGA executes an algebraic subtraction instruction on the original acquisition matrix, subtracting the corresponding dark-field background matrix pixel by pixel to suppress the hardware interference of sensor transistor thermal noise and dark current drift on the photoelectric conversion signal. Subsequently, the system loads the pre-calibrated PRNU coefficient matrix and performs pixel-by-pixel multiplication operations on the image after dark-field subtraction to compensate for the differences in photoelectric conversion efficiency of each pixel due to the silicon wafer manufacturing process, outputting a flat-field calibrated image matrix.

[0035] Step S200: Perform substrate adaptive calibration extraction, and initialize the luminescence determination benchmark threshold and normal setting range.

[0036] For blended fabrics incorporating graphene short fibers (strong light absorption) or modified pearl fibers (high scattering), the control module has built-in substrate adaptive calibration logic to prevent static threshold failure caused by the optical properties of the materials.

[0037] Before the testing begins, a qualified reference fabric sample is fed into the knitting equipment. The control module schedules the camera to perform multi-frame reference scans. For the visible fluorescence image matrix, the processing unit calculates the grayscale histogram and applies the Otsu algorithm to automatically obtain the optimal truncation threshold, stripping away the foreground pixels representing spandex. For the remaining background pixels, the grayscale mean is calculated as the ultraviolet band reference background response value, and the grayscale standard deviation is calculated. For the near-infrared transparent image matrix, the processing unit performs 16×16 pixel grid division, calculates the grayscale histogram of each region, and extracts the mode of the most frequent grayscale. The arithmetic mean of the grayscale modes of multiple regions is calculated and recorded as the near-infrared band reference background response value.

[0038] The calibration module sets the emission determination threshold by adding the product of a weighting constant and the grayscale standard deviation to the ultraviolet band reference background response value according to the formula. Based on the near-infrared band reference background response value plus or minus the set tolerance constant, the upper and lower limits of the normal setting range representing the normal cotton yarn arrangement density are established.

[0039] Step S300: Extract the spandex luminescent skeleton from the visible fluorescence image matrix and perform geometric continuity tracing.

[0040] The processing unit reads the visible fluorescence image matrix, compares the pixel grayscale values ​​with the emission determination benchmark threshold, and generates a binarized matrix. For the foreground connected regions in the binarized matrix, the Zhang-Suen morphological thinning algorithm is applied. The algorithm uses a 3×3 structuring element sliding window to traverse the matrix, iteratively stripping edge pixels according to the pixel connectivity determination rules until only single-pixel width line data is retained, defined as the spandex emission skeleton. The skeleton coordinates are stored in a linked list.

[0041] The processing unit uses the Freeman chain code tracking algorithm to scan along the skeleton trajectory. When a discontinuity in the coordinate sequence is detected, the coordinates of the start and end points of the signal interruption area are recorded, and the Euclidean distance algorithm is called to calculate the spatial span between the two points. The spatial span is multiplied by the camera's physical resolution mapping coefficient to convert it into a physical fracture size parameter. When the physical fracture size parameter is greater than the set length tolerance threshold, it is determined that the spandex fluorescent signal has been interrupted.

[0042] See attached document Figure 3 As shown, the method further includes: Step S400: Combine the cotton yarn background thickness features in the near-infrared transmission image to perform cross-discrimination and generate a primary yarn leakage alarm.

[0043] To eliminate optical obstructions caused by thick sections of the main yarn, fly waste, or jacquard stacking, the processing unit opens an infrared target analysis window centered on the coordinates of the fluorescence signal interruption boundary within the near-infrared transparent image matrix.

[0044] The processing unit calls the GLCM (Gray Co-occurrence Matrix) algorithm to count the frequency of gray level combinations of adjacent pixels in four directions: 0 degrees, 45 degrees, 90 degrees, and 135 degrees. It then extracts energy feature values ​​that characterize texture uniformity and contrast feature values ​​that characterize local gray level changes to form the cotton yarn background density parameters.

[0045] The processing unit compares the cotton yarn background density parameter with the normal setting range established in step S200. If the parameter falls within the normal setting range, it confirms that the cotton yarn interlacing mesh structure in that area is in a normal transmission state and no abnormal accumulation of solids has occurred. After eliminating occlusion interference, it confirms that the spandex filament has mechanically broken or has a feed defect, and generates a primary yarn leakage alarm and stores it in the message queue. If the parameter exceeds the upper limit of the normal setting range, it indicates that there is cotton yarn solid occlusion, and the processing unit suppresses the yarn leakage judgment based on the coordinates and discards the primary yarn leakage alarm.

[0046] Step S500: Perform dual yarn filling fault identification for the connected regions of the foreground pixels.

[0047] To address the defect of simultaneous feeding of multiple spandex strands caused by obstruction at the yarn guide hole, the processing unit measures the horizontal display width and luminous intensity values ​​based on the foreground luminescent pixel matrix after binarization and before thinning. Using the central skeleton node as a reference, the processing unit calls the Sobel operator to calculate the normal direction of the skeleton trajectory, scans along the normal, and accumulates the number of consecutive foreground pixels as the horizontal display width value. Simultaneously, it reads the original grayscale values ​​of the visible fluorescent image within the corresponding normal range and performs summation to obtain the luminous intensity value. The processing unit compares these two values ​​with the normal reference width and brightness values ​​for a single spandex strand maintained by the system. If the values ​​exceed the tolerance limit configured for the normal reference values, it is determined that an excessively large polyurethane luminescent entity has accumulated within the fabric gap. After matching the condition, a system interrupt is triggered to generate a re-yarn fault signal command.

[0048] Step S600: Extract the topological deformation parameters of the cotton yarn coil mesh in the near-infrared transmission image and identify the tension state.

[0049] The tension applied to the knitted fabric by the winding device is in a dynamic, high-frequency fluctuation state. When the spandex encounters the tension peak, it undergoes axial stretching. According to the Poisson's ratio effect, the cross-sectional area shrinks radially, resulting in a reduction in the volume of excitable fluorescence, forming a darkened area in the visible fluorescence image. The static thresholding mechanism easily misinterprets this darkened area as a broken thread.

[0050] The processing unit performs Otsu's threshold segmentation on the near-infrared transmission image, mapping regions representing transmission apertures to the foreground. After performing morphological opening for noise reduction, a connected component labeling algorithm is called to merge adjacent foreground pixels into independent sets of mesh aperture pixels. The coordinates of the minimum bounding rectangle of each set are then extracted.

[0051] Calculate the longitudinal span of the circumscribed rectangle in the longitudinal stretching direction of the fabric, and the transverse span in the transverse arrangement direction. As tension increases, the mesh openings lengthen and narrow longitudinally. The processing unit performs floating-point division to calculate the ratio of the longitudinal span to the transverse span, defined as the topological deformation parameter. The topological deformation parameter is compared to the offline-calibrated standard tension ratio range constant. If the topological deformation parameter is greater than the upper limit constant, the tension state is marked as a high-tension taut state; if it is lower than the lower limit constant, it is marked as a low-tension relaxed state.

[0052] See attached document Figure 4 As shown, the method further includes: Step S700: When the condition is determined to be a high-tension taut state, a threshold compensation coefficient is generated based on the Poisson's ratio model.

[0053] When the system is determined to be in a high-tension, taut state, the processing unit loads an elastomer mechanical conversion model to calculate the reduction rate of excitable fluorescence volume caused by radial contraction.

[0054] Calculate the difference between the topological deformation parameter and the upper limit constant. Use a polynomial fitting function to map the difference to the spandex axial elongation strain rate. Retrieve the Poisson's ratio constant for polyurethane and multiply it by the axial elongation strain rate to calculate the radial shrinkage strain rate.

[0055] Based on the infinitesimal model, the constant 1.0 is added to the sum of the radial contraction strain rates and squared to obtain the cross-sectional area retention ratio. The cross-sectional area retention ratio is multiplied by the constant 1.0 and then added to the axial elongation strain rate to calculate the volumetric residual ratio. The volumetric residual ratio is then subtracted from the constant 1.0 to obtain the excitable fluorescence volume reduction ratio.

[0056] The volume loss data is converted into a threshold compensation coefficient. A constant of 1.0 is set, and the product of the optical attenuation compensation weight constant and the excitable fluorescence volume reduction ratio is subtracted to output the threshold compensation coefficient. The algorithm ensures that the threshold compensation coefficient is confined to a closed interval between 0.0 and 1.0. The more severe the mechanical stretching, the higher the excitable fluorescence volume reduction ratio, and the lower the output threshold compensation coefficient.

[0057] Step S800: Calculate the dynamic relaxation of the emission determination benchmark threshold using the threshold compensation coefficient.

[0058] The processing unit extracts the currently effective emission determination benchmark threshold, performs a multiplication operation, multiplies the benchmark threshold by the threshold compensation coefficient, and generates the adjusted emission determination benchmark threshold. Since the threshold compensation coefficient is less than the constant 1.0, the adjusted emission determination benchmark threshold decreases numerically.

[0059] The downward decay of the threshold lowers the system's lower threshold for weak fluorescence brightness at the underlying logic level, dynamically and equally compensating for the optical darkening effect caused by the physical stretching and thinning of spandex. To prevent frequent threshold oscillations, the processing unit uses a Schmitt trigger hysteresis algorithm before the threshold update entry. When the newly calculated adjustment threshold deviates from the currently used threshold by an amount exceeding the set dead zone constant, a register update is performed.

[0060] Step S900: Verify the primary yarn leakage alarm using the adjusted luminescence judgment benchmark threshold, and output the final detection result.

[0061] The processing unit reads the alarm queue and extracts the original grayscale brightness values ​​of the consecutive pixels in the area that triggered the primary yarn leakage alarm. The original grayscale brightness values ​​are then compared with the adjusted luminance determination threshold.

[0062] If the grayscale value attenuated due to stretching and thinning is greater than or equal to the adjusted luminescence judgment threshold, the processing unit determines that the previously interrupted area was actually optical darkening attenuation caused by tension, and that the spandex molecular chains were not broken by force. The control module then clears the corresponding primary yarn leakage alarm to prevent the equipment from stopping erroneously.

[0063] If the grayscale value of the pixels in the suspected broken area is still lower than the adjusted emission judgment benchmark threshold, it indicates that no polyurethane luminescent carrier was detected in the target space. The control module confirms that a physical break or yarn leakage defect has occurred. The system outputs the final detection result, including coordinate parameters and a timestamp, which drives the underlying solid-state relay to activate, triggering the emergency stop interrupt pin of the loom's main electrical control cabinet, cutting off the power supply circuit of the main traction motor to stop the machine.

[0064] Step S1000: Monitor the tension state sequence and use a PID closed-loop algorithm to generate a traction speed control command and send it to the winding device.

[0065] To address the steady-state tension shift caused by mechanical transmission wear, the control module employs a PID closed-loop feedback control algorithm. The control module constructs a FIFO (First-In-First-Out) queue in memory to cache topology deformation parameters from multiple consecutive scan cycles.

[0066] If the tension state remains in a state of high tension or low tension, and the number of abnormal sampling cycles exceeds the set time limit, the control system activates the discrete PID closed-loop control program.

[0067] The PID program extracts the topological deformation parameter sequence within a set sliding window, performs moving average filtering, and calculates the arithmetic mean as the feedback input. The differential error is obtained by subtracting the preset center target constant value of the standard tension ratio range from the feedback input.

[0068] Calculate the proportional component: multiply the differential error by the proportional gain constant.

[0069] Calculate the integral component: Accumulate the historical differential error, configure the anti-integral saturation clamping logic, and multiply it by the integral gain constant.

[0070] Calculate the differential component: Take the difference between the differential error of the current round and the differential error of the previous round, smooth it through an IIR (Infinite Impulse Response) low-pass filter, and then multiply it by the differential gain constant.

[0071] The rotational speed correction parameter is generated by algebraically summing the three components. When the error is positive, reflecting high tension and tightness, the correction parameter is a negative value that reduces the linear velocity; when the error is negative, reflecting low tension and relaxation, the correction parameter is a positive value that accelerates and increases the linear velocity.

[0072] The control module utilizes the RS-485 serial interface on the motherboard, employing the Modbus RTU industrial communication protocol to encapsulate traction speed control command messages. The message includes an 8-bit slave address, an 8-bit function code, a 16-bit speed correction parameter data register value, and a 16-bit CRC checksum. The message is sent to the inverter receiver of the fabric winding machine. After parsing the parameters, the inverter changes the AC frequency output to the stator windings of the three-phase AC asynchronous motor, adjusting the motor rotor angular velocity. This angular velocity change is transmitted through the reduction mechanism, resulting in a closed-loop adjustment of the linear velocity of the fabric winding traction roller. The fabric tensile stress changes accordingly, and the evolution of the mesh porosity deformation is again captured and recorded by the camera. The control flow extracts the updated topology deformation parameters in real time and inputs them into the PID calculation process until the parameters fall back to a safe operating range.

[0073] In the hardware protection design for complex workshop electromagnetic environments, to suppress electromagnetic interference from high-power motors from intruding into the detection system, a wide-band ferrite core is connected in series with the external communication cable to absorb high-frequency common-mode interference current using its high impedance characteristics. The PWM signal sent from the control module to the external lighting module is transmitted through a 6N137 high-speed optocoupler isolation component to achieve electrical isolation between the input and output ends and block ground loop interference. The analog signal sampling front end of the near-infrared camera is equipped with an RC second-order passive low-pass filter network to filter out spurious frequency noise above the Nyquist sampling frequency, suppress signal aliasing, and ensure the data purity of the input analog-to-digital converter. A TVS (transient voltage suppressor diode) is cascaded at the power input to clamp the mains surge voltage and ensure stable operation of the system in harsh industrial environments.

[0074] The hardware architecture, algorithm derivation, and electromechanical closed-loop execution logic described in the foregoing embodiments are used to reveal the implementation path of the application to integrate multispectral imaging and underlying mesh topology analysis to achieve dynamic threshold compensation and physical device control. Those skilled in the art, within the framework of the application's reverse correction of the ultraviolet optical judgment threshold using near-infrared features and linkage with the mechanical execution end, can perform conventional code porting, filter replacement, or communication protocol reorganization, all of which fall within the protection scope of this invention.

Claims

1. A multispectral imaging-based system for detecting missing yarn in knitted fabrics, applied to knitting equipment, comprising an illumination module, an imaging module, and a control module communicatively connected to the illumination module and the imaging module; The lighting module projects ultraviolet and near-infrared light onto the knitted fabric. The imaging module acquires visible fluorescence images of the knitted fabric under ultraviolet light irradiation and near-infrared transparent images under near-infrared light irradiation. Its features are, The control module is configured to perform the following steps: The spandex luminescent skeleton is extracted from the visible fluorescent image, and the cotton yarn background features in the near-infrared transparent image are combined to perform yarn leakage detection and generate a primary yarn leakage alarm. Extract the topological deformation parameters of the cotton yarn loops in the near-infrared transmission image, and identify the current tension state of the knitted fabric based on the topological deformation parameters; A threshold compensation coefficient is generated based on the tensile tension state; The threshold compensation coefficient is used to dynamically relax and adjust the luminescence judgment benchmark threshold used for yarn leakage detection; The primary yarn leakage alarm is verified using the adjusted luminescence judgment benchmark threshold, and the final detection result is output.

2. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 1, characterized in that, The illumination module includes an ultraviolet light source array with an output wavelength in the range of 365 nm to 395 nm, and a near-infrared light source array with an output wavelength in the range of 1600 nm to 2200 nm; the imaging module includes a visible light camera equipped with a 450 nm bandpass filter, and a near-infrared camera equipped with an indium gallium arsenide sensor.

3. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 1, characterized in that, The control logic for extracting the spandex luminescent skeleton from the visible fluorescent image and combining it with the cotton yarn background features in the near-infrared transparent image to perform yarn leakage detection and generate a primary yarn leakage alarm is as follows: The central skeleton nodes of continuously bright pixels in the visible fluorescence image are extracted using a morphological thinning algorithm. When the scan reveals a continuous interruption in the central skeleton node and the interruption size exceeds a preset length threshold, the cotton yarn background density of the corresponding interruption coordinate region is extracted from the near-infrared transparent image. If the background density of the cotton yarn is within the normal setting range, a yarn breakage is confirmed and the primary yarn leakage alarm is generated.

4. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 3, characterized in that, The control module is also equipped with dual yarn feeding fault identification logic: The horizontal display width and luminous intensity of the spandex light-emitting skeleton are statistically analyzed in real time. When the horizontal display width value or the luminous intensity value increases to a multiple of the normal reference value, a re-yarn fault signal is output.

5. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 1, characterized in that, The control module has a built-in substrate adaptive calibration module; Before starting batch testing of the target batch of fabrics, the substrate adaptive calibration module controls the imaging module to scan the qualified reference sample fabric and extract the reference background response values ​​of the standard sample fabric in the ultraviolet and near-infrared bands. The reference background response value is used to initialize the luminescence determination reference threshold and the normal setting range.

6. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 1, characterized in that, The logical steps for extracting the topological deformation parameters of the cotton yarn loops in the near-infrared transmission image and identifying the current tension state of the knitted fabric based on the topological deformation parameters are as follows: Adopt a topological recognition algorithm to lock the set of grid pore pixels formed by the interweaving of cotton yarns in the near-infrared perspective image; Calculate the longitudinal span value of the set of grid pore pixels in the longitudinal stretching direction and the transverse span value in the transverse arrangement direction; Take the ratio value of the longitudinal span value to the transverse span value as the topological deformation parameter, and compare the topological deformation parameter with the standard tension ratio range to divide the pulling tension state.

7. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 6, characterized in that, The logical steps for generating the threshold compensation coefficient based on the pulling tension state include: When the pulling tension state shows that the topological deformation parameter exceeds the upper limit of the standard tension ratio range, it is determined that the knitted fabric is in a high-tension tight state; Based on the Poisson ratio effect of fiber stress, calculate the reduction ratio of the excitable fluorescence volume caused by the cross-sectional area contraction of spandex in the high-tension tight state; Convert the reduction ratio of the excitable fluorescence volume into the threshold compensation coefficient, so that the threshold compensation coefficient has a positive correlation mapping relationship with the topological deformation parameter.

8. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 7, characterized in that, The logical steps for dynamically relaxing and adjusting the luminescence determination reference threshold used for the missed yarn discrimination by using the threshold compensation coefficient are as follows: Multiply the luminescence determination reference threshold by the threshold compensation coefficient to lower the determination condition requirements; By lowering the determination condition requirements, compensate for the optical luminescence darkening effect caused by physical stretching and thinning, and prevent unbroken spandex from being misjudged as missed yarn breakage.

9. The knitted fabric yarn filling detection system based on multispectral imaging according to claim 8, characterized in that, The control module is further configured to monitor the pulling tension state within a continuous plurality of scanning cycles: If the pulling tension state continuously remains in the high-tension tight state or the low-tension relaxation state and the duration exceeds the mechanical abnormality confirmation time upper limit, generate a traction speed adjustment instruction including a speed correction parameter; Send the traction speed adjustment instruction to the drive motor of the winding device supporting the knitting device to adjust the fabric winding and traction speed in a closed loop until the topological deformation parameter returns to the standard tension ratio range.

10. A method for detecting missing yarn in knitted fabrics based on multispectral imaging, applied to the knitted fabric missing yarn detection system based on multispectral imaging as described in any one of claims 1 to 9, characterized in that, Include the following control steps: Project ultraviolet band light and near-infrared band light onto the knitted fabric; Collect the visible fluorescence image generated by the knitted fabric under the irradiation of the ultraviolet band light and the near-infrared perspective image generated under the irradiation of the near-infrared band light; Extract the spandex luminescence skeleton in the visible fluorescence image, and perform missed yarn discrimination in combination with the cotton yarn background characteristics in the near-infrared perspective image to generate a primary missed yarn alarm; Extract the topological deformation parameter of the cotton yarn coils in the near-infrared perspective image, and identify the current pulling tension state of the knitted fabric according to the topological deformation parameter; Generate a threshold compensation coefficient based on the pulling tension state; Dynamically relax and adjust the luminescence determination reference threshold used for the missed yarn discrimination by using the threshold compensation coefficient; Verify the primary missed yarn alarm by using the adjusted luminescence determination reference threshold and output the final detection result.