Search

CN-121998917-A - Textile fabric flaw detection method and system based on image recognition

CN121998917ACN 121998917 ACN121998917 ACN 121998917ACN-121998917-A

Abstract

The invention relates to the technical field of textile fabric detection, in particular to a textile fabric flaw detection method and system based on image recognition, wherein the detection method comprises the following steps of S1, collecting multi-frame linear array images of a textile fabric to be detected, S2, generating residual vectors, S3, generating model residual, S4, generating standardized residual, S5, identifying flaw candidate signals, S6, judging true flaws and outputting the true flaws when consistency conditions are met, and decoupling complex texture interference by establishing dynamic low-rank factor modeling on-line tracking and filtering time-varying fixed stripe noise, and verifying precise capturing flaw signals by spatial pre-whitening and local variance standardization, so that the problems that fixed stripe noise drift is difficult to inhibit, complex texture and noise coupling cause serious false leakage detection under narrow-band imaging are solved, and finally, the composite beneficial effects of high real-time performance, high detection rate and low false alarm rate are synchronously realized under the condition of a high-speed production line.

Inventors

  • CHEN YANG
  • HU YUFENG
  • YANG XIAOLONG

Assignees

  • 常州莱仕德纺织有限公司

Dates

Publication Date
20260508
Application Date
20260108

Claims (9)

  1. 1. The textile fabric flaw detection method based on image recognition is characterized by comprising the following steps of: s1, acquiring multi-frame linear array images of textile fabric to be detected, dividing the multi-frame linear array images to generate a plurality of image blocks, and constructing an image block set; S2, performing dimension reduction and spatial pre-whitening on the image block feature set to generate residual vectors based on the features of each image block in the image block set to form the image block feature set; S3, constructing and updating a low-rank model representing fixed-mode stripe noise through robust factorization based on residual vectors of the multi-frame linear array image, denoising the residual vectors of the current frame through the low-rank model, and generating model residual; s4, carrying out local noise variance standardization processing on the model residual error to generate a standardized residual error; S5, carrying out abnormal mutation detection based on sparse constraint on the standardized residual error, and identifying flaw candidate signals; s6, performing time sequence verification based on the flaw candidate signals of the continuous multi-frame, and judging the flaw to be a true flaw and outputting the true flaw when the consistency condition is met.
  2. 2. The method for detecting the defects of the textile fabric based on the image recognition of claim 1, wherein in S1, a plurality of image blocks are generated by dividing a multi-frame linear array image, and an image block set is constructed as follows: S11, uniformly dividing the linear array image into initial areas with corresponding numbers according to the preset target number of image blocks, taking the average space coordinates of all pixels in each initial area as a space position characteristic value of a clustering center, and taking an average color vector as a color characteristic value of the clustering center to finish the initialization of the clustering centers with the target number; S12, calculating the comprehensive distance between each pixel in the linear array image and each clustering center, and distributing each pixel to the closest clustering center, wherein the comprehensive distance is determined by the weighted combination of the distance between the pixel and the clustering center in a color space and the Euclidean distance in an image space; s13, recalculating the spatial position characteristic value and the color characteristic value of each clustering center according to all pixels distributed to each clustering center, and generating an iterated clustering center; S14, based on the iterative clustering center, returning to execute S12 to S13 until convergence conditions are met; s15, defining all pixels associated with each cluster center after meeting convergence conditions as a final image block, wherein all the image blocks form the image block set; The meeting the convergence condition is that the position change of the clustering center is smaller than a preset threshold value or the maximum iteration number is reached.
  3. 3. The method for detecting the defects of the textile fabric based on the image recognition of claim 2, wherein in S2, based on the characteristics of each image block in the image block set, an image block characteristic set is formed, the image block characteristic set is subjected to dimension reduction and spatial pre-whitening treatment, and residual vectors are generated as follows: S21, extracting a spatial position characteristic value and a color characteristic value of each image block based on each image block in the image block set, and combining the spatial position characteristic value and the color characteristic value of each image block into a first characteristic vector; S22, multiplying each first feature vector in the image block feature set by a preset random projection matrix to generate a corresponding low-dimensional projection feature vector, wherein all projection feature vectors form a projection feature set and form projection features of a current frame line image; S23, calculating the projection characteristic set based on the current frame linear array image and the projection characteristic set of the previous frame linear array image by an autoregressive prediction method to generate a predicted value of the projection characteristic of the current frame, and subtracting the projection characteristic set corresponding to the current frame linear array image from the predicted value to generate a residual vector.
  4. 4. The method for detecting the textile fabric flaws based on the image recognition of claim 3, wherein in S3, a low-rank model representing fixed pattern stripe noise is constructed and updated by robust factorization based on residual vectors of multi-frame linear array images as follows: S31, constructing an original residual vector based on residual vectors of multi-frame linear array images, generating a sample covariance matrix, performing feature decomposition on the sample covariance matrix, and constructing a low-rank factor matrix; S32, for the residual vector of the current frame, generating a steady reconstruction error based on the low-rank factor matrix, minimizing iteration on the steady reconstruction error, and generating a column vector of the iterated low-rank factor matrix and a coefficient corresponding to the column vector; And S33, performing linear projection and reconstruction on the residual vector of the current frame based on the updated low-rank factor matrix to generate a reconstructed vector, and subtracting the original residual vector from the reconstructed vector to generate a model residual.
  5. 5. The method for detecting defects of textile fabric based on image recognition as set forth in claim 4, wherein in S4, the model residual is subjected to local noise variance normalization processing to generate a normalized residual as follows: s41, generating a model residual image based on the model residual of each image block; S42, based on the model residual image, presetting a sliding window with a fixed size by taking each pixel as a central pixel, and calculating standard deviation of model residual values of all pixels in the sliding window as a local noise standard deviation estimated value of the central pixel position for each sliding window; S43, calculating the average value of the local noise standard deviation estimated values according to the local noise standard deviation estimated values of all pixels of the pixel area covered by each image block, and taking the average value as the final local noise standard deviation of the image block; s44, dividing the model residual value of each image block by the corresponding final local noise standard deviation to generate a standardized residual of the image block.
  6. 6. The method for detecting defects of textile fabric based on image recognition as set forth in claim 5, wherein in S5, abnormal mutation detection based on sparse constraint is performed on the normalized residual error, and defect candidate signals are identified as follows: s51, constructing a signal sequence based on standardized residuals of a plurality of continuous image blocks, and decomposing the signal sequence into a sparse differential sequence and a smooth background trend; S52, detecting elements with absolute values exceeding a preset first threshold value in the sparse differential sequence, recording the image block positions corresponding to the elements as candidate mutation points, and constructing a candidate mutation point set; S53, based on each position in the candidate mutation point position set, extracting standardized residual values of a plurality of image blocks in a neighborhood of the candidate mutation point position set to construct a local sample vector; and S54, when the Hotelling statistic is judged to be larger than the second threshold, judging that a flaw candidate signal exists.
  7. 7. The method for detecting defects of textile fabric based on image recognition as set forth in claim 6, wherein in S6, time sequence verification is performed based on the defect candidate signals of consecutive multiframes, and when the consistency condition is satisfied, the defect candidate signals are judged to be true defects and are output as follows: s61, constructing a space-time signal set based on flaw candidate signals of continuous multiframes; s62, carrying out space-time consistency analysis on the space-time signal set to generate a signal mode of continuous multiframe continuous appearance in a space position; s63, when the signal mode meets the preset persistence and consistency conditions, judging that the signal mode corresponds to a real flaw; s64, generating and outputting the positioning information of the real flaw.
  8. 8. The method for detecting the defects of the textile fabric based on image recognition of claim 7, wherein the persistence and consistency conditions are that if and only if a certain spatial area is in a continuous N frame, the signal positions of the spatial area are all within a preset tolerance range, and the true defects exist in the area, wherein the value range of N is 5 to 10, and the preset tolerance range is a square area with a target position as the center and 2 to 5 pixels on the side.
  9. 9. A textile fabric flaw detection system based on image recognition, which adopts the textile fabric flaw detection method based on image recognition as claimed in any one of claims 1 to 8, and is characterized by comprising: the image dividing module is used for collecting multi-frame linear array images of the textile fabric to be detected, dividing the multi-frame linear array images to generate a plurality of image blocks and constructing an image block set; the system comprises an image block feature set, a dimension reduction whitening module, a residual vector generation module, a dimension reduction and spatial pre-whitening module and a processing module, wherein the dimension reduction whitening module is used for reducing dimension and spatial pre-whitening of the image block feature set based on the features of each image block in the image block set to form the image block feature set; The factor denoising module is used for constructing and updating a low-rank model representing fixed-mode stripe noise through robust factor decomposition based on residual vectors of the multi-frame linear array image, denoising the residual vectors of the current frame through the low-rank model, and generating model residual; the noise standardization module is used for carrying out local noise variance standardization processing on the model residual error and generating a standardized residual error; the sparse detection module is used for carrying out abnormal mutation detection on the standardized residual errors based on sparse constraint and identifying flaw candidate signals; And the time sequence verification module is used for performing time sequence verification based on the flaw candidate signals of the continuous multiframes, judging the flaw to be a true flaw when the consistency condition is met, and outputting the flaw.

Description

Textile fabric flaw detection method and system based on image recognition Technical Field The invention relates to the technical field of textile fabric detection, in particular to a textile fabric flaw detection method and system based on image recognition. Background In the field of online flaw detection of textile fabrics, industrial linear cameras are widely used due to their high resolution and high scanning rate. However, when the detection system uses a narrow-band light source such as blue light for illumination, an inherent technical bottleneck is greatly amplified, namely, small non-uniformity in quantum efficiency among pixels of the camera sensor exists. In broadband white light, this non-uniformity is not apparent due to spectral averaging effects, but in narrow-band light, the difference in the efficiency with which photons of a particular wavelength are converted into electrical signals is pronounced, manifesting as bright-dark streak noise across the image frame, fixed in position and mode, on the imaging result. This noise does not occur randomly, but rather is fixed pattern noise, which is determined by the physical characteristics of the sensor, severely interfering with the identification of real fabric imperfections. To eliminate such fixed fringes, conventional industrial vision systems commonly employ a flat field correction method that acquires a uniform whiteboard image in a sample-free state as a reference frame, and divides the actual image acquired later by the reference frame to compensate for the difference in response of each pixel. In fact, in a production environment, the camera sensor temperature may drift, the light source may decay with time, and the fabric running tension may change, which factors together result in slow dynamic drift of the intensity and relative position of the fixed stripe noise. The one-time calibrated whiteboard reference frame cannot track this drift, resulting in rapid degradation of the correction effect with run time, and residual streak noise remains strong. In the face of a fabric with complex periodic texture, the fixed stripe noise appears as a specific frequency component in the frequency domain, while the texture pattern of the complex fabric is also rich in strong frequency characteristics. Both are susceptible to coupling and aliasing over the frequency spectrum. The traditional mode of suppressing stripe noise can always erase texture details with similar frequency at the same time, so that real tiny flaws are missed, while the reserved texture details can misjudge the stripe noise as a part of the fabric pattern or directly misdetect the stripe noise as flaws, so that alarm is frequently sent out. Disclosure of Invention In order to solve the technical problems in the background art, the invention provides a textile fabric flaw detection method and system based on image recognition, and the specific scheme is as follows: a textile fabric flaw detection method based on image recognition comprises the following steps: s1, acquiring multi-frame linear array images of textile fabric to be detected, dividing the multi-frame linear array images to generate a plurality of image blocks, and constructing an image block set; S2, performing dimension reduction and spatial pre-whitening on the image block feature set to generate residual vectors based on the features of each image block in the image block set to form the image block feature set; S3, constructing and updating a low-rank model representing fixed-mode stripe noise through robust factorization based on residual vectors of the multi-frame linear array image, denoising the residual vectors of the current frame through the low-rank model, and generating model residual; s4, carrying out local noise variance standardization processing on the model residual error to generate a standardized residual error; S5, carrying out abnormal mutation detection based on sparse constraint on the standardized residual error, and identifying flaw candidate signals; s6, performing time sequence verification based on the flaw candidate signals of the continuous multi-frame, and judging the flaw to be a true flaw and outputting the true flaw when the consistency condition is met. Further, in S1, the multi-frame linear array image is divided to generate a plurality of image blocks, and an image block set is constructed as follows: S11, uniformly dividing the linear array image into initial areas with corresponding numbers according to the preset target number of image blocks, taking the average space coordinates of all pixels in each initial area as a space position characteristic value of a clustering center, and taking an average color vector as a color characteristic value of the clustering center to finish the initialization of the clustering centers with the target number; S12, calculating the comprehensive distance between each pixel in the linear array image and each clustering center, and distributin