Fabric defect intelligent detection method and system based on AI visual recognition

By using AI visual recognition technology to acquire optical response and motion state data of fabrics, and then performing correction and calibration, high-frequency texture feature maps and defect characterization maps are obtained. This solves the problem of optical data distortion caused by fabric movement and environmental interference, and improves the accuracy of defect detection and the linkage of production control.

CN120747091BActive Publication Date: 2026-01-06HANGZHOU HANGSIYUE TEXTILE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511243239.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2026-01-06
Estimated Expiration
2045-09-02

AI Technical Summary

Technical Problem

In traditional fabric defect detection, changes in the fabric's motion state during transmission and environmental interference cause distortion in optical response data, resulting in a high rate of missed or false detections of defects.

Method used

By using AI-based visual recognition methods, optical response data and motion state data of the fabric surface are acquired, and primary correction and dynamic optical parameter calibration are performed. High-frequency texture feature maps and comprehensive defect characterization maps are obtained. Combined with quality quantification indicators and comprehensive risk values, graded response control information is generated to adjust the textile production line.

Benefits of technology

It improves the accuracy of fabric defect detection and its resistance to environmental interference, realizes the linkage between detection and production control, and reduces the rate of missed and false detections of defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747091B_ABST
    Figure CN120747091B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of fabric detection, and discloses a fabric defect intelligent detection method and system based on AI visual recognition.The application quantifies motion blur through motion state data, and eliminates optical blur caused by fabric motion through back convolution solution, thereby targetedly processing motion interference in the fabric transmission process, realizing adaptive balance of deblurring capability and feature reservation capability, then based on the optical interference principle, a dynamic calibration system combining hardware-level real-time compensation and multi-dimensional optical parameter calibration is used to realize dynamic optical parameter calibration of the primary correction data, subsequently, fabric defect characterization data is extracted to accurately obtain defect features, finally, through quality quantitative indexes and comprehensive risk values, a detection-production line control closed loop is constructed, which is beneficial to improving fabric defect detection precision, thereby effectively solving the problems that in traditional methods, optical data distortion is caused due to motion and environmental interference, and the defect omission and misjudgment rates are high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fabric inspection technology, and in particular to an intelligent method and system for detecting fabric defects based on AI visual recognition. Background Technology

[0002] Fabric defects refer to flaws in the appearance and performance of fabrics caused by process deviations, equipment malfunctions, or environmental factors during production and processing (such as spinning, weaving, dyeing, and finishing). Common types include broken yarns, oil stains, holes, uneven yarn density, and dirt. AI-based intelligent fabric defect detection can replace traditional manual inspection, solving the problems of low efficiency and inconsistent inspection standards in manual inspection, while also reducing production costs and ensuring product quality stability. AI-based intelligent fabric defect detection involves using a high-resolution industrial camera with a specific light source to acquire surface images of moving fabrics, followed by image preprocessing algorithms and deep learning models for defect detection and classification, thereby achieving precise control over fabric quality.

[0003] In traditional fabric defect detection, changes in the fabric's motion state during transmission and environmental interference (such as mechanical vibration and light fluctuations) can damage the optical characteristics of fabric defects under specific wavelengths of visible light (such as differences in reflectivity and absorptivity), resulting in distortion of the optical contrast between defects and normal areas in the optical response data, leading to a high rate of missed and false detections of defects. Summary of the Invention

[0004] The main objective of this invention is to provide an intelligent method and system for detecting fabric defects based on AI visual recognition, aiming to solve the technical problems in the prior art.

[0005] This invention proposes an intelligent fabric defect detection method based on AI visual recognition, comprising:

[0006] Based on AI visual recognition, optical response data of the fabric surface is obtained using visible light of a specific wavelength, and motion state data and environmental interference data of the fabric are obtained based on sensors.

[0007] Primary correction data is obtained based on the motion state data and the optical response data;

[0008] Based on the environmental interference data, the primary correction data is dynamically calibrated using optical parameters to obtain optical feature enhancement data;

[0009] Fabric defect characterization data is obtained based on the optical feature enhancement data, wherein the fabric defect characterization data includes high-frequency texture feature maps and defect comprehensive characterization maps;

[0010] The quality quantification index is obtained based on the high-frequency texture feature map and the defect comprehensive characterization map, and the comprehensive risk value is obtained based on the quality quantification index.

[0011] Compare the overall risk value with a preset threshold:

[0012] If the overall risk value is not greater than the preset threshold, then the quality quantification index is output;

[0013] If the overall risk value is greater than a preset threshold, then graded response control information is generated based on the quality quantification index, and adjustment operations are performed on the textile production line based on the graded response control information. The graded response control information includes a speed reduction ratio and light source adjustment parameters.

[0014] Preferably, the step of obtaining primary correction data based on the motion state data and the optical response data includes:

[0015] Based on the motion state data, obtain the fabric's motion speed parameters, fabric motion direction, and fabric motion cycle, and obtain the fabric's motion fuzzy length based on the motion speed parameters;

[0016] Obtain the optical detection distance and static blur base value, and obtain the optical blur feature coefficients based on the optical detection distance, static blur base value and motion blur length;

[0017] The time-varying blur kernel matrix is ​​obtained based on the optical blur feature coefficients and the fabric motion direction;

[0018] Obtain an overlapping subframe sequence based on the optical response data and the fabric motion cycle;

[0019] Obtain the vibration sensitivity coefficient, and obtain the dynamic noise parameters based on the vibration sensitivity coefficient and the motion speed parameters;

[0020] Obtain the defect feature response spectrum, and obtain the denoised subframe sequence based on the defect feature response spectrum, the overlapping subframe sequence, and the dynamic noise parameters;

[0021] A deblurred subframe sequence is obtained based on the motion speed parameters, the time-varying blur kernel matrix, and the denoised subframe sequence. Primary correction data is obtained based on the fabric motion cycle and the deblurred subframe sequence.

[0022] Preferably, the step of performing dynamic optical parameter calibration on the primary correction data based on the environmental interference data to obtain optical feature enhancement data includes:

[0023] Mechanical vibration parameters and ambient light parameters are obtained based on the environmental disturbance data;

[0024] Obtain the calibration conversion coefficient, and obtain the predicted value of reflectivity fluctuation based on the calibration conversion coefficient and the mechanical vibration parameters;

[0025] Obtain optical detection reference parameters, and perform phase-sensitive demodulation processing on the primary correction data based on the optical detection reference parameters and the predicted reflectance fluctuation value to obtain an anti-interference reflectance distribution matrix;

[0026] The dynamic light disturbance and spectral shift are obtained based on the ambient light parameters, and the dynamic compensation coefficient and wavelength compensation coefficient are obtained based on the dynamic light disturbance, spectral shift and the optical detection reference parameters.

[0027] Optical feature fusion is performed on the primary correction data based on the anti-interference reflectivity distribution matrix, dynamic compensation coefficient, and wavelength compensation coefficient to obtain optical feature enhancement data.

[0028] Preferably, the step of obtaining fabric defect characterization data based on the optical feature enhancement data includes:

[0029] The RGB value of each pixel is obtained based on the optical feature enhancement data.

[0030] Acquire optical feature-noise correlation database and fabric reference spectrum;

[0031] Obtain the minimum detection size of the defect, and obtain the optical feature components based on the RGB value corresponding to each pixel, the fabric reference spectrum, and the minimum detection size of the defect;

[0032] Optimized feature components are obtained based on the optical feature-noise correlation database and the optical feature components, wherein the optimized feature components include substrate reflection components, anomalous absorption components, and high-frequency scattering noise components;

[0033] A high-frequency texture feature map is obtained based on the fabric reference spectrum and the abnormal absorption component, and a comprehensive defect characterization map is obtained based on the substrate reflection component, the abnormal absorption component and the high-frequency scattering noise component.

[0034] Preferably, the step of obtaining a quality quantification index based on the high-frequency texture feature map and the defect comprehensive characterization map, and obtaining a comprehensive risk value based on the quality quantification index, includes:

[0035] The optical signal difference value of each pixel is obtained based on the high-frequency texture feature map, and the defect heat map is obtained based on the optical signal difference value, the attention weight matrix and the defect comprehensive characterization map.

[0036] Based on the defect heat map, obtain the defect optical characterization data, and based on the defect optical characterization data, obtain the defect detection result table;

[0037] The defect heatmap and the defect detection result table are used as quality quantification indicators.

[0038] The defect density distribution matrix is ​​obtained from the defect heat map, and the defect size, defect type and defect coordinates are obtained from the defect density distribution matrix and the defect comprehensive characterization map.

[0039] The defect impact index is obtained based on the defect size, defect type, and defect coordinates, and the comprehensive risk value is obtained based on the defect density distribution matrix, defect type, and defect impact index.

[0040] Preferably, the step of generating graded response control information based on the quality quantification index includes:

[0041] Based on the quality quantification indicators, the defect feature energy and defect diffusion rate are obtained, and based on the environmental interference data, the high-frequency noise energy is obtained.

[0042] The optical feature stability is obtained based on the high-frequency noise energy and the defect feature energy, and it is determined whether the optical feature stability is greater than the stability threshold.

[0043] If the optical feature stability is greater than the stability threshold, then the defect optical feature parameters are obtained according to the defect comprehensive characterization map.

[0044] Obtain a reference library of fabric optical properties, and obtain the reflectance anomaly amplitude, transmittance gradient change amount and absorption peak offset based on the reference library of fabric optical properties and the optical characteristic parameters;

[0045] The optical sensitivity level is obtained based on the anomalous reflectance magnitude, the transmittance gradient change, and the absorption peak shift.

[0046] Obtain a graded response database, and obtain graded response control information based on the graded response database, the optical sensitivity level, and the defect diffusion rate.

[0047] This application also provides an intelligent fabric defect detection system based on AI visual recognition, including:

[0048] The data acquisition module is used to acquire optical response data of the fabric surface using visible light of a specific wavelength based on AI visual recognition, and to acquire motion state data and environmental interference data of the fabric based on sensors.

[0049] A motion correction module is used to obtain primary correction data based on the motion state data and the optical response data;

[0050] The parameter calibration module is used to perform dynamic optical parameter calibration on the primary correction data based on the environmental interference data to obtain optical feature enhancement data;

[0051] The defect analysis module is used to obtain fabric defect characterization data based on the optical feature enhancement data, wherein the fabric defect characterization data includes a high-frequency texture feature map and a comprehensive defect characterization map.

[0052] The detection and evaluation module is used to obtain quality quantification indicators based on the high-frequency texture feature map and the defect comprehensive characterization map, and to obtain a comprehensive risk value based on the quality quantification indicators.

[0053] The detection and control module is used to determine whether the comprehensive risk value is greater than a preset threshold;

[0054] If the overall risk value is not greater than the preset threshold, then the quality quantification index is output;

[0055] If the overall risk value is greater than a preset threshold, then graded response control information is generated based on the quality quantification index, and adjustment operations are performed on the textile production line based on the graded response control information. The graded response control information includes a speed reduction ratio and light source adjustment parameters.

[0056] Preferably, the motion correction module includes:

[0057] The motion sensing unit is used to obtain the fabric's motion speed parameters, fabric motion direction, and fabric motion cycle based on the motion state data, and to obtain the fabric's motion fuzzy length based on the motion speed parameters.

[0058] A fuzzy quantization unit is used to obtain the optical detection distance and the static fuzzy base value, and to obtain the optical fuzzy feature coefficients based on the optical detection distance, the static fuzzy base value and the motion fuzzy length;

[0059] A matrix construction unit is used to obtain a time-varying blur kernel matrix based on the optical blur feature coefficients and the fabric motion direction;

[0060] A subframe extraction unit is used to obtain an overlapping subframe sequence based on the optical response data and the fabric motion cycle.

[0061] A noise assessment unit is used to obtain a vibration sensitivity coefficient and to obtain dynamic noise parameters based on the vibration sensitivity coefficient and the motion speed parameters.

[0062] The noise suppression unit is used to acquire the defect feature response spectrum and acquire the denoised subframe sequence based on the defect feature response spectrum, the overlapping subframe sequence and the dynamic noise parameters.

[0063] The data correction unit is used to obtain a deblurred subframe sequence based on the motion speed parameters, the time-varying blur kernel matrix and the denoised subframe sequence, and to obtain primary correction data based on the fabric motion cycle and the deblurred subframe sequence.

[0064] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described intelligent fabric defect detection method based on AI visual recognition.

[0065] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described intelligent fabric defect detection method based on AI visual recognition.

[0066] The beneficial effects of this invention are as follows: By acquiring optical response data of the fabric surface, fabric motion state data, and environmental interference data, this invention provides a comprehensive data foundation for subsequent elimination of motion and environmental interference and restoration of the true optical characteristics of defects. Then, based on the motion state data and optical response data, primary correction data is obtained, and motion interference during fabric transmission is specifically addressed, initially restoring the true optical characteristics of defects. This solves the problem in existing technologies where "fabric motion causes optical blurring and missed detection of subframes, resulting in distorted optical contrast between defects and normal areas." Finally, based on environmental interference data, dynamic optical parameter calibration is performed on the primary correction data to address the problem in existing technologies where "environmental interference damages the optical characteristics of defects, leading to distorted optical contrast between defects and normal areas in the optical response data." To address the issue of "distortion," the system then acquires fabric defect characterization data, including high-frequency texture feature maps and comprehensive defect characterization maps, based on enhanced optical feature data. This enables precise extraction of defect features. Based on this, quality quantification indicators and comprehensive risk values ​​can be further obtained, providing quantifiable data for subsequent quality assessment and production line adjustments. Finally, by judging the relationship between the comprehensive risk value and a preset threshold, quality quantification indicators are output or graded response control information is generated and executed to construct a closed loop from detection to production line control. This achieves linkage between detection and production control. Through the synergistic effect of the above, the accuracy of fabric defect detection and its resistance to environmental interference are comprehensively improved, effectively solving the problem of high false negative and false positive rates in traditional detection methods due to optical data distortion caused by motion and environmental interference. Attached Figure Description

[0067] Figure 1 This is a schematic diagram of a method flow according to an embodiment of the present invention.

[0068] Figure 2 This is a schematic diagram of the system structure according to an embodiment of the present invention.

[0069] Figure 3This is a schematic diagram of the internal structure of a computer device according to an embodiment of this application.

[0070] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0071] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0072] like Figure 1 As shown, this application provides an intelligent fabric defect detection method based on AI visual recognition, including:

[0073] S1. Based on AI visual recognition, optical response data of the fabric surface is obtained using visible light of a specific wavelength, and motion state data and environmental interference data of the fabric are obtained based on sensors.

[0074] S2. Obtain primary correction data based on the motion state data and the optical response data;

[0075] S3. Perform dynamic optical parameter calibration on the primary correction data based on the environmental interference data to obtain optical feature enhancement data;

[0076] S4. Obtain fabric defect characterization data based on the optical feature enhancement data, wherein the fabric defect characterization data includes a high-frequency texture feature map and a comprehensive defect characterization map.

[0077] S5. Obtain quality quantification indicators based on the high-frequency texture feature map and the defect comprehensive characterization map, and obtain a comprehensive risk value based on the quality quantification indicators;

[0078] S6. Compare the comprehensive risk value with a preset threshold:

[0079] If the overall risk value is not greater than the preset threshold, then the quality quantification index is output;

[0080] If the overall risk value is greater than a preset threshold, then graded response control information is generated based on the quality quantification index, and adjustment operations are performed on the textile production line based on the graded response control information. The graded response control information includes a speed reduction ratio and light source adjustment parameters.

[0081] As described in steps S1-S6 above, this invention determines a specific wavelength of visible light based on the fabric material (e.g., blue light is preferred for cotton and polyester, maximizing the difference in reflectance / absorption rate between defects (e.g., oil stains, broken yarns) and normal areas), and irradiates the fabric surface with visible light of a specific wavelength (e.g., blue light) adapted to the fabric material. Based on AI visual recognition, optical response data of the fabric surface is obtained. This optical response data refers to multiple frames of optical images of the fabric surface continuously acquired under a single specific wavelength (e.g., blue light, near-infrared light, etc.) to utilize the difference in reflectance / absorption rate between defects and normal areas at that wavelength to form raw detection data. Simultaneously, it combines sensor data from the textile production line to synchronously acquire fabric motion state data and environmental interference data. Motion state data refers to the set of parameters collected by sensors to quantify the dynamic characteristics of the fabric during transmission. Environmental interference data refers to the set of external environmental parameters collected by sensors that may damage the optical characteristics of fabric defects, mainly including mechanical vibration parameters and ambient lighting parameters. By acquiring multi-dimensional data, the limitations of traditional detection relying solely on single optical data are overcome. This helps solve the problem of existing technologies "not linking motion state and environmental interference data, making it impossible to trace the cause of optical response distortion," providing a comprehensive data foundation for subsequent elimination of motion and environmental interference and restoration of the true optical characteristics of defects. Next, for motion interference during fabric transmission, primary correction data is obtained based on motion state data and optical response data. Primary correction data refers to image data that, after motion data correction, initially restores the true optical characteristics of the fabric. Through this correction of motion blur and sub-frame optimization, the true optical features of defects are initially restored, thus solving the problem in existing technologies where "fabric motion causes optical blurring, sub-frame misses, and distortion of the optical contrast between defects and normal areas." Then, regarding the impact of environmental interference on optical detection, dynamic optical parameter calibration is performed on the primary correction data based on environmental interference data to obtain optical feature enhancement data. This optical feature enhancement data, obtained after dynamic optical parameter calibration of the primary correction data based on environmental interference data, further restores the true optical characteristics of the fabric. This dynamic calibration enhances the optical features of defects. This method addresses the problem in existing technologies where environmental interference damages the optical features of defects, leading to distortion of the optical contrast between defects and normal areas in the optical response data. It then acquires fabric defect characterization data, including high-frequency texture feature maps and comprehensive defect characterization maps, based on enhanced optical feature data. This enables precise extraction of defect features, providing clear and reliable feature data for defect detection. Specifically, the fabric defect characterization data refers to the structured data extracted from enhanced optical feature data to describe fabric defect features, while the high-frequency texture feature map highlights subtle structural changes on the fabric surface, focusing on the high-frequency signal differences in the normal fabric texture caused by defects (such as yarn breaks, stains, and holes).A comprehensive defect characterization map is a map that comprehensively reflects the authenticity and severity of defects. Because existing technologies suffer from "vague assessment of the impact of defects on quality and a lack of quantitative indicators," quality quantification indicators are subsequently obtained based on high-frequency texture feature maps and the comprehensive defect characterization map. These quality quantification indicators are specific data used to quantify the quality status of fabric defects, including defect heat maps and defect detection result tables. Furthermore, a comprehensive risk value is obtained to quantitatively assess the impact of defects on quality, providing a quantifiable basis for subsequent quality judgments and production line adjustments. Finally, by judging the relationship between the comprehensive risk value and a preset threshold, the quality quantification indicator is output or a classification is generated and implemented. The response control information, specifically the hierarchical response control information, refers to a set of instructions used to guide adjustments in the textile production line. This includes a speed reduction ratio and light source adjustment parameters. The speed reduction ratio is a percentage parameter used to adjust the fabric transport speed, while the light source adjustment parameters are parameters used to optimize the detection light source, including light intensity and characteristic wavelength. This hierarchical response control information constructs a closed loop from detection to production line control, achieving linkage between detection and production control. Through the synergistic effect of these elements, the accuracy and resistance to environmental interference in fabric defect detection are comprehensively improved, effectively solving the problem of high false negative and false positive rates in traditional detection methods due to optical data distortion caused by motion and environmental interference.

[0082] In one embodiment, step S2, which involves obtaining primary correction data based on the motion state data and the optical response data, includes:

[0083] S21. Obtain the fabric's motion speed parameters, fabric motion direction, and fabric motion cycle based on the motion state data, and obtain the fabric's motion fuzzy length based on the motion speed parameters.

[0084] S22. Obtain the optical detection distance and static blur base value, and obtain the optical blur feature coefficients based on the optical detection distance, static blur base value and motion blur length;

[0085] S23. Obtain the time-varying fuzzy kernel matrix based on the optical fuzzy feature coefficients and the fabric motion direction;

[0086] S24. Obtain an overlapping subframe sequence based on the optical response data and the fabric motion cycle;

[0087] S25. Obtain the vibration sensitivity coefficient, and obtain the dynamic noise parameter based on the vibration sensitivity coefficient and the motion speed parameter;

[0088] S26. Obtain the defect feature response spectrum, and obtain the denoised subframe sequence based on the defect feature response spectrum, the overlapping subframe sequence, and the dynamic noise parameters;

[0089] S27. Obtain a deblurred subframe sequence based on the motion speed parameters, the time-varying blur kernel matrix, and the denoised subframe sequence, and obtain primary correction data based on the fabric motion cycle and the deblurred subframe sequence.

[0090] As described in steps S21-S27 above, this invention obtains the motion speed parameters of the fabric through motion state data. The motion speed parameters refer to physical parameters that can quantify the speed and trend of position changes of the fabric during movement, including real-time linear velocity and acceleration. Next, the optical detection distance and static blur baseline are obtained. The optical detection distance refers to the vertical distance from the camera lens in the optical system to the fabric surface, directly affecting the magnification and depth of field of the image. The static blur baseline is a characterizing degree of inherent blur of the optical system in a static state, determined through calibration experiments. Then, based on kinematic principles and an optical imaging model, the real-time linear velocity and acceleration are converted into blur length. The blur length refers to the physical length of the trailing shadow of a single pixel in the optical image caused by fabric movement, and its calculation formula is: ,in, Indicates fuzzy length, Indicates real-time linear velocity. This represents the square of the camera exposure time. This represents acceleration, and the "" in the formula "This indicates linear fuzziness caused by uniform motion, which is the dominant term for fuzziness length. However, when the acceleration of the fabric movement is large (such as during sudden starts and stops), additional compensation for the fuzziness length is required." "" represents the nonlinear fuzzy compensation term caused by acceleration. Then, the ratio of fuzzy length to optical detection distance is calculated, and the sum of this ratio and the static fuzzy base value is calculated to obtain the optical fuzzy characteristic coefficient. The optical fuzzy characteristic coefficient refers to the standardized fuzzy length quantity that characterizes the intensity and scale of fuzziness. The optical fuzzy characteristic coefficient is used to eliminate geometric differences in the imaging system (such as fuzzy scale changes caused by different object distances) and static noise interference. The above method realizes the accurate quantification of fabric imaging fuzziness under complex motion state, thus providing a unified and accurate quantitative basis for subsequent fuzzy correction.

[0091] Furthermore, the fabric motion direction is obtained based on the motion state data, and a discretized time-varying fuzzy kernel matrix is ​​generated based on the fabric motion direction and optical fuzzy feature coefficients. The dimension of this matrix is... ,in, The time-varying blur kernel matrix represents the optical blur feature coefficients. Its non-zero elements are arranged in single-pixel-width line segments uniformly distributed along the direction of motion, simulating the pixel trailing effect caused by motion. The sum of the matrix elements is 1 to ensure energy conservation. For example, when moving horizontally to the right (the fabric's direction of motion is 0°) and the optical blur feature coefficient is 5, the first 5 elements in the center row of the matrix are 1 / 5, and the rest are 0. The core components of the time-varying blur kernel matrix include motion direction parameters (determining the geometric direction of the blur trail), blur intensity parameters (controlling the physical scale of the blur kernel), and a time-varying update mechanism (adjusting the optical blur feature coefficients and their sum according to real-time acceleration). The fabric movement direction is monitored to ensure dynamic matching of the motion state. The time-domain update frequency of the time-varying blur kernel matrix is ​​dynamically adjusted through real-time acceleration feedback (such as high-frequency updates to cope with rapid acceleration), ensuring that the blur kernel always accurately represents the current motion state. The time-varying blur kernel matrix can provide an accurate degradation model for subsequent deconvolution deblurring algorithms. Convolution operations can also be used to remove optical feature distortions caused by fabric movement (such as the trailing shadow at yarn breakage), thereby significantly improving the accuracy of defect detection. This solves the problem that traditional technologies cannot adapt to the dynamic changes in fabric movement direction and speed, resulting in unstable blur correction effects.

[0092] Next, the fabric motion cycle (i.e., the smallest time unit of repeated fabric motion) is obtained based on the motion state data. The optical response data is then divided into several time segments based on the motion cycle. Within each segment, a continuous subframe sequence is extracted according to a preset overlap rate (e.g., 30%–50%) to ensure that there is partial overlap between adjacent subframes to cover the entire fabric surface, thus obtaining an overlapping subframe sequence. The overlapping subframe sequence refers to a collection of partially overlapping images extracted from continuous images based on the fabric motion cycle and displacement compensation. The following conditions must be met when extracting the subframe: the subframe size must be larger than the maximum physical size of the defect, and the exposure parameters must be adapted to a specific wavelength (e.g., blue light to enhance oil stain contrast) to preserve the difference in reflectivity / transmittance between the defect and the normal area. If the motion cycle changes due to variable speed production, the subframe extraction frequency and overlap rate are recalculated to ensure no detection blind spots. The final output overlapping subframe sequence will serve as the input for subsequent deblurring and feature extraction, providing a high-fidelity optical data foundation for defect identification.

[0093] Following this, based on the instantaneous acceleration during fabric movement, the signal-to-noise ratio (SNR) of each subframe is simultaneously calculated (determined by the ratio of the variance to the mean of the grayscale values ​​in the subframe image). Combined with pre-acquired vibration sensitivity coefficients (obtained experimentally by measuring the grayscale fluctuation caused by unit acceleration) and the system's maximum acceleration (the upper limit of mechanical vibration allowed by the hardware), the instantaneous acceleration is mapped to a vibration noise intensity component through normalization. Furthermore, the reciprocal of the subframe SNR is introduced to characterize the inherent noise of the optical system (such as illumination fluctuations and sensor noise). Finally, the dynamic noise parameters are calculated using a weighted fusion formula based on the vibration noise intensity component and the reciprocal of the subframe SNR (the weighting coefficients corresponding to the vibration noise intensity component and the reciprocal of the subframe SNR are determined by calibration experiments). Among these parameters, the dynamic noise... Acoustic parameters refer to the quantitative indicators of combined vibration noise and optical noise. Dynamic noise parameters will be used for the adaptive adjustment of the subsequent defect feature response spectrum to ensure that noise interference can be effectively suppressed under variable speed or high vibration conditions, and the stability of defect optical features can be maintained. Traditional methods cannot distinguish between different types of noise. Under variable speed or high vibration conditions, defect features are easily misjudged as noise filtering, or defect features are masked by noise due to insufficient noise reduction, which seriously affects the detection stability. This solution realizes the comprehensive quantification and differentiation of vibration noise and inherent noise of optical system by constructing dynamic noise parameters. By associating dynamic noise parameters with the subsequent filtering process, noise suppression can be adaptively adjusted according to the real-time noise status, so as to retain the defect optical features to the maximum extent while effectively reducing noise.

[0094] Subsequently, the defect characteristic response spectrum adapted to the target wavelength (e.g., 450nm blue light) was obtained through optical system calibration experiments. The defect characteristic response spectrum characterizes the optical system's ability to transmit light intensity distributions at different spatial frequencies, comprising both modulus (modulation transfer function) and phase. It is presented in the frequency domain to characterize the system's transmission efficiency for defect features (e.g., abrupt changes in oil absorption rate, differences in transmittance due to yarn breakage). Next, each frame in the overlapping sub-frame sequence was transformed to the frequency domain using Fourier transform. The image spectrum was then weighted and filtered using the modulus curve (MTF) of the defect characteristic response spectrum to enhance the mid-to-high frequency components corresponding to defect features (e.g., the 20-50 LP / mm band) while suppressing high-frequency noise bands identified by dynamic noise parameters. For periodic noise caused by vibration (e.g., the dominant frequency of mechanical vibration), a notch filter was designed in the frequency domain. Local spectral repair was performed using the phase information of the defect characteristic response spectrum as a reference. Finally... The spatial domain image is reconstructed by inverse Fourier transform to generate a denoised subframe sequence. The denoised subframe sequence refers to the set of subframes after frequency domain filtering of the defect feature response spectrum and dynamic noise suppression. In this process, the dynamic noise parameter is used to adaptively adjust the filtering threshold: when the dynamic noise parameter is high, the low-pass characteristics of the defect feature response spectrum are enhanced to suppress vibration noise, and conversely, the frequency band is widened to retain subtle defect features. This maximizes the maintenance of the optical contrast characteristics between defects and background while denoising. Traditional spatial domain filtering is difficult to effectively separate defect features from noise, especially in environments with strong interference such as vibration, where the optical contrast between defects and background is severely damaged, making defect identification difficult and unable to selectively enhance defect features at specific wavelengths. This method, which combines dynamic noise parameters to achieve adaptive adjustment of the filtering threshold, balances the relationship between noise reduction and defect feature preservation, which is conducive to further improving the denoising effect.

[0095] Then, the basic weights are obtained. These basic weights are determined by statistically analyzing the optical reflectance benchmark values ​​of normal fabric texture areas at a specific wavelength, and then normalizing them in conjunction with the system's imaging signal-to-noise ratio. Subsequently, the ratio of real-time linear velocity to the system's maximum design speed is introduced as a dynamic adjustment factor, using an exponential decay function… "Calculate the final regularization weights, where, The regularization weight is a key hyperparameter used to balance the algorithm's "deblurring ability" and "feature preservation ability". Indicates the basic weight. This represents the natural exponential function. This represents the attenuation coefficient, typically taken as 1.5 to 2. Indicates real-time linear velocity. The formula represents the system's maximum design speed. Its physical meaning is as follows: when the fabric's real-time linear velocity approaches the system's maximum design speed, the regularization weight automatically decreases to enhance the deblurring algorithm's aggressiveness (prioritizing the elimination of motion blur). At low speeds, the regularization weight increases to protect optical texture details (such as micron-level light transmission characteristics at yarn breaks). The regularization weight directly affects the subsequent deconvolution optimization objective function, achieving an adaptive balance between motion blur correction and feature preservation. This ensures stable extraction of optical characteristic parameters of defects (such as an absorption rate deviation of ≥25% in the blue light band for stained areas) even in variable-speed production environments. Finally, based on the denoised subframe sequence, the time-varying blur kernel matrix, and the regularization weight, an optimization objective function is constructed to minimize the defect feature restoration error. This is then solved using the Richardson-Lucy iterative algorithm combined with an initial estimated image (a reference image generated based on optical reflectance / transmittance modeling of normal fabric at a specific wavelength, used to provide physical constraints for deconvolution and prevent algorithm divergence or artifact generation) to progressively optimize and obtain the deblurred subframe sequence. This method can eliminate the blurring caused by fabric variations. Motion-induced optical blurring (such as ghosting and texture diffusion) and significantly enhanced differences in optical properties (such as reflectivity and transmittance contrast) between defective areas (such as holes and oil stains) and normal areas are addressed to ensure that the physical quantity error of defect features (such as areas with increased transmittance in holes and areas with decreased absorption in oil stains) is ≤5%. Subsequently, the ratio of fabric motion cycle to the number of subframes is calculated to obtain the subframe time interval, and the product of the subframe time interval and the real-time linear velocity is calculated to obtain the displacement vector. Then, the phase correlation method is used to perform subpixel-level registration on the deblurred subframe sequence to eliminate mechanical vibration. The misalignment caused by the movement is ultimately corrected by a weighted stitching algorithm (weights are allocated by the signal-to-noise ratio of the subframes) to generate primary correction data. The primary correction data must meet the following requirements: no breakage or repetition of a single defect (such as a hole with a diameter ≥ 0.5 mm) in the image; and a relative difference in reflectance / transmittance between the defect area and the normal area is preserved at a rate ≥ 95%. Through this dynamic adjustment mechanism of regularized weights based on real-time linear velocity, an adaptive balance between deblurring capability and feature preservation capability is achieved, which improves the deblurring accuracy and avoids the generation of artifacts, thereby ensuring the integrity and accuracy of the primary correction data.

[0096] In one embodiment, step S3, which involves performing dynamic optical parametric calibration on the primary correction data based on the environmental interference data to obtain optical feature enhancement data, includes:

[0097] S31. Obtain mechanical vibration parameters and ambient light parameters based on the environmental interference data;

[0098] S32. Obtain the calibration conversion coefficient, and obtain the predicted value of reflectivity fluctuation based on the calibration conversion coefficient and the mechanical vibration parameters;

[0099] S33. Obtain optical detection reference parameters, and perform phase-sensitive demodulation processing on the primary correction data based on the optical detection reference parameters and the predicted reflectance fluctuation value to obtain the anti-interference reflectance distribution matrix;

[0100] S34. Obtain dynamic light disturbance and spectral shift based on the ambient light parameters, and obtain dynamic compensation coefficient and wavelength compensation coefficient based on the dynamic light disturbance, spectral shift and optical detection reference parameters.

[0101] S35. Optical feature fusion is performed on the primary correction data based on the anti-interference reflectivity distribution matrix, dynamic compensation coefficient, and wavelength compensation coefficient to obtain optical feature enhancement data.

[0102] As described in steps S31-S35 above, this invention obtains mechanical vibration parameters and ambient lighting parameters through environmental interference data. Mechanical vibration parameters refer to physical parameters that quantify the mechanical vibration attributes affecting the stability of the optical detection system, including the dominant vibration frequency, vibration amplitude, and vibration direction angle. Ambient lighting parameters refer to physical parameters that quantify the interference of ambient light changes on the optical detection accuracy, including dynamic light disturbance, spectral shift, and scintillation frequency. Then, calibration conversion coefficients are obtained through a laser Doppler vibration meter calibration system. These coefficients characterize the optical path change corresponding to a unit output voltage of the vibration sensor. The dominant vibration frequency, vibration amplitude, and vibration direction angle are input to the FPGA processing unit. Combined with the calibration conversion coefficients, the change in optical path difference caused by vibration is calculated according to the principle of optical interference. This change in optical path difference refers to the periodic change in the optical path length caused by vibration, used to quantify the time-varying interference intensity of vibration on the optical detection system and provide input parameters for the reflectivity modulation model. Subsequently, a reference reflectivity distribution of the fabric under static conditions was obtained using a standard reflector calibration. Based on the data obtained above, a reflectivity modulation model was established based on Fresnel reflection theory. The reflectivity modulation model is a mathematical model that describes the quantitative relationship between the change in optical path difference caused by vibration and the fluctuation of fabric reflectivity. This model linearly maps the optical path difference to reflectivity fluctuation through Taylor's first-order approximation and outputs the predicted value of reflectivity fluctuation caused by vibration in real time. The predicted value of reflectivity fluctuation refers to the quantitative data calculated by the model that reflects the change of reflectivity of each point of the fabric over time caused by vibration, including fluctuation amplitude, frequency and phase information. After verification by Polytec OFV-505, the phase deviation between the model prediction value and the measured data is ≤0.1π, so as to provide a high-precision interference feature template for optical compensation. This solves the problem that traditional methods cannot quantify the influence of mechanical vibration on reflectivity measurement, which leads to the reflection frequency fluctuation caused by vibration being misjudged as fabric defect features, or the real defect features being masked by vibration noise, which seriously affects the detection accuracy.

[0103] Next, a scientific-grade CCD camera (such as Hamamatsu Orca-Flash 4.0) is used to obtain the raw voltage matrix based on the primary calibration data. The raw voltage matrix is ​​a two-dimensional array of digitized voltage values ​​output through photoelectric conversion, including the raw voltage values ​​corresponding to multiple pixels. Then, a dark-field reference voltage matrix, a reference voltage matrix, and a calibrated reflectance are obtained based on optical detection reference parameters. The dark-field reference voltage matrix refers to the background voltage distribution of the CCD camera under completely dark conditions due to dark current and readout noise, including the dark-field reference voltage values ​​corresponding to multiple pixels. The reference voltage matrix refers to the standard reflectance measured... The voltage distribution of the plates under the same optical path is determined. The calibrated reflectivity refers to the standard absolute reflectivity value of the standard reflector at a wavelength of 450nm. Then, the difference between the original voltage value and the dark-field reference voltage value of each pixel is calculated to obtain the calibration voltage matrix. This calibration voltage matrix represents the effective signal voltage distribution after subtracting the dark-field reference voltage value from the original voltage value of each pixel. Next, the ratio of the calibration voltage value to the reference voltage value of each pixel is calculated, and this ratio is multiplied by the calibrated reflectivity to obtain the reflectivity measurement value for each point. The reflectivity measurement value refers to the percentage of absolute reflectivity of each point on the fabric surface relative to the standard reflector. The reflectance measurements of all three-dimensional points, arranged in spatial coordinates, form a two-dimensional array, which is the reflectance matrix. Then, the reflectance measurement of each pixel and the predicted reflectance fluctuation value from the model are synchronously input into a lock-in amplifier, with a time constant set according to the dominant vibration frequency. Next, the reflectance measurements and the predicted reflectance fluctuation value are multiplied to obtain the vibration synchronization component. This vibration synchronization component refers to the reflectance fluctuation signal that maintains strict phase synchronization with the vibration modulation model. This method of extracting the component in phase with the predicted fluctuation from the measured signal through quadrature demodulation can accurately separate the reflectance modulation component caused by vibration, thus improving the signal-to-noise ratio of the reflectance measurements. The reflectivity is improved by ≥15dB while retaining a spatial resolution of no less than 10μm for the true optical features of the defects. Then, the vibration synchronization component is subtracted from the reflectivity measurement value to obtain the anti-interference reflectivity distribution matrix. The anti-interference reflectivity distribution matrix refers to a two-dimensional steady-state optical parameter array that characterizes the true optical properties of the material after eliminating vibration interference. This method achieves accurate separation and subtraction of vibration interference components, which can effectively eliminate the reflectivity measurement error caused by high-frequency vibration of 50-500Hz. It can solve the problem that the existing technology has a problem that the fabric reflectivity measurement value is deviated due to high-frequency mechanical vibration, which affects the accurate detection of optical features such as fabric defects.

[0104] Subsequently, a reference light intensity value and a fabric characteristic absorption curve are obtained based on optical testing reference parameters. The reference light intensity value refers to a stable optical power density reference value calibrated using a NIST traceable standard light source under standard testing conditions. The fabric characteristic absorption curve is a quantified value used to characterize the light absorption characteristics of the fabric at different wavelengths. The real-time acquired dynamic light disturbance is then compared with the reference light intensity value using a high-speed analog divider for hardware-level ratio calculation, generating a dynamic compensation coefficient. This dynamic compensation coefficient is a real-time calculated light intensity correction factor used to offset the influence of ambient light fluctuations on the measurement. The signal is fed back in real-time to the preamplifier (gain adjustment range ±20dB) of the detection optical path via a 16-bit DAC. Closed-loop gain control is then applied to the output signal of the photomultiplier tube to ensure that the absolute light intensity deviation measured by the system is ≤0.5% under ±15% illuminance fluctuation conditions. Next, the spectral offset and the reference wavelength of 450nm are input into the floating-point unit built into the FPGA to calculate the wavelength compensation coefficient. Then, dynamic light intensity compensation is performed on the anti-interference reflectivity distribution matrix: by performing a scalar multiplication operation between the reflectivity value of each pixel and the dynamic compensation coefficient at the corresponding pixel position, the illumination is calculated. Intensity normalization correction yields a compensated reflectance matrix, ensuring accurate gain compensation for each pixel. This point-by-point computation method based on spatial registration maintains the spatial resolution of the original image while effectively eliminating reflectance measurement deviations caused by non-uniform illumination. Subsequently, the matrix is ​​spectral response corrected using wavelength compensation coefficients. The reflectance data is matched to a standard wavelength using a polynomial fitting method, generating a spectrally normalized reflectance matrix. Simultaneously, the system precisely controls the exposure timing of the image sensor through a flicker synchronization trigger signal, ensuring it maintains an integer multiple relationship with the light source flicker period to eliminate flicker interference. Finally, the time-synchronized reflectance matrix is ​​spatially weighted and fused with the wavelength-compensated absorptivity data. A high-precision analog-to-digital converter outputs standardized optical feature enhancement data with a signal-to-noise ratio improved by more than 20dB and a spatial resolution maintained at 10μm. Traditional methods struggle to cope with dynamic changes and spectral shifts in ambient light, leading to systematic deviations in reflectance measurements. This solution, however, achieves real-time closed-loop gain control and precise correction of spectral shifts in response to ambient light fluctuations through a dynamic calibration system of "hardware-level real-time compensation + multi-dimensional optical parameter calibration."

[0105] In one embodiment, step S4, which involves obtaining fabric defect characterization data based on the optical feature enhancement data, includes:

[0106] S41. Obtain the RGB value of each pixel based on the optical feature enhancement data;

[0107] S42. Obtain the optical feature-noise correlation database and fabric reference spectrum;

[0108] S43. Obtain the minimum detection size of the defect, and obtain the optical feature components based on the RGB value corresponding to each pixel, the fabric reference spectrum, and the minimum detection size of the defect;

[0109] S44. Obtain optimized feature components based on the optical feature-noise correlation database and the optical feature components, wherein the optimized feature components include substrate reflection components, anomalous absorption components, and high-frequency scattering noise components;

[0110] S45. Obtain a high-frequency texture feature map based on the fabric reference spectrum and the abnormal absorption component, and obtain a comprehensive defect characterization map based on the substrate reflection component, the abnormal absorption component and the high-frequency scattering noise component.

[0111] As described in steps S41-S45 above, this invention obtains the RGB value of each pixel through optical feature enhancement data. The RGB value refers to the numerical value representing the color and brightness of a single pixel in an image using a combination of the three primary colors of light: red, green, and blue. Furthermore, it obtains an optical feature-noise correlation database and a fabric reference spectrum. The optical feature-noise correlation database is a pre-constructed structured dataset that stores the correspondence between the optical features of specific fabric defects and various types of interference noise (such as mechanical vibration, light fluctuations, etc.). This database can characterize the characteristic frequency band distribution of specific defects at the target wavelength, the attenuation weight coefficient of different vibration frequencies on the optical signal, and the change in contrast attenuation caused by light fluctuations with frequency. The fabric reference spectrum stores optical characteristic parameters of different fabric materials, such as the normal reflectance distribution range corresponding to yarn density. Then, combined with textile process specifications, the minimum detection size of defects (such as hole diameter ≥ 0.5 mm, yarn breakage length ≥ 1 mm, etc.) is obtained. Next, the RGB value of each pixel is matched with the fabric reference spectrum channel by channel. The initial component of substrate reflection is obtained by least squares fitting (characterizing the degree of matching between the pixel and the standard fabric reflectance). Then, the initial component of abnormal absorption is extracted by residual analysis (i.e., the region of significant negative deviation between the pixel reflectance and the standard value, whose spatial distribution must meet the process size threshold to be judged as a valid defect signal). At the same time, the initial component of high-frequency scattering noise is separated by high-pass filtering (whose spatial frequency characteristics do not match the texture period defined by the process parameters). These three components constitute the optical feature components. The separation process requires dynamic adjustment of the decomposition parameters to ensure that the initial component of substrate reflection at the macro scale (e.g., ≥5mm) can completely preserve the overall optical properties of the fabric, while the initial component of abnormal absorption at the micro scale (e.g., 0.5-1mm) can accurately capture tiny defects. The final output optical feature components will serve as the quantitative basis for subsequent defect identification to achieve deep coupling of "feature extraction - process specification".

[0112] Next, based on the optical feature-noise correlation database, the decomposed optical feature components are specifically optimized: For the initial component of substrate reflection, a vibration frequency domain compensation algorithm is used. Specifically, after converting the spatial domain signal to the frequency domain through Fourier transform, inverse filtering is performed in the frequency domain according to the interference weight coefficient of the mechanical vibration dominant frequency band in the mapping function of the optical feature-noise correlation data to eliminate the low-frequency baseline drift caused by vibration, thus obtaining the substrate reflection component; For the initial component of anomalous absorption, enhancement is achieved through a spectral matching filter. The kernel function of this filter is designed based on the defect standard absorption spectral characteristics in the mapping function, and convolution operation is performed in the spatial domain to improve the signal-to-noise ratio while suppressing interference components that match the frequency domain attenuation model of illumination fluctuations, thus obtaining the anomalous absorption component; For high-frequency dispersion... The initial component of the scattering noise is then used to construct an optical coherence mask using the noise floor features in the mapping function. Non-coherent noise is separated and filtered out using a wavelet thresholding denoising method to obtain the high-frequency scattering noise component. The floor reflection component, anomalous absorption component, and high-frequency scattering noise component constitute the optimized feature components. The optimized feature components must meet the following requirements: the energy fluctuation of the floor reflection component ≤ 5%, the peak signal-to-noise ratio of the anomalous absorption component ≥ 30 dB, and the energy proportion of the scattering noise component ≤ 1%. These optimized components will be used as input data for subsequent feature fusion. This method of separating non-coherent noise through "optical coherence mask + wavelet denoising" achieves precise suppression of "one type of interference corresponding to one optimization strategy", thereby solving the problem that existing technologies lack targeted processing of noise components.

[0113] Then, based on the standard spectral database (containing standard reflectance / absorption spectral curves of various defects at the target wavelength) and the fabric reference spectrum, the optimized feature components are matched with the standard library data in multiple dimensions: the pixel-by-pixel Euclidean distance is calculated based on the abnormal absorption components (obtained through spectral-spatial decomposition) and the reference reflectance curve in the standard spectral database, and an initial difference map is generated. Then, a guided filtering algorithm is used for edge enhancement: the yarn direction field (extracted through Gabor filter bank, with the frequency set to 10-15 lines / mm to match the fabric texture) is used as the guiding image to smooth the edges of the difference map. The filtering radius is set to 3 pixels (corresponding to 0.1mm process accuracy), and the regularization parameters are... The algorithm retains gradient changes ≥0.5dB and then enhances the reflection gradient differences at defect edges through nonlinear stretching (Sigmoid function, slope coefficient k=5). This causes abrupt gradient changes at yarn breaks (typically ≥8dB / mm) to appear as significant bright spots in the feature map, while the gentle gradients of normal textures (≤2dB / mm) are suppressed. The final output is a high-frequency texture feature map, marking abnormal regions with Euclidean distances exceeding a threshold and gradient amplitudes >6dB, which serve as input data for subsequent defect localization. Furthermore, based on the abnormal absorption components and combined with pre-stored stain absorption parameters in a standard spectral database, a pixel-by-pixel saliency score is calculated. An adaptive threshold segmentation algorithm is then used to segment pixels with saliency scores exceeding 1.0. Pixel regions are marked as high-interest areas, and small holes are filled using morphological closing operations (3×3 circular structuring elements) to ensure the integrity of continuous defect regions. Then, bilateral filtering is used to smooth the edges of the initial weights to avoid weight jumps caused by noise, resulting in the attention weight matrix. At the same time, a cross-validation mechanism is used to require that high-weight regions must appear simultaneously in the feature pyramids of at least two adjacent scales (such as L1 and L3 layers) to eliminate isolated noise interference. Finally, multi-scale fusion and verification of the 5-level feature pyramid are achieved. A hierarchical processing architecture is constructed based on optimized feature components: the first level utilizes the high-frequency gradient features in the anomalous absorption component (the signal-to-noise ratio is improved by 30dB after vibration frequency domain compensation). The first stage analyzes the abrupt changes in surface reflectance of a single yarn using Local Binary Pattern (LBP). When the reflectance gradient of three consecutive pixels exceeds 8dB and the coefficient of variation of the substrate reflectance component in this region is ≤5%, it is marked as a valid warp break signal. The second stage combines the texture stability of the substrate reflectance component and the spatial distribution of the anomalous absorption component, and applies a multi-directional Gabor filter bank (0° / 45° / 90°, 10 lines / mm) to extract the yarn interlacing point features, and verifies that the energy proportion of the scattered noise component in this frequency band is <10% to eliminate interference. The third stage processes the connected components (structuring element 3×3) of the anomalous absorption component through morphological opening operation, while requiring that the SSIM of the substrate reflectance component in the area surrounding the defect is ≥0.Level 85 ensures accurate defect isolation; Level 4 performs Fourier transform on the substrate reflection component to detect the peak amplitude spectrum of periodic defects (which must exceed the energy of the scattering noise component by 3σ), and combines this with spatial correlation analysis of the anomalous absorption component to confirm the authenticity of the defects; Level 5 comprehensively evaluates the overall uniformity of the substrate reflection component (SSIM≥0.9) and the aggregation characteristics of the anomalous absorption component, and finally outputs a comprehensive defect characterization map that integrates multi-scale optical properties. This acquisition method can effectively eliminate isolated noise interference and ensure the accuracy of defect identification. Each defect is labeled with its source component and cross-scale consistency verification results.

[0114] In one embodiment, step S5, which involves obtaining a quality quantification index based on the high-frequency texture feature map and the defect comprehensive characterization map, and obtaining a comprehensive risk value based on the quality quantification index, includes:

[0115] S51. Obtain the optical signal difference value of each pixel based on the high-frequency texture feature map, and obtain the defect heat map based on the optical signal difference value, the attention weight matrix and the defect comprehensive characterization map.

[0116] S52. Obtain optical characterization data of defects based on the defect heat map, and obtain a defect detection result table based on the defect optical characterization data;

[0117] S53. Use the defect heat map and the defect detection result table as quality quantification indicators;

[0118] S54. Obtain the defect density distribution matrix based on the defect heat map, and obtain the defect size, defect type and defect coordinates based on the defect density distribution matrix and the defect comprehensive characterization map;

[0119] S55. Obtain the defect impact index based on the defect size, defect type and defect coordinates, and obtain the comprehensive risk value based on the defect density distribution matrix, defect type and defect impact index.

[0120] As described in steps S51-S55 above, this invention obtains the optical signal difference value of each pixel through a high-frequency texture feature map. The optical signal difference value refers to the numerical difference between the optical signal (such as reflectivity, absorptivity, etc.) of a pixel in the high-frequency texture feature map and the standard optical signal of the corresponding pixel in the fabric reference spectrum. This difference quantifies the degree to which the optical characteristics of the pixel deviate from the normal state. Then, a dot product operation is performed with the spatial attention weight matrix. Weight adjustment strengthens the optical abnormality signal of the real defect area (e.g., the absorptivity difference in the stain area is amplified by a weight of 0.9) while suppressing environmental interference (e.g., the difference value in the reflective area is attenuated by a weight of 0.2). Next, a dynamic threshold algorithm is used, where the threshold is adaptively adjusted according to the average weight of the current region (high weight areas...). The threshold is reduced by 5-10% to capture weak signal defects, and the threshold in low-weight areas is increased by 20% to filter texture noise. Finally, morphological opening is performed on the weighted difference map to eliminate discrete noise points, and hot areas with a continuous area of ​​more than 3 pixels are marked. After normalization, the consistency of multiple levels is verified by a 5-scale feature pyramid (e.g., the broken warp hot area detected in L1 layer must have an extension feature in L3 layer, otherwise it is judged as an artifact). Finally, a defect heat map that strictly corresponds to the physical defects of the fabric is output. This method of strengthening effective signals through "differential weight adjustment" and obtaining dynamic thresholds based on the weight mean achieves a balance between "weak signal defect capture" and "texture noise filtering", avoiding the drawbacks of "missing weak signals" or "falsely detecting noise" in traditional fixed threshold methods.

[0121] Based on the defect heatmap, the coordinates of abnormal areas are obtained, and the optical characterization data of the defects at the corresponding locations are extracted for quantitative analysis. For each high-value area in the heatmap, its optical response mode is matched using a 5-scale feature pyramid (e.g., at the 50μm scale, warp breakage is characterized by a sharp drop in reflectance ≥12dB and the high-frequency gradient direction is consistent with the yarn direction; at the 1mm scale, stains show a specific wavelength absorption peak exceeding the standard value by 15%). At the same time, the significance of the features is verified by combining the spatial attention weight matrix. Then, the standard spectral database is called for spectral angle matching to calculate the spectral curve of the defect area and the standard defect curve. The similarity of the templates is calculated, and the core optical parameters of each defect are recorded, including transmittance, reflectance, and spectral feature similarity. Finally, the core optical parameters of each defect are compared with the process thresholds of the optical standard library of textile materials to generate a defect detection result table. Each record in the defect detection result table includes defect mark, center coordinates, core optical parameters, scale level association identifier, etc. This defect detection result table can be directly imported into the quality management system for defect tracing and process optimization, helping to quickly identify equipment or algorithm parameter problems, thereby solving the problem that existing technologies cannot locate the source of detection deviation when tracing defects.

[0122] Subsequently, the defect heatmap was gridded, dividing the fabric into 5mm×5mm detection units. The area ratio of high-value regions and the number of defects within each unit were statistically analyzed to generate a defect density distribution matrix. This matrix directly reflects the distribution of optical uniformity defects in the fabric. Simultaneously, three core parameters—defect size, defect type, and defect coordinates—were obtained from the defect detection results table. First, based on the multi-level detection results of the 5-scale feature pyramid, cross-scale pixel aggregation was performed on each confirmed defect region: starting from the highest resolution L1 layer, optically anomalous regions (such as consecutive pixel blocks with reflectance drops exceeding a threshold) were marked through connected component analysis. Then, spatially corresponding anomalous regions were searched in adjacent scale layers (L2-L5) (using a pyramid coordinate mapping algorithm to ensure cross-scale alignment). Next, a multi-scale fusion algorithm was used to accumulate the connected component pixels detected at each level according to their weights, while eliminating duplicate counts caused by differences in detection sensitivity at different scales (such as broken warp images already marked in L1 layer). (The calculation is not repeated at the L3 layer). Then, the physical size is converted according to the preset camera resolution parameters. For irregularly shaped defects, the minimum bounding rectangle algorithm is used to determine the feature size (major axis × minor axis). Finally, the defect size of each defect is output. Next, based on the optical characterization data of the defects, the spectral response value, reflection, absorption intensity change value and frequency domain energy distribution characteristics corresponding to each defect area are extracted (the high-frequency / mid-frequency energy ratio is obtained through wavelet analysis). Then, a pre-trained random forest classifier is applied to determine the type of defect, so as to obtain the accurate mapping between "optical features and defect type" and avoid the misjudgment of traditional single feature (such as only looking at grayscale) classification. Finally, the defect coordinates are obtained by mapping the heat map coordinates to the physical location of the fabric. Then, the defect impact index is obtained by weighted summation algorithm based on defect size, defect type and defect coordinates. The defect impact index is a quantitative indicator used to evaluate the degree of impact of defects on the overall fabric quality, which is used to lay the foundation for subsequent comprehensive risk assessment.

[0123] Finally, the defect density distribution matrix, defect type, and defect impact index are normalized: the defect density distribution is converted into a relative density value in the range of 0-1, the defect impact index is mapped to a numerical value according to the defect level, and the defect type weight is directly used as the coefficient. Then, the comprehensive risk value is calculated through a weighted fusion algorithm. At the same time, a spatial distribution correction factor is introduced, and an additional 20% risk weight is added to the continuously distributed defect areas (area > 10 mm²). The final output comprehensive risk value is compressed to the range of 0-1 by the Sigmoid function. This multi-dimensional risk assessment method can improve the accuracy of defect risk assessment and ensure that the risk values ​​of different batches and different fabrics are comparable, so as to solve the problem that the risk values ​​of existing technologies do not have a unified scale and cannot be compared horizontally in terms of quality levels.

[0124] In one embodiment, step S6, which generates graded response control information based on the quality quantification index, includes:

[0125] S61. Obtain the defect feature energy and defect diffusion rate based on the quality quantification index, and obtain the high-frequency noise energy based on the environmental interference data;

[0126] S62. Obtain the optical feature stability based on the high-frequency noise energy and the defect feature energy, and determine whether the optical feature stability is greater than the stability threshold.

[0127] S63. If the optical feature stability is greater than the stability threshold, then obtain the defect optical feature parameters according to the defect comprehensive characterization map.

[0128] S64. Obtain the fabric optical property reference library, and obtain the reflectance anomaly amplitude, transmittance gradient change amount and absorption peak offset amount according to the fabric optical property reference library and the optical characteristic parameters.

[0129] S65. Obtain the optical sensitivity level based on the anomalous reflectance amplitude, the transmittance gradient change, and the absorption peak offset.

[0130] S66. Obtain the graded response database, and obtain graded response control information based on the graded response database, the optical sensitivity level, and the defect diffusion rate.

[0131] As described in steps S61-S66 above, this invention obtains defect feature energy by integrating the pixel values ​​of defect areas (located by defect heatmaps) in the high-frequency texture feature map. Defect feature energy reflects the intensity of optical feature mutations caused by defects. Invalid optical signal energy caused by mechanical vibration and environmental interference is extracted from environmental interference data. After converting the time-domain vibration data into a frequency-domain energy distribution using a fast Fourier transform, the squares of the amplitudes of a preset high-frequency band (e.g., 50-1000Hz) are accumulated to obtain high-frequency noise energy. High-frequency noise energy quantifies the degree of contamination of the optical detection system by external interference. The ratio of high-frequency noise energy to defect feature energy is then calculated, and the difference between "1" and this ratio is calculated to obtain optical feature stability. Optical feature stability reflects the reliability of defect detection results under environmental interference; a higher value indicates a lower degree of contamination of effective optical features by high-frequency noise, and a more reliable detection result. This method transforms the "impact of environmental interference on detection results" into a quantifiable indicator, avoiding the ambiguity of traditional "subjective judgment of interference intensity." It then compares the optical feature stability with a stability threshold. If the optical feature stability is less than the stability threshold, the current optical signal is deemed unreliable, requiring a re-inspection. This involves rapidly switching the imaging module to three characteristic wavelengths (e.g., 450nm blue light, 550nm green light, and 850nm near-infrared) to cover the main optical response bands of the fabric, obtaining new optical response data. Multispectral complementarity can identify defects that are difficult to detect with a single wavelength, thus solving the problem of insufficient optical contrast for certain defects at specific wavelengths. The newly acquired optical response data replaces the original optical response data for subsequent steps, achieving a closed-loop control of "unreliable signal - automatic re-inspection - data replacement." If the optical feature stability is greater than the stability threshold, the current optical signal is deemed reliable. This method of accurately identifying signal reliability through stability indicators helps reduce the false judgment rate.

[0132] Then, the optical characteristic parameters of the defects are extracted from the defect detection result table. These parameters are key physical quantities used to quantify the differences in optical properties between defective and normal fabric areas. They include the reflectance, transmittance, and absorption peak wavelength of the defective area. Specifically, the reflectance is the percentage ratio of the intensity of reflected light to the intensity of incident light under specific wavelength illumination conditions, used to quantify the abnormal reflectance caused by defects (e.g., a broken warp defect significantly reduces reflectance due to yarn breakage). The transmittance is the ability of the defective area to transmit light of a specific wavelength, used to reflect changes in light transmittance caused by defects (e.g., a hole defect causes a sudden drop in transmittance due to structural defects). (Additional information) The absorption peak wavelength of the defect area refers to the characteristic wavelength position where the defective area absorbs light energy most strongly within a specific spectral band. It is used to characterize the characteristic absorption changes caused by pollutants or structural defects. Next, a fabric optical property benchmark library is obtained. This benchmark library refers to a dataset of optical parameters of defect-free fabric samples collected under standard laboratory conditions in multispectral bands (such as 450nm / 550nm / 850nm). It includes benchmark values ​​for reflectance, transmittance, and absorption peak wavelengths. The defective area reflectance, transmittance, and absorption peak wavelengths are then compared with the benchmark values ​​for reflectance, transmittance, and absorption peak wavelengths, respectively. The comparison yields the following: reflectance anomaly amplitude (the percentage absolute difference between the reflectance of the defective area and the baseline reflectance value at the same wavelength, used to quantify the degree of attenuation or enhancement of reflectivity caused by defects), transmittance gradient change (the maximum rate of change of transmittance of the defective area in the spatial dimension, reflecting the abrupt change in the transmittance characteristics at the defect boundary), and absorption peak shift (the absolute difference between the absorption peak wavelength of the defective area and the baseline absorption peak wavelength, directly characterizing the spectral feature shift caused by contaminants or chemical degradation). These three core indicators enable a comprehensive quantification of the differences in the optical properties of defects, avoiding the limitations of traditional single-parameter assessments (such as looking only at reflectance). This is then further analyzed through the first-level node of the decision tree. The system performs a coarse classification of defects based on their dominant optical characteristics: if the absorption peak shift is greater than 15nm, it is classified as oil stain; if the abnormal reflectance amplitude is greater than 25%, it is classified as broken warp; otherwise, if the transmittance gradient change is greater than 4%, it is classified as hole. Then, at the sub-level nodes, a dedicated fuzzy logic rule base is applied to each type of defect for reasoning to obtain the optical sensitivity level. The optical sensitivity level refers to the risk quantification index that classifies the defects based on the severity of their optical characteristics and their impact on product quality. This precise mapping method, which achieves "from parameter quantification to level classification", can ensure that the optical sensitivity level matches the actual quality impact of the defects.

[0133] Then, based on the coordinates of the abnormal region, optical flow calculations are performed on the boundary displacements of consecutive time frames (e.g., 10 frames per second) to obtain the pixel displacement of the defect region in the warp and weft directions (e.g., +5 pixels / frame in the X direction, +2 pixels / frame in the Y direction). This pixel displacement is then converted into a physical diffusion rate (e.g., 0.5 mm / s in the X direction, 0.2 mm / s in the Y direction) by combining real-time linear velocity. Finally, the defect diffusion rate is obtained through vector synthesis. Here, the defect diffusion rate refers to the physical expansion speed of the defect region on the fabric surface per unit time (e.g., per second). This method, which extends "static defect characteristics" to "dynamic diffusion trends," can provide a "timely" basis for production line control, avoiding the lag in traditional methods that only formulate control strategies based on static defects. Furthermore, a graded response database is acquired. This database is a rule base built based on textile production line process knowledge, used to correlate optical detection results with production line control strategies. The rule base stores the mapping relationship between optical sensitivity level, defect diffusion rate, and control parameters in tabular form. Then, optical sensitivity level and defect diffusion rate are input in real time. Based on the graded response database, the optimal control strategy is retrieved through interval matching to obtain graded response control information. The graded response control information includes JSON format control instructions for speed reduction ratio and light source adjustment parameters, thereby transforming abstract risk indicators into executable production line adjustment operations to achieve seamless connection between "detection-decision-control" and meet the real-time and standardization requirements of the production line.

[0134] This application also provides an intelligent fabric defect detection system based on AI visual recognition, including:

[0135] The data acquisition module is used to acquire optical response data of the fabric surface using visible light of a specific wavelength based on AI visual recognition, and to acquire motion state data and environmental interference data of the fabric based on sensors.

[0136] A motion correction module is used to obtain primary correction data based on the motion state data and the optical response data;

[0137] The parameter calibration module is used to perform dynamic optical parameter calibration on the primary correction data based on the environmental interference data to obtain optical feature enhancement data;

[0138] The defect analysis module is used to obtain fabric defect characterization data based on the optical feature enhancement data, wherein the fabric defect characterization data includes a high-frequency texture feature map and a comprehensive defect characterization map.

[0139] The detection and evaluation module is used to obtain quality quantification indicators based on the high-frequency texture feature map and the defect comprehensive characterization map, and to obtain a comprehensive risk value based on the quality quantification indicators.

[0140] The detection and control module is used to determine whether the comprehensive risk value is greater than a preset threshold;

[0141] If the overall risk value is not greater than the preset threshold, then the quality quantification index is output;

[0142] If the overall risk value is greater than a preset threshold, then graded response control information is generated based on the quality quantification index, and adjustment operations are performed on the textile production line based on the graded response control information. The graded response control information includes a speed reduction ratio and light source adjustment parameters.

[0143] In one embodiment, the motion correction module includes:

[0144] The motion sensing unit is used to obtain the fabric's motion speed parameters, fabric motion direction, and fabric motion cycle based on the motion state data, and to obtain the fabric's motion fuzzy length based on the motion speed parameters.

[0145] A fuzzy quantization unit is used to obtain the optical detection distance and the static fuzzy base value, and to obtain the optical fuzzy feature coefficients based on the optical detection distance, the static fuzzy base value and the motion fuzzy length;

[0146] A matrix construction unit is used to obtain a time-varying blur kernel matrix based on the optical blur feature coefficients and the fabric motion direction;

[0147] A subframe extraction unit is used to obtain an overlapping subframe sequence based on the optical response data and the fabric motion cycle.

[0148] A noise assessment unit is used to obtain a vibration sensitivity coefficient and to obtain dynamic noise parameters based on the vibration sensitivity coefficient and the motion speed parameters.

[0149] The noise suppression unit is used to acquire the defect feature response spectrum and acquire the denoised subframe sequence based on the defect feature response spectrum, the overlapping subframe sequence and the dynamic noise parameters.

[0150] The data correction unit is used to obtain a deblurred subframe sequence based on the motion speed parameters, the time-varying blur kernel matrix and the denoised subframe sequence, and to obtain primary correction data based on the fabric motion cycle and the deblurred subframe sequence.

[0151] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described intelligent fabric defect detection method based on AI visual recognition.

[0152] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, comprises the steps of an AI-based visual recognition-based intelligent fabric defect detection method.

[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0154] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0155] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An AI vision recognition-based fabric defect intelligent detection method, characterized in that, The method comprises the following steps: Based on AI visual recognition, specific wavelength visible light is used to obtain optical response data of the fabric surface, and motion state data and environmental interference data of the fabric are obtained by a sensor; Primary correction data is obtained according to the motion state data and the optical response data; wherein the primary correction data is obtained according to the motion state data and the optical response data, including: obtaining the motion speed parameter, the fabric motion direction and the fabric motion period of the fabric according to the motion state data, and obtaining the motion blur length of the fabric according to the motion speed parameter; obtaining the optical detection distance and the static blur base value, and obtaining the optical blur feature coefficient according to the optical detection distance, the static blur base value and the motion blur length; obtaining the time-varying blur kernel matrix according to the optical blur feature coefficient and the fabric motion direction; obtaining the overlapping sub-frame sequence according to the optical response data and the fabric motion period; obtaining the vibration sensitivity coefficient, and obtaining the dynamic noise parameter according to the vibration sensitivity coefficient and the motion speed parameter; obtaining the defect feature response spectrum, and obtaining the denoising sub-frame sequence according to the defect feature response spectrum, the overlapping sub-frame sequence and the dynamic noise parameter; obtaining the deblurring sub-frame sequence according to the motion speed parameter, the time-varying blur kernel matrix and the denoising sub-frame sequence, and obtaining the primary correction data according to the fabric motion period and the deblurring sub-frame sequence; The primary correction data is dynamically calibrated according to the environmental interference data to obtain optical feature enhancement data; Fabric defect characterization data is obtained according to the optical feature enhancement data, wherein the fabric defect characterization data includes high-frequency texture feature map and defect comprehensive characterization spectrum; Quality quantitative index is obtained according to the high-frequency texture feature map and the defect comprehensive characterization spectrum, and comprehensive risk value is obtained according to the quality quantitative index; It is judged whether the comprehensive risk value is greater than a preset threshold value; If the comprehensive risk value is not greater than the preset threshold value, the quality quantitative index is output; If the comprehensive risk value is greater than the preset threshold value, hierarchical response control information is generated according to the quality quantitative index, and adjustment operation is performed on the textile production line according to the hierarchical response control information, wherein the hierarchical response control information includes speed reduction ratio and light source adjustment parameter.

2. The AI vision recognition-based fabric defect intelligent detection method according to claim 1, characterized in that, The step of dynamically calibrating the primary correction data according to the environmental interference data to obtain optical feature enhancement data comprises the following steps: Mechanical vibration parameters and environmental illumination parameters are obtained according to the environmental interference data; Calibration conversion coefficients are obtained, and reflectivity fluctuation prediction values are obtained according to the calibration conversion coefficients and the mechanical vibration parameters; Optical detection reference parameters are obtained, and the primary correction data is phase-sensitive demodulation processed according to the optical detection reference parameters and the reflectivity fluctuation prediction values to obtain anti-interference reflectivity distribution matrix; Dynamic light disturbance and spectral shift are obtained according to the environmental illumination parameters, and dynamic compensation coefficient and wavelength compensation coefficient are obtained according to the dynamic light disturbance, the spectral shift and the optical detection reference parameters; According to the anti-interference reflectivity distribution matrix, the dynamic compensation coefficient and the wavelength compensation coefficient, the primary correction data is fused with optical characteristics to obtain optical characteristic enhancement data.

3. The AI vision recognition-based fabric defect intelligent detection method according to claim 1, characterized in that, The step of obtaining fabric defect characterization data according to the optical characteristic enhancement data comprises: According to the optical characteristic enhancement data, the RGB value of each pixel point is obtained. An optical characteristic-noise correlation database and a fabric reference spectrum are obtained. A minimum defect detection size is obtained, and an optical characteristic component is obtained according to the RGB value of each pixel point, the fabric reference spectrum and the minimum defect detection size. According to the optical characteristic-noise correlation database and the optical characteristic component, an optimized characteristic component is obtained, wherein the optimized characteristic component comprises a base reflection component, an abnormal absorption component and a high-frequency scattering noise component. According to the fabric reference spectrum and the abnormal absorption component, a high-frequency texture feature map is obtained, and according to the base reflection component, the abnormal absorption component and the high-frequency scattering noise component, a defect comprehensive characterization map is obtained.

4. The AI vision recognition-based fabric defect intelligent detection method according to claim 1, characterized in that, The step of obtaining a quality quantization index according to the high-frequency texture feature map and the defect comprehensive characterization map, and obtaining a comprehensive risk value according to the quality quantization index comprises: According to the high-frequency texture feature map, an optical signal difference value of each pixel point is obtained, and according to the optical signal difference value, an attention weight matrix and the defect comprehensive characterization map, a defect heat map is obtained. According to the defect heat map, defect optical characterization data is obtained, and according to the defect optical characterization data, a defect detection result table is obtained. The defect heat map and the defect detection result table are taken as the quality quantization index. According to the defect heat map, a defect density distribution matrix is obtained, and according to the defect density distribution matrix and the defect comprehensive characterization map, a defect size, a defect type and a defect coordinate are obtained. According to the defect size, the defect type and the defect coordinate, a defect influence index is obtained, and according to the defect density distribution matrix, the defect type and the defect influence index, a comprehensive risk value is obtained.

5. The AI vision recognition-based fabric defect intelligent detection method according to claim 1, characterized in that, The step of generating a hierarchical response control information according to the quality quantization index comprises: According to the quality quantization index, a defect feature energy and a defect diffusion rate are obtained, and according to the environmental interference data, a high-frequency noise energy is obtained. According to the high-frequency noise energy and the defect feature energy, an optical characteristic stability is obtained, and it is judged whether the optical characteristic stability is greater than a stability threshold value. If the optical characteristic stability is greater than the stability threshold value, a defect optical characteristic parameter is obtained according to the defect comprehensive characterization map. A fabric optical property reference library is obtained, and according to the fabric optical property reference library and the optical characteristic parameter, a reflectivity abnormal amplitude, a light transmittance gradient change amount and an absorption peak shift amount are obtained. According to the reflectivity abnormal amplitude, the light transmittance gradient change amount and the absorption peak shift amount, an optical sensitivity level is obtained. A hierarchical response database is obtained, and according to the hierarchical response database, the optical sensitivity level and the defect diffusion rate, hierarchical response control information is obtained.

6. An AI vision recognition-based fabric defect intelligent detection system, characterized in that, Comprise: The data acquisition module is configured to acquire optical response data of a fabric surface based on AI visual recognition and specific wavelength visible light, and to acquire motion state data and environmental interference data of the fabric based on a sensor; The motion correction module is configured to acquire primary correction data based on the motion state data and the optical response data; Specifically, the motion correction module includes: a motion sensing unit configured to acquire a motion speed parameter, a fabric motion direction, and a fabric motion period of the fabric based on the motion state data, and to acquire a motion blur length of the fabric based on the motion speed parameter; a blur quantization unit configured to acquire an optical detection distance and a static blur base value, and to acquire an optical blur feature coefficient based on the optical detection distance, the static blur base value, and the motion blur length; a matrix construction unit configured to acquire a time-varying blur kernel matrix based on the optical blur feature coefficient and the fabric motion direction; a sub-frame intercepting unit configured to acquire an overlapping sub-frame sequence based on the optical response data and the fabric motion period; a noise evaluation unit configured to acquire a vibration sensitivity coefficient, and to acquire a dynamic noise parameter based on the vibration sensitivity coefficient and the motion speed parameter; a noise suppression unit configured to acquire a defect feature response spectrum, and to acquire a de-noised sub-frame sequence based on the defect feature response spectrum, the overlapping sub-frame sequence, and the dynamic noise parameter; and a data correction unit configured to acquire a de-blurring sub-frame sequence based on the motion speed parameter, the time-varying blur kernel matrix, and the de-noised sub-frame sequence, and to acquire the primary correction data based on the fabric motion period and the de-blurring sub-frame sequence. The parameter calibration module is configured to perform dynamic optical parameter calibration on the primary correction data based on the environmental interference data to obtain optical feature enhancement data. The defect analysis module is configured to acquire fabric defect characterization data based on the optical feature enhancement data, wherein the fabric defect characterization data includes a high-frequency texture feature map and a defect comprehensive characterization spectrum. The detection evaluation module is configured to acquire a quality quantization index based on the high-frequency texture feature map and the defect comprehensive characterization spectrum, and to acquire a comprehensive risk value based on the quality quantization index. The detection regulation module is configured to determine whether the comprehensive risk value is greater than a preset threshold. If the comprehensive risk value is not greater than the preset threshold, the quality quantization index is output. If the comprehensive risk value is greater than the preset threshold, hierarchical response control information is generated based on the quality quantization index, and an adjustment operation is performed on a textile production line based on the hierarchical response control information, wherein the hierarchical response control information includes a speed reduction ratio and a light source adjustment parameter. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Online quality detection system and method for hollow sunshade product based on target detection

    CN117635603A