Textile quality detection method fusing multi-scale features

Through multi-scale decomposition and feature fusion technology, the multi-scale characteristics and brightness characteristics of textiles are extracted, and the impact of textile torsion deformation and brightness changes on detection is solved, and a comprehensive quantitative evaluation and automatic detection of textile quality is achieved.

CN119444670AActive Publication Date: 2025-02-14IFLYTEK SOUTH CHINA ARTIFICIAL INTELLIGENCE RES INST GUANGZHOU CO LTD

Patent Information

Application Number
CN202411395736.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-14
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

Textiles are prone to twisting and deformation during production and testing, resulting in the failure of traditional feature extraction methods and affecting the accuracy of testing. At the same time, the brightness changes of textiles also affect the detection results, and it is difficult for the prior art to effectively integrate multi-scale features and brightness features.

Method used

Multi-scale decomposition technology is used to extract multi-scale feature vectors of textiles, calculate the invariant moment to obtain torsional feature descriptors, construct a grayscale symbiosis matrix to extract brightness features, calculate the correlation coefficients between features, and fuse the torsional area features and brightness dynamic range features. Form a comprehensive feature vector.

Benefits of technology

Automatic detection and quantitative evaluation of textile torsion and brightness defects is realized, and effective technical means for textile quality control is provided, which can adapt to the torsional deformation and brightness changes of textiles while ensuring the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444670A_ABST
    Figure CN119444670A_ABST
Patent Text Reader

Abstract

The invention provides a multi-scale feature fused textile quality detection method, which comprises the following steps of: aiming at multi-scale feature representation, obtaining a torsion angle and a torsion direction feature descriptor which are kept unchanged under image rotation transformation by calculating an invariant moment of a feature vector, and generating a multi-scale torsion feature vector; calculating a correlation coefficient between the torsion frequency and the torsion density in the multi-scale torsion feature vector and the brightness gradient and the brightness change rate in the brightness feature vector, and determining the correlation degree of the torsion feature and the brightness feature; according to the comprehensive feature vector, a support vector machine classifier is adopted to classify the textile image, and whether a defect area with an abnormal torsion area or an abnormal brightness dynamic range exists in the textile is judged; and in the defect area, local features of a torsion angle, a torsion amplitude, average brightness and brightness contrast are extracted, the torsion degree and the brightness abnormal degree of the defect area are judged through threshold comparison, and quantitative description of the defect is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a textile quality detection method integrating multi-scale features. Background Art

[0002] In the process of textile quality inspection, there is a complex technical challenge. Textiles often undergo torsional deformation to varying degrees during production and inspection. This deformation will cause the traditional feature extraction method to fail, thus affecting the accuracy of detection. At the same time, the surface texture, shape, and brightness of textiles will show different performances under different torsion states, which further increases the difficulty of feature extraction. In addition, since the brightness change of textiles will also affect the detection results, it is also necessary to effectively integrate the brightness features with multi-scale features. However, in practical applications, these requirements are often contradictory. Improving the torsional invariance of the feature may reduce its sensitivity to subtle texture changes; while enhancing the adaptability to brightness changes may affect the extraction accuracy of shape features. How to find a balance between these mutually restrictive factors requires a feature extraction method that can adapt to torsional deformation and accurately capture texture, shape, and brightness information. This is the core technical problem faced. Summary of the invention

[0003] The present invention provides a textile quality detection method integrating multi-scale features, which mainly includes:

[0004] Perform multi-scale decomposition on textile images, obtain image features at different scales, extract multi-scale feature vectors containing texture and shape information, and obtain multi-scale feature representations that reflect the structural characteristics of textile torsion period, torsion amplitude and torsion morphology at different scales;

[0005] For multi-scale feature representation, by calculating the invariant moment of the feature vector, the torsion angle and torsion direction feature descriptors that remain unchanged under image rotation transformation are obtained, and a multi-scale torsion feature vector is generated;

[0006] Construct a gray-level co-occurrence matrix, extract statistical features reflecting brightness distribution from textile images, calculate the energy, contrast, and correlation statistics of the gray-level co-occurrence matrix, and obtain the brightness feature vector that characterizes the average brightness, brightness contrast, and brightness uniformity of the textiles.

[0007] Calculate the correlation coefficient between the torsion frequency and torsion density in the multi-scale torsion feature vector and the brightness gradient and brightness change rate in the brightness feature vector to determine the correlation between the torsion feature and the brightness feature;

[0008] Based on the correlation between the multi-scale torsion feature vector and the brightness feature vector, the main feature components of the torsion region feature in the multi-scale torsion feature vector and the brightness dynamic range feature in the brightness feature vector are selected and fused to form a comprehensive feature vector.

[0009] Based on the comprehensive feature vector, the support vector machine classifier is used to classify the textile image to determine whether the textile has defective areas with abnormal torsion area or abnormal brightness dynamic range;

[0010] In the defect area, the local features of torsion angle, torsion amplitude, average brightness, and brightness contrast are extracted. The degree of torsion and abnormal brightness of the defect area are determined by threshold comparison to obtain a quantitative description of the defect.

[0011] The torsion characteristics and brightness characteristics of the defective area are comprehensively considered to calculate the comprehensive quality score of the defective area, and a quantitative evaluation result reflecting the local quality of the textile is obtained. Combined with the comprehensive quality scores of each defective area, the overall quality evaluation score of the textile is obtained to comprehensively evaluate the quality of the textile.

[0012] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0013] The invention discloses a textile quality detection method integrating multi-scale features. The method extracts a multi-scale feature vector containing texture and shape information by multi-scale decomposition of a textile image, and obtains a multi-scale feature representation reflecting a torsion feature. At the same time, a grayscale co-occurrence matrix is ​​constructed to extract a brightness feature vector, and the correlation between the torsion feature and the brightness feature is calculated. Based on the correlation between the torsion feature and the brightness feature, a dimension reduction process is performed on the torsion region feature in the multi-scale torsion feature and the brightness dynamic range feature in the brightness feature, and the main feature components are selected. The torsion region feature and the brightness dynamic range feature are integrated to form a comprehensive feature vector, which contains both local torsion change information of the textile image and overall brightness dynamic range information, thereby achieving a comprehensive characterization of the textile quality. A support vector machine classifier is used to determine whether there is a defective area. Local features are extracted in the defective area, and the degree of torsion and the degree of brightness abnormality are determined by threshold comparison to obtain a quantitative description of the defect. Finally, the quality scores of each defective area are combined to obtain the overall quality evaluation result of the textile. The invention realizes automatic detection and quantitative evaluation of torsion and brightness defects of textiles, and provides an effective technical means for textile quality control. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 The present invention is a flowchart of a textile quality detection method integrating multi-scale features.

[0015] Figure 2A schematic diagram of a textile quality detection method integrating multi-scale features according to the present invention.

[0016] Figure 3 It is another schematic diagram of a textile quality detection method integrating multi-scale features according to the present invention. DETAILED DESCRIPTION

[0017] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] like Figure 1 -3. In this embodiment, a textile quality detection method integrating multi-scale features may specifically include:

[0019] Step S101, performing multi-scale decomposition on the textile image, obtaining image features at different scales, extracting multi-scale feature vectors containing texture and shape information, and obtaining multi-scale feature representations reflecting the structural characteristics of the textile torsion period, torsion amplitude and torsion morphology at different scales.

[0020] The textile image is decomposed into multiple scales by using discrete wavelet transform to obtain the approximate coefficient and detail coefficient of the textile image at different scales. The grayscale co-occurrence matrix features of each scale sub-image are calculated according to the approximate coefficient and detail coefficient to obtain the texture features; at the same time, the edge direction histogram and Zernike moment features of the sub-image are extracted to obtain the shape features. The texture features and shape features are combined by using the feature cascade method to form a high-dimensional feature vector containing multi-scale information. If the dimension of the high-dimensional feature vector is higher than the preset requirement, the principal component analysis method is used to reduce the dimension of the high-dimensional feature vector to obtain the final multi-scale feature representation. Based on the multi-scale feature representation, a support vector machine regression model is constructed, and the regression model is used to predict the torsion period, torsion amplitude and torsion morphological parameters of the textile.

[0021] Specifically, the discrete wavelet transform is used to perform multi-scale decomposition on the textile image, and the Daubechies wavelet basis function is used to decompose the original image into approximate coefficients and detail coefficients of three scales, so as to obtain the image features of the textile at different scales. For the decomposed sub-images, the energy, contrast, correlation and entropy of the gray-level co-occurrence matrix are calculated as texture features for each scale of the sub-image; at the same time, the edge direction histogram and Zernike moment are extracted as shape features to obtain a multi-scale feature vector containing texture and shape information. The feature cascade method is used to combine the texture features and shape features extracted at different scales in sequence to form a high-dimensional feature vector. Then, the principal component analysis method is used to reduce the dimension of the feature vector, retaining the principal components with an explained variance ratio of 95%, and obtaining the final multi-scale feature representation, which reflects the structural characteristics of the torsion period, torsion amplitude and torsion morphology of the textile at different scales. Based on the multi-scale feature representation, a regression model based on support vector machine is designed to predict the torsion period, torsion amplitude and torsion morphology parameters of the textile respectively. The most representative feature subset is selected from the high-dimensional feature vector to construct a low-dimensional feature representation reflecting the torsion characteristics of the textile. When performing multi-scale decomposition on textile images, the discrete wavelet transform method is used, and the Daubechies4 wavelet basis function is selected to decompose the original image of 512×512 pixels into approximate coefficients and detail coefficients of three scales. For each sub-image of each scale, the energy, contrast, correlation and entropy of the gray-level co-occurrence matrix are calculated as texture features, where the gray level is set to 8, the directions are 0°, 45°, 90°, 135°, and the distance is 1 pixel. At the same time, the edge direction histogram and Zernike moment are extracted as shape features. The edge direction histogram uses 8 direction bins, and the Zernike moment order is set to 4. The texture features and shape features extracted at different scales are combined in sequence to form a 256-dimensional high-dimensional feature vector. The principal component analysis method is used to reduce the dimension of the feature vector, retaining the principal component with a variance explanation ratio of 95%, and finally obtaining a 64-dimensional multi-scale feature representation. Based on the multi-scale feature representation, a regression model based on support vector machine was established, using radial basis kernel function, penalty parameter C set to 10, kernel parameter γ set to 0.1, to predict the torsion period, torsion amplitude and torsion morphological parameters of textiles respectively. The 32 most representative features were selected as a subset from the 64-dimensional feature vector to construct a low-dimensional feature representation reflecting the torsion characteristics of textiles.

[0022] Step S102 , for the multi-scale feature representation, by calculating the invariant moment of the feature vector, obtaining the torsion angle and torsion direction feature descriptors that remain unchanged under the image rotation transformation, and generating a multi-scale torsion feature vector.

[0023] The feature vector is converted into polar coordinate representation, and the amplitude spectrum and phase spectrum are obtained by Fourier transform. The torsion angle feature and the torsion direction feature are extracted according to the amplitude spectrum and the phase spectrum to obtain a preliminary feature descriptor. The Zernike moment algorithm is used to calculate the multi-order Zernike moment to construct the multi-order moment feature. If the multi-order moment feature meets the rotation invariance requirement, it is combined with the preliminary feature descriptor to generate a multi-scale torsion feature vector. The multi-scale torsion feature vector is subjected to minimum-maximum normalization processing to obtain a standardized multi-scale torsion feature vector. Determining whether the standardized multi-scale torsion feature vector meets the rotation invariance requirement includes: performing multi-angle rotation on the original image; extracting the feature vector at each rotation angle; calculating the Euclidean distance between the original feature vector and the feature vector at each rotation angle; if all distance values ​​are less than a preset threshold, it is determined that the standardized multi-scale torsion feature vector meets the rotation invariance requirement.

[0024] Specifically, for multi-scale feature representation, the polar coordinate Fourier transform is used to process the feature vector. First, the feature vector is converted into polar coordinate representation, and then its Fourier transform is calculated to obtain the amplitude spectrum and phase spectrum. The rotation-invariant torsion angle feature is extracted from the amplitude spectrum, and the torsion direction feature is extracted from the phase spectrum, and the combination forms a preliminary feature descriptor. The Zernike moment algorithm is used to further extract the rotation-invariant feature. For the feature image of each scale, the 3rd, 5th, and 7th order Zernike moments are calculated to construct multi-order moment features. These features are combined with the preliminary feature descriptor to generate a complete multi-scale torsion feature vector, which contains the torsion angle and torsion direction information of the textile at different scales. The generated multi-scale torsion feature vector is normalized, and the eigenvalue is mapped to the range of 0-1 by the minimum-maximum normalization method to obtain a standardized multi-scale torsion feature vector. The rotation consistency test method is used to verify the rotation invariance of the standardized multi-scale torsion feature vector. First, the original image is rotated by 0°, 90°, 180°, and 270°, and the feature vectors at each rotation angle are extracted. Then the Euclidean distance between the original feature vector and each rotation angle feature vector is calculated. If all distance values ​​are less than the preset threshold value of 0.01, it is determined that the extracted features meet the rotation invariance requirement. For the 512×512 pixel textile image, it is first converted into polar coordinate representation and processed by polar coordinate Fourier transform. In the calculated amplitude spectrum, the first 10 low-frequency components are selected as the torsion angle features, and the first 5 high-frequency components are extracted from the phase spectrum as the torsion direction features, which are combined to form a 16-dimensional preliminary feature descriptor. Then, the Zernike moment is calculated for the feature image of each scale, and the 3rd, 5th, and 7th order moments are selected to obtain 20 moment features. These 20 moment features are combined with the 16-dimensional preliminary feature descriptor to generate a 36-dimensional multi-scale torsion feature vector. The feature vector is subjected to minimum-maximum normalization processing, and the feature value is mapped to the range of 0-1. To verify the rotation invariance, the original 512×512 pixel image is rotated by 0°, 90°, 180°, and 270°, and 36-dimensional feature vectors are extracted respectively. The Euclidean distance between the original feature vector and each rotation angle feature vector is calculated to obtain 4 distance values. If these 4 distance values ​​are all less than the preset threshold value 0.01, it is determined that the extracted features meet the rotation invariance requirement.

[0025] Step S103, constructing a gray level co-occurrence matrix, extracting statistical features reflecting brightness distribution from the textile image, calculating the energy, contrast, and correlation statistics of the gray level co-occurrence matrix, and obtaining a brightness feature vector representing the average brightness, brightness contrast, and brightness uniformity of the textile.

[0026] A textile color image is obtained, and the red, green and blue channels of the color image are converted into a single-channel grayscale image by using a weighted average method to obtain a textile image matrix; a grayscale co-occurrence matrix is ​​constructed according to the textile image matrix, and the grayscale co-occurrence matrix is ​​obtained by counting the occurrence frequency of grayscale values ​​of adjacent pixel pairs in each direction of each pixel point; for the grayscale co-occurrence matrix in each direction, three statistics of energy, contrast and correlation of each matrix are calculated, wherein the energy is obtained by calculating the sum of squares of matrix elements, the contrast is obtained by calculating the second moment of the difference matrix, and the correlation is obtained by calculating the covariance between the grayscale value and its average value; the arithmetic mean of the statistical results in each direction is taken to obtain the final energy, contrast and correlation statistics; the maximum and minimum normalization method is used to map the three statistics to the range of 0-1, and a final three-dimensional brightness feature vector is generated, and the three-dimensional brightness feature vector contains the normalized average brightness, brightness contrast and brightness uniformity values.

[0027] Specifically, the grayscale information is extracted from the color image of the textile, and the red, green and blue channels are converted into a single-channel grayscale image using the weighted average method. The weights are 0.299 for red, 0.587 for green and 0.114 for blue, respectively, to obtain a textile image matrix with 256 grayscale levels. According to the grayscale textile image matrix, a grayscale co-occurrence matrix is ​​constructed. For each pixel, the adjacent pixels in the four directions of right, lower right, lower and lower left are considered, and the grayscale values ​​of these pixel pairs are counted to obtain the grayscale co-occurrence matrix in the four directions. For the constructed grayscale co-occurrence matrix in the four directions, the three statistics of energy, contrast and correlation of each matrix are calculated. The energy is obtained by calculating the sum of squares of the matrix elements, the contrast is obtained by calculating the second moment of the difference matrix, and the correlation is obtained by calculating the covariance between the grayscale value and its average value. Then the arithmetic mean of the results in the four directions is taken to obtain the final energy, contrast and correlation statistics. The energy is regarded as the average brightness index, the contrast is regarded as the brightness contrast index, and the correlation is regarded as the brightness uniformity index to form a three-dimensional brightness feature vector. The maximum and minimum normalization method is used to map these three eigenvalues ​​to the range of 0-1, and the final three-dimensional brightness eigenvector is generated, which contains the normalized average brightness, brightness contrast and brightness uniformity values. For a 1024x1024 pixel textile color image, it is first converted into a grayscale image. The weighted average method is used to multiply the red, green and blue channel values ​​of each pixel by weights 0.299, 0.587 and 0.114 respectively, and the grayscale value is summed up. In this way, a 1024x1024 grayscale matrix with a grayscale level of 256 is obtained. Then the grayscale co-occurrence matrix is ​​constructed, and the distance is 1 pixel and the directions are 0°, 45°, 90° and 135°. For each pixel, the frequency of occurrence of the grayscale value pairs of its adjacent pixels in the four directions is counted to obtain four 256x256 grayscale co-occurrence matrices. Then the statistics of each direction matrix are calculated, the energy is the square sum of the matrix elements, the contrast is the second moment of the difference matrix, and the correlation is the covariance between the grayscale value and its average value. Take the arithmetic average of the results in the four directions to get the final energy, contrast, and correlation values. Assume that the energy value is 0.85, the contrast is 0.45, and the correlation is 0.62. These three values ​​constitute the initial feature vector [0.85, 0.45, 0.62]. Finally, perform maximum and minimum value normalization. Assuming that the minimum values ​​of the three features are 0.5, 0.2, and 0.3, respectively, and the maximum values ​​are 0.9, 0.7, and 0.8, the normalized feature vector is [0.875, 0.5, 0.64]. This three-dimensional vector is the final brightness feature vector, which represents the normalized average brightness, brightness contrast, and brightness uniformity.

[0028] Step S104, calculating the correlation coefficient between the torsion frequency and torsion density in the multi-scale torsion feature vector and the brightness gradient and brightness change rate in the brightness feature vector, and determining the correlation degree between the torsion feature and the brightness feature.

[0029] A multi-scale torsion feature vector is obtained, and torsion frequency data and torsion density data are extracted from the multi-scale torsion feature vector; wherein the torsion frequency data is obtained by calculating the inverse of the torsion period, and the torsion density data is obtained by counting the number of torsion times within a unit area. According to the brightness feature vector, the Sobel operator is used to calculate the horizontal and vertical gradients of the image to obtain the brightness gradient; the brightness change rate is obtained by calculating the sum of the absolute values ​​of the brightness differences of adjacent pixels and dividing it by the total number of pixels. The torsion frequency, the torsion density, the brightness gradient, and the brightness change rate are combined into a 4-dimensional feature vector; for the 4-dimensional feature vector, the correlation coefficients between the features are calculated using the Pearson correlation coefficient algorithm to form a 4x4 correlation coefficient matrix. It is determined whether the absolute value of the non-diagonal elements in the correlation coefficient matrix is ​​greater than a preset threshold; if the absolute value of any non-diagonal element in the correlation coefficient matrix is ​​greater than the preset threshold, it is determined to be significantly correlated. According to the significantly correlated feature pairs, it is determined that there is an intrinsic connection between the quality of the textile and the corresponding feature; through the intrinsic connection, a quantitative analysis of the correlation between the torsion feature and the brightness feature is achieved.

[0030] Specifically, the torsion frequency and torsion density data are extracted from the multi-scale torsion feature vector. The torsion frequency data is analyzed in the time domain, and the inverse of the torsion period is calculated to obtain the frequency value; for the torsion density data, the number of torsion per unit area is counted. The brightness feature vector is processed, and the Sobel operator is used to calculate the horizontal and vertical gradients of the image, and then the gradient amplitude is calculated as the brightness gradient. The brightness change rate is obtained by calculating the sum of the absolute values ​​of the brightness differences of adjacent pixels and dividing it by the total number of pixels. The four features of torsion frequency, torsion density, brightness gradient, and brightness change rate are combined into a 4-dimensional feature vector. The Pearson correlation coefficient algorithm is used to calculate the correlation coefficients between the four features to form a 4x4 correlation coefficient matrix. The correlation coefficient threshold is set to 0.7. If the absolute value of any non-diagonal element in the correlation coefficient matrix is ​​greater than 0.7, it is judged to be significantly correlated. According to the significantly correlated feature pairs, it is determined that there is an intrinsic connection between the quality of the textile and the corresponding features. For a 1024x1024 pixel textile image, the torsion frequency and torsion density data are extracted from the multi-scale torsion feature vector. Through time domain analysis, it is found that the torsion period is 20 pixels, and the torsion frequency is calculated to be 0.05 times / pixel. Statistics show that there are an average of 25 torsions in each 100x100 pixel area, and the torsion density is 0.0025 times / pixel2. Apply a 3x3 Sobel operator to the brightness feature vector, calculate the horizontal and vertical gradients, and obtain the gradient amplitude matrix as the brightness gradient. The sum of the absolute values ​​of the brightness differences of adjacent pixels is calculated to be 5,242,880, divided by the total number of pixels 1,048,576, and the brightness change rate is 5. The torsion frequency of 0.05, the torsion density of 0.0025, the average brightness gradient of 50, and the brightness change rate of 5 are combined into a 4-dimensional feature vector [0.05, 0.0025, 50, 5]. The Pearson correlation coefficient algorithm is used to calculate the correlation coefficients between these four features and obtain a 4x4 correlation coefficient matrix. Assume that the correlation coefficient between torsion frequency and brightness gradient in the matrix is ​​0.82, and the correlation coefficient between torsion density and brightness change rate is 0.75, both exceeding the set threshold of 0.7. Therefore, it is determined that there is a significant correlation between torsion frequency and brightness gradient, torsion density and brightness change rate, and that there is an intrinsic connection between textile quality and these characteristics, providing quantitative data support for textile quality assessment.

[0031] Step S105 , based on the correlation between the multi-scale torsion feature vector and the brightness feature vector, main feature components of the torsion region feature in the multi-scale torsion feature vector and the brightness dynamic range feature in the brightness feature vector are selected and then fused to form a comprehensive feature vector.

[0032] According to the correlation coefficient matrix, the features with high correlation coefficients are assigned corresponding weights to obtain weighted multi-scale torsion features; the torsion region features in the weighted multi-scale torsion features are processed by the principal component analysis method, and the principal components with cumulative contribution rates reaching a preset threshold are selected as the main feature components to obtain the torsion region feature vector after dimensionality reduction; for the brightness dynamic range features in the brightness features, the wavelet transform is applied to extract the brightness change information at different scales, and the wavelet coefficients of the first N scales with the largest energy share are selected as the main feature components to form the brightness dynamic range feature vector after dimensionality reduction; the Euclidean distance between the torsion region feature vector after dimensionality reduction and the brightness dynamic range feature vector is calculated, and a weight matrix is ​​constructed according to the Euclidean distance, and the two feature vectors are weightedly fused through the weight matrix to obtain a preliminary comprehensive feature vector; data distribution analysis is performed on each component in the preliminary comprehensive feature vector, and if the component is approximately normally distributed, z-score normalization is used, and if the component is non-normally distributed, minimum and maximum normalization is used, and all standardized features are combined to obtain the final comprehensive feature vector.

[0033] Specifically, based on the correlation coefficient matrix of the previously calculated torsion feature and brightness feature, a greater weight is given to the feature with a higher correlation coefficient. Then, the principal component analysis is performed on the torsion region feature in the weighted multi-scale torsion feature, and the principal component with a cumulative contribution rate of 95% is selected as the main feature component to obtain the torsion region feature vector after dimensionality reduction. Wavelet transform is applied to the brightness dynamic range feature in the brightness feature to extract the brightness change information at different scales. The wavelet coefficients of the first three scales with the largest energy share are selected as the main feature components to form the brightness dynamic range feature vector after dimensionality reduction. The distance-based feature fusion method is used to calculate the Euclidean distance between the torsion region feature vector and the brightness dynamic range feature vector after dimensionality reduction, and a weight matrix is ​​constructed according to the distance. The weight matrix is ​​used to perform weighted fusion on the two feature vectors to obtain a preliminary comprehensive feature vector. Data distribution analysis is performed on each component in the preliminary comprehensive feature vector. Z-score normalization is used for features with approximately normal distribution, and minimum-maximum normalization is used for features with non-normal distribution. Finally, all standardized features are combined to obtain the final comprehensive feature vector to achieve a comprehensive characterization of textile quality. For a 1024x1024 pixel textile image, based on the previously calculated correlation coefficient matrix, it was first found that the correlation coefficient between torsion frequency and brightness gradient was 0.85, and the correlation coefficient between torsion density and brightness change rate was 0.78. Based on this, these features were given a weight of 1.5 times. The weighted torsion region features were subjected to principal component analysis, and the first three principal components were selected, with a cumulative contribution rate of 96.7%. A 4-level discrete wavelet transform was applied to the brightness dynamic range features, and the wavelet coefficients of the first three scales with the largest energy share were selected, accounting for 45%, 30% and 15% of the total energy, respectively. The Euclidean distance between the torsion region feature vector after dimensionality reduction, with a dimension of 3 and the brightness dynamic range feature vector, with a dimension of 3, was calculated, and the distance value was 0.6. The weight matrix was constructed, with a torsion feature weight of 0.4 and a brightness feature weight of 0.6. The two feature vectors were weighted and fused to obtain a preliminary 6-dimensional comprehensive feature vector. Data distribution analysis was performed on these 6 feature components, and it was found that 4 were approximately normally distributed and 2 were skewed. The features of normal distribution are z-score standardized, and the features of skewed distribution are minimum-maximum normalized. Finally, a standardized 6-dimensional comprehensive feature vector is obtained, which contains the local torsion change information and the overall brightness dynamic range information of the textile, realizing a comprehensive characterization of the quality of the textile.

[0034] Step S106, classifying the textile image using a support vector machine classifier according to the comprehensive feature vector, and determining whether the textile has defective areas with abnormal torsion areas or abnormal brightness dynamic range.

[0035] A training data set containing normal samples and known defect samples is obtained, and a comprehensive feature vector is extracted for each sample in the training data set, and normal and defect categories are marked. According to the comprehensive feature vector, a support vector machine classifier with a radial basis kernel function is used to perform binary classification on the textile image, and the optimal penalty parameter C and kernel parameter γ are determined to obtain a classification hyperplane. The comprehensive feature vector of the textile image to be tested is classified by the classification hyperplane to obtain a classification result and a confidence score. If the classification result is a defect category and the confidence score is greater than a preset threshold, it is determined that there is a quality defect. For textile images determined to have quality defects, a multi-scale sliding window method is used to scan the textile image using windows of different sizes, and feature vectors are extracted and classified for each window area. The local area classified as a defect is clustered, and the feature vector of the cluster center is obtained. The feature vector is classified into defect types to determine the specific type of the defect.

[0036] Specifically, a training data set containing normal samples and known defective samples was first constructed, and a comprehensive feature vector was extracted for each sample, and the normal and defective categories were marked. According to the comprehensive feature vector, the support vector machine classifier with radial basis kernel function was used to classify the textile images into two categories. The grid search method and 5-fold cross validation were used to determine the optimal penalty parameter C and kernel parameter γ, and the classification model was trained to obtain the classification hyperplane. The trained support vector machine classifier was used to classify the comprehensive feature vector of the textile image to be tested, and the classification results and confidence scores were obtained. The confidence threshold was set to 0.8. If the classification result was a defect category and the confidence score was greater than 0.8, it was determined that there was a quality defect; otherwise, it was determined to be normal. If it was determined that there was a quality defect, the multi-scale sliding window method was used to scan the original image using three different sizes of windows of 32x32, 64x64, and 128x128 pixels, and the step size was set to 1 / 4 of the window size. Feature vectors were extracted from each window area and classified. The local areas classified as defects were clustered, and the minimum number of samples was set to 5 and the neighborhood radius was set to 20 pixels. For the feature vector of each cluster center, the decision tree algorithm is used to classify the defect type, and two main defect types, torsion anomaly and brightness anomaly, are predefined to determine the specific type of the defect.

[0037] For a batch of 2000 textile images, including 1600 normal samples and 400 known defect samples, each image size is 1024x1024 pixels. First, a 256-dimensional comprehensive feature vector is extracted from each image to construct a training data set. The support vector machine classifier with radial basis kernel function is used, and the parameters are optimized in the range of C=[0.1, 1, 10, 100] and γ=[0.001, 0.01, 0.1, 1] by grid search method. The optimal parameters C=10 and γ=0.01 are obtained by 5-fold cross validation. After the training is completed, the comprehensive feature vector is extracted and classified for a new textile image to be tested. The classification result is defective category, and the confidence score is 0.92, which exceeds the set threshold of 0.8, and it is judged that there is a quality defect. Then, the multi-scale sliding window method was used to scan the image with window sizes of 32x32, 64x64, and 128x128 pixels, and a step size of 1 / 4 of the window size, generating a total of 15,625 local regions. Feature vectors were extracted and classified for each local region, and 67 regions were found to be defects. The DBSCAN algorithm was used to cluster these 67 defective regions, setting the minimum sample number to 5 and the neighborhood radius to 20 pixels, and 2 cluster centers were obtained. Finally, the C4.5 decision tree algorithm was used to classify the feature vectors of the two cluster centers, and one of them was determined to be a torsional anomaly and the other to be a brightness anomaly, thereby determining the specific location and type of the defect.

[0038] Step S107, extracting the local features of torsion angle, torsion amplitude, average brightness, and brightness contrast in the defect area, and judging the degree of torsion and brightness abnormality in the defect area through threshold comparison to obtain a quantitative description of the defect.

[0039] Extract the local direction field of the defective area and calculate multiple directional responses within a multi-angle range. According to the directional response, select the direction with the strongest response as the torsion angle, and obtain the torsion amplitude by calculating the standard deviation of the multiple directional responses. Grayscale the defective area and obtain the average grayscale value of the pixels in the area as the average brightness feature. Calculate the brightness contrast, use a sliding window of a preset pixel size, calculate the local entropy value of each pixel, and take the average value of the local entropy in the area as the brightness contrast feature. Based on the statistics of normal textile samples, set the normal range of torsion angle; compare the extracted torsion feature with the normal range of torsion angle, and calculate the degree of excess as a quantitative description of torsion anomaly. Analyze normal textile samples and establish a database of normal brightness range. Calculate the mean and standard deviation of the average brightness and brightness contrast of normal samples to define the normal brightness range. Compare the extracted brightness feature with the normal brightness range, and calculate the degree of deviation as a quantitative description of brightness anomaly.

[0040] Specifically, for the identified defective area, the Gabor filter group is used to extract the local direction field, and the 12 directional responses in the range of 0° to 180° with a step size of 15° are calculated. The direction with the strongest response is selected as the torsion angle, and the torsion amplitude is obtained by calculating the standard deviation of the 12 directional responses to obtain the torsion feature vector of the defective area. The defective area is grayed, and the average gray value of the pixels in the area is calculated as the average brightness feature. The local entropy algorithm is used to calculate the brightness contrast, and the local entropy value of each pixel is calculated with a sliding window of 3x3 pixels. The average value of the local entropy in the area is taken as the brightness contrast feature to form the brightness feature vector of the defective area. Based on the statistics of normal textile samples, the normal range of torsion angle is set as the main direction ±15°, and the torsion amplitude threshold is the normal sample amplitude mean plus two times the standard deviation. The extracted torsion features are compared with these thresholds, and the degree of excess is calculated as a quantitative description of torsion anomaly. A database of normal brightness range is established by analyzing a large number of normal textile samples. The mean and standard deviation of the average brightness and brightness contrast of normal samples are calculated, and the normal range is defined as the mean ±2 times the standard deviation. The extracted brightness features are compared with this range, and the degree of deviation is calculated as a quantitative description of the brightness anomaly, thereby achieving a comprehensive quantitative characterization of the defect.

[0041] For an identified defect area of ​​128x128 pixels, 12 Gabor filters (0° to 165°, step size 15°) are first applied to extract the local direction field. The calculation results show that the 45° direction response is the strongest, with a value of 0.85, which is determined as the torsion angle. The standard deviation of the 12 directional responses is 0.12, which is used as the torsion amplitude. After graying the area, the average grayscale value is calculated to be 128.5. The local entropy is calculated using a 3x3 pixel sliding window, and the average local entropy value in the area is 4.2, which is used as the brightness contrast feature. Based on the statistical analysis of 1,000 normal textile samples, the normal range of torsion angle is set to 30°

[0042] to 60°, and the torsion amplitude threshold is 0.1. Comparison shows that the torsion angle of the current defect area is within the normal range, but the torsion amplitude exceeds the threshold of 0.02, and the quantitative description of the torsion abnormality is 20%. In the brightness normal range database, the mean of the average brightness is 120 and the standard deviation is 10; the mean of the brightness contrast is 3.8 and the standard deviation is 0.3. The comparison results show that the average brightness of the current defect area is 8.5 units higher, exceeding the normal range by 0.85 standard deviations; the brightness contrast is 0.4 units higher, exceeding the normal range by 1.33 standard deviations. The comprehensive quantitative description of the brightness abnormality of the defect area is 13.3%. Through these quantitative analyses, the torsion and brightness abnormality characteristics of the defect area are fully characterized.

[0043] Step S108, the torsion characteristics and brightness characteristics of the defective area are integrated to calculate the comprehensive quality score of the defective area to obtain a quantitative evaluation result reflecting the local quality of the textile. Combined with the comprehensive quality scores of each defective area, the overall quality evaluation score of the textile is obtained to comprehensively evaluate the quality of the textile.

[0044] According to the torsion characteristics and brightness characteristics of the defective area, the comprehensive quality score of the defective area is calculated; wherein, the calculation of the comprehensive quality score of the defective area includes adjusting the weights of the torsion characteristics and the brightness characteristics according to the defect type; using the Sigmoid function to map the torsion eigenvalue and the brightness eigenvalue into a preset range; weighted summing the mapped eigenvalues ​​to obtain the local quality assessment result of the defective area. The DBSCAN algorithm is used to spatially cluster the defective area to obtain the defective area clustering result; wherein the neighborhood radius of the DBSCAN algorithm is a preset pixel value, and the minimum number of samples is a preset value; the average comprehensive quality score is calculated for each cluster in the defective area clustering result to obtain the local quality assessment results of different defect types. The area ratio of the defective area is obtained; wherein, obtaining the area ratio of the defective area includes: calculating the number of pixels in the defective area; dividing the number of pixels in the defective area by the total number of pixels in the textile image; multiplying the comprehensive quality score of the defective area by the area ratio, and summing them to obtain the overall quality assessment score of the textile. Establish a fuzzy set of defect quantity, defect area ratio and overall quality assessment score; define a preset number of quality levels; set fuzzy rules for the fuzzy set; use Mamdani reasoning method to perform fuzzy reasoning on the fuzzy rules; use the centroid method to defuzzify the fuzzy reasoning results to obtain the final quality level.

[0045] Specifically, the adaptive weight method is used to calculate the comprehensive quality score according to the torsion characteristics and brightness characteristics of the defect area. The weights of the torsion characteristics and brightness characteristics are automatically adjusted according to the defect type. For torsion defects, the weight of the torsion characteristics is higher; for brightness defects, the weight of the brightness characteristics is higher. The eigenvalues ​​are mapped to the range of 0-1 using the Sigmoid function, and then weighted summation is performed to obtain a quantitative evaluation result reflecting the local quality of the defect area. The comprehensive quality score of all identified defect areas in the textile image is calculated, and the DBSCAN algorithm is used to spatially cluster the defect areas, setting the neighborhood radius to 20 pixels and the minimum number of samples to 2. The average comprehensive quality score is calculated for each cluster to obtain the local quality evaluation results of different defect types. The area of ​​each defect area is calculated using the pixel counting method, and the area ratio is obtained by dividing it by the total number of pixels in the entire textile image. The comprehensive quality score of each defect area is multiplied by its area ratio, and the sum is obtained to obtain the overall quality evaluation score of the textile. Three fuzzy sets are established for the number of defects, the defect area ratio, and the overall quality evaluation score. Five quality levels are defined as excellent, good, medium, poor, and unqualified. Fuzzy rules are set, such as "If the number of defects is small, the area ratio is small, and the overall evaluation score is high, the quality grade is excellent". The Mamdani inference method and the centroid method are used for defuzzification to obtain the final quality grade, and a comprehensive evaluation of the quality of textiles is achieved. For a 4096x4096 pixel textile image, 5 defective areas are identified. The torsion eigenvalue of the first defective area is 0.8, and the brightness eigenvalue is 0.3. It is judged as a torsion defect, and the adaptive weights are set to 0.7 and 0.3. The eigenvalues ​​are mapped to the range of 0-1 using the Sigmoid function, and 0.92 and 0.42 are obtained. The comprehensive quality score after weighted summation is 0.77. The DBSCAN algorithm is applied to the 5 defective areas, and the neighborhood radius is set to 20 pixels and the minimum number of samples is 2, and 2 clusters are obtained. The first cluster contains 3 defects with an average comprehensive quality score of 0.75; the second cluster contains 2 defects with an average comprehensive quality score of 0.62. The pixel counting method calculated that the areas of the five defective regions accounted for 0.2%, 0.3%, 0.1%, 0.4% and 0.2% of the total area respectively. After weighted average, the overall quality assessment score of the textile was 0.71. A fuzzy set was established, with 5 defects corresponding to a membership of 0.6, 1.2% of the defect area corresponding to a membership of 0.4, and an overall quality assessment score of 0.71 corresponding to a membership of 0.7. The fuzzy rule "If the number of defects is medium, the area accounts for a small proportion and the overall assessment score is high, the quality grade is good" was applied, and the Mamdani reasoning method and the centroid method were used to defuzzify, and finally the quality grade "good" was obtained, with a membership of 0.65, realizing a comprehensive quantitative assessment of textile quality.

[0046] It should be noted that the above examples are only some specific embodiments of the present invention. Obviously, the present invention is not limited to the above embodiments, and there are many variations. All variations that can be directly derived or associated with the content disclosed by a person skilled in the art should be considered as the protection scope of the present invention.

Claims

1. A textile quality detection method integrating multi-scale features, characterized in that: The method comprises: Perform multi-scale decomposition on textile images, obtain image features at different scales, extract multi-scale feature vectors containing texture and shape information, and obtain multi-scale feature representations that reflect the structural characteristics of textile torsion period, torsion amplitude and torsion morphology at different scales; For multi-scale feature representation, by calculating the invariant moment of the feature vector, the torsion angle and torsion direction feature descriptors that remain unchanged under image rotation transformation are obtained, and a multi-scale torsion feature vector is generated; Construct a gray-level co-occurrence matrix, extract statistical features reflecting brightness distribution from textile images, calculate the energy, contrast, and correlation statistics of the gray-level co-occurrence matrix, and obtain the brightness feature vector that characterizes the average brightness, brightness contrast, and brightness uniformity of the textiles. Calculate the correlation coefficient between the torsion frequency and torsion density in the multi-scale torsion feature vector and the brightness gradient and brightness change rate in the brightness feature vector to determine the correlation between the torsion feature and the brightness feature; Based on the correlation between the multi-scale torsion feature vector and the brightness feature vector, the main feature components of the torsion region feature in the multi-scale torsion feature vector and the brightness dynamic range feature in the brightness feature vector are selected and fused to form a comprehensive feature vector. Based on the comprehensive feature vector, the support vector machine classifier is used to classify the textile image to determine whether the textile has defective areas with abnormal torsion area or abnormal brightness dynamic range; In the defect area, the local features of torsion angle, torsion amplitude, average brightness, and brightness contrast are extracted. The degree of torsion and abnormal brightness of the defect area are determined by threshold comparison to obtain a quantitative description of the defect. The torsion characteristics and brightness characteristics of the defective area are comprehensively considered to calculate the comprehensive quality score of the defective area, and a quantitative evaluation result reflecting the local quality of the textile is obtained. Combined with the comprehensive quality scores of each defective area, the overall quality evaluation score of the textile is obtained to comprehensively evaluate the quality of the textile.

2. The method according to claim 1, wherein: The multi-scale decomposition of the textile image is performed to obtain image features at different scales, and the multi-scale feature vector containing texture and shape information is extracted to obtain a multi-scale feature representation reflecting the structural features of the textile torsion period, torsion amplitude and torsion morphology at different scales, including: Using discrete wavelet transform to perform multi-scale decomposition on the textile image to obtain approximate coefficients and detail coefficients of the textile image at different scales; Calculate the gray level co-occurrence matrix features of each scale sub-image according to the approximation coefficient and the detail coefficient to obtain the texture features; At the same time, edge direction histogram and Zernike moment features of the sub-image are extracted to obtain shape features; The texture features and shape features are combined using a feature cascade method to form a high-dimensional feature vector containing multi-scale information; If the dimension of the high-dimensional feature vector is higher than the preset requirement, the principal component analysis method is used to reduce the dimension of the high-dimensional feature vector to obtain the final multi-scale feature representation; Based on the multi-scale feature representation, a support vector machine regression model is constructed, and the regression model is used to predict the torsion period, torsion amplitude and torsion morphological parameters of the textile.

3. The method according to claim 1, wherein: The method for representing multi-scale features, by calculating the invariant moment of the feature vector, obtains the feature descriptors of the torsion angle and torsion direction that remain unchanged under the image rotation transformation, and generates a multi-scale torsion feature vector, including: The eigenvector is converted into polar coordinates, and the amplitude spectrum and phase spectrum are obtained through Fourier transform; Extracting torsion angle features and torsion direction features according to the amplitude spectrum and the phase spectrum to obtain a preliminary feature descriptor; The Zernike moment algorithm is used to calculate multi-order Zernike moments and construct multi-order moment features; If the multi-order moment feature meets the rotation invariance requirement, it is combined with the preliminary feature descriptor to generate a multi-scale torsion feature vector; Performing minimum-maximum normalization processing on the multi-scale torsion feature vector to obtain a standardized multi-scale torsion feature vector; Determining whether the standardized multi-scale twist feature vector meets the rotation invariance requirement includes: rotating the original image at multiple angles; Extract the feature vector at each rotation angle; Calculate the Euclidean distance between the original eigenvector and the eigenvectors of each rotation angle; If all the distance values ​​are less than a preset threshold, it is determined that the standardized multi-scale torsion feature vector meets the rotation invariance requirement.

4. The method according to claim 1, wherein: The gray level co-occurrence matrix is ​​constructed, statistical features reflecting brightness distribution are extracted from the textile image, energy, contrast, and correlation statistics of the gray level co-occurrence matrix are calculated, and brightness feature vectors representing average brightness, brightness contrast, and brightness uniformity of the textile are obtained, including: Acquire a textile color image, and convert the red, green and blue three channels of the color image into a single-channel grayscale image using a weighted average method to obtain a textile image matrix; According to the textile image matrix, a gray level co-occurrence matrix is ​​constructed, wherein the gray level co-occurrence matrix is ​​obtained by counting the occurrence frequency of gray values ​​of adjacent pixel pairs in each direction of each pixel point; For the gray-level co-occurrence matrix in each direction, three statistics, namely energy, contrast and correlation, are calculated for each matrix. The energy is obtained by calculating the sum of squares of matrix elements, the contrast is obtained by calculating the second moment of the difference matrix, and the correlation is obtained by calculating the covariance between the gray value and its mean value. Take the arithmetic mean of the statistical results in each direction to obtain the final energy, contrast and correlation statistics; The three statistics are mapped to the range of 0-1 by using the maximum and minimum value normalization method to generate a final three-dimensional brightness feature vector, which includes the normalized average brightness, brightness contrast and brightness uniformity values.

5. The method according to claim 1, wherein: The step of calculating the correlation coefficient between the torsion frequency and torsion density in the multi-scale torsion feature vector and the brightness gradient and brightness change rate in the brightness feature vector to determine the correlation between the torsion feature and the brightness feature includes: Acquire a multi-scale torsion feature vector, and extract torsion frequency data and torsion density data from the multi-scale torsion feature vector; The torsion frequency data is obtained by calculating the inverse of the torsion period, and the torsion density data is obtained by counting the number of torsion times per unit area; According to the brightness feature vector, the Sobel operator is used to calculate the horizontal and vertical gradients of the image to obtain the brightness gradient; The brightness change rate is obtained by calculating the sum of the absolute values ​​of the brightness differences of adjacent pixels and dividing it by the total number of pixels; The torsion frequency, the torsion density, the brightness gradient and the brightness change rate form a 4-dimensional feature vector; For the 4-dimensional feature vector, the Pearson correlation coefficient algorithm is used to calculate the correlation coefficient between the features to form a 4x4 correlation coefficient matrix; Determine whether the absolute value of the non-diagonal elements in the correlation coefficient matrix is ​​greater than a preset threshold; If the absolute value of any non-diagonal element in the correlation coefficient matrix is ​​greater than the preset threshold, it is determined to be significantly correlated; According to the significantly correlated feature pairs, determining that there is an intrinsic relationship between the quality of the textile and the corresponding features; Through the intrinsic connection, quantitative analysis of the correlation between the torsion feature and the brightness feature is achieved.

6. The method according to claim 1, wherein: The method of selecting the main feature components of the torsion region feature in the multi-scale torsion feature vector and the brightness dynamic range feature in the brightness feature vector based on the correlation between the multi-scale torsion feature vector and the brightness feature vector and fusing them to form a comprehensive feature vector includes: According to the correlation coefficient matrix, the features with high correlation coefficients are assigned corresponding weights to obtain weighted multi-scale torsion features; The torsion region features in the weighted multi-scale torsion features are processed by a principal component analysis method, and the principal component whose cumulative contribution rate reaches a preset threshold is selected as the main feature component to obtain a torsion region feature vector after dimensionality reduction; For the brightness dynamic range feature in the brightness feature, wavelet transform is applied to extract brightness change information at different scales, and the wavelet coefficients of the first N scales with the largest energy share are selected as the main feature components to form a brightness dynamic range feature vector after dimensionality reduction; Calculating the Euclidean distance between the reduced-dimensional torsion region feature vector and the brightness dynamic range feature vector, constructing a weight matrix according to the Euclidean distance, and performing weighted fusion on the two feature vectors through the weight matrix to obtain a preliminary comprehensive feature vector; Data distribution analysis is performed on each component in the preliminary comprehensive feature vector. If the component is approximately normally distributed, z-score normalization is used. If the component is non-normally distributed, minimum and maximum normalization is used. All standardized features are combined to obtain the final comprehensive feature vector.

7. The method according to claim 1, wherein: The method of classifying the textile image using a support vector machine classifier according to the comprehensive feature vector to determine whether the textile has a defective area with abnormal torsion area or abnormal brightness dynamic range includes: Obtaining a training data set including normal samples and known defect samples, extracting a comprehensive feature vector for each sample in the training data set, and marking normal and defect categories; According to the comprehensive feature vector, a support vector machine classifier of a radial basis kernel function is used to perform binary classification on the textile image, and an optimal penalty parameter C and a kernel parameter γ are determined to obtain a classification hyperplane; The comprehensive feature vector of the textile image to be detected is classified by the classification hyperplane to obtain the classification result and confidence score; If the classification result is a defect category and the confidence score is greater than a preset threshold, it is determined that there is a quality defect; For textile images that are judged to have quality defects, a multi-scale sliding window method is used to scan the textile images using windows of different sizes, extract feature vectors from each window area and classify them; Cluster the local areas classified as defects, obtain the feature vectors of the cluster centers, classify the defect types on the feature vectors, and determine the specific types of the defects.

8. The method according to claim 1, wherein: The method extracts the local features of torsion angle, torsion amplitude, average brightness, and brightness contrast in the defect area, and determines the degree of torsion and brightness abnormality in the defect area by threshold comparison to obtain a quantitative description of the defect, including: Extract the local directional field of the defect area and calculate multiple directional responses within a multi-angle range; According to the directional responses, the direction with the strongest response is selected as the torsion angle, and the torsion amplitude is obtained by calculating the standard deviation of the multiple directional responses; Grayscale the defect area and obtain the average grayscale value of the pixels in the area as the average brightness feature; Calculate the brightness contrast, use a sliding window with a preset pixel size, calculate the local entropy value of each pixel, and take the average value of the local entropy in the area as the brightness contrast feature; Based on the statistics of normal textile samples, the normal range of torsion angle is set; The extracted torsion features are compared with the normal range of torsion angles, and the degree of excess is calculated as a quantitative description of torsion abnormality; Analyze normal textile samples and establish a database of normal brightness range; Calculate the mean brightness and the mean and standard deviation of brightness contrast of normal samples, and define the normal range of brightness; The extracted brightness feature is compared with the normal brightness range, and the degree of deviation is calculated as a quantitative description of brightness abnormality.

9. The method according to claim 1, wherein: The torsion characteristics and brightness characteristics of the integrated defect area are calculated to obtain a comprehensive quality score of the defect area to obtain a quantitative evaluation result reflecting the local quality of the textile; the comprehensive quality scores of each defect area are combined to obtain the overall quality evaluation score of the textile to comprehensively evaluate the quality of the textile, including: Calculate the comprehensive quality score of the defect area based on the torsion characteristics and brightness characteristics of the defect area; Wherein, the calculating of the comprehensive quality score of the defect area includes adjusting the weights of the torsion feature and the brightness feature according to the defect type; The sigmoid function is used to map the torsion eigenvalue and the brightness eigenvalue into a preset range; Perform weighted summation on the mapped eigenvalues ​​to obtain the local quality assessment result of the defect area; The DBSCAN algorithm is used to perform spatial clustering of defect areas and obtain defect area clustering results; The neighborhood radius of the DBSCAN algorithm is a preset pixel value, and the minimum number of samples is a preset value; Calculate the average comprehensive quality score for each cluster in the defect area clustering results to obtain local quality assessment results of different defect types; Get the area ratio of the defect area; Wherein, obtaining the area ratio of the defective area includes: calculating the number of pixels in the defective area; Divide the number of pixels in the defect area by the total number of pixels in the textile image; Multiply the comprehensive quality score of the defective area by the area ratio, and sum them up to get the overall quality assessment score of the textile; Establish fuzzy sets of defect quantity, defect area ratio and overall quality assessment score; Define a preset number of quality levels; Setting fuzzy rules for the fuzzy set; Using Mamdani reasoning method to perform fuzzy reasoning on the fuzzy rules; The fuzzy reasoning result is defuzzified by using the centroid method to obtain the final quality grade.

Citation Information

Patent Citations

  • Textile defect detection method based on defect enhancement

    CN102331425A

  • Image analysis method based on multi-scale and multi-zone woven fabric knitting tightness

    CN104715477A

  • Woven fabric weave structure type identification method

    CN105550660A

  • Fabric defect detection and classification method based on unsupervised segmentation and ELM (Extreme Learning Machines)

    CN107341499A

  • Defect detection method

    JP2013072866A

Cited By

  • Image recognition method and system for non-woven fabric surface quality

    CN120107248A

  • Casting surface defect detection method and system

    CN120976216A

  • Visual monitoring method and system for running state of energy feedback elevator

    CN121259747A

  • Oil product quality detection method

    CN121437418A