Intelligent evaluation method and system for color fastness of textile based on machine vision

CN121437394BActive Publication Date: 2026-08-11南通源佑纺织科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

但是该方法没有考虑人眼难以识别微观纹理变化,因而难以对色牢度等级对应颜色进行区分,没有考虑不同光谱条件下的纺织品图像的区别,没有考虑纹理损伤以及色度失真对于色牢度等级的影响,以及没有对色牢度等级进行预警,因而亟需一种基于机器视觉的纺织品色牢度智能评估的方法

Benefits of technology

通过局部对比度权重和光谱相似性权重的动态融合,优先保留高对比度区域的细节信息,同时抑制光谱间不一致的干扰信号,提升融合图像的信噪比,为后续纹理损伤与色度失真分析提供高分辨率的融合图像基础,确保特征提取的准确性,将灰度值压缩至32级,增强纹理统计的鲁棒性,通过水平相邻像素对的共生概率计算,量化织物纹理的规则性与损伤程度,相比传统灰度直方图更能表征空间结构特性;结合D65标准光源光谱分布与CIE颜色匹配函数,消除光源条件偏差,确保色度计算符合人眼视觉标准,通过非线性映射放大色差信号的感知权重,使色度失真指数更贴近实际色牢度退化程度,解决传统色差公式在低色差区域的灵敏度不足问题,通过线性加权融合将纹理损伤指数与色度失真指数映射到统一特征空间,避免单一指标误判,实现色牢度评估的全局最优决策,降低漏检率与误检率,满足工业级检测的可靠性要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121437394B_ABST
    Figure CN121437394B_ABST
Patent Text Reader

Abstract

This invention provides a machine vision-based intelligent assessment method and system for color fastness of textiles, belonging to the technical field of intelligent assessment methods for color fastness of textiles. The method includes: acquiring images of the textile to be assessed under various visible light spectra to obtain a fused spectral image containing the features of each spectral element; constructing a texture damage index of the textile to be assessed; obtaining a color distortion index of the textile to be assessed; using linear weighted fusion to concatenate the texture damage index and the color distortion index to form color feature parameters of the textile image; comparing the color feature parameters with a set threshold, and issuing an alert when the threshold is exceeded. By optimizing the fusion of different spectral information through weighting, the ability to capture subtle color changes in textiles is enhanced; by calculating the contrast of the gray-level co-occurrence matrix, the physical damage characteristics of the fibers are captured; and by combining color adaptation transformation and nonlinear transformation, the influence of the light source is eliminated, and the degree of fading is accurately quantified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of intelligent evaluation methods for color fastness of textiles, specifically to an intelligent evaluation method and system for color fastness of textiles based on machine vision. Background Technology

[0002] Color fastness assessment of textiles is a key indicator for measuring the color stability of fabrics under conditions such as light and friction. Traditional methods rely on manual visual inspection or single-spectrum imaging technology, which suffers from problems such as strong subjectivity, low detection efficiency, and insensitivity to subtle color changes and texture damage. Color difference analysis based on RGB images is easily affected by light source conditions and has difficulty separating texture degradation from color distortion; while single-spectrum methods cannot fully utilize multispectral information, resulting in limited feature representation capabilities.

[0003] In the prior art, CN117517045A discloses a method that pre-inputs the color corresponding to the color fastness grade into the processor, adjusts the warp and weft density of the textile after wetting it and before testing, and uses machine vision to test the color fastness of the textile sample by rubbing. However, this method does not consider the difficulty for the human eye to perceive microscopic texture changes, thus making it difficult to distinguish the colors corresponding to the color fastness grade. It also does not consider the differences in textile images under different spectral conditions, the impact of texture damage and color distortion on the color fastness grade, and does not provide early warning for the color fastness grade. Therefore, there is an urgent need for a machine vision-based intelligent evaluation method for textile color fastness.

[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide a machine vision-based intelligent evaluation method and system for color fastness of textiles, in order to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: The intelligent assessment method for color fastness of textiles based on machine vision includes the following steps: S1: Collect images of the textile to be evaluated under various visible light spectra, and perform pixel alignment processing on the images of each spectrum. Based on the similarity information between the spectra of the pixels under each spectrum, generate an adaptive weight coefficient for each pixel under each spectrum. Based on the adaptive weight coefficient, fuse the aligned pixels to obtain a fused spectral image containing the features of each spectrum. S2: Convert the spectral intensity value of each pixel in the fused spectral image into a single-channel gray value to obtain a grayscale image. Construct the grayscale co-occurrence probability of the pixels based on the grayscale image, perform contrast calculation on the grayscale co-occurrence probability, and construct the texture damage index of the textile to be evaluated. S3: For each pixel in the fused spectral image, the tristimulus components of each pixel are obtained based on its spectral reflectance data under each spectrum and the standard D65 light source spectral distribution data. The tristimulus components are color-adapted based on the standard white board reflectance. The color-adapted tristimulus values ​​are then nonlinearly transformed to obtain the color distortion index of the textile to be evaluated. S4: Linear weighted fusion is used to combine the texture damage index and the chromaticity distortion index to form the color feature parameters of the textile image. The color feature parameters are compared with a set threshold, and an early warning is issued when the threshold is exceeded.

[0007] Furthermore, the aligned pixels are fused according to adaptive weighting coefficients to obtain a fused spectral image containing each spectral feature, specifically including the following steps: Set the collection of images of different visible light spectra as follows: ,in, Indicates the spectral index number. Representing the total number of spectra, construct local contrast weighting coefficients: Among them, the central difference method is used to calculate : Indicates the first A spectrum at the pixel Local contrast weighting coefficient at the location; Indicates the first A spectrum at the pixel Gradient operator at the location; Denotes the Euclidean norm; Indicates the first Images under a spectrum; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel spectral intensity values; Define the similarity weighting coefficients between spectra: Indicates the first Pixels in a spectrum Similarity weight coefficient at each location; Represents pixels First The spectral intensity values ​​of each spectrum; Indicates the scale parameter; Indicates the first Pixels at each spectrum Spectral intensity value at; An adaptive weighting coefficient is constructed based on the local contrast weighting coefficient and the spectral similarity weighting coefficient: The influence factor representing the weighting coefficient of local contrast; Indicates the first Pixels in the spectrum Adaptive weighting coefficients at the location; The spectral intensity values ​​of the fused image are: in, Indicates the first after fusion A spectrum in The spectral intensity value at that location.

[0008] Furthermore, the texture damage index of the textile to be evaluated is constructed, and the specific steps are as follows: Convert the spectral intensity values ​​of the fused image to grayscale values: in, in, Represents pixels The grayscale value at that location; , as well as They represent the first The contribution weighting coefficients of each spectrum to red, green, and blue; Indicates the first Each spectrum for its wavelength spectral response function; , as well as These represent the matching functions for CIE standard colors, and represent the spectral sensitivity curves of human eye cone cells to red, green, and blue light, respectively. The specific steps to compress a grayscale image into a 32-level grayscale image are as follows: Determine the minimum and maximum grayscale values ​​of the pixels in the current grayscale image, and use the grayscale value of the current pixel. Subtract the minimum grayscale value to obtain the absolute difference between the current grayscale value and the minimum value. Divide the absolute difference by the difference between the maximum and minimum grayscale values ​​of the pixel to obtain the normalized value. Multiply the normalized value by 31 to linearly stretch the original grayscale range to the interval [0, 31]. Then, round down to the nearest integer to obtain an integer value between 0 and 31, which is the 32-level grayscale value of the compressed pixel. ; Calculate the gray-level co-occurrence probability in the direction of horizontally adjacent pixels: in, , , Indicates the width of the textile image; Indicates the height of the textile image; Indicates the left pixel grayscale value; Indicates the right pixel grayscale value; Indicates the left pixel in a horizontally adjacent pixel pair. grayscale value Right side pixels grayscale value The probability of; express The compressed 32-level grayscale value; express The compressed 32-level grayscale value; Iterate through all possible grayscale combinations For each pair Calculate the square of its grayscale difference, and then... The contrast of the image is calculated as a weight: Indicates the contrast of an image; A texture damage index is constructed by comparing the test images with those of standard textiles: in, Indicates the contrast of standard textiles; This indicates the texture damage index.

[0009] Furthermore, color adaptation of the tristimulus components is performed based on the reflectance of a standard white board, specifically including the following steps: Set the spectral power distribution of the D65 light source to... The CIE 1931 standard observer color matching function is: , , The tristimulus values ​​are: Color adaptation is performed based on the reflectance of a standard white board: in, , ,as well as The tristimulus values ​​of a standard whiteboard under a D65 light source; express After color adaptation Stimulus value; express After color adaptation Stimulus value; express After color adaptation Stimulus value; express place Stimulus value; express place Stimulus value; express place Stimulus value; Indicates the first after fusion A spectrum in The spectral intensity value at that location.

[0010] Furthermore, the color distortion index of the textile to be evaluated is obtained by nonlinearly transforming the tristimulus values ​​after color adaptation. The specific steps are as follows: Nonlinear transformation of the tristimulus values ​​after color adaptation: The nonlinear function is: This represents the red and green axis chromaticity components after nonlinear transformation; This represents the blue-yellow axis chromaticity components after nonlinear transformation; Represents a nonlinear function; The independent variable represents the nonlinear function; , , They represent After color adaptation , , Stimulus value; Calculate the chromaticity difference between the tristimulus values ​​after nonlinear transformation and the tristimulus values ​​of standard textiles: in, Represents pixels Color difference at the location; Represents the red and green axis chromaticity components of standard textiles; Represents the blue-yellow axis chromaticity components of standard textiles; Perform global chromaticity distortion index synthesis: in, Indicates the distortion index; Indicates the width of the textile image; Indicates the height of the textile image.

[0011] Furthermore, the texture damage index and chromaticity distortion index are both linearly weighted and fused together to construct the color feature parameters of the textile image. The specific steps are as follows: The texture damage index and chromaticity distortion index of the textile image are normalized by dividing them by the maximum texture damage index and the maximum chromaticity distortion index among all textile images, respectively. The normalized parameters are then fused using a linear weighted method to generate the color feature parameters that constitute the textile image. in, This represents the normalized texture damage index; This represents the normalized chromaticity distortion index; The weighting parameters represent the texture damage index; The color feature parameters of the textile image.

[0012] Furthermore, the color feature parameters are compared with a set threshold. When the threshold is exceeded, an alert is issued. The specific steps are as follows: Color feature parameters calculated from the current textile image With the set threshold Compare, if Greater than If the colorfastness is abnormal, an alarm signal will be triggered; otherwise, the textile will be marked as a qualified product.

[0013] The present invention also provides a machine vision-based intelligent evaluation system for color fastness of textiles, the evaluation system being used to perform the above-described evaluation method, comprising: The data acquisition module is used to acquire images of the textile to be evaluated under various visible light spectra, and to perform pixel alignment processing on the images of each spectrum. Based on the similarity information between the spectra of the pixels under each spectrum, an adaptive weight coefficient for each pixel under each spectrum is generated. The aligned pixels are then fused according to the adaptive weight coefficient to obtain a fused spectral image containing the features of each spectrum. The texture damage index calculation module is used to convert the spectral intensity value of each pixel in the fused spectral image into a single-channel gray value to obtain a grayscale image. Based on the grayscale image, the grayscale co-occurrence probability of the pixels is constructed, and the contrast of the grayscale co-occurrence probability is calculated to construct the texture damage index of the textile to be evaluated. The color distortion index calculation module is used to obtain the tristimulus components of each pixel in the fused spectral image based on its spectral reflectance data under each spectrum and the standard D65 light source spectral distribution data. The tristimulus components are color-adapted based on the standard white board reflectance, and the color distortion index of the textile to be evaluated is obtained by nonlinear transformation of the color-adapted tristimulus values. The early warning module is used to perform linear weighted fusion of texture damage index and chromaticity distortion index to obtain color feature parameters of textile image. The color feature parameters are compared with a set threshold, and an early warning is issued when the threshold is exceeded.

[0014] Compared with the prior art, the beneficial effects of the present invention are: By dynamically fusing local contrast weights and spectral similarity weights, detailed information in high-contrast regions is preferentially preserved while suppressing interference signals from spectral inconsistencies, thus improving the signal-to-noise ratio of the fused image. This provides a high-resolution fused image foundation for subsequent texture damage and color distortion analysis, ensuring the accuracy of feature extraction. Grayscale values ​​are compressed to 32 levels, enhancing the robustness of texture statistics. By calculating the co-occurrence probability of horizontally adjacent pixel pairs, the regularity and degree of damage of fabric texture are quantified, which better characterizes spatial structural characteristics compared to traditional grayscale histograms. Combining the spectral distribution of the D65 standard light source with the CIE color matching function eliminates light source condition deviations, ensuring that colorimetric calculations conform to human visual standards. Nonlinear mapping amplifies the perceptual weight of color difference signals, making the color distortion index closer to the actual degree of color fastness degradation, solving the problem of insufficient sensitivity of traditional color difference formulas in low color difference regions. Linear weighted fusion maps the texture damage index and color distortion index to a unified feature space, avoiding misjudgment by a single index, achieving globally optimal decision-making for color fastness assessment, reducing false negative and false positive rates, and meeting the reliability requirements of industrial-grade testing. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the overall method flow of the present invention.

[0016] Figure 2 This is a schematic diagram illustrating the relationship between the texture damage index and color feature parameters of the present invention.

[0017] Figure 3 This is a schematic diagram illustrating the relationship between the chromaticity distortion index and color feature parameters of the present invention.

[0018] Figure 4 This is a block diagram of the overall system structure of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0020] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0021] Example: Please see Figures 1-3 The present invention provides a technical solution: The intelligent assessment method for color fastness of textiles based on machine vision includes the following steps: S1: Collect images of the textile to be evaluated under various visible light spectra, and perform pixel alignment processing on the images of each spectrum. Based on the similarity information between the spectra of the pixels under each spectrum, generate an adaptive weight coefficient for each pixel under each spectrum. Based on the adaptive weight coefficient, fuse the aligned pixels to obtain a fused spectral image containing the features of each spectrum. The step of fusing aligned pixels according to adaptive weighting coefficients to obtain a fused spectral image containing each spectral feature specifically includes the following steps: Set the collection of images of different visible light spectra as follows: ,in, Indicates the spectral index number. Representing the total number of spectra, construct local contrast weighting coefficients: Among them, the central difference method is used to calculate : Indicates the first A spectrum at the pixel Local contrast weighting coefficient at the location; Indicates the first A spectrum at the pixel Gradient operator at the location; Denotes the Euclidean norm; Indicates the first Images under a spectrum; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel spectral intensity values; In the above formula, the local contrast weighting coefficient Reflecting the first A spectrum at the pixel Edge intensity and texture saliency at certain points are evaluated using normalized weight allocation. This prioritizes preserving detail information in high-contrast regions of the multispectral image while suppressing noise interference from low-contrast spectra, thereby improving the clarity and information integrity of the fused image. The molecule is the first... Gradient norm of a spectrum The denominator is the sum of all spectral gradient norms. The larger the gradient norm, the more drastic the local brightness change, and the higher the contribution weight of that spectrum at the current position. and They exhibit a positive correlation; the stronger the gradient, the larger the weight coefficient. It is inversely correlated with the sum of the gradient norms of other spectra, and the weight of the current spectrum is diluted when the contrast of other spectra increases.

[0022] In the central difference method, the pixel information on both sides of the current point is used simultaneously to eliminate directional deviations, which can more accurately reflect the real local changes. Due to the symmetrical difference calculation, the influence of random noise in adjacent pixels may be partially canceled out. Compared with the one-sided difference, the central difference is more robust to noise. The gradient magnitude is directly related to high-frequency details such as edges and textures in the image. Through the central difference, the fine texture breaks, wrinkles and other damage features on the surface of textiles can be accurately captured, providing high-resolution information for subsequent color fastness assessment.

[0023] Define the similarity weighting coefficients between spectra: Indicates the first Pixels in the spectrum Similarity weight coefficient at each location; Represents pixels First The spectral intensity values ​​of each spectrum; Indicates the scale parameter; Indicates the first Pixels at each spectrum Spectral intensity value at; In the above formula, the similarity weight coefficient This reflects the first Pixels in the spectrum By maintaining intensity consistency with other spectra and suppressing regions with significant inter-spectral differences, the fusion weight of consistent regions in multispectral images is enhanced, reducing the interference of anomalous spectra on the fusion result and improving fusion robustness; numerator term Indicates the first The first spectrum and the second A spectrum at the pixel The square of the intensity difference at a given point corresponds to the exponential term; the greater the difference between spectra, the larger the negative value of the exponential term. The smaller the value, the greater the difference in global average calculation. To avoid weighting bias due to different numbers of spectra; Differences between spectra They exhibit an inverse correlation; the greater the difference, the smaller the weight. With scale parameters Showing a positive correlation, The larger the value, the slower the weight decays.

[0024] An adaptive weighting coefficient is constructed based on the local contrast weighting coefficient and the spectral similarity weighting coefficient: The influence factor representing the weighting coefficient of local contrast; Indicates the first Pixels in the spectrum Adaptive weighting coefficients at the location; In the above formula, the adaptive weight coefficient Comprehensive reflection of the first Pixels in the spectrum The significance of local contrast and the consistency characteristics between spectra; the local contrast weighting coefficients are fused by linear weighting. Similarity weight coefficient It adaptively balances the requirements of detail preservation and noise suppression, avoids the limitations of a single weight strategy, and improves the accuracy of multispectral fusion results in characterizing textile damage. When the value approaches 1, the weight allocation is dominated by local contrast to emphasize edge details; When the value approaches 0, spectral similarity takes precedence, emphasizing the consistent region; ensure that the sum of the weight coefficients is 1 to prevent intensity shift in the fusion result due to differences in contrast or similarity between different spectra; and Positive correlation, local contrast weight or When the value is increased, the current spectral weight is improved; and A positive correlation is observed, with spectral similarity weights or When the value is increased, the current spectral weight is increased; the normalized denominator is scaled synchronously for all spectral weights without changing the relative proportion of each spectral weight.

[0025] The spectral intensity values ​​of the fused image are: in, Indicates the first after fusion A spectrum in The spectral intensity value at that location.

[0026] S2: Convert the spectral intensity value of each pixel in the fused spectral image into a single-channel gray value to obtain a grayscale image. Construct the grayscale co-occurrence probability of the pixels based on the grayscale image, perform contrast calculation on the grayscale co-occurrence probability, and construct the texture damage index of the textile to be evaluated. The specific steps for constructing the texture damage index of the textile to be evaluated are as follows: Convert the spectral intensity values ​​of the fused image to grayscale values: in, in, Represents pixels The grayscale value at that location; , as well as They represent the first The contribution weighting coefficients of each spectrum to red, green, and blue; Indicates the first Each spectrum for its wavelength spectral response function; , as well as These represent the matching functions for CIE standard colors, and represent the spectral sensitivity curves of human eye cone cells to red, green, and blue light, respectively. In the above formula, grayscale value This reflects the pixel-level appearance of the fused image. It provides a comprehensive brightness response to human visual perception and quantifies the effective integration of multispectral information within the visible light range. , as well as Simulates the differences in human eye sensitivity to red, green, and blue light to ensure that grayscale conversion conforms to human visual characteristics; normalized weights. , as well as To eliminate the bias in luminance calculation caused by differences in spectral response and improve color accuracy and consistency in color fastness assessment, the calculation is performed by the inner product of the spectral response and the color matching function, and the visible light spectrum is... arrive , and The larger the overlapping area, The higher the value, the more significant the contribution of red light; the same applies to green and blue light. Normalizing the denominator ensures that the sum of the weighting coefficients for each color channel is 1, avoiding brightness shifts due to differences in spectral energy distribution. The grayscale coefficient includes... , , Based on the human eye's high sensitivity to green light, the contribution of the green channel to the grayscale value is enhanced; and Positive correlation: the higher the spectral fusion intensity, the greater the contribution of grayscale value. and , as well as There is a positive correlation; the higher the overlap between the spectral response and the color matching function, the larger the weighting coefficient, and the stronger the contribution of the corresponding color channel to the grayscale. The grayscale value is a linear weighted sum, and the weighting coefficient is directly related to the spectral energy distribution characteristics, with no inverse modulation relationship.

[0027] The specific steps to compress a grayscale image into a 32-level grayscale image are as follows: Determine the current grayscale image The minimum and maximum grayscale values ​​of a pixel, using the current pixel's grayscale value. Subtract the minimum grayscale value to obtain the absolute difference between the current grayscale value and the minimum value. Divide the absolute difference by the difference between the maximum and minimum grayscale values ​​of the pixel to obtain the normalized value. Multiply the normalized value by 31 to linearly stretch the original grayscale range to the interval [0, 31]. Then, round down to the nearest integer to obtain an integer value between 0 and 31, which is the 32-level grayscale value of the compressed pixel. ; Calculate the gray-level co-occurrence probability in the direction of horizontally adjacent pixels: in, , , Indicates the width of the textile image; Indicates the height of the textile image; Indicates the left pixel grayscale value; Indicates the right pixel grayscale value; Indicates the left pixel in a horizontally adjacent pixel pair. grayscale value Right side pixels grayscale value The probability of; express The compressed 32-level grayscale value; express The compressed 32-level grayscale value; In the above formula, by statistically analyzing the co-occurrence patterns of grayscale values ​​of adjacent pixels, local features such as color difference and texture breakage on the surface of textiles are captured, providing quantifiable statistical basis for color fastness damage detection; normalization coefficient To ensure global comparability of probability values ​​and eliminate the impact of image size differences on statistical results; the numerator directly depends on all conditions that satisfy... and The number of pixel pairs, the higher the frequency, the higher the probability. The larger the denominator; This means that as the image size increases, the normalization coefficient decreases, the overall probability value decreases, and statistical bias is avoided. Pixel Pair The frequency of occurrence is positively correlated; the more times a specific grayscale combination appears, the higher the probability value. With image size , The correlation is negative; the larger the size, the larger the denominator, which dilutes the probability value.

[0028] Iterate through all possible grayscale combinations For each pair Calculate the square of its grayscale difference, and then... The contrast of the image is calculated as a weight: Indicates the contrast of an image; In the above formula, This represents the image contrast and is used to quantify the weighted sum of squares of gray-level differences between adjacent pixels in the global texture, reflecting the severity and spatial distribution characteristics of gray-level changes on the textile surface. It is achieved by fusing the intensity of gray-level differences. Coexistence probability weights It highlights the abnormal contrast in the damaged area, improving detection sensitivity; it provides a calculable global contrast index, replacing manual visual assessment and optimizing the objectivity and efficiency of color fastness testing. Used to measure the intensity of local differences in grayscale values ​​between adjacent pixels; The larger, the better The more significant the contribution, the higher the detection priority for large grayscale jumps; frequently occurring grayscale combinations... The larger the value, the better. The impact is greater, strengthening the expression of texture regularity features; Squared difference in grayscale Positive correlation; the more dramatic the difference, the more the contrast contribution increases quadratically. With coexistence probability Positive correlation; the more frequently a specific combination of differences occurs, the stronger its weighted effect.

[0029] A texture damage index is constructed by comparing the test images with those of standard textiles: in, Indicates the contrast of standard textiles; This indicates the texture damage index.

[0030] In the above formula, the texture damage index Used to characterize the relative deviation of the contrast between the test image and the standard textile, quantifying the intensity of texture degradation caused by colorfastness damage, and through normalizing the difference. This eliminates the difference in contrast dimensions between different standard samples, enables objective quantification of damage levels across samples, maps contrast anomalies to standardized indices, and enhances the detection sensitivity and interpretability of minor damage. The absolute value of the damage index is directly determined; the greater the difference, The higher, As a denominator, the larger its value, the greater the difference in contrast for the same value. The smaller the value, the less the impact of magnitude fluctuations on the results. Difference in contrast Positive correlation; the more significant the deviation of the test sample from the standard, the higher the damage index. Contrast with standard The correlation is negative; the larger the baseline value, the more diluted the damage index is for the same difference. If the contrast is being tested... Approaching When the damage index approaches zero, it increases exponentially.

[0031] S3: For each pixel in the fused spectral image, the tristimulus components of each pixel are obtained based on its spectral reflectance data under each spectrum and the standard D65 light source spectral distribution data. The tristimulus components are color-adapted based on the standard white board reflectance. The color-adapted tristimulus values ​​are then nonlinearly transformed to obtain the color distortion index of the textile to be evaluated. The process of color adaptation of the tristimulus components based on the reflectance of a standard white board specifically includes the following steps: Set the spectral power distribution of the D65 light source to... The CIE 1931 standard observer color matching function is: , , The tristimulus values ​​are: In the above formula, the object's reflectance characteristics are expressed through spectral weighted integration. With light source spectrum By combining these methods, we can accurately simulate the human eye's perception of textile colors, ensuring the physical consistency of color difference calculations; and provide standardized color space parameters for color fastness testing, reducing ambient light interference. , The higher the value, the greater the contribution of the tristimulus component to the corresponding wavelength; the colorimetric function value at a specific wavelength , , The higher the value, the stronger the contribution of the tristimulus components.

[0032] Color adaptation is performed based on the reflectance of a standard white board: in, , ,as well as The tristimulus values ​​of a standard whiteboard under a D65 light source; express After color adaptation Stimulus value; express After color adaptation Stimulus value; express After color adaptation Stimulus value; express place Stimulus value; express place Stimulus value; express place Stimulus value; Indicates the first after fusion A spectrum in The spectral intensity value at that location.

[0033] The color distortion index of the textile to be evaluated is obtained by nonlinearly transforming the tristimulus values ​​after color adaptation. The specific steps are as follows: Nonlinear transformation of the tristimulus values ​​after color adaptation: The nonlinear function is: This represents the red and green axis chromaticity components after nonlinear transformation; This represents the blue-yellow axis chromaticity components after nonlinear transformation; Represents a nonlinear function; The independent variable represents the nonlinear function; , , They represent After color adaptation , , Stimulus value; In the above formula, It represents the intensity of color shift on the red-green perception axis; positive values ​​are biased towards red, and negative values ​​are biased towards green. This characterizes the intensity of color shift along the blue-yellow perception axis; positive values ​​shift towards yellow, and negative values ​​shift towards blue. This is achieved through a nonlinear function. By compressing the color difference sensitivity in the high brightness range and stretching the color difference resolution in the low brightness range, it better matches the non-linear response characteristics of human vision; by utilizing the difference in tristimulus values ​​after color adaptation, it eliminates the interference of light source color temperature on chromaticity components and improves the perceptual consistency of color space conversion. Depend on and The nonlinear difference dominates the result; the greater the difference between the two, the more significant the chromaticity shift of the red and green axes. The piecewise function property suppresses oversaturation in the high brightness range while preserving color difference details in the low brightness range. and Positive correlation, if relatively As the color increases, the red-green tone shifts towards a stronger red; and Positive correlation, if Compared to Increase, the blue-yellow tone shifts towards a stronger yellow.

[0034] For nonlinear functions, the high-brightness region is... When the brightness is large, the sensitivity of the human eye to changes in brightness follows an approximately power-law relationship, with the cube root function... By compressing the dynamic range of the high-brightness region, the color difference changes in the color space in the bright area more closely match the smooth characteristics of human visual perception; in the low-brightness region, i.e. When the brightness is small, the human eye's sensitivity to differences in brightness increases significantly. (Linear function) This magnifies minute brightness variations in dark areas, avoiding numerical instability caused by the derivative of the cube root function approaching infinity when it is close to zero, while preserving chromatic aberration details in dark areas.

[0035] Calculate the chromaticity difference between the tristimulus values ​​after nonlinear transformation and the tristimulus values ​​of standard textiles: in, Represents pixels Color difference at the location; Represents the red and green axis chromaticity components of standard textiles; Represents the blue-yellow axis chromaticity components of standard textiles; In the above formula, It is used to quantify the perceived color difference intensity between the tested textile and the standard sample on the red-green-blue-yellow hue plane, reflecting the overall magnitude of color shift. By combining the chromaticity component differences of the red-green axis and the blue-yellow axis through the Euclidean distance formula, it simulates the overall perception of composite color difference by the human eye, eliminates the limitations of single chromaticity axis analysis, provides multi-dimensional color difference criteria for color fastness damage, dye fading, etc., and improves detection accuracy. Differences between red and green axes Differences between blue and yellow axes The sum of squares dominates, and the total chromatic difference increases significantly when the differences between the two axes are amplified simultaneously; the square operation strengthens the weight of large chromatic differences, suppresses small noise interference, and enhances the robustness of the chromatic difference criterion; Absolute value of difference from red and green axes Positive correlation; the further the red and green axes deviate from the standard values, the greater the total color difference. Absolute value of difference from blue-yellow axis Positive correlation: the further the blue-yellow axis deviates from the standard value, the greater the total color difference.

[0036] Perform global chromaticity distortion index synthesis: in, Indicates the distortion index; Indicates the width of the textile image; Indicates the height of the textile image.

[0037] In the above formula, It is used to characterize the average intensity of chromaticity distortion across the entire area of ​​a textile image, reflecting the perceived significance of the overall color deviation from the standard sample; it eliminates local noise interference through spatial averaging, providing a stable and uniform quantitative index of chromaticity distortion. The arithmetic mean of the color difference contributions of all pixels; an increase in the color difference of any pixel directly increases the global distortion index; the color difference weight of each pixel is equal. To avoid evaluation bias caused by regional preferences; The total pixel color difference is positively correlated with Yang Ge's index; the larger the total color difference, the higher the global distortion index. Compared with single-point color difference intensity Local positive correlation; an increase in color difference in any pixel will lead to rise.

[0038] S4: Linear weighted fusion is used to combine the texture damage index and the chromaticity distortion index to form the color feature parameters of the textile image. The color feature parameters are compared with a set threshold, and an early warning is issued when the threshold is exceeded.

[0039] The texture damage index and chromaticity distortion index are both linearly weighted and fused together to form the color feature parameters of the textile image. The specific steps are as follows: The texture damage index and chromaticity distortion index of the textile image are normalized by dividing them by the maximum texture damage index and the maximum chromaticity distortion index among all textile images, respectively. The normalized parameters are then fused using a linear weighted method to generate the color feature parameters that constitute the textile image. in, This represents the normalized texture damage index; This represents the normalized chromaticity distortion index; The weighting parameters represent the texture damage index; The color feature parameters of the textile image.

[0040] In the above formula, This method characterizes the degree of color quality degradation in textile images, balances the joint impact of texture damage and chromaticity distortion on perceived quality, eliminates differences in texture and chromaticity dimensions between different samples through normalization, achieves parameter comparability across images, and uses linear weighted fusion to preserve the independent contributions of the two damage dimensions, supporting weight adjustment. To adapt to the needs of different testing scenarios, yes and The weighted sum, an increase in any damage index directly raises the [damage index]. The value; As the size increases, texture damage affects The effect of color distortion increases, while the effect of color distortion decreases, and vice versa; and as well as Positive correlation, when When it approaches 1, right The sensitivity to change approaches zero, and vice versa, reflecting the inverse regulatory characteristics of the two damage dimensions.

[0041] In the above embodiments, 10 sets of color feature parameters and normalized texture damage index and normalized chromaticity distortion index data were selected to reflect the changing relationship between color feature parameters and independent variables, namely normalized texture damage index and normalized chromaticity distortion index, as shown in Table 1: Table 1: Relationship between color feature parameters and independent variables, namely, normalized texture damage index and normalized chromaticity distortion index. The data in the table above shows that as the texture impairment index increases, the color feature parameters gradually increase, and conversely, as the corresponding chromaticity distortion index increases, the color feature parameters also gradually increase, demonstrating that... yes and The weighted sum, an increase in any damage index directly raises the [damage index]. The value of .

[0042] The step of comparing color feature parameters with a set threshold and issuing an alert when the threshold is exceeded is as follows: Color feature parameters calculated from the current textile image With the set threshold Compare, if Greater than If the colorfastness is abnormal, an alarm signal will be triggered; otherwise, the textile will be marked as a qualified product.

[0043] Please see Figure 4 The present invention also provides a machine vision-based intelligent evaluation system for color fastness of textiles, the evaluation system being used to perform the above-described evaluation method, comprising: The data acquisition module is used to acquire images of the textile to be evaluated under various visible light spectra, and to perform pixel alignment processing on the images of each spectrum. Based on the similarity information between the spectra of the pixels under each spectrum, an adaptive weight coefficient for each pixel under each spectrum is generated. The aligned pixels are then fused according to the adaptive weight coefficient to obtain a fused spectral image containing the features of each spectrum. The texture damage index calculation module is used to convert the spectral intensity value of each pixel in the fused spectral image into a single-channel gray value to obtain a grayscale image. Based on the grayscale image, the grayscale co-occurrence probability of the pixels is constructed, and the contrast of the grayscale co-occurrence probability is calculated to construct the texture damage index of the textile to be evaluated. The color distortion index calculation module is used to obtain the tristimulus components of each pixel in the fused spectral image based on its spectral reflectance data under each spectrum and the standard D65 light source spectral distribution data. The tristimulus components are color-adapted based on the standard white board reflectance, and the color distortion index of the textile to be evaluated is obtained by nonlinear transformation of the color-adapted tristimulus values. The early warning module is used to perform linear weighted fusion of texture damage index and chromaticity distortion index to obtain color feature parameters of textile image. The color feature parameters are compared with a set threshold, and an early warning is issued when the threshold is exceeded.

[0044] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0045] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0046] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0047] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A machine vision-based intelligent evaluation method for color fastness of textiles, characterized by the following steps: include: S1: Collect images of the textile to be evaluated under various visible light spectra, and perform pixel alignment processing on the images of each spectrum. Based on the similarity information between the spectra of the pixels under each spectrum, generate an adaptive weight coefficient for each pixel under each spectrum. Based on the adaptive weight coefficient, fuse the aligned pixels to obtain a fused spectral image containing the features of each spectrum. S2: Convert the spectral intensity value of each pixel in the fused spectral image into a single-channel gray value to obtain a grayscale image. Construct the grayscale co-occurrence probability of the pixels based on the grayscale image, perform contrast calculation on the grayscale co-occurrence probability, and construct the texture damage index of the textile to be evaluated. S3: For each pixel in the fused spectral image, the tristimulus components of each pixel are obtained based on its spectral reflectance data under each spectrum and the standard D65 light source spectral distribution data. The tristimulus components are color-adapted based on the standard white board reflectance. The color-adapted tristimulus values ​​are then nonlinearly transformed to obtain the color distortion index of the textile to be evaluated. S4: Linear weighted fusion is used to splice the texture damage index and the chromaticity distortion index to form the color feature parameters of the textile image. The color feature parameters are compared with the set threshold, and an early warning is issued when the threshold is exceeded.

2. The intelligent assessment method for color fastness of textiles based on machine vision according to claim 1, characterized in that, The step of fusing aligned pixels according to adaptive weighting coefficients to obtain a fused spectral image containing each spectral feature specifically includes the following steps: Set the collection of images of different visible light spectra as follows: ,in, Indicates the spectral index number. Representing the total number of spectra, construct local contrast weighting coefficients: Among them, the central difference method is used to calculate : Indicates the first A spectrum at the pixel Local contrast weighting coefficient at the location; Indicates the first A spectrum at the pixel Gradient operator at the location; Denotes the Euclidean norm; Indicates the first Images under a spectrum; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel Spectral intensity value at; Indicates the first A spectrum at the pixel spectral intensity values; Define the similarity weighting coefficients between spectra: Indicates the first Pixels in a spectrum Similarity weight coefficient at each location; Represents pixels First The spectral intensity values ​​of each spectrum; Indicates the scale parameter; Indicates the first Pixels at each spectral point Spectral intensity value at; An adaptive weighting coefficient is constructed based on the local contrast weighting coefficient and the spectral similarity weighting coefficient: The influence factor representing the weighting coefficient of local contrast; Indicates the first Pixels in a spectrum Adaptive weighting coefficients at the location; The spectral intensity values ​​of the fused image are: in, Indicates the first after fusion A spectrum in The spectral intensity value at that location.

3. The intelligent assessment method for color fastness of textiles based on machine vision according to claim 1, characterized in that, The specific steps for constructing the texture damage index of the textile to be evaluated are as follows: Convert the spectral intensity values ​​of the fused image to grayscale values: in, in, Represents pixels The grayscale value at that location; , as well as They represent the first The contribution weighting coefficients of each spectrum to red, green, and blue; Indicates the first Each spectrum for its wavelength spectral response function; , as well as These represent the matching functions for CIE standard colors, and represent the spectral sensitivity curves of human eye cone cells to red, green, and blue light, respectively. The specific steps to compress a grayscale image into a 32-level grayscale image are as follows: Determine the minimum and maximum grayscale values ​​of the pixels in the current grayscale image, and use the grayscale value of the current pixel. Subtract the minimum grayscale value to obtain the absolute difference between the current grayscale value and the minimum value. Divide the absolute difference by the difference between the maximum and minimum grayscale values ​​of the pixel to obtain the normalized value. Multiply the normalized value by 31 to linearly stretch the original grayscale range to the interval [0, 31]. Then, round down to the nearest integer to obtain an integer value between 0 and 31, which is the 32-level grayscale value of the compressed pixel. ; Calculate the gray-level co-occurrence probability in the direction of horizontally adjacent pixels: in, , , Indicates the width of the textile image; Indicates the height of the textile image; Represents the left pixel grayscale value; Indicates the right pixel grayscale value; Indicates the left pixel in a horizontally adjacent pixel pair. grayscale value Right side pixels grayscale value The probability of; express The compressed 32-level grayscale value; express The compressed 32-level grayscale value; Iterate through all possible grayscale combinations For each pair Calculate the square of its grayscale difference, and then... The contrast of the image is calculated as a weight: Indicates the contrast of an image; A texture damage index is constructed by comparing the test images with those of standard textiles: in, Indicates the contrast ratio of standard textiles; This indicates the texture damage index.

4. The intelligent assessment method for color fastness of textiles based on machine vision according to claim 1, characterized in that, The process of color adaptation of the tristimulus components based on the reflectance of a standard white board specifically includes the following steps: Set the spectral power distribution of the D65 light source to... The CIE 1931 standard observer color matching function is: , , The tristimulus values ​​are: Color adaptation is performed based on the reflectance of a standard white board: in, , ,as well as The tristimulus values ​​of a standard whiteboard under a D65 light source; express After color adaptation Stimulus value; express After color adaptation Stimulus value; express After color adaptation Stimulus value; express place Stimulus value; express place Stimulus value; express place Stimulus value; Indicates the first after fusion A spectrum in The spectral intensity value at that location.

5. The intelligent assessment method for color fastness of textiles based on machine vision according to claim 1, characterized in that, The color distortion index of the textile to be evaluated is obtained by nonlinearly transforming the tristimulus values ​​after color adaptation. The specific steps are as follows: Nonlinear transformation of the tristimulus values ​​after color adaptation: The nonlinear function is: This represents the red and green axis chromaticity components after nonlinear transformation; This represents the blue-yellow axis chromaticity components after nonlinear transformation; Represents a nonlinear function; The independent variable represents the nonlinear function; , , They represent After color adaptation , , Stimulus value; Calculate the chromaticity difference between the tristimulus values ​​after nonlinear transformation and the tristimulus values ​​of standard textiles: in, Represents pixels Color difference at the location; Represents the red-green axis chromaticity components of standard textiles; Represents the blue-yellow axis chromaticity components of standard textiles; Perform global chromaticity distortion index synthesis: in, Indicates the distortion index; Indicates the width of the textile image; Indicates the height of the textile image.

6. The intelligent assessment method for color fastness of textiles based on machine vision according to claim 1, characterized in that, The texture damage index and chromaticity distortion index are linearly weighted and fused together to form the color feature parameters of the textile image. The specific steps are as follows: The texture damage index and chromaticity distortion index of the textile image are normalized by dividing them by the maximum texture damage index and the maximum chromaticity distortion index among all textile images, respectively. The normalized parameters are then fused using a linear weighted method to generate the color feature parameters that constitute the textile image. in, This represents the normalized texture damage index; This represents the normalized chromaticity distortion index; The weighting parameters represent the texture damage index; The color feature parameters of the textile image.

7. The intelligent assessment method for color fastness of textiles based on machine vision according to claim 6, characterized in that, The step of comparing color feature parameters with a set threshold and issuing an alert when the threshold is exceeded is as follows: Color feature parameters calculated from the current textile image With the set threshold Compare, if Greater than If the colorfastness is abnormal, an alarm signal will be triggered; otherwise, the textile will be marked as a qualified product.

8. A machine vision-based intelligent evaluation system for color fastness of textiles, characterized in that: The system is used to perform the method according to any one of claims 1-7, comprising: The data acquisition module is used to acquire images of the textile to be evaluated under various visible light spectra, and to perform pixel alignment processing on the images of each spectrum. Based on the similarity information between the spectra of the pixels under each spectrum, an adaptive weight coefficient for each pixel under each spectrum is generated. The aligned pixels are then fused according to the adaptive weight coefficient to obtain a fused spectral image containing the features of each spectrum. The texture damage index calculation module is used to convert the spectral intensity value of each pixel in the fused spectral image into a single-channel gray value to obtain a grayscale image. Based on the grayscale image, the grayscale co-occurrence probability of the pixels is constructed, and the contrast of the grayscale co-occurrence probability is calculated to construct the texture damage index of the textile to be evaluated. The color distortion index calculation module is used to obtain the tristimulus components of each pixel in the fused spectral image based on its spectral reflectance data under each spectrum and the standard D65 light source spectral distribution data. The tristimulus components are color-adapted based on the standard white board reflectance, and the color distortion index of the textile to be evaluated is obtained by nonlinear transformation of the color-adapted tristimulus values. The early warning module is used to perform linear weighted fusion of texture damage index and chromaticity distortion index to obtain color feature parameters of textile image. The color feature parameters are compared with a set threshold, and an early warning is issued when the threshold is exceeded.

Citation Information

Patent Citations

  • Textile color fastness intelligent evaluation method based on machine vision

    CN117517045A

  • CNN-Transform fusion model-based textile color fastness automatic rating method and system

    CN119850607A

  • Military clothing production defect automatic detection method and system based on machine learning

    CN120471860A