A fabric color difference grade determination method based on multi-dimensional spectral analysis

By combining multidimensional spectral analysis and deep learning, the automation, precise segmentation, and high-precision detection of synthetic fiber dyeing grades have been achieved, solving the problems of subjective error and interference in traditional detection methods and meeting the quality control needs of modern textile production.

CN122108978BActive Publication Date: 2026-07-14ZHEJIANG SCI-TECH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG SCI-TECH UNIV
Filing Date
2026-04-29
Publication Date
2026-07-14

Smart Images

  • Figure CN122108978B_ABST
    Figure CN122108978B_ABST
Patent Text Reader

Abstract

The application provides a fabric color difference grade determination method based on multi-dimensional spectral analysis, and belongs to the technical field of intelligent textile detection. The method comprises the following steps: acquiring a three-dimensional spectral data cube of a sock band under an integrating sphere diffuse light source environment by using a spectral imaging acquisition system, and converting an original image into spectral reflectance data through black and white board radiation correction; identifying a joint position by using the spectral response difference between the joint and the sock band, completing automatic segmentation of the sock band image, and acquiring effective detection areas of each segment; in combination with OCR-recognized character information, eliminating surface defects by using a deep learning target detection algorithm for a single sock band; separating texture shadows and background noise by using hyperspectral unmixing, and extracting pure spectra representing the true color of the sock band; and mapping the pure spectra to a CIELAB color space to calculate color differences and determine grades. The application realizes the intelligentization and objective evaluation of the sock band determination method by using spectral imaging and intelligent recognition technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent textile testing technology, and in particular to a method for determining the color difference grade of fabrics based on multidimensional spectral analysis. Background Technology

[0002] The dyeing uniformity of synthetic fiber filaments is a core indicator for evaluating product quality. Currently, the main method for testing the dyeing uniformity of synthetic fibers involves sampling the sample, then sequentially weaving sock segments into long sock bands on a sock knitting machine, numbering the sock segments, dyeing, and drying them. Finally, the color of the samples is manually observed and compared for quality inspection. This process relies heavily on manual visual comparison under a D65 standard light source, using a gray scale for color change assessment. Traditional testing methods heavily depend on the visual experience and subjective judgment of the inspectors. Visual comparison under a D65 standard light source is easily affected by visual fatigue, emotional fluctuations, and changes in the observation environment, resulting in large subjective errors in test results, inconsistent assessment standards between batches, and high labor intensity. Furthermore, manual testing can only achieve qualitative grading and cannot generate quantifiable and traceable digital quality archives, making it difficult to meet the full-process quality control needs of modern textile production.

[0003] Existing technologies include solutions that use machine vision or photoelectric colorimetry equipment to replace manual labor. However, these solutions primarily rely on RGB three-channel wideband integral imaging to acquire color data, essentially performing a rough statistical analysis of light energy in the visible light band. Garters, on the other hand, are porous knitted fabrics with a distinct warp and weft weave structure. Their surface is not a uniform Lambertian surface. During imaging, the field of view of a single pixel typically includes high-brightness fiber ridges, dark-toned coil shadows, and background noise transmitted through the pores. This results in the detected color difference data being mixed with interference from variations in weave density, failing to accurately reflect differences in dye concentration. Consequently, high-precision color difference discrimination is impossible, making it difficult to meet the quality inspection requirements of high-quality synthetic fibers. Furthermore, existing automated solutions often use mechanical fixed-length cutting or manual alignment for garter segmentation, which is prone to misalignment of the detection area due to fabric elastic deformation, further reducing the accuracy and stability of the detection results. Summary of the Invention

[0004] The purpose of this invention is to provide a method for determining the color difference grade of fabrics based on multidimensional spectral analysis. By identifying seams through spectral differences, automatic segmentation is achieved. Combined with deep learning to eliminate interference, hyperspectral unmixing technology is used to separate texture shadows from background noise, and pure spectral data is extracted to calculate color difference. This realizes fully automated evaluation and quality traceability of garter dyeing grade, and provides a systematic solution for garter dyeing grade detection.

[0005] To achieve the above objectives, this invention proposes a method for determining the color difference grade of fabrics based on multidimensional spectral analysis, comprising the following steps:

[0006] Step S1: Under the diffuse light source environment of the integrating sphere, acquire the original spectral image data cube of the garter belt. Combined with blackboard data Perform radiometric correction to obtain spectral reflectance data. ;

[0007] Step S2: Process the spectral reflectance data Feature extraction is performed to obtain feature maps. ,based on The garter belt seam location is identified using the characteristic band difference method, and the long garter belt image is automatically segmented into sections based on the seam location. A separate image of the garter belt segment. ,in for The index of the i-th independent garter segment image, ;

[0008] Step S3: Segment the image for each garter belt The input is fed into the multi-task processing module to locate characters in the image and generate character masks. The system identifies character content as a unique identifier (ID) for each garter belt, inputs the image into a deep learning defect detection network, identifies physical defects, and generates a mask for the defect region. Calculate the integrated interference mask, and then... The covered area is removed from the original image as interference information, and the effective region for subsequent spectral analysis is extracted from each garter belt segment. ;

[0009] Step S4: Based on the effective detection area after removing interference Hyperspectral unmixing was performed to extract endmembers containing background features and calculate their abundance. Transmission and shadow interference were removed to reconstruct the pure spectrum characterizing the true color of the garter belt. ;

[0010] Step S5: Extract the pure spectrum Mapping to the CIELAB color space, the color difference between the glove under test and the standard sample is calculated, and the dyeing grade of the glove under test is determined based on the preset set of graded gradient thresholds.

[0011] Preferably, in step S1, the acquired raw spectral image data cube For containing two-dimensional spatial coordinates With the wavelength of light The three-dimensional hyperspectral data cube is radiometrically corrected using a linear correction model. The formula for radiometric correction is as follows:

[0012] ;

[0013] in, The original digital quantity, For dark current data, For standard whiteboard data, This represents the reflectivity of a standard whiteboard.

[0014] Preferably, step S2 specifically includes the following steps:

[0015] Step S21: For the obtained Feature extraction is performed to obtain feature maps. Set reflectivity threshold Generate suture mask ;

[0016] Step S22: Calculation The row density is calculated and then smoothed using Gaussian smoothing. The local maxima neighborhood pixel set of the smoothed row density is then detected. ;

[0017] Step S23: For Linear regression fitting is performed to obtain the seam trajectory equation. If the root mean square error of the fit is greater than a preset error threshold, then... The optimized seam trajectory equation was obtained by performing piecewise independent fitting. ;

[0018] Step S24: with To segment the boundaries, the garter belt image is segmented into... A separate image of the garter belt segment. .

[0019] Preferably, in step S21, the full-band spectral difference is calculated, and the band image corresponding to the peak value is selected as the feature map. The calculation formula is as follows:

[0020] ;

[0021] in, This represents the spectral difference across the entire wavelength band. The average spectral curve of the normally woven area. This is the average spectral curve of the seam area.

[0022] Preferably, in step S3, the multi-task processing module includes a parallel character recognition branch and a defect detection branch. In the character recognition branch, the segmented image is input into the character recognition model, and the model output includes two parts: the recognized character sequence, which serves as the unique identifier ID of the corresponding garter band segment; and the generation of a binary mask for the character region.

[0023] Preferably, in step S3, the calculation formula for the integrated interference mask is:

[0024] ;

[0025] in, For comprehensive interference masking.

[0026] Preferably, step S4 specifically includes the following steps:

[0027] Step S41: Construct a linear spectral mixture model, assuming the spectral vector of any pixel in the hyperspectral image is... ,Will Represented as a linear combination of endmember vectors plus additive noise, the mathematical expression is:

[0028] ;

[0029] in, Let be the spectral vector of any pixel in the hyperspectral image. The number of endmembers, For the first The spectral vector of each endmember. For the corresponding abundance, It is Gaussian white noise;

[0030] Step S42: Employ a vertex component analysis algorithm to analyze the effective detection region. Extracting endmember matrices from spectral data Endmember matrix It includes fabric body endmembers, shadow endmembers, and background transmission endmembers;

[0031] Step S43: Calculate the endmember abundance matrix for each pixel using the fully constrained least squares method. Minimize the reconstruction error under the conditions of non-negativity and summation constraint. The formula for minimizing the reconstruction error is:

[0032] ;

[0033] in, This is the endmember abundance vector;

[0034] Step S44: Based on the calculated abundance matrix, remove the interfering endmember sets corresponding to shadow endmembers and background transmission endmembers, and identify the main endmember set corresponding to the fabric body. The pure spectrum is calculated by reconstructing the spectrum based on the set of principal endmembers and their corresponding normalized abundance weights. The calculation formula is:

[0035] ;

[0036] in, In the main end-member set Abundance corresponding to each endmember In the main end-member set The spectral vector of each endmember.

[0037] Preferably, step S5 specifically includes the following steps:

[0038] Step S51: Obtain the pure spectrum The values ​​are converted to XYZ tristimulus values, then mapped to the CIELAB color space via a nonlinear transformation to obtain the color feature vector of the garter to be tested. The formula is as follows:

[0039] ;

[0040] in, This refers to the brightness value. The red-green hue value. The value represents the yellow-blue tint.

[0041] Step S52: Based on the garter belt's identity ID, construct a baseline adaptive update mechanism based on identity recognition. Specifically: if the identity ID of the currently retrieved garter belt segment contains a standard segment identifier, determine that the current segment is a standard sample segment, update the color feature vector of the corresponding garter belt segment to the dynamic baseline, and store it in the buffer; if the identity ID of the currently retrieved garter belt segment does not contain a standard segment identifier, determine that the current segment is a regular product, and call the latest dynamic baseline in the current buffer.

[0042] Step S53: Construct a multi-level dyeing evaluation model for automatic grading. Set a set of grading gradient thresholds in advance according to the factory's quality control requirements. Compare the color difference value with the preset set of grading gradient thresholds to determine the dyeing grade of the socks to be tested. After associating the dyeing grade with the corresponding identification ID, store it in the database.

[0043] Preferably, in step S52, for ordinary product segments, the color feature vector of the glove to be tested is calculated. With dynamic benchmark The color difference value is obtained by calculating the Euclidean distance between them, using the following formula:

[0044] ;

[0045] in, This is the color difference value. The brightness value is a dynamic baseline. The red-green color value is the dynamic baseline. The yellow-blue tint value is the dynamic baseline.

[0046] Preferably, in step S53, the hierarchical gradient threshold set is an increasing threshold sequence. , , calculate The system compares the results with a threshold set to determine the coloring level. Finally, the system outputs the level and combines it with the identified identity ID for archiving.

[0047] Therefore, this invention proposes a method for determining the color difference grade of fabrics based on multidimensional spectral analysis, which has the following advantages:

[0048] (1) This invention uses the spectral feature-based seam positioning and automatic segmentation technology to achieve non-contact positioning by utilizing the difference in spectral response between the seam and the fabric body. It can adapt to the stretch elastic deformation of the sock belt for precise segmentation, which solves the problem of regional misalignment that is easy to occur in traditional mechanical fixed-length cutting and manual alignment. It establishes a reliable spatial benchmark for subsequent color analysis and greatly improves the automation and stability of the detection process.

[0049] (2) This invention generates a comprehensive interference mask by combining OCR character recognition and deep learning defect detection through a multi-task parallel processing module. Before spectral extraction, it automatically removes non-effective areas such as character numbers, oil stains, and stiff wires, avoiding the bias of foreign pixels on the overall color features and effectively improving the accuracy of subsequent spectral analysis.

[0050] (3) This invention introduces hyperspectral demixing technology, which decomposes mixed pixels through a linear spectral mixing model, separates and eliminates spectral interference caused by fabric coil shadows and pore background transmission from a physical level, restores the intrinsic spectral reflectance of synthetic fiber filaments, completely solves the industry pain point that traditional RGB imaging cannot distinguish between uneven weaving density and dye concentration differences, eliminates systematic misjudgment caused by fabric structure, and greatly improves the accuracy of color difference detection.

[0051] (4) This invention uses a dynamic benchmark update mechanism to automatically identify standard sample segments and update the comparison benchmark by combining the identity ID. This effectively eliminates the systematic error caused by the fluctuation of dyeing process between batches. At the same time, it maps high-dimensional spectral data to the standard CIELAB color space for quantitative color difference calculation, establishes an objective and unified grading standard, eliminates the subjective error of manual detection, realizes the digitization of detection results and full-process traceability, and adapts to the intelligent quality control needs of modern textile production. Attached Figure Description

[0052] Figure 1 This is a flowchart of a method for determining the color difference grade of fabrics based on multidimensional spectral analysis;

[0053] Figure 2 This is a flowchart for spectral data processing. Detailed Implementation

[0054] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0055] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0056] Example 1

[0057] like Figure 1 As shown, this invention provides a method for determining the color difference grade of fabrics based on multidimensional spectral analysis. The test object is a continuous garter belt woven from polyester filament, and the detection target is to determine the dyeing uniformity grade of each garter segment. The method includes the following steps:

[0058] Step S1: Acquire raw hyperspectral image data cubes of polyester filament stockings using a hyperspectral camera built in an integrating sphere diffuse light source environment. Specifically: Image acquisition is achieved using a pushbroom hyperspectral camera with a spectral range covering 400-1000 nm, resulting in a cube of raw spectral image data. For containing two-dimensional spatial coordinates With the wavelength of light A three-dimensional hyperspectral data cube was generated, and radiometric correction was performed using a linear correction model combined with black-and-white board data to obtain spectral reflectance data. The formula for calculating radiation correction is:

[0059] ;

[0060] in, The original digital quantity, For dark current data, For standard whiteboard data, This represents the reflectivity of a standard whiteboard.

[0061] Step S2: Based on spectral reflectance data The method of identifying the seam location of garter belts is used, and the image of a long garter belt is automatically segmented into sections based on the seam location. A separate image of the garter belt segment. ,in for, Specifically, it includes the following steps:

[0062] Step S21: For the obtained Feature extraction is performed to obtain feature maps. Set reflectivity threshold Generate suture mask ;

[0063] The average spectral curves of the normal knit area and the seam area of ​​the garter differ in spectral response intensity within a specific wavelength range due to the physical difference in yarn stacking density at the seam compared to the main body of the garter. The full-band spectral difference is calculated, and the wavelength image corresponding to the peak value is selected as the feature map. The calculation formula is as follows:

[0064] ;

[0065] in, This represents the spectral difference across the entire wavelength band. The average spectral curve of the normally woven area. The average spectral curve of the seam area;

[0066] Step S22: Calculation The row density is calculated and Gaussian smoothed to remove noise interference, resulting in a smoothed row density. The local maxima neighborhood pixel set of the smoothed row density is then detected and extracted. ;

[0067] Step S23: For Linear regression fitting is performed to obtain the seam trajectory equation. If the root mean square error of the fit is greater than a preset error threshold, then... The optimized seam trajectory equation was obtained by performing piecewise independent fitting. ;

[0068] Step S24: with To segment the boundaries, the garter belt image is segmented into... A separate image of the garter belt segment. .

[0069] Step S3: Segment each individual garter belt image obtained from the segmentation. The input is fed into a multi-task parallel processing module, which includes a character recognition branch and a defect segmentation branch. In the character recognition branch, the segmented image is input into the character recognition model, and the model output includes two parts:

[0070] First, the identified character sequence serves as the unique identifier (ID) for that section of the garter belt;

[0071] Second, generate a binary mask for the character region;

[0072] In the defect detection branch, a U-Net architecture based on a semantic segmentation network improved from deep learning is adopted to accurately segment physical defects such as holes and stiff wires. The network finally outputs a binarized defect region mask of the same size as the original image. ;

[0073] A comprehensive interference mask is generated through logical parallel operations. The covered area is removed from the original image as interference information, and the effective region for subsequent spectral analysis is extracted from each garter belt segment. The formula for calculating the overall interference mask is:

[0074] ;

[0075] Among them, for Pixels that are not properly defined will be removed during the subsequent construction of the spectral matrix, retaining only the normal fabric areas. The spectral data is used in the calculation, thereby eliminating interference with the determination of staining grade.

[0076] Step S4: Based on the effective detection area after removing interference Hyperspectral unmixing was employed to reconstruct the spectrum, eliminating the influence of fabric density variations, texture shading, and background transmission on color measurement. Endmembers containing background features were extracted and their abundance was calculated. Transmission and shading interference were removed to reconstruct a pure spectrum characterizing the true color of the garter belt. ;

[0077] like Figure 2 As shown, step S4 specifically includes the following steps:

[0078] Step S41: Construct a linear spectral mixture model, assuming the spectral vector of any pixel in the hyperspectral image is... ,Will Represented as a linear combination of endmember vectors plus additive noise, the mathematical expression is:

[0079] ;

[0080] in, Let be the spectral vector of any pixel in the hyperspectral image. The number of endmembers, For the first The spectral vector of each endmember. The corresponding abundance is the proportion within the pixel area. It is Gaussian white noise;

[0081] When the number of endpoints is At that time, the extracted endmember vector set includes endmembers representing the bright yarn body, fabric texture shadows, and interference endmembers representing the transmission characteristics of the background plate; the vertex component analysis algorithm can lock the spectral characteristics of these pure substances from the data by iteratively finding the projection of the simplex vertex.

[0082] Step S42: Employ a vertex component analysis algorithm to analyze the effective detection region. Extracting endmember matrices from spectral data Endmember matrix It includes fabric body endmembers, shadow endmembers, and background transmission endmembers;

[0083] Step S43: Calculate the endmember abundance matrix for each pixel using the fully constrained least squares method. Minimize the reconstruction error under the conditions of non-negativity and summation constraint. The formula for minimizing the reconstruction error is:

[0084] ;

[0085] in, For the endmember abundance vector, in order to improve processing efficiency, a multi-process parallel computing framework is adopted to solve the image data in parallel after dividing it into blocks;

[0086] Step S44: Based on the calculated abundance matrix, classify the endmember sets, remove interfering endmember sets representing porosity projection and shadows, and identify the main endmember sets representing the fabric's reflective properties. By removing the interference endmember sets corresponding to shadow endmembers and background transmission endmembers, and using the main endmembers and their corresponding normalized abundance weights for spectral reconstruction, the pure spectrum characterizing the true color of polyester filament is calculated. The calculation formula is:

[0087] ;

[0088] in, In the main end-member set Abundance corresponding to each endmember In the main end-member set The spectral vector of each endmember.

[0089] Step S5: Extract the pure spectrum Mapping to the CIELAB color space, calculating the color difference between the tested gaiter and the standard sample, and determining the dyeing grade of the tested gaiter based on a preset set of graded gradient thresholds, specifically includes the following steps:

[0090] Step S51: Map the high-dimensional spectral data to the CIELAB color space for human visual perception, and convert the pure spectrum... The values ​​are converted to XYZ tristimulus values, then mapped to the CIELAB color space via a nonlinear transformation to obtain the color feature vector of the garter to be tested. The formula is as follows:

[0091] ;

[0092] in, This refers to the brightness value. The red-green hue value. The value represents the yellow-blue tint.

[0093] Step S52: Employing an identity-based adaptive update mechanism, before calculating the color difference, the system first retrieves the identity ID obtained through character recognition. If the ID contains a specific standard segment identifier, the current segment is determined to be a standard sample segment, and the system uses the demixed spectral feature vector of this segment as the new dynamic benchmark. Store in the buffer, overwriting the old baseline, for comparison with subsequent products in the same batch; if the ID is a regular product identifier, then retrieve the latest ID from the current buffer. Perform calculations;

[0094] For a typical product segmentation, calculate the color feature vector of the glove to be tested. With dynamic benchmark The color difference value is obtained by calculating the Euclidean distance between them, using the following formula:

[0095] ;

[0096] in, This is the color difference value. The brightness value is a dynamic baseline. The red-green color value is the dynamic baseline. The yellow-blue tint value is the dynamic baseline.

[0097] The aforementioned update mechanism ensures that the evaluation benchmark always keeps pace with changes in production batches, eliminates the impact of dyeing fluctuations between batches, and effectively avoids systematic misjudgments caused by outdated benchmarks.

[0098] Step S53: Construct a multi-level dyeing evaluation model for automatic grading. Set a set of grading gradient thresholds in advance according to the factory's quality control requirements. Compare the color difference value with the preset set of grading gradient thresholds to determine the dyeing grade of the socks to be tested. After associating the dyeing grade with the corresponding identification ID, store it in the database.

[0099] The hierarchical gradient threshold set is an increasing sequence of thresholds. , , calculate The staining level is determined by comparing it with a threshold set. The system will eventually output this level. And combine the identified identity ID for data entry and archiving.

[0100] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.

[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for determining the color difference grade of fabrics based on multidimensional spectral analysis, characterized in that, Includes the following steps: Step S1: Under the diffuse light source environment of the integrating sphere, acquire the original spectral image data cube of the garter belt. Combined with blackboard data Perform radiometric correction to obtain spectral reflectance data. ; Step S2: Process the spectral reflectance data Feature extraction is performed to obtain feature maps. ,based on The garter belt seam location is identified using the characteristic band difference method, and the long garter belt image is automatically segmented into sections based on the seam location. A separate image of the garter belt segment. ,in For the first Index of individual garter belt segment images, ; Step S3: Segment the image for each garter belt The input is fed into the multi-task processing module to locate characters in the image and generate character masks. The system identifies character content as a unique identifier (ID) for each garter belt, inputs the image into a deep learning defect detection network, identifies physical defects, and generates a mask for the defect region. Calculate the integrated interference mask, and then... The covered area is removed from the original image as interference information, and the effective region for subsequent spectral analysis is extracted from each garter belt segment. ; Step S4: Based on the effective detection area after removing interference Hyperspectral unmixing was performed to extract endmembers containing background features and calculate their abundance. Transmission and shadow interference were removed to reconstruct the pure spectrum characterizing the true color of the garter belt. ; Step S5: Extract the pure spectrum Mapping to the CIELAB color space, the color difference between the glove under test and the standard sample is calculated, and the dyeing grade of the glove under test is determined based on the preset set of graded gradient thresholds.

2. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 1, characterized in that: In step S1, the acquired raw spectral image data cube For containing two-dimensional spatial coordinates With the wavelength of light The three-dimensional hyperspectral data cube is radiometrically corrected using a linear correction model. The formula for radiometric correction is as follows: ; in, The original digital quantity, For dark current data, For standard whiteboard data, This represents the reflectivity of a standard whiteboard.

3. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 1, characterized in that: Step S2 specifically includes the following steps: Step S21: For the obtained Feature extraction is performed to obtain feature maps. Set reflectivity threshold Generate suture mask ; Step S22: Calculation The row density is calculated and then smoothed using Gaussian smoothing. The local maxima neighborhood pixel set of the smoothed row density is then detected. ; Step S23: For Linear regression fitting is performed to obtain the seam trajectory equation. If the root mean square error of the fit is greater than a preset error threshold, then... The optimized seam trajectory equation was obtained by performing piecewise independent fitting. ; Step S24: with To segment the boundaries, the garter belt image is segmented into... A separate image of the garter belt segment. .

4. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 3, characterized in that: In step S21, the full-band spectral difference is calculated, and the band image corresponding to the peak value is selected as the feature map. The calculation formula is as follows: ; in, This represents the spectral difference across the entire wavelength band. The average spectral curve of the normally woven area. This is the average spectral curve of the seam area.

5. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 1, characterized in that: In step S3, the multi-task processing module includes a parallel character recognition branch and a defect detection branch. In the character recognition branch, the segmented image is input into the character recognition model. The model output includes two parts: the recognized character sequence, which serves as the unique identifier ID of the corresponding garter band segment; and the generation of a binary mask for the character region.

6. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 1, characterized in that: In step S3, the calculation formula for the integrated interference mask is: ; in, For comprehensive interference masking.

7. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 1, characterized in that: Step S4 specifically includes the following steps: Step S41: Construct a linear spectral mixture model, assuming the spectral vector of any pixel in the hyperspectral image is... ,Will Represented as a linear combination of endmember vectors plus additive noise, the mathematical expression is: ; in, Let be the spectral vector of any pixel in the hyperspectral image. The number of endmembers, For the first The spectral vector of each endmember. For the corresponding abundance, It is Gaussian white noise; Step S42: Employ a vertex component analysis algorithm to analyze the effective detection region. Extracting endmember matrices from spectral data Endmember matrix It includes fabric body endmembers, shadow endmembers, and background transmission endmembers; Step S43: Calculate the endmember abundance matrix for each pixel using the fully constrained least squares method. Minimize the reconstruction error under the conditions of non-negativity and summation constraint. The formula for minimizing the reconstruction error is: ; in, This is the endmember abundance vector; Step S44: Based on the calculated abundance matrix, remove the interfering endmember sets corresponding to shadow endmembers and background transmission endmembers, and identify the main endmember set corresponding to the fabric body. The pure spectrum is calculated by reconstructing the spectrum based on the set of principal endmembers and their corresponding normalized abundance weights. The calculation formula is: ; in, In the main end-member set Abundance corresponding to each endmember In the main end-member set The spectral vector of each endmember.

8. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 1, characterized in that: Step S5 specifically includes the following steps: Step S51: Obtain the pure spectrum The values ​​are converted to XYZ tristimulus values, then mapped to the CIELAB color space via a nonlinear transformation to obtain the color feature vector of the garter to be tested. The formula is as follows: ; in, This refers to the brightness value. The red-green hue value. The value represents the yellow-blue tint. Step S52: Based on the garter belt's identity ID, construct a baseline adaptive update mechanism based on identity recognition. Specifically: if the identity ID of the currently retrieved garter belt segment contains a standard segment identifier, determine that the current segment is a standard sample segment, update the color feature vector of the corresponding garter belt segment to the dynamic baseline, and store it in the buffer; if the identity ID of the currently retrieved garter belt segment does not contain a standard segment identifier, determine that the current segment is a regular product, and call the latest dynamic baseline in the current buffer. Step S53: Construct a multi-level dyeing evaluation model for automatic grading. Set a set of grading gradient thresholds in advance according to the factory's quality control requirements. Compare the color difference value with the preset set of grading gradient thresholds to determine the dyeing grade of the socks to be tested. After associating the dyeing grade with the corresponding identification ID, store it in the database.

9. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 8, characterized in that: In step S52, for ordinary product segments, the color feature vector of the glove to be tested is calculated. With dynamic benchmark The color difference value is obtained by calculating the Euclidean distance between them, using the following formula: ; in, This is the color difference value. The brightness value is a dynamic baseline. The red-green color value is the dynamic baseline. The yellow-blue tint value is the dynamic baseline.

10. The method for determining the color difference grade of fabrics based on multidimensional spectral analysis according to claim 8, characterized in that: In step S53, the hierarchical gradient threshold set is an increasing threshold sequence. , , calculate The system compares the results with a threshold set to determine the coloring level. Finally, the system outputs the level and combines it with the identified identity ID for archiving.