Textile color fastness analysis method and system based on gray mapping

CN122199566BActive Publication Date: 2026-10-30JIANGSU TEXTILE PROD QUALITY SUPERVISION & INSPECTION INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610682135.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-10-30
Estimated Expiration
2046-05-18

AI Technical Summary

Technical Problem

[0005]针对现有技术中由于纺织品质量评估方法主观性过高,对纺织品的实际评估结果偏差较大,测试环境和测试样品数量都会直接影响对纺织品的质量评估结果等问题

Benefits of technology

其一,本发明通过对图像数据进行纹理分析,确定纹理区域,随后将原始图像数据转换至HSV颜色空间进行灰度补偿,进而屏蔽纹理区域,计算灰卡区域平均灰度值,得到评级结果。以此得到平均绝对误差小于等于0.2级,以及纹理织物误差小于等于0.3级的质量评估结果,可以将织物质量评估的准确率提升至80%以上。大大减少了进行人工肉眼检测评估时,对人工经验的依赖程度。实现全自动化评估处理,提升了质量评估的标准和准确度。并避免了织物评估过程中,红色系织物褪色被高估的情况以及蓝色系织物褪色被低估的情况,增加了红色色相和蓝色色相的动态补偿,消除了色相主观偏差;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199566B_ABST
    Figure CN122199566B_ABST
Patent Text Reader

Abstract

The present application provides a textile color fastness analysis method and system based on gray scale mapping, relating to the field of textile detection technology. The existing technology textile quality evaluation method is too subjective, and the actual evaluation result of the textile is greatly deviated. The test environment and the number of test samples will directly affect the quality evaluation result of the textile. The present application breaks through the limitations of manual subjective judgment in traditional textile color fastness rating, and cooperates with physical optical filter and dynamic weighted gray scale mapping algorithm for fabric evaluation operation. The color three attributes are converted into quantifiable gray scale, the collected image is subjected to secondary gray scale compensation, the hue deviation and fabric texture interference on the rating result are eliminated, and a fast, accurate and highly automated color fastness grading determination method is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of textile testing technology, and in particular to a method and system for analyzing the color fastness of textiles based on grayscale mapping. Background Technology

[0002] In the quality assessment of textiles, various tests are required, including colorfastness to rubbing, colorfastness to washing, and colorfastness to perspiration. Following this, the degree of color change and staining is graded to determine the quality of the textiles. Currently, the mainstream quality assessment grading methods are visual grading, the nine-level color chart grading method, and instrumental grading. Visual grading is a commonly used standard method in laboratories, primarily based on the ISO 105-A02 gray scale for color change and the ISO 105-A03 gray scale for staining. During the process, the sample is compared to the gray scale under a D65 standard light source, and the grader visually determines which grade (1-5) the sample belongs to. However, this method requires regular verification of the accuracy of the gray scale and the competence of the graders. The nine-level color chart grading method is a US standard method, mainly used for staining tests such as colorfastness to rubbing. This method employs a color card system comprising sixty color wheels representing five hues: red, yellow, green, blue, and violet. It comprehensively evaluates color changes and staining levels through color matching, overcoming the shortcomings of existing testing methods that incompletely assess hue factors. However, its applicability is limited. The instrumental evaluation method uses a spectrophotometer or digital colorimetric system for objective measurement. Color difference values ​​are then calculated using the CIELAB color space and converted into specific grades according to ISO 105-A03 or AATCCEP6 standards.

[0003] Among existing testing methods, the manual visual rating method is significantly influenced by the subjectivity of the tester, with ratings varying by 0.5-2 levels between different testers. Furthermore, this method is easily affected by external factors such as light source, background color, and the order of the samples being tested. These factors result in this method being time-consuming, inefficient, and prone to significant errors. Instrumental evaluation methods have limited applicability; spectrophotometers distort the results when testing fabrics with textures such as napped or brushed fabrics and cannot identify hue anomalies such as yellowing from fluorescent whitening agents or metamerism. Pure physical color difference calculations deviate from visual perception, especially in the intermediate grades of 3-4, where the results are ambiguous. Complex fabric textures can also interfere with the measurement optical path.

[0004] Therefore, this application proposes a method and system for analyzing the color fastness of textiles based on grayscale mapping, in order to overcome the limitations of the influence of subjective human judgment in the traditional color fastness rating of textiles. By using physical optical filters and dynamic weighted grayscale mapping algorithms in synergy to perform fabric evaluation, the three attributes of color are converted into quantifiable grayscale levels. Secondary grayscale compensation is performed on the acquired images to eliminate the interference of hue deviation and fabric texture on the rating results, thereby realizing a fast, accurate and highly automated method for color fastness grading. Summary of the Invention

[0005] To address the problems in existing textile quality assessment methods, such as excessive subjectivity leading to significant deviations in actual assessment results, and the direct impact of testing environment and sample quantity on quality assessment outcomes, this invention first proposes a textile colorfastness analysis method based on grayscale mapping, specifically including the following steps: Step S1: Set up a standard light source environment, and use a dynamic grayscale mapping filter to acquire images of the test sample and a standard gray card to obtain the original image data and original color image data of the test sample. Step S2: Perform texture analysis on the original color image data to identify and determine texture regions; Step S3: Convert the original image data to the HSV color space, extract the hue angle H of each pixel, and dynamically compensate the grayscale value of the test sample based on the hue angle H to generate a compensated grayscale image. The rules for dynamic compensation are as follows: when the hue angle H is less than 30° or greater than 330°, multiply by a weighting coefficient of 0.95; when the hue angle H is greater than 150° and less than 210°, apply a weight of 1.05 to the grayscale value; otherwise, the grayscale value remains unchanged. Step S4: Perform a masking operation on the textured areas of the compensated grayscale image to generate a detextured grayscale image; Step S5: Calculate the average gray value of the test sample area in the detextured grayscale image, and calculate the average gray value of each level of gray card in the gray card area. Output the rating result according to the gray card level.

[0006] Furthermore, in step S1, the transmission spectral response function of the dynamic grayscale mapping filter is: ; Where R(λ), G(λ), and B(λ) are the CIE1931 standard colorimetric observer matching functions.

[0007] Furthermore, in step S1, the standard light source environment includes: a D65 standard light source with a color temperature of 6500K±200K, an illuminance of 1200lx±200lx, and a color rendering index R0. a ≥95.

[0008] Furthermore, in step S2, texture analysis involves extracting local contrast features through the gray-level co-occurrence matrix; the texture region is the region identified through contrast threshold segmentation.

[0009] Furthermore, in step S3, the grayscale value is first subjected to gamma correction before dynamic compensation, and then subjected to inverse gamma correction after compensation.

[0010] Furthermore, the comparison in step S5 uses the following formula: ; in, For colorfastness rating, The average gray value of the area to be tested. This represents the average grayscale value of the corresponding level in the standard grayscale chart. This is the calibration coefficient.

[0011] According to another aspect of the present invention, a textile color fastness analysis system based on grayscale mapping is also proposed, applied to the above-mentioned textile color fastness analysis method based on grayscale mapping, comprising: The optical rating box is equipped with a ring-shaped D65 light source for providing standard illumination and a 45° observation platform for placing the test sample and standard gray card. The surface of the observation platform is coated with a neutral gray coating. A rotatable filter assembly, connected to an optical rating box and positioned between the light source and the observation platform, includes at least one dynamic grayscale mapping filter and one neutral gray filter. The dynamic grayscale mapping filter is used to convert incident light into grayscale light proportional to human brightness perception. The intelligent image sensor, connected to a rotatable filter group, is used to acquire images of the sample and gray card after processing by a dynamic grayscale mapping filter. An image processing module, connected to a smart image sensor, is used to execute steps S1 to S5; The touchscreen control terminal is connected to the image processing module and is used to set parameters, select rating modes, and display rating results.

[0012] Furthermore, the dynamic grayscale mapping filter is a filter coated with a multilayer dielectric film, and its transmittance error in the 400-700nm visible light band is ≤±2%.

[0013] Furthermore, the color temperature of the ring-shaped D65 light source is 6500K±200K, the illuminance is 1200lx±200lx, and the color rendering index Ra≥95.

[0014] Furthermore, the intelligent image sensor has a resolution of ≥20 million pixels and features autofocus and exposure control.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: Firstly, this invention performs texture analysis on image data to identify texture regions. Then, it converts the original image data to the HSV color space for grayscale compensation, thereby masking the texture regions and calculating the average grayscale value of the grayscale area to obtain the rating result. This yields quality assessment results with an average absolute error of less than or equal to 0.2 and a texture fabric error of less than or equal to 0.3, improving the accuracy of fabric quality assessment to over 80%. This significantly reduces the reliance on human experience in manual visual inspection and assessment. It achieves fully automated assessment processing, improving the standards and accuracy of quality assessment. Furthermore, it avoids the overestimation of fading in red fabrics and the underestimation of fading in blue fabrics during fabric assessment by adding dynamic compensation for red and blue hues, eliminating subjective hue bias. Secondly, by performing texture analysis on the original color image to determine the texture region, the texture of the fabric can be adaptively processed. It can also accurately rate brushed and napped fabrics. The texture analysis algorithm accurately identifies the napping and brushing conditions of the fabric, further improving the accuracy. It is also adaptable to various quality assessment situations, expanding the scope of fabric quality assessment to all fabric types. It can not only accurately output the color fastness grade, but also identify hue anomalies that traditional instruments cannot detect through grayscale change trends, providing more comprehensive information for textile quality assessment. Thirdly, by integrating an optical rating box, rotatable filter group, intelligent image sensor, image processing module, and touchscreen control terminal into a coherent and comprehensive quality assessment, the efficiency of the assessment is greatly improved. Whether the number of samples to be tested is large or small, analysis and evaluation can be performed quickly. While retaining the conventional model, it seamlessly integrates with existing quality assessment methods, facilitating widespread use and demonstrating strong compatibility. The use of industrial cameras and embedded systems reduces costs by 60%, making it more cost-effective than previous methods. Attached Figure Description

[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a method for analyzing the color fastness of textiles based on grayscale mapping. Figure 2 This is a schematic diagram of the optical rating box structure; Figure 3 This is a schematic diagram of a textile color fastness analysis system based on grayscale mapping. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0019] The specific embodiments of the present invention will be described below.

[0020] To address the problems of excessive subjectivity in existing textile quality assessment methods, leading to significant deviations in actual quality assessment results, and the direct impact of testing environment and sample quantity on assessment outcomes, this invention first proposes a textile colorfastness analysis method based on grayscale mapping. This method reduces reliance on human experience in fabric quality assessment, improves accuracy and efficiency, and establishes a standardized fabric quality assessment methodology.

[0021] Example 1 like Figure 1 and Figure 2 As shown, this invention proposes a method for analyzing the color fastness of textiles based on grayscale mapping, including: Step S1: Under a standard light source environment, acquire images of the test sample and the standard gray card using a dynamic grayscale mapping filter to obtain the original image data and original color image data of the test sample. In the actual fabric quality assessment process, place the test sample and the standard gray card side by side on an observation platform with an inclination of 45°. Then, select the filter according to the rating mode: a neutral gray filter in normal mode and a dynamic grayscale mapping filter in intelligent mode. Select an original image with a resolution of no less than 20 million pixels and acquire the original images of the test sample and the gray card using an intelligent image sensor.

[0022] Under standard lighting conditions, images of the test sample and a standard grayscale card are acquired using a dynamic grayscale mapping filter to obtain the original image data and original color image data of the test sample. In the actual fabric quality assessment process, the operator places the test sample and the standard grayscale card side-by-side on an observation platform at a 45° inclination. The surface of the observation platform is coated with a neutral gray coating, such as Munsell N5, to prevent background color interference with the acquired images. Subsequently, the appropriate filter from the rotatable filter group is selected according to the rating mode: a neutral gray filter is used in normal mode, and a dynamic grayscale mapping filter is used in intelligent mode.

[0023] Specifically, the dynamic grayscale mapping filter is made of multiple layers of dielectric film, and its transmission spectral response function is as follows: ; Where R(λ), G(λ), and B(λ) are the CIE1931 standard colorimetric observer matching functions. These functions ensure that the intensity distribution of incident light passing through the filter matches the brightness perception function of the human eye under photopic vision conditions, thus physically converting color to grayscale and allowing the acquired grayscale image to directly reflect the brightness information perceived by the human eye. In intelligent mode, the dynamic grayscale mapping filter ensures that the transmitted light intensity is directly proportional to the brightness perception of the object in the human eye, achieving physical grayscale conversion. The standard light source environment at this time is a D65 standard light source with a color temperature of 6500K±200K, an illuminance of 1200lx±200lx, and a color rendering index RC. a A resolution of ≥95 ensures clear imaging of both the sample and the gray card. Finally, a smart image sensor with a resolution of at least 20 megapixels, such as a CMOS or CCD sensor, is used to acquire the original images of the test sample and the gray card, simultaneously obtaining both the original color image data and the grayscale image data processed by a dynamic grayscale mapping filter. The smart image sensor features autofocus and exposure control functions, enabling it to quickly and accurately acquire image information.

[0024] Step S2: Perform texture analysis on the original color image data to identify and determine texture regions. In this embodiment, the original image undergoes geometric correction and brightness normalization. The sample region and gray card region are located using an image segmentation algorithm. Furthermore, the RGB (red, green, blue) three-channel values ​​of the sample region are extracted to obtain more specific information from the image. Next, texture analysis extracts local contrast features based on the gray-level co-occurrence matrix and identifies texture regions through contrast threshold segmentation.

[0025] First, the acquired raw color images undergo geometric correction and brightness normalization. Image segmentation algorithms are then used to locate the sample area and gray card area. Subsequently, local contrast features are extracted based on the Gray-Level Co-occurrence Matrix (GLCM), which effectively characterizes the roughness of fabric surface textures such as napping and brushing. Segmentation is performed using a preset contrast threshold; when the local contrast feature value exceeds the threshold, the area is identified and marked as a textured region. These textured regions include, but are not limited to, napped areas, brushed areas, and woven structure texture areas.

[0026] In another embodiment, instead of using a real-time calculated hue compensation formula, an RGB-to-grayscale lookup table is pre-built. Through calibration experiments, the compensated grayscale values ​​for RGB combinations of different hue regions are pre-calculated. During rating operations, the grayscale values ​​are directly retrieved from the table, improving processing speed. Alternatively, a lightweight neural network can replace the manually designed compensation formula. The network is trained with a large number of labeled samples to achieve an end-to-end mapping from RGB images to equivalent grayscale values, enabling automatic learning of compensation weights for different hues. Furthermore, in special cases, instead of using a single filter, multiple narrowband spectral images, such as 10 bands, are acquired. The complete spectral reflectance is obtained through a spectral reconstruction algorithm, and then the luminance value is calculated according to CIE standards. This allows for adjustments based on different actual situations, increasing the applicability.

[0027] Step S3: Convert the original image data to the HSV color space, extract the hue angle H of each pixel, and dynamically compensate the grayscale value of the test sample based on the hue angle H to generate a compensated grayscale image. The dynamic compensation rule is as follows: when the hue angle H is less than 30° or greater than 330°, apply a weight of 0.95 to the grayscale value; when the hue angle H is greater than 150° and less than 210°, apply a weight of 1.05 to the grayscale value; otherwise, the grayscale value remains unchanged. In this embodiment, each pixel of the image to be tested is converted. Specifically, the RGB values ​​are converted to the hue angle H in the HSV space. Then, normalization is performed, the hue H is calculated, and the input value range is verified. Next, the grayscale value is subjected to gamma correction before dynamic compensation, and then inverse gamma correction is performed after compensation. The basic lightness is calculated, and compensation is made based on hue lightness. For red fabrics, a weight of 0.95 is applied to the grayscale value when the hue angle H is less than 30° or greater than 330°. For blue fabrics, a weight of 1.05 is applied to the grayscale value when the hue angle H is greater than 150° and less than 210°. This addresses situations where fading of red fabrics is overestimated and fading of blue fabrics is underestimated during fabric evaluation, adding dynamic compensation for red and blue hues, further reducing errors and eliminating subjective hue bias.

[0028] Step S4: Mask texture regions in the compensated grayscale image to generate a detextured grayscale image. Texture analysis is performed on the original color image to extract local contrast features and identify texture regions such as napping and pilling. These regions are formed based on the contrast parameters of the grayscale co-occurrence matrix. The texture regions are then masked in the grayscale image to generate a detextured grayscale image. This detextured grayscale image, after masking texture regions, can be used to evaluate texture regions, obtaining accurate image processing results. This ensures that subsequent fabric quality assessment and grading are unaffected by other factors.

[0029] Step S5: Calculate the average grayscale value of the sample area in the detextured grayscale image, and calculate the average grayscale value of each level of grayscale in the grayscale area. Output the rating result according to the grayscale level. The following formula is used: ; in, For colorfastness rating, This represents the average gray value of the sample area. This represents the average grayscale value of the corresponding level in the standard grayscale chart. This is the calibration coefficient. The rating result is obtained through gray card grading, resulting in a widely applicable and highly accurate quality assessment, efficiently completing the quality assessment of various test samples. Calibration coefficient The system, through pre-calibration, determines the method for matching grayscale differences with visual perception level differences. The calculated values ​​will then be used to... The grayscale value is compared with the grayscale card level, rounded by 0.5 units, and the final rating result is output to the touch screen control terminal. The average grayscale value of the test sample area in the detextured grayscale image is calculated, and the average grayscale value of each level of grayscale card in the standard grayscale card area is calculated. The rating result is output based on the comparison with the grayscale card level.

[0030] In one specific embodiment, a red brushed cotton fabric sample that has undergone a color fastness-to-rubbing test is graded. First, the light source stability and sensor are calibrated to ensure the color temperature of the ring-shaped D65 light source is stable within the range of 6500K±200K, and the illuminance reaches 1200lx±200lx. Then, the test sample and a standard gray card are placed side-by-side on a 45° observation platform, the surface of which is coated with a neutral gray coating. Next, the intelligent mode is selected, and a dynamic grayscale mapping filter is screwed into the optical path. This filter is made of multilayer dielectric film, and its transmission spectral response function strictly follows: ; Next, the rating algorithm is executed, performing texture analysis on the original color image data. A gray-level co-occurrence matrix is ​​used to extract local contrast features, and the matte texture area on the sample surface is successfully segmented using a preset contrast threshold. The original color image data is converted to the HSV color space, and the hue angle H of each pixel is extracted. For the red-toned matte areas, the hue angle H is distributed in the range of less than 30° or greater than 330°. Based on this, the algorithm applies a weight of 0.95 to the grayscale values ​​for dynamic compensation, effectively correcting the visual bias that the human eye tends to overestimate the degree of red fading. Before dynamic compensation, the grayscale values ​​undergo gamma correction, for example, setting the correction gamma value to 2.2. After compensation, inverse gamma correction is performed to accurately simulate the nonlinear perception characteristics of the human eye.

[0031] The algorithm overlays the compensated grayscale image with the previously identified brushed texture area, masking the textured area and generating a detextured grayscale image. This operation eliminates the interference of physical texture on light path reflection, ensuring that the calculated grayscale value accurately reflects color changes. Next, the average grayscale value of the sample area in the detextured grayscale image is calculated, and the average grayscale value of each level of gray card in the gray card area is also calculated. Actual evaluation calculations show that the average grayscale value of the sample area is 28.5, the average grayscale value of level 3 gray card is 30.2, and the average grayscale value of level 4 gray card is 25.1. Substituting these values ​​into the calibration formula: ; Where the calibration coefficient k is taken as 5, we get =5-0.34=4.66, after rounding by 0.5 units, the final output rating result is 4.5. Furthermore, rating the same sample using the traditional manual visual method further demonstrates the significant advantages of the method in this embodiment in eliminating hue deviation and texture interference.

[0032] In another specific embodiment, a lightfastness test was performed on a white polyester sample containing fluorescent whitening agents, resulting in a rating. White polyester samples containing fluorescent whitening agents typically exhibit a visible yellowing after prolonged exposure to light, a typical manifestation of fluorescent whitening agent degradation and failure. Traditional spectrophotometers primarily measure color physical parameters and are ill-suited to effectively identify such hue anomalies caused by fluorescent agent failure. Furthermore, the white sample surface lacks obvious texture, minimizing the impact of texture masking. For yellowed areas, the hue corners fall within the yellow hue range, not triggering compensation rules for red and blue hues, and the grayscale value remains at the base calculation value. However, by comparing the grayscale values ​​of the sample area with those of a standard gray card, the system can determine that the average grayscale value of the sample shows a decrease from historical data or expected values ​​to actual values. This significant decrease in grayscale brightness triggers the system's warning mechanism, alerting the user that the decrease in grayscale brightness may indicate fluorescent agent degradation or hue anomalies.

[0033] Traditional spectrophotometers, when assessing the quality of white polyester samples containing fluorescent whitening agents, can only output the color fastness grade corresponding to the color difference value, failing to indicate the risk of fluorescent agent deterioration. Subsequent verification using ultraviolet light confirms that the fluorescent whitening agent on the sample surface has largely deteriorated. This embodiment not only accurately outputs the color fastness grade but also identifies hue anomalies that traditional instruments cannot detect through grayscale change trends, providing more comprehensive information for textile quality assessment.

[0034] Next, a wash fastness test was conducted on a piece of polyester-cotton blended fabric to assess the degree of staining of cotton fibers by disperse dyes. Polyester-cotton blended fabrics are complex structures woven from polyester and cotton fibers, with the cotton fibers exhibiting distinct natural textures. In traditional instrument rating, these textures can easily interfere with the measurement optical path, leading to lower ratings. After the system acquires images of the polyester-cotton blended fabric, the texture analysis algorithm in the image processing module plays a crucial role. Texture analysis using the gray-level co-occurrence matrix accurately identifies the differences between cotton and polyester fiber areas and marks the textured areas of the cotton fibers. During the dynamic gray-level conversion stage, the system performs hue angle analysis on the entire image. Since staining is typically caused by disperse dyes, which are usually predominantly blue or red, taking the blue family as an example, the algorithm automatically applies a weight of 1.05 to compensate for the blue hue areas, correcting the visual bias that the human eye tends to underestimate blue fading. Subsequently, the algorithm overlays the compensated gray-level image with the previously identified cotton fiber textured areas to generate a detextured gray-level image. This detextured grayscale image eliminates the interference of the physical texture of cotton fibers on color measurement, retaining only the optical information related to color staining.

[0035] In this embodiment, texture analysis is performed on image data to identify textured regions. The original image data is then converted to the HSV color space for grayscale compensation, thereby masking the textured regions. The average grayscale value of the grayscale region is calculated to obtain the rating result. This yields a quality assessment result with an average absolute error of less than or equal to 0.2 and a texture fabric error of less than or equal to 0.3, improving the accuracy of fabric quality assessment to over 80%. This significantly reduces the reliance on human experience in manual visual inspection and assessment. It achieves fully automated assessment processing, improving the standard and accuracy of quality assessment. Furthermore, it avoids the overestimation of fading in red fabrics and the underestimation of fading in blue fabrics during fabric assessment by adding dynamic compensation for red and blue hues, eliminating subjective hue bias.

[0036] Example 2 like Figure 2 and Figure 3 As shown, this invention also proposes a textile color fastness analysis system based on grayscale mapping, using the textile color fastness analysis method based on grayscale mapping as described in Example 1, including the following: The optical grading box contains a ring-shaped D65 light source to provide standard illumination and a 45° observation platform for placing the test sample and standard gray card. The surface of the observation platform is coated with a neutral gray coating. The optical grading box is used to acquire images of the test sample and standard gray card.

[0037] A rotatable filter assembly, connected to an optical rating box and positioned between a ring-shaped D65 light source and an observation platform, includes at least one dynamic grayscale mapping filter and one neutral gray filter. The dynamic grayscale mapping filter is used to convert incident light into grayscale light that is proportional to the brightness perceived by the human eye. The intelligent image sensor, connected to a rotatable filter group, is used to acquire images of the sample and gray card after processing by a dynamic grayscale mapping filter. An image processing module, connected to a smart image sensor, is used to execute steps S1 to S5; The touchscreen control terminal is connected to the image processing module and is used to set parameters, select rating modes, and display rating results.

[0038] In this embodiment, a ring-shaped D65 light source is positioned at the top of the optical grading box to provide ISO standard illumination with a color temperature of 6500K±200K, an illuminance of 1200lx±200lx, and a color rendering index Ra≥95. Under such illumination, the test sample and the standard gray card can be clearly compared, providing a foundation for obtaining accurate image data subsequently. Below the light source in the optical grading box, a rotatable filter assembly is also provided, including filter positions for a neutral gray filter and a dynamic grayscale mapping filter. The neutral gray filter is suitable for image acquisition in normal mode, while the dynamic grayscale mapping filter is suitable for image acquisition in intelligent mode. An observation platform with a 45° tilt angle is also provided at the bottom of the grading box. The observation platform can automatically tilt to a standard observation angle and its surface is coated with a neutral gray layer, such as Munsell N5, to prevent background color from affecting the image acquisition process. By mounting intelligent image sensors above the observation platform, such as CMOS sensors or CCD sensors with a resolution of 20 megapixels or higher and having autofocus and exposure control functions, image information can be obtained quickly and accurately.

[0039] Specifically, the dynamic grayscale mapping filter is a multi-layer dielectric film coated filter with a transmittance error of ≤±2% in the 400-700nm visible light band. The intelligent image sensor has a resolution of ≥20 million pixels and features autofocus and exposure control functions.

[0040] This system integrates an optical rating box, a rotatable filter group, an intelligent image sensor, an image processing module, and a touchscreen control terminal for comprehensive quality assessment, significantly improving evaluation efficiency. It can quickly analyze and evaluate both large and small sample sizes. While retaining conventional methods, it seamlessly integrates with existing quality assessment foundations, facilitating widespread adoption and demonstrating strong compatibility. Utilizing industrial cameras and embedded systems reduces costs by 60%, offering superior cost-effectiveness compared to previous methods.

[0041] Example 3 An electronic device, comprising: Processor and memory; The processor executes the steps of the grayscale mapping-based color fastness analysis method for textiles, as described in any of Embodiment 1, by calling programs or instructions stored in memory.

[0042] Example 4 A computer-readable storage medium includes computer program instructions that cause a computer to perform the steps of a grayscale mapping-based method for analyzing the colorfastness of textiles, as described in any of Embodiment 1.

[0043] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0044] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A textile color fastness analysis system based on grayscale mapping, characterized in that, It includes an optical rating box, a rotatable filter set, an intelligent image sensor, an image processing module, and a touch screen control terminal; The optical rating box is equipped with a ring-shaped D65 light source for providing standard illumination and a 45° observation platform for placing the test sample and standard gray card. The surface of the observation platform is also coated with a neutral gray coating. A standard light source environment is formed inside the optical rating box; The rotatable filter assembly is connected to the optical rating box and positioned between the annular D65 light source and the observation platform. It includes at least one dynamic grayscale mapping filter and one neutral density filter. The transmission spectral response function of the dynamic grayscale mapping filter is: ; Wherein, R(λ), G(λ), and B(λ) are CIE1931 standard colorimetric observer matching functions; the dynamic grayscale mapping filter is used to convert incident light into grayscale light that is proportional to the human eye's perceived brightness. The intelligent image sensor is connected to the rotatable filter group and is used to acquire images of the sample and gray card after processing by the dynamic grayscale mapping filter, so as to obtain the original image data and original color image data of the sample to be tested. The image processing module is connected to the intelligent image sensor and includes a texture analysis unit, a color space conversion and compensation unit, a texture masking unit, and a rating unit. The texture analysis unit is used to perform texture analysis on the original color image data, extract local contrast features through the gray-level co-occurrence matrix, and identify and determine the texture region through contrast threshold segmentation. The color space conversion and compensation unit is used to convert the original image data to the HSV color space, extract the hue angle H of each pixel, and dynamically compensate the grayscale value of the test sample based on the hue angle H to generate a compensated grayscale image. The dynamic compensation rule is as follows: when the hue angle H is less than 30° or greater than 330°, a weight of 0.95 is applied to the grayscale value; when the hue angle H is greater than 150° and less than 210°, a weight of 1.05 is applied to the grayscale value; otherwise, the grayscale value remains unchanged. The texture masking unit is used to mask the texture region of the compensated grayscale image to generate a detextured grayscale image. The rating unit is used to calculate the average gray value of the test sample area in the detextured grayscale image, and to calculate the average gray value of each level of gray card in the standard gray card area, and to output the rating result by comparison according to the gray card level. The touchscreen control terminal is connected to the image processing module and is used to set parameters, select rating modes, and display rating results.

2. The textile color fastness analysis system based on grayscale mapping according to claim 1, characterized in that, The ring-shaped D65 light source has a color temperature of 6500K±200K, an illuminance of 1200lx±200lx, and a color rendering index R0. a ≥95.

3. The textile color fastness analysis system based on grayscale mapping according to claim 1, characterized in that, The image processing module is further configured to perform gamma correction on the grayscale value before the dynamic compensation, and to perform inverse gamma correction again after the compensation.

4. The textile color fastness analysis system based on grayscale mapping according to claim 1, characterized in that, The rating unit compares gray card levels using the following formula: ; in, For colorfastness rating, The average gray value of the region of the test sample. The average grayscale value of the corresponding level in the standard grayscale card. This is the calibration coefficient.

5. The textile color fastness analysis system based on grayscale mapping according to claim 1, characterized in that, The dynamic grayscale mapping filter is a multilayer dielectric film coated filter, and its transmittance error in the 400-700nm visible light band is ≤±2%.

6. The textile color fastness analysis system based on grayscale mapping according to claim 1, characterized in that, The intelligent image sensor has a resolution of ≥20 million pixels and features autofocus and exposure control.

Citation Information

Patent Citations

  • Image contrast enhancement implementation method based on local adaptive gamma correction

    CN110599415A

  • Test paper bag packaging detection system based on machine vision

    CN120598915A

  • Textile color fastness prediction method and system

    CN121999064A