Parameter generation method, textile color fastness calculation method and system
By using an image processing-based parameter generation method, the color fastness grade of textiles is automatically generated, solving the problems of high labor intensity and strong subjectivity in color fastness assessment in existing technologies. This achieves efficient and accurate color fastness rating, which is suitable for automated production in modern industry.
Patent Information
- Application Number
- CN202510217615.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-02-26
AI Technical Summary
Existing methods for assessing color fastness to textiles suffer from high labor intensity, strong subjectivity, and inconsistent results, making it particularly difficult to achieve efficient and accurate color fastness ratings in large-scale production.
By employing an image processing-based parameter generation method, the grayscale value ratio of a standard gray card and the textile to be tested is obtained to generate a quantization range and quantization value, and the color fastness grade is automatically generated, reducing the influence of human subjective judgment and improving the objectivity and consistency of the rating.
It achieves standardization and high-efficiency automation in color fastness rating, reduces labor intensity, and improves the accuracy and consistency of rating, making it suitable for the large-scale production needs of modern industry.
Smart Images

Figure CN120198515B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a parameter generation method based on image processing, a textile fabric color fastness calculation method and system. BACKGROUND
[0002] With the rapid development of the textile industry, the color fastness evaluation of textiles has become an important link to ensure product quality. Color fastness is related to the ability of textiles to maintain their color in the face of various environmental effects (such as washing, rubbing, light, etc.) during use. Currently, the rating methods for color fastness are mainly divided into two categories: visual rating and instrument rating.
[0003] The traditional visual rating method mainly relies on experienced personnel to compare color differences by eye, that is, comparing the test stained textile with each group of comparison cards in the standard stained gray card, and obtaining the color fastness grade according to the comparison result. Although this rating method is simple and direct, it has significant drawbacks. First, the labor intensity of visual rating is high, especially when a large number of samples need to be detected, this method can cause the fatigue of the evaluation personnel and thus affect the accuracy of the results. Second, visual rating has strong subjectivity, and the rating results often have large deviations due to differences in vision and perception of color. Therefore, visual rating has high requirements for the quality and experience of the rating personnel.
[0004] In order to overcome the shortcomings of visual rating, instrument rating methods have emerged. The commonly used instrument rating methods include spectrophotometry and photoelectric integration method, etc. Instrument rating eliminates the interference of human factors on the measurement results by using advanced technical means, and the results are usually stable and accurate. However, some studies have shown that even in theory, the results of instrument rating and traditional visual rating may still have large differences. Such differences make the results of instrument rating sometimes only be regarded as a reference in practical application.
[0005] In summary, the existing color fastness evaluation methods have their own advantages and disadvantages, and how to develop a new rating method that combines the advantages of subjective evaluation and objective instrument measurement has become an important issue in the industry. SUMMARY
[0006] The purpose of the present application is to provide a parameter generation method, a textile fabric color fastness calculation method and system that can effectively improve the evaluation efficiency and accuracy of color fastness.
[0007] In order to achieve the above purpose, the present application provides a parameter generation method for generating textile fabric color fastness calculation parameters, the calculation parameters including quantization interval and quantization value, which include:
[0008] The gray scale value ratio of the gray area and the light color area in each set of comparison color cards in the standard staining gray card is obtained to obtain a plurality of standard gray scale ratios; the light color area corresponds to the color of the textile before dyeing, and the gray area corresponds to the color of the textile after dyeing;
[0009] A plurality of quantization intervals corresponding to each color fastness level are generated based on a plurality of standard gray scale ratios corresponding to each pair of comparison color cards;
[0010] The gray scale value ratio of the dyed area and the undyed area of the textile is obtained to obtain the quantization value.
[0011] Preferably, the method for generating the quantization interval comprises:
[0012] According to the size of the color fastness level represented by the comparison color card in the standard staining gray card, a plurality of standard gray scale ratios are sorted to obtain a ratio array;
[0013] The average value of two standard gray scale ratios adjacent to each other in the ratio array is calculated to obtain a quantization boundary value;
[0014] The numerical value interval formed by each quantization boundary value on the number axis is taken as the quantization interval.
[0015] Preferably, the method for generating the standard gray scale ratio and the quantization value comprises:
[0016] A first image of the standard staining gray card under a standard light source is obtained;
[0017] An image processor is used to perform identification processing on the first image to obtain a first gray scale value corresponding to the gray area and a second gray scale value corresponding to the light color area in each pair of comparison color cards;
[0018] The ratio of the first gray scale value and the second gray scale value is calculated to obtain the standard gray scale ratio;
[0019] A second image of the dyed area and the undyed area of the textile under a standard light source is obtained;
[0020] The image processor is used to perform identification processing on the second image to obtain a third gray scale value corresponding to the dyed area and a fourth gray scale value corresponding to the undyed area;
[0021] The ratio of the third gray scale value and the fourth gray scale value is calculated to obtain the quantization value.
[0022] Preferably, when used for calculating the rubbing fastness of the textile, the method for obtaining the third gray scale value and the fourth gray scale value comprises:
[0023] Convert the second image into a grayscale image;
[0024] The contour of the stained region in the grayscale image is identified based on the contour recognition algorithm to obtain a first patch related to the stained contour, and at least one second patch is randomly selected around the first patch, the area of the second patch being equivalent to the area of the first patch.
[0025] Calculate the average of several pixel grayscale values in the first image block to obtain the third grayscale value;
[0026] Calculate the average of several pixel grayscale values in the second image block to obtain the fourth grayscale value.
[0027] Preferably, it also includes a first verification method for verifying whether the current second image is valid:
[0028] Generate the circumcircle and incircle of the first block based on its outline;
[0029] Calculate the ratio of the radius of the inscribed circle to the radius of the circumscribed circle to obtain the roundness of the first block;
[0030] The validity of the second image is determined based on the relationship between the roundness and the preset roundness threshold.
[0031] Preferably, it also includes a second verification method for verifying whether the current second image is valid:
[0032] The color uniformity Cu of the second patch is calculated based on the following formula:
[0033]
[0034] Where A is a constant set based on the order of magnitude of gray values, std(gray) is the variance of the gray values of the first patch, and avg(gray) is the average gray value of the first patch.
[0035] The validity of the second image is determined based on the relationship between the color uniformity and the preset uniformity threshold.
[0036] The present invention also provides a method for calculating the color fastness of textiles, which generates the quantization interval and the quantization value based on the parameter generation method described above, and generates the color fastness grade of the current dyed textile based on the quantization interval corresponding to the quantization value.
[0037] The present invention also provides a system for calculating the color fastness of textiles, which includes an image acquisition module, a parameter generation module and a comparison module;
[0038] The image acquisition module is configured to acquire images of a standard color-staining gray card and a textile fabric to be tested for color-staining.
[0039] The parameter generation module is configured to process the images acquired by the image acquisition module based on the parameter generation method described above to generate the quantization interval and the quantization value.
[0040] The comparison module is configured to compare the quantization value with the quantization interval to generate the color fastness grade of the textile fabric to be tested.
[0041] The present application also provides a textile fabric color fastness calculation system, which comprises:
[0042] one or more processors;
[0043] a memory;
[0044] and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs comprise instructions for executing the textile fabric color fastness calculation method described above.
[0045] The present application also provides a computer-readable storage medium comprising a computer program, which can be executed by a processor to complete the textile fabric color fastness calculation method described above.
[0046] Compared with the prior art, the textile fabric color fastness calculation method provided by the above technical solution of the present application acquires the gray value ratio corresponding to the standard gray card and the quantization value corresponding to the textile fabric to be tested, and then automatically generates the color fastness grade through comparison between the quantization value and the quantization interval. This standardizes the color fastness rating process, reduces the influence of human subjective judgment, improves the objectivity and consistency of color fastness evaluation, and in addition, not only reduces the labor intensity, but also improves the color fastness rating efficiency, which can process a large number of samples in a short time and is suitable for the large-scale production needs of modern industry. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 The color fastness calculation method flowchart in the embodiment of the present application.
[0048] Figure 2 The generation method flowchart of the quantization interval in the embodiment of the present application.
[0049] Figure 3 The sample image of the textile fabric to be tested for color-staining in the embodiment of the present application.
[0050] Figure 4 The sample image of the textile fabric to be tested for color-staining in the embodiment of the present application. DETAILED DESCRIPTION
[0051] To illustrate the technical content, structural features, objectives, and effects of the present invention in detail, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0052] This embodiment discloses a machine vision-based method for calculating the color fastness of textiles, enabling automated batch evaluation of textile color fastness. This method automatically evaluates color fastness based on two calculation parameters: quantization range and quantization value. Regarding this, as... Figure 1 The method for calculating color fastness includes the following steps:
[0053] S10: Obtain the grayscale ratio of the gray area to the light area in each set of comparison color cards in the standard staining gray card to obtain several standard grayscale ratios. The light area corresponds to the color of the textile before dyeing, and the gray area corresponds to the color of the textile after dyeing.
[0054] It should be noted that the standard staining grey card in this embodiment is a tool used for visually evaluating the degree of staining on lining fabrics or undyed textiles after a color fastness test.
[0055] The gray scale for staining consists of multiple contrasting color cards. Each contrasting color card includes a white card and a gray card. Each contrasting color card represents a different degree of color difference or contrast (color and intensity), corresponding to a staining level represented by a number. On the gray scale, the color fastness level and the corresponding color difference and tolerance are determined based on the CIE L*a*b* (CIELAB) formula. Specifically, a color fastness level of 5 is represented by a set of two identical white reference cards with a reflectance of not less than 85% placed side by side.
[0056] Specifically, the colorfastness rating is divided into five levels: Level 1, Level 1 / 2, Level 2, Level 2 / 3, Level 3, Level 3 / 4, Level 4, Level 4 / 5, and Level 5, for a total of nine levels. In the gray scale for staining, one comparison color chart represents one level. Therefore, in this embodiment, there are a total of nine sets of comparison color charts in the gray scale for staining.
[0057] S11: Based on several standard grayscale ratios corresponding to each contrast color chart, generate several quantization intervals corresponding to each color fastness level, the number of which is equal to the number of color fastness levels in the standard staining gray chart.
[0058] S12: Obtain the grayscale ratio between the dyed and undyed areas of the textile to obtain a quantized value.
[0059] S13: Generate the color fastness grade of the dyed textile fabric to be tested based on the quantization range corresponding to the quantization value.
[0060] On the other hand, such as Figure 2 According to Table 1 below, the methods for generating quantization intervals include:
[0061] S20: According to the size of the color fastness level represented by the comparison color card in the standard staining gray card, the corresponding standard gray scale ratios are sorted to obtain a ratio array including several standard gray scale ratios.
[0062] S21: The average value of two standard gray scale ratios adjacent to each other in the ratio array is calculated to obtain a quantization boundary value.
[0063] S22: The numerical interval formed by each quantization boundary value on the number axis is taken as a quantization interval.
[0064] Table 1
[0065]
[0066] For example, for a certain textile to be evaluated, the quantization value of the gray scale value ratio representing the dyed area and the non-dyed area of the textile is 0.2, which is in the quantization interval [0.000, 0.440], and therefore the color fastness level of the textile is 1. Furthermore, the quantization value is 0.7, which is in the quantization interval (0.675, 0.755], and therefore the color fastness level of the textile is 2 / 3.
[0067] On the other hand, the method for generating the standard gray scale ratio comprises:
[0068] S30: Obtain a first image of the standard staining gray card under a standard light source.
[0069] S31: Use an image processor to perform recognition processing on the first image to obtain a first gray scale value corresponding to the gray area and a second gray scale value corresponding to the light area in each comparison color card.
[0070] S32: Calculate the ratio of the first gray scale value and the second gray scale value to obtain the standard gray scale ratio.
[0071] In addition, the method for generating the quantization value comprises:
[0072] S40: Obtain a second image of the dyed area and the non-dyed area of the textile under a standard light source.
[0073] S41: Use an image processor to perform recognition processing on the second image to obtain a third gray scale value corresponding to the dyed area and a fourth gray scale value corresponding to the non-dyed area.
[0074] S42: Calculate the ratio of the third gray scale value and the fourth gray scale value to obtain the quantization value.
[0075] Specifically, a cubic light box with a gray scale of N7 is provided, and two D65 lamp tubes of VeriVide and an industrial camera are built-in at the top. The measured object is about 300 mm away from the bottom of the lens. The lamp tubes are driven by a constant current source, with a color temperature of about 6500K and a brightness of 1250lx. The textile or standard color card is placed on the plane, parallel to the top and bottom of the inner cavity of the light box. The camera captures the image, which is transmitted to the PC through the USB line, and the PC uses the software system to detect and calculate the color fastness related.
[0076] When used for calculating the washing color fastness of the textile, as Figure 4 , the dyed area Q1 and the non-dyed area Q2 are on two different pieces of cloth. In this case, a patch (which can be square, circular or other image) is grabbed on each piece of cloth, and then the gray value is calculated respectively.
[0077] On the other hand, when used for calculating the rubbing color fastness of the textile, the sample of the tested color sample is a piece of cloth rubbed by a rubbing head. In this case, as Figure 3 , the dyed area Q3 and the non-dyed area Q4 are on the same piece of cloth, the dyed area Q3 is at the center of the piece of cloth, and the non-dyed area Q4 is outside the dyed area Q3. Based on this, the method for obtaining the third gray value and the fourth gray value includes:
[0078] S50: converting the second image into a gray scale image.
[0079] S51: identifying the contour of the dyed area Q3 in the gray scale image based on a contour recognition algorithm to obtain a first patch P1 related to the dyed contour C, and randomly selecting at least one second patch P2 on the periphery of the first patch P1, the area of the second patch P2 being comparable to the area of the first patch P1. It should be noted that the contour recognition algorithm is a digital image processing algorithm for extracting the outer edge of the target object from a binary, edge detection or threshold image. It is usually based on the method of edge tracking, which connects adjacent edge pixels into a closed edge, thereby obtaining the contour of the target object. Common contour recognition algorithms include algorithms based on connectivity, edge detection-based algorithms and segmentation-based algorithms. For this, the contour recognition algorithm is a conventional processing algorithm in the field of image processing, and its specific workflow will not be described here.
[0080] S52: calculating the average value of the gray scale values of a plurality of pixels in the first patch P1 to obtain the third gray value;
[0081] calculating the average value of the gray scale values of a plurality of pixels in the second patch P2 to obtain the fourth gray value.
[0082] On the other hand, to ensure the effectiveness of the sample represented by the second image, a first verification method for verifying whether the current second image is effective is also included:
[0083] S60: generating a circumscribed circle C2 and an inscribed circle C1 of the first patch P1 based on the contour of the first patch P1.
[0084] S61: calculating a radius ratio of the inscribed circle C1 and the circumscribed circle C2 to obtain a roundness of the first patch P1.
[0085] S62: judging whether the current second image is valid based on a size relationship between the roundness and a preset roundness threshold.
[0086] Specifically, when the roundness of the first patch P1 is less than the roundness threshold, the current second image is invalid. Thus, the accuracy of the generated color fastness level is ensured.
[0087] In addition, the embodiment also discloses a second verification method for verifying whether the current second image is valid:
[0088] The color uniformity Cu of the second patch P2 is calculated based on the following formula:
[0089]
[0090] wherein A is a constant set based on the order of magnitude of the gray value, std(gray) is the variance of the gray value of the first patch P1, and avg(gray) is the average gray value of the first patch P1.
[0091] It is judged whether the current second image is valid based on a size relationship between the color uniformity and a preset uniformity threshold.
[0092] Therefore, it can be judged whether the current second image is valid through the roundness and / or the color uniformity of the second patch P2. If not, the calculation of the color fastness is stopped, and an invalid prompt is given.
[0093] In summary, the application discloses a textile color fastness calculation method, which obtains a gray value ratio corresponding to a standard gray card and a quantitative value corresponding to a textile to be evaluated, and then automatically generates a color fastness level through comparison of the quantitative value and a quantitative interval. This standardizes the color fastness rating process, reduces the influence of human subjective judgment, improves the objectivity and consistency of color fastness evaluation, and additionally, not only reduces labor intensity, but also improves color fastness rating efficiency, can process a large number of samples in a short time, and is suitable for large-scale production needs of modern industry.
[0094] In another preferred embodiment of the application, a textile color fastness calculation system is also disclosed, which comprises an image acquisition module, a parameter generation module and a comparison module.
[0095] The image acquisition module is used to acquire images of a standard color card and a textile to be evaluated.
[0096] The parameter generation module is configured to process the image obtained by the image acquisition module based on the method embodiment to generate the quantization interval and the quantization value.
[0097] The comparison module is configured to compare the quantization value with the quantization intervals to generate the color fastness grade of the current textile fabric to be tested.
[0098] The working principle and process of the textile fabric color fastness calculation system in the embodiment are described above in the textile fabric color fastness calculation method, and will not be repeated here.
[0099] The application further discloses another textile fabric color fastness calculation system, which comprises one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs comprise instructions for executing the textile fabric color fastness calculation method as described above. The processor can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for executing the related programs to realize the functions required by the modules in the textile fabric color fastness calculation system of the embodiment of the application or execute the textile fabric color fastness calculation method of the method embodiment of the application.
[0100] The application further discloses a computer readable storage medium comprising a computer program, which can be executed by a processor to complete the textile fabric color fastness calculation method as described above. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic medium such as a floppy disk, a hard disk, a magnetic tape, a magnetic disc, or an optical medium such as a digital versatile disc (DVD), or a semiconductor medium such as a solid state disk (SSD) and the like.
[0101] The embodiment of the application further discloses a computer program product or a computer program, which comprises computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the electronic device to execute the textile fabric color fastness calculation method described above.
[0102] The above-described embodiments are merely preferred embodiments of the present application, and thus are not intended to limit the scope of the present application. Therefore, various equivalents for the technical features and changes in the configuration of the present application are included in the scope of the present application.
Claims
1. A method of generating parameters for calculating color fastness of a textile, the calculating parameters comprising quantization intervals and quantization values, characterized in that, The method comprises the following steps: obtaining a plurality of standard gray scale ratios by obtaining the gray scale value ratio of the gray area and the light color area in each group of comparison color cards in the standard staining gray card, wherein the light color area corresponds to the color of the textile before dyeing, and the gray area corresponds to the color of the textile after dyeing; generating a plurality of quantization intervals corresponding to each color fastness level based on the standard gray scale ratios corresponding to each pair of comparison color cards; obtaining the quantization value by obtaining the gray scale value ratio of the dyeing area and the non-dyeing area of the textile; the generation method of the quantization interval comprises: sorting a plurality of corresponding standard gray scale ratios according to the size of the color fastness level represented by the comparison color card in the standard staining gray card to obtain a ratio array; calculating the average value of two adjacent standard gray scale ratios in the ratio array to obtain a quantization boundary value; forming a numerical interval on a number line by each quantization boundary value as the quantization interval; the generation method of the standard gray scale ratio and the quantization value comprises: obtaining a first image of the standard staining gray card under a standard light source; using an image processor to perform identification processing on the first image to obtain a first gray scale value corresponding to the gray area and a second gray scale value corresponding to the light color area in each pair of comparison color cards; calculating the ratio of the first gray scale value and the second gray scale value to obtain the standard gray scale ratio; obtaining a second image of the dyeing area and the non-dyeing area of the textile under a standard light source; using the image processor to perform identification processing on the second image to obtain a third gray scale value corresponding to the dyeing area and a fourth gray scale value corresponding to the non-dyeing area; calculating the ratio of the third gray scale value and the fourth gray scale value to obtain the quantization value; when used for calculating the rubbing fastness of the textile, the method for obtaining the third gray scale value and the fourth gray scale value comprises: converting the second image into a gray scale image; identifying the contour of the dyeing area in the gray scale image based on a contour recognition algorithm to obtain a first block related to the dyeing contour, and randomly selecting at least one second block on the periphery of the first block, wherein the area of the second block is comparable to the area of the first block; calculating the average value of a plurality of pixel gray scale values in the first block to obtain the third gray scale value; calculating the average value of a plurality of pixel gray scale values in the second block to obtain the fourth gray scale value.
2. The parameter generation method according to claim 1, characterized by, It also includes a first verification method for verifying whether the current second image is valid: generating the circumscribed circle and the inscribed circle of the first block based on the contour of the first block; calculating the radius ratio of the inscribed circle and the circumscribed circle to obtain the circularity of the first block; judging whether the current second image is valid based on the size relationship between the circularity and a preset circularity threshold.
3. The parameter generation method according to claim 1, characterized by, It also includes a second verification method for verifying whether the current second image is valid: calculating the color uniformity Cu of the second block based on the following formula: Wherein, A is a constant based on the order of magnitude of the gray value, std(gray) is the variance of the gray value of the first image block, avg(gray) is the average gray value of the first image block; Determine whether the current second image is valid based on the size relationship between the color uniformity and the preset uniformity threshold.
4. A method of calculating color fastness of a textile fabric, characterized in that, The parameter generation method according to any one of claims 1 to 3 is used to generate the quantization interval and the quantization value, and the color fastness grade of the current textile fabric to be tested is generated based on the quantization interval corresponding to the quantization value.
5. A textile color fastness calculation system, characterized by, The method comprises an image acquisition module, a parameter generation module, and a comparison module. The image acquisition module is configured to acquire images of a standard color mixing gray card and a textile fabric to be tested. The parameter generation module is configured to process the images acquired by the image acquisition module based on the parameter generation method according to any one of claims 1 to 3, so as to generate the quantization interval and the quantization value. The comparison module is configured to compare the quantization value with the quantization intervals, so as to generate the color fastness grade of the current textile fabric to be tested.
6. A textile color fastness calculation system characterized by, One or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the programs comprise instructions for executing the textile fabric color fastness calculation method according to any one of claims 1 to 3. The computer program can be executed by a processor to complete the textile fabric color fastness calculation method according to any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Automatic color fastness grading method and device for textiles
CN110644216A
Colorfastness and finishing compounds
US20110009021A1