Parameter generation method and textile color fastness calculation method and system
The quantization interval and quantization value are generated through image processing technology, and the color fastness level of textiles is automatically generated, which solves the problems of high labor intensity and strong subjectivity of existing evaluation methods, and achieves efficient and accurate color fastness evaluation.
Patent Information
- Application Number
- CN202510217615.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-02-26
AI Technical Summary
The existing color fastness evaluation methods for textiles have problems such as high labor intensity, strong subjectivity and inconsistent results, and it is difficult to efficiently and accurately evaluate color fastness in industrial production.
By obtaining images of standard colored gray cards and textiles to be tested, the quantization interval and quantization value are generated using image processing technology, and then the color fastness level is automatically generated to reduce the influence of human subjective judgment.
It improves the efficiency and accuracy of color fastness evaluation, reduces labor intensity, enhances the objectivity and consistency of results, and is suitable for large-scale production needs.
Smart Images

Figure CN120198515A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a parameter generation method based on image processing, a textile color fastness calculation method and a system. Background Art
[0002] With the rapid development of the textile industry, the evaluation of textile color fastness has become an important link to ensure product quality. Color fastness is related to the ability of textiles to maintain their color during use against various environmental effects (such as washing, rubbing, light, etc.). Currently, the rating methods for color fastness are mainly divided into two categories: visual rating and instrumental rating.
[0003] Traditional visual rating methods mainly rely on experienced personnel to compare color differences by the naked eye, that is, comparing the stained textile to be tested with each group of comparison color cards in the standard stained gray scale, and obtaining the color fastness grade according to the comparison results. Although this rating method is simple and direct, it has significant drawbacks. First, the labor intensity of visual rating is relatively high. Especially when a large number of samples need to be detected, this method may cause fatigue of the evaluators and thus affect the accuracy of the results. Second, visual inspection is highly subjective, and the rating results often vary greatly due to individual visual differences and different perceptions of colors. Therefore, visual rating has relatively high requirements for the quality and experience of the rating personnel.
[0004] To overcome the deficiencies of visual rating, instrumental rating methods have emerged. Currently, commonly used instrumental rating methods include spectrophotometry and photoelectric integration method, etc. Instrumental rating eliminates the interference of human factors on the measurement results by using advanced technical means, and its results are usually more stable and accurate. However, some studies have shown that even for instrumental rating, which is theoretically more reliable, there may still be significant differences between its results and traditional visual rating. Such differences make the results of instrumental rating sometimes only regarded as a reference in practical applications.
[0005] In summary, the existing color fastness evaluation methods have their own advantages and disadvantages. How to develop a new rating method that can combine the advantages of subjective evaluation and objective instrumental measurement has become an important topic in the industry. Summary of the Invention
[0006] The object of the present invention is to provide a parameter generation method, a textile color fastness calculation method and a system that can effectively improve the evaluation efficiency and accuracy of color fastness.
[0007] To achieve the above object, the present invention provides a parameter generation method for generating textile color fastness calculation parameters, the calculation parameters including a quantization interval and a quantization value, and it includes:
[0008] Obtain the gray-scale value ratio of the gray area and the light color area in each pair of comparison color cards in the standard staining gray scale card to obtain a number 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] Generate a number of quantization intervals corresponding to each color fastness level respectively based on a number of the standard gray scale ratios respectively corresponding to each pair of the comparison color cards;
[0010] Obtain the gray-scale value ratio of the dyed area and the undyed area of the textile to obtain the quantization value.
[0011] Preferably, the method for generating the quantization interval includes:
[0012] Sort the corresponding number of the standard gray scale ratios according to the size of the color fastness level represented by the comparison color card in the standard staining gray scale card to obtain a ratio array;
[0013] Calculate the average value of two adjacent standard gray scale ratios in the ratio array to obtain quantization boundary values;
[0014] Take the numerical interval formed by each quantization boundary value on the number axis as the quantization interval.
[0015] Preferably, the method for generating the standard gray scale ratio and the quantization value includes:
[0016] Obtain a first image of the standard staining gray scale card under a standard light source;
[0017] 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 color area in each pair of the comparison color cards;
[0018] Calculate the ratio of the first gray-scale value and the second gray-scale value to obtain the standard gray scale ratio;
[0019] Obtain a second image of the dyed area and the undyed area of the textile under a standard light source;
[0020] Use the 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 undyed area;
[0021] Calculate the ratio of the third gray-scale value and the fourth gray-scale value to obtain the quantization value.
[0022] Preferably, when used for calculating the rubbing color fastness of textiles, the method for obtaining the third gray-scale value and the fourth gray-scale value includes:
[0023] Convert the second image into a grayscale image;
[0024] Based on a contour recognition algorithm, identify the contour of the stained area in the grayscale image to obtain a first tile related to the stained contour, and randomly select at least one second tile outside the periphery of the first tile, where the area of the second tile is equivalent to the area of the first tile;
[0025] Calculate the average value of the grayscale values of several pixels in the first tile to obtain the third grayscale value;
[0026] Calculate the average value of the grayscale values of several pixels in the second tile to obtain the fourth grayscale value.
[0027] Preferably, it further includes a first verification method for verifying whether the current second image is valid:
[0028] Generate a circumcircle and an incircle of the first tile based on the contour of the first tile;
[0029] Calculate the ratio of the radius of the incircle to the radius of the circumcircle to obtain the roundness of the first tile;
[0030] Based on the magnitude relationship between the roundness and a preset roundness threshold, determine whether the current second image is valid.
[0031] Preferably, it further includes a second verification method for verifying whether the current second image is valid:
[0032] Calculate the color uniformity Cu of the second tile based on the following formula:
[0033]
[0034] where A is a constant set based on the order of magnitude of the grayscale value, std(gray) is the variance of the grayscale values of the first tile, and avg(gray) is the average grayscale value of the first tile;
[0035] Based on the magnitude relationship between the color uniformity and a preset uniformity threshold, determine whether the current second image is valid.
[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 as described above, and generates the color fastness grade of the current textile to be stained 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 staining gray card and a textile to be tested for 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 a plurality of the quantization intervals to generate the color fastness grade of the current textile to be tested for staining.
[0041] The present invention further provides a textile color fastness calculation system, which includes:
[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 are configured to be executed by the one or more processors, and the programs include instructions for executing the textile color fastness calculation method described above.
[0045] The present invention further provides a computer-readable storage medium, which includes a computer program that can be executed by a processor to complete the textile color fastness calculation method described above.
[0046] Compared with the prior art, the textile color fastness calculation method provided by the above technical solution of the present invention obtains the gray value ratio corresponding to the standard gray card and the quantization value corresponding to the textile to be evaluated, and then automatically generates the color fastness grade by comparing the quantization value with the quantization interval. This standardizes the color fastness rating process, reduces the influence of subjective human judgment, improves the objectivity and consistency of color fastness evaluation. In addition, this not only reduces the labor intensity but also improves the color fastness rating efficiency, can process a large number of samples in a short time, and meets the large-scale production requirements of modern industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flowchart of the color fastness calculation method in an embodiment of the present invention.
[0048] Figure 2 It is a flowchart of the generation method of the quantization interval in an embodiment of the present invention.
[0049] Figure 3 It is a sample diagram of a textile to be tested for rubbing staining in an embodiment of the present invention.
[0050] Figure 4 It is a sample diagram of a textile to be tested for staining in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] In order to explain the technical content, structural features, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.
[0052] This embodiment discloses a method for calculating the color fastness of textiles based on machine vision, so as to automatically and batch-wise evaluate the color fastness of textiles. The color fastness calculation method automatically evaluates the color fastness based on two calculation parameters: a quantization interval and a quantization value. Figure 1 , the color fastness calculation method comprises the following steps:
[0053] S10: Obtain the gray value ratio of the gray area and the light area in each set of comparison color cards in the standard staining gray card to obtain a number of standard gray 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 gray scale for staining in this embodiment is a tool for visually evaluating the degree of staining of adjacent fabrics or non-dyed textiles after color fastness tests.
[0055] The staining grey card consists of multiple pairs of color cards, each pair of color cards includes a white card and a small gray card. Each pair of color cards represents different degrees of color difference or contrast (shade and intensity), corresponding to the relevant color staining level represented by numbers. On the grey card, the color fastness level and the corresponding color difference and tolerance are determined based on the CIE L*a*b* (CIELAB) formula. Specifically, color fastness level 5 is represented by a set of two identical reference white small cards with a reflectivity of not less than 85% side by side.
[0056] Specifically, the 5 levels of color fastness include: 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 9 levels. In the staining gray card, a pair of comparison color cards represents one level, so there are a total of 9 sets of comparison color cards in the staining gray card in this embodiment.
[0057] S11: generating a number of quantization intervals corresponding to each color fastness level based on a number of standard grayscale ratios corresponding to each comparison color card, wherein the number of the quantization intervals is equal to the number of color fastness levels in the standard staining gray card.
[0058] S12: Obtain the gray value ratio between the dyed area and the undyed area of the textile to obtain a quantitative value.
[0059] S13: Generate the color fastness grade of the current dyed textile to be tested based on the quantization interval corresponding to the quantization value.
[0060] On the other hand, Figure 2 As shown in Table 1 below, the method for generating the quantization interval includes:
[0061] S20: Sort several 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 scale card, so as to obtain a ratio array including several standard gray-scale ratios.
[0062] S21: Calculate the average value of two adjacent standard gray-scale ratios in the ratio array to obtain a quantization boundary value.
[0063] S22: Use the numerical interval formed by each quantization boundary value on the number axis as the quantization interval.
[0064] Table 1
[0065]
[0066] For example, for a textile to be evaluated, the quantization value representing the gray-scale value ratio of its dyed area and undyed area is 0.2, and this quantization value is within the quantization interval [0.000, 0.440]. Therefore, the color fastness grade of this textile is 1. Furthermore, the quantization value is 0.7, and this quantization value is within the quantization interval (0.675, 0.755]. Therefore, the color fastness grade of this textile is 2 / 3.
[0067] On the other hand, the method for generating the standard gray-scale ratio includes:
[0068] S30: Obtain a first image of the standard staining gray scale card under the 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 color 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 includes:
[0072] S40: Obtain a second image of the dyed area and undyed area of the textile under the 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 undyed 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 cube light box with a gray scale of N7 is set up, and two VeriVide D65 fluorescent tubes and an industrial camera are built in above. The plane of the object to be measured is about 300 mm away from the bottom of the lens. The fluorescent tubes are driven by a constant current source, with a color temperature of about 6500K and a brightness of 1250 lx. The textile or standard staining gray scale card is placed flat on the plane, parallel to the top and bottom of the inner cavity of the light box. The camera takes images and transmits them to the PC through a USB cable. The PC uses a software system to perform color fastness-related detection and calculation.
[0076] When calculating the washing color fastness of textiles, such as Figure 4 , the dyed area Q1 and the undyed area Q2 are on two different fabric pieces. In this case, a patch (which can be square, circular or other shapes) is captured on each of the two fabric pieces, and then the gray scale values are calculated respectively.
[0077] On the other hand, when calculating the rubbing color fastness of textiles, the sample of the textile to be measured for staining is a fabric piece that has been rubbed by a rubbing head. In this case, such as Figure 3 , the dyed area Q3 and the undyed area Q4 are on the same fabric piece. The dyed area Q3 is at the center of the fabric piece, and the undyed area Q4 is located outside the dyed area Q3. Based on this, the methods for obtaining the third gray scale value and the fourth gray scale value include:
[0078] S50: Convert the second image into a gray scale image.
[0079] S51: Based on the contour recognition algorithm, identify the contour of the dyed area Q3 in the gray scale image to obtain a first patch P1 related to the dyeing contour C, and randomly select at least one second patch P2 outside the first patch P1. The area of the second patch P2 is equivalent to the area of the first patch P1. It should be noted that the contour recognition algorithm is a digital image processing algorithm used to extract the outer shape edge of the target object from a binary, edge-detected or thresholded image. It usually based on the method of edge tracking, connecting adjacent edge pixels into a closed edge to obtain the contour of the target object. Common contour recognition algorithms include connectivity-based algorithms, edge-detection-based algorithms and segmentation-based algorithms. In this regard, this contour recognition algorithm belongs to the conventional processing algorithms in the field of image processing, and its specific working process will not be elaborated here.
[0080] S52: Calculate the average value of the gray scale values of several pixels in the first patch P1 to obtain the third gray scale value;
[0081] Calculate the average value of the gray scale values of several pixels in the second patch P2 to obtain the fourth gray scale value.
[0082] On the other hand, to ensure the effectiveness of the sample represented by the second image, it also includes a first verification method for verifying whether the current second image is valid:
[0083] S60: Generate the circumcircle C2 and incircle C1 of the first tile P1 based on the contour of the first tile P1.
[0084] S61: Calculate the radius ratio of the incircle C1 to the circumcircle C2 to obtain the roundness of the first tile P1.
[0085] S62: Determine whether the current second image is valid based on the relationship between the roundness and a preset roundness threshold.
[0086] Specifically, when the roundness of the first tile P1 is less than the roundness threshold, then the current second image is invalid. This ensures the accuracy of the generated color fastness level.
[0087] In addition, this embodiment also discloses a second verification method for verifying whether the current second image is valid:
[0088] Calculate the color uniformity Cu of the second tile P2 based on the following formula:
[0089]
[0090] where A is a constant set based on the gray value order of magnitude, std(gray) is the variance of the gray values of the first tile P1, and avg(gray) is the average gray value of the first tile P1.
[0091] Determine whether the current second image is valid based on the relationship between the color uniformity and a preset uniformity threshold.
[0092] It can be seen therefrom that the validity of the current second image can be determined by the roundness and / or color uniformity of the second tile P2. If it is invalid, the calculation of the color fastness is stopped and an invalid prompt is given.
[0093] In summary, the present invention discloses a method for calculating the color fastness of textile materials, which obtains the gray value ratio corresponding to the standard gray scale and the quantization value corresponding to the textile material to be evaluated, and then automatically generates the color fastness level by comparing the quantization value with the quantization interval. This standardizes the color fastness rating process, reduces the influence of subjective human judgment, improves the objectivity and consistency of color fastness evaluation. In addition, this not only reduces the labor intensity but also improves the color fastness rating efficiency, and can process a large number of samples in a short time, meeting the large-scale production requirements of modern industry.
[0094] In another preferred embodiment of the present invention, a system for calculating the color fastness of textile materials is also disclosed, which includes an image acquisition module, a parameter generation module, and a comparison module.
[0095] The image acquisition module is used to acquire the images of the standard staining gray scale and the textile material to be stained.
[0096] A parameter generation module, configured to process the image acquired by the image acquisition module based on the above method embodiments to generate quantization intervals and quantization values.
[0097] A comparison module, configured to compare the quantization values with a plurality of quantization intervals to generate the color fastness level of the currently tested stained textile.
[0098] For the working principle and process of the textile color fastness calculation system in this embodiment, refer to the above-mentioned textile color fastness calculation method, which will not be elaborated here.
[0099] The present invention also discloses another textile color fastness calculation system, which includes one or more processors, a memory, and one or more programs, wherein one or more programs are stored in the memory and are configured to be executed by the one or more processors. The programs include instructions for executing the textile color fastness calculation method as described above. The processor may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the functions required to be executed by the modules in the textile color fastness calculation system of the embodiments of the present application, or to execute the textile color fastness calculation method of the method embodiments of the present application.
[0100] The present invention also discloses a computer-readable storage medium, which includes a computer program, and the computer program can be executed by a processor to complete the textile color fastness calculation method as described above. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrating one or more available media. The available medium may 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 disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid-state disk (SSD), etc.
[0101] The embodiments of the present application also disclose a computer program product or a computer program, which includes computer instructions, and the computer instructions are 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, so that the electronic device executes the above-mentioned textile color fastness calculation method.
[0102] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the scope of the patent application of the present invention still fall within the scope covered by the present invention.
Claims
1. A parameter generation method for generating a textile color fastness calculation parameter, wherein the calculation parameter includes a quantization interval and a quantization value, characterized in that: include: Obtaining the gray value ratio of the gray area and the light area in each set of comparison color cards in the standard staining gray card to obtain a number of standard gray 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; generating a plurality of quantization intervals corresponding to each color fastness level respectively based on a plurality of standard grayscale ratios respectively corresponding to each pair of the comparison color cards; The gray value ratio between the dyed area and the undyed area of the textile is obtained to obtain the quantitative value.
2. The parameter generation method according to claim 1, characterized in that: The method for generating the quantization interval includes: According to the color fastness levels represented by the comparison color cards in the standard staining gray card, sorting the corresponding standard grayscale ratios to obtain a ratio array; Calculating an average value of two adjacent standard grayscale ratios in the ratio array to obtain a quantization boundary value; The numerical interval formed by each of the quantization boundary values on the number axis is used as the quantization interval.
3. The parameter generation method according to claim 1, characterized in that: The method for generating the standard grayscale ratio and the quantization value includes: Acquire a first image of a standard stained gray card under a standard light source; Using an image processor to perform recognition processing on the first image to obtain a first grayscale value corresponding to the gray area and a second grayscale value corresponding to the light-colored area in each pair of the comparison color cards; calculating a ratio of the first grayscale value to the second grayscale value to obtain the standard grayscale ratio; acquiring a second image of the dyed area and the undyed area of the textile under a standard light source; Using the image processor to perform recognition processing on the second image to obtain a third grayscale value corresponding to the stained area and a fourth grayscale value corresponding to the unstained area; A ratio of the third grayscale value to the fourth grayscale value is calculated to obtain the quantized value.
4. The parameter generation method according to claim 3, characterized in that: When used for calculating the rubbing color fastness of textiles, the method for obtaining the third grayscale value and the fourth grayscale value includes: Converting the second image into a grayscale image; Identify the contour of the dyed area in the grayscale image based on a contour recognition algorithm to obtain a first image block related to the dyed contour, and randomly select at least one second image block outside the first image block, where the area of the second image block is equivalent to that of the first image block; Calculating an average of grayscale values of a plurality of pixels in the first image block to obtain the third grayscale value; An average value of grayscale values of a plurality of pixels in the second image block is calculated to obtain the fourth grayscale value.
5. The parameter generation method according to claim 4, characterized in that: Also included is a first verification method for verifying whether the second image is currently valid: generating a circumscribed circle and an inscribed circle of the first block based on the outline of the first block; Calculating a radius ratio of the inscribed circle to the circumscribed circle to obtain a roundness of the first image block; Whether the second image is valid is determined based on a magnitude relationship between the roundness and a preset roundness threshold.
6. The parameter generation method according to claim 4, characterized in that: Also included is a second verification method for verifying whether the second image is currently valid: The color uniformity Cu of the second block is calculated based on the following formula: Wherein, A is a constant set based on the gray value magnitude, std(gray) is the variance of the gray value of the first image block, and avg(gray) is the average gray value of the first image block; Whether the second image is currently valid is determined based on a magnitude relationship between the color uniformity and a preset uniformity threshold.
7. A method for calculating color fastness of textiles, characterized in that: The quantization interval and the quantization value are generated based on the parameter generation method according to any one of claims 1 to 6, and the color fastness grade of the current dyed textile to be tested is generated based on the quantization interval corresponding to the quantization value.
8. A textile color fastness calculation system, characterized in that: It includes an image acquisition module, a parameter generation module and a comparison module; The image acquisition module is used to acquire images of the standard staining gray card and the stained textile to be tested; The parameter generation module is used to process the image acquired by the image acquisition module based on the parameter generation method according to any one of claims 1 to 6 to generate the quantization interval and the quantization value; The comparison module is used to compare the quantized value with a plurality of quantized intervals to generate the color fastness grade of the dyed textile to be tested.
9. A textile color fastness calculation system, characterized in that: include: 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, the programs comprising instructions for executing the textile color fastness calculation method according to claim 7.
10. A computer-readable storage medium, characterized in that: The method comprises a computer program which can be executed by a processor to complete the method for calculating color fastness of textiles as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Automatic color fastness grading method and device for textiles
CN110644216A
Textile color fastness detection method and system based on machine vision
CN118794895A
Color selection and visualization system and methods of making and using same
US20030151611A1
Colorfastness and finishing compounds
US20110009021A1
Image processing apparatus generating profile mapping a plurality of input values to respective ones of a plurality of output values
US20190199888A1