A method for evaluating color uniformity of fabric surface
Through image processing technology, fabric pictures are analyzed in CIELAB colorimetric space, the color mean value of each sub-window is calculated and the CMC color difference formula is used to solve the problem that fabric color uniformity evaluation depends on the human eye in the prior art, and the color uniformity of the fabric surface is achieved objective, fast and accurate evaluation of degree.
Patent Information
- Application Number
- CN202111581367.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-12-22
AI Technical Summary
In the prior art, the color uniformity of the fabric surface mainly depends on human eye assessment, is greatly affected by subjective factors, is time-consuming and labor-intensive, and lacks an objective evaluation method.
Through image processing technology, pictures of the fabric surface are taken and chromaticity space converted in CIELAB chromaticity space, information of the luminance layer, red and green value layer and yellow and blue value layer are extracted, and the color average of each sub-window is calculated. Use the CMC color difference formula to calculate the degree of color uniformity.
The objective, fast and accurate evaluation of the color uniformity of the fabric surface is achieved, reducing the dependence on human eye assessment, and improving the accuracy and reliability of the evaluation.
Smart Images

Figure BDA0003426149310000011 
Figure BDA0003426149310000021 
Figure BDA0003426149310000022
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of textile color evaluation and relates to a method for evaluating the color uniformity of a fabric surface. Background Art
[0002] When dyeing fabrics, due to the different dye uptake rates of yarns or the fabric stacking method during the dyeing process, the dyed fabric surface sometimes has uneven colors. Currently, the dyeing uniformity is mainly evaluated by human eyes, which is greatly affected by subjective factors and is time-consuming and laborious. Therefore, an objective method for evaluating the color uniformity of the fabric surface is proposed, which can reduce the degree of dependence on humans and make the evaluation results more objective. Summary of the invention
[0003] In order to overcome the shortcomings of the prior art, the present invention provides a method for evaluating the color uniformity of a fabric surface, which specifically extracts the color information of a fabric image through an image processing method, then analyzes and processes the information, and calculates a color uniformity index.
[0004] To achieve the above object, the scheme adopted by the present invention is as follows:
[0005] A method for evaluating color uniformity of a fabric surface comprises the following steps:
[0006] (1) taking a fabric picture of the surface to be tested of the fabric to be tested;
[0007] (2) Chromaticity space conversion: Use MATLAB software to read the fabric image in step (1), and then use the makecform() function and applycform() function in MATLAB to convert the color information of the fabric image from the color information matrix of the RGB color space to the color information matrix of the CIELAB color space;
[0008] (3) respectively extracting (also referred to as “reading”) information of different color layers in the color information matrix of the CIELAB color space obtained in step (2);
[0009] L = Lab(:,:,1);
[0010] a=Lab(:,:,2);
[0011] b=Lab(:,:,3);
[0012] Wherein, L is the brightness layer information of the color information matrix of the CIELAB color space; a is the red and green value layer information of the color information matrix of the CIELAB color space; b is the yellow and blue value layer information of the color information matrix of the CIELAB color space; Lab is the color information matrix of the fabric image of the CIELAB color space converted in step (2);
[0013] (4) Calculate the color mean of the color information matrix of the fabric image based on the information of different color layers obtained in step (3). The calculation formula is as follows:
[0014]
[0015]
[0016]
[0017] Among them, L i 、a i and b i are the CIE L values of the ith data point in the brightness layer information matrix, the red-green value layer information matrix, and the yellow-blue value layer information matrix in step (3). * Value, CIE a * Value and CIE b * Value; N is the product of the number of rows and columns of the color information matrix Lab; The CIE L values of all data points in the brightness layer information matrix L, the red-green value layer information matrix a, and the yellow-blue value layer information matrix b obtained in step (3) are respectively * Mean, CIE a * Mean and CIE b * Mean;
[0018] (5) Extract the color mean of different parts in the color information matrix of the fabric image;
[0019] (5.1) Extract the color mean of different parts in the brightness layer of the color information matrix of the fabric image;
[0020] (5.1.1) The information matrix of the brightness layer in the color information matrix of the CIELAB color space obtained in step (3) is divided into m rows × n columns of sub-blocks. The sub-block matrices after division are recorded as sub-windows. Different sub-windows represent different parts of the color information matrix of the fabric image; and m and n satisfy:
[0021] 1≤n <W;
[0022] 1≤m <H;
[0023] Where W and H are the number of columns and rows of the color information matrix of the fabric image respectively; m and n cannot be equal to 1 at the same time;
[0024] (5.1.2) Calculate the color mean of each sub-window in the brightness layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows:
[0025]
[0026] Among them, L kj is the CIE L value of the jth data point extracted from the kth sub-window in the luminance layer * value; is the CIE L of all data points in the kth subwindow in the brightness layer * Mean; M is the total number of sub-windows in step (5.1.1);
[0027] (5.2) Extract the color mean of different parts in the red and green value layer of the color information matrix of the fabric image;
[0028] (5.2.1) segmenting the information matrix of the red and green value layers in the color information matrix of the CIELAB chromaticity space obtained in step (3) according to the method for segmenting the color information matrix of the luminance layer in (5.1.1);
[0029] (5.2.2) Calculate the color mean of each sub-window in the red and green value layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows:
[0030]
[0031] Among them, a kj is the CIE a of the jth data point extracted from the kth subwindow in the red and green value layer * value; is the CIE a of all data points in the kth subwindow in the red and green value layer * Mean; M is the total number of sub-windows in step (5.1.1);
[0032] (5.3) Extract the color mean of different parts in the yellow-blue value layer of the color information matrix of the fabric image;
[0033] (5.3.1) segmenting the information matrix of the yellow-blue value layer in the color information matrix of the CIELAB chromaticity space obtained in step (3) according to the method for segmenting the color information matrix of the luminance layer in (5.1.1);
[0034] (5.3.2) Calculate the color mean of each sub-window in the yellow-blue value layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows:
[0035] Among them, bkj is the CIE b of the jth data point extracted from the kth subwindow in the yellow-blue value layer * value; is the CIE b of all data points in the kth subwindow of the yellow-blue value layer * Mean; M is the total number of sub-windows in step (5.1);
[0036] (6) using the CMC color difference formula to calculate the color difference between the color mean obtained in step (4) and the color mean of each sub-window obtained in step (5); the specific calculation method of the CMC color difference formula is referred to in the literature (Dong Zhenli, Zheng Baohai, Chen Guifen, et al. Color Measurement and Computer Color Matching [M]. Beijing: China Textile Press, 2017.), wherein the values of the brightness adjustment factor l and the chroma adjustment factor c in the CMC color difference formula are set to 2 and 1 respectively;
[0037] (7) Calculate the color uniformity of different parts of the fabric surface. The calculation formula is:
[0038]
[0039] Among them, ΔE k is the color difference between the color mean obtained in step (4) and the color mean of each sub-window obtained in step (5) according to the calculation method in step (6), It is the color uniformity of different parts of the fabric surface. The larger the value, the worse the color uniformity of the fabric surface.
[0040] As the preferred technical solution:
[0041] As described above, a method for evaluating color uniformity of a fabric surface is photographed using a DigiEye colorimeter. During the photographing, the parameters of the shutter and aperture are set according to the instructions based on the actual situation, and the conventional camera parameter setting method is followed.
[0042] In the above method for evaluating color uniformity of a fabric surface, when shooting, the light source is set to D65 or D50.
[0043] In the above-mentioned method for evaluating the color uniformity of a fabric surface, the specific process of step (2) is as follows:
[0044] First, read in the fabric image and convert the data type:
[0045] rgb0 = imread('image name');
[0046] rgb = im2double(rgb0);
[0047] W = size(rgb,2);
[0048] H = size(rgb,1);
[0049] Wherein, 'image name' is the name of the fabric image in the computer; rgb0 is the color information matrix of the fabric image in the RGB color space; rgb is the color information matrix of the fabric image in the RGB color space, and the matrix format is double precision format; imread() is a function for reading images in MATLAB; im2double is a function for converting image format to double precision type in MATLAB; W is the number of columns of the color information matrix of the fabric image; H is the number of rows of the color information matrix of the fabric image; size() is a function for reading the matrix size in MATLAB;
[0050] Then, set the conversion method:
[0051] C_srgb2lab=makecform('srgb2lab','AdaptedWhitePoint',whitepoint('d65'));
[0052] Among them, C_srgb2lab is the set color space conversion function; makecform() is the function of creating a color conversion structure in MATLAB; 'srgb2lab' is the color conversion type; 'AdaptedWhitePoint' is the white point adjustment option; whitepoint('d65') is the white point value of the adjusted white point;
[0053] Finally, perform the color space conversion:
[0054] Lab=applycform(rgb,C_rgb2lab);
[0055] Among them, Lab is the color information matrix of CIELAB color space; applycform() is a function for performing color space conversion.
[0056] In the above-mentioned method for evaluating the color uniformity of a fabric surface, in step (5.1), according to the relationship between W and n, H and m, the number of rows and columns of the sub-windows, and the total number of sub-windows are divided into the following four cases for calculation:
[0057] (a) When is an integer, and When is also an integer, the number of rows and columns in each subwindow is the same, and the number of columns w and rows h of each subwindow and the total number of subwindows M are respectively:
[0058]
[0059]
[0060] M = m × n;
[0061] (b) When Not an integer, When it is an integer, the division starts from the upper left corner, and the number of columns w and the number of rows h of each sub-window from the 1st column to the n-1th column are the same, which are recorded as the first type of sub-windows; the number of columns w2 and the number of rows h2 of each sub-window in the nth column are the same, which are recorded as the second type of sub-windows;
[0062] The number of columns w1 and rows h1 of the first type of sub-window, the number of columns w2 and rows h2 of the second type of sub-window, and the total number M of sub-windows are respectively:
[0063]
[0064]
[0065] w2=W-(n-1)×w;
[0066]
[0067] M = m × n;
[0068] Among them, Int() is the rounding function to negative infinity in MATLAB;
[0069] (c) When is an integer, When it is not an integer, the division starts from the upper left corner. The number of columns w3 and the number of rows h3 of each sub-window from the 1st row to the m-1th row are the same, and they are recorded as the third type of sub-windows; the number of columns w4 and the number of rows h4 of each sub-window in the mth row are the same, and they are recorded as the fourth type of sub-windows.
[0070] The number of columns w3 and rows h3 of the third type of sub-window, the number of columns w4 and rows h4 of the fourth type of sub-window, and the total number M of sub-windows are respectively:
[0071]
[0072]
[0073]
[0074] h4=H-(m-1)×h;
[0075] M = n × m;
[0076] (d) When Not an integer, When it is not an integer, the division starts from the upper left corner. The sub-windows located in the 1st column to the n-1th column and the 1st row to the m-1th row have the same column number w5 and row number h5, which are recorded as the fifth type of sub-windows; the sub-windows located in the nth column and the 1st row to the m-1th row have the same column number w6 and row number h6, which are recorded as the sixth type of sub-windows; the sub-windows located in the mth row and the 1st column to the n-1th column have the same column number w7 and row number h7, which are recorded as the seventh type of sub-windows; the sub-window located in the nth column and the mth row is recorded as the eighth type of sub-window;
[0077] The number of columns w5 and the number of rows h5 of the fifth type of sub-window, the number of columns w6 and the number of rows h6 of the sixth type of sub-window, the number of columns w7 and the number of rows h7 of the seventh type of sub-window, the number of columns w8 and the number of rows h8 of the eighth type of sub-window, and the total number M of sub-windows are respectively:
[0078]
[0079]
[0080]
[0081] w6=W-(n-1)×w;
[0082] h7=H-(n-1)×h;
[0083]
[0084] h8=H-(m-1)×h;
[0085] w8=W-(n-1)×w;
[0086] M=n×m.
[0087] The above segmentation may also be performed in other ways, with the purpose of dividing the color matrix corresponding to different parts of the fabric image.
[0088] The principle of the present invention is:
[0089] The present invention divides the fabric image into different sub-windows, then calculates the color mean of each sub-window respectively, and finally takes the average of the color difference between the color mean of each sub-window and the overall color mean of the fabric as an indicator for evaluating the color uniformity of the fabric surface. The color difference formula is a very mature method for evaluating color differences, and the mean is also a commonly used method to express the degree of uniformity. Because the color difference formula and the mean are relatively mature, the use of the color difference formula is accurate and reliable, so the proposed evaluation index has certain accuracy and reliability.
[0090] Beneficial Effects
[0091] The method for evaluating the color uniformity of a fabric surface of the present invention is simple to operate and uses the mean value of the color difference as an evaluation index, which can not only reflect the overall difference between the colors of each sub-window, but also because the color difference has a relatively clear description of the visual color difference degree, the calculation result is more intuitive. DETAILED DESCRIPTION
[0092] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.
[0093] A method for evaluating color uniformity of a fabric surface comprises the following steps:
[0094] (1) taking a picture of the surface of the fabric to be tested; the color of the surface of the fabric to be tested comes from dyeing, coating, inkjet, etc., and these methods can make the fabric surface have color;
[0095] The photos were taken using a DigiEye colorimeter, and the light source was set to D65 or D50.
[0096] (2) Chromaticity space conversion: Use MATLAB software to read the fabric image in step (1), and then use the makecform() function and applycform() function in MATLAB to convert the color information of the fabric image from the color information matrix of the RGB color space to the color information matrix of the CIELAB color space;
[0097] The specific process of step (2) is as follows:
[0098] First, read in the fabric image and convert the data type:
[0099] rgb0 = imread('image name');
[0100] rgb = im2double(rgb0);
[0101] W = size(rgb,2);
[0102] H = size(rgb,1);
[0103] Among them, rgb0 is the color information matrix of the fabric image in the RGB color space; rgb is the color information matrix of the fabric image in the RGB color space, and the matrix format is double precision format; imread() is the function for reading images in MATLAB; im2double is the function for converting image format to double precision type in MATLAB; W is the number of columns of rgb; H is the number of rows of rgb; size() is the function for reading matrix size in MATLAB;
[0104] Then, set the conversion method:
[0105] C_srgb2lab=makecform('srgb2lab','AdaptedWhitePoint',whitepoint('d65'));
[0106] Among them, C_srgb2lab is the set color space conversion function; makecform() is the function of creating a color conversion structure in MATLAB; 'srgb2lab' is the color conversion type; 'AdaptedWhitePoint' is the white point adjustment option; whitepoint('d65') is the white point value of the adjusted white point;
[0107] Finally, perform the color space conversion:
[0108] Lab=applycform(rgb,C_rgb2lab);
[0109] Among them, Lab is the color information matrix of CIELAB color space; applycform() is a function for performing color space conversion.
[0110] (3) respectively reading the information of different color layers in the color information matrix of the CIELAB color space obtained in step (2);
[0111] L = Lab(:,:,1);
[0112] a=Lab(:,:,2);
[0113] b=Lab(:,:,3);
[0114] Wherein, L is the brightness layer information matrix of the color information matrix of the CIELAB color space; a is the red and green value layer information matrix of the color information matrix of the CIELAB color space; b is the yellow and blue value layer information matrix of the color information matrix of the CIELAB color space; Lab is the color information matrix of the fabric image in the CIELAB color space converted in step (2);
[0115] (4) Calculate the color mean of the color information matrix of the fabric image based on the information of different color layers obtained in step (3). The calculation formula is as follows:
[0116]
[0117]
[0118]
[0119] Among them, L i 、a i and b i are the CIE L values of the ith data point in the brightness layer information matrix, the red-green value layer information matrix, and the yellow-blue value layer information matrix in step (3). * Value, CIE a * Value and CIE b * Value; N is the product of the number of rows and columns of the color information matrix Lab; The CIE L values of all data points in the brightness layer information matrix L, the red-green value layer information matrix a, and the yellow-blue value layer information matrix b obtained in step (3) are respectively * Mean, CIE a * Mean and CIE b * Mean;
[0120] (5) Extract the color mean of different parts in the color information matrix of the fabric image;
[0121] (5.1) Extract the color mean of different parts in the brightness layer of the color information matrix of the fabric image;
[0122] (5.1.1) The information matrix of the brightness layer in the color information matrix of the CIELAB color space obtained in step (3) is divided into m rows × n columns of sub-blocks. The sub-block matrices after division are recorded as sub-windows. Different sub-windows represent different parts of the color information matrix of the fabric image; and m and n satisfy:
[0123] 1≤n<W;
[0124] 1≤m<H;
[0125] Where W and H are the number of columns and rows of the color information matrix of the fabric image respectively; m and n cannot be equal to 1 at the same time;
[0126] According to the relationship between W and n, H and m, the number of rows and columns of sub-windows and the total number of sub-windows are calculated in the following four cases:
[0127] (a) When is an integer, and When is also an integer, the number of rows in each subwindow is the same, the number of columns in each subwindow is the same, and the number of columns w and rows h of each subwindow and the total number of subwindows M are respectively:
[0128]
[0129]
[0130] M = m × n;
[0131] (b) When Not an integer, When it is an integer, the division starts from the upper left corner, and the number of columns w and the number of rows h of each sub-window from the 1st column to the n-1th column are the same, which are recorded as the first type of sub-windows; the number of columns w2 and the number of rows h2 of each sub-window in the nth column are the same, which are recorded as the second type of sub-windows;
[0132] The number of columns w1 and rows h1 of the first type of sub-window, the number of columns w2 and rows h2 of the second type of sub-window, and the total number M of sub-windows are respectively:
[0133]
[0134]
[0135] w2=W-(n-1)×w;
[0136]
[0137] M = m × n;
[0138] Among them, Int() is the rounding function to negative infinity in MATLAB;
[0139] (c) When is an integer, When it is not an integer, the division starts from the upper left corner. The number of columns w3 and the number of rows h3 of each sub-window from the 1st row to the m-1th row are the same, and they are recorded as the third type of sub-windows; the number of columns w4 and the number of rows h4 of each sub-window in the mth row are the same, and they are recorded as the fourth type of sub-windows.
[0140] The number of columns w3 and rows h3 of the third type of sub-window, the number of columns w4 and rows h4 of the fourth type of sub-window, and the total number M of sub-windows are respectively:
[0141]
[0142]
[0143]
[0144] h4=H-(m-1)×h;
[0145] M = n × m;
[0146] (d) When Not an integer, When it is not an integer, the division starts from the upper left corner. The sub-windows located in the 1st column to the n-1th column and the 1st row to the m-1th row have the same column number w5 and row number h5, which are recorded as the fifth type of sub-windows; the sub-windows located in the nth column and the 1st row to the m-1th row have the same column number w6 and row number h6, which are recorded as the sixth type of sub-windows; the sub-windows located in the mth row and the 1st column to the n-1th column have the same column number w7 and row number h7, which are recorded as the seventh type of sub-windows; the sub-window located in the nth column and the mth row is recorded as the eighth type of sub-window;
[0147] The number of columns w5 and the number of rows h5 of the fifth type of sub-window, the number of columns w6 and the number of rows h6 of the sixth type of sub-window, the number of columns w7 and the number of rows h7 of the seventh type of sub-window, the number of columns w8 and the number of rows h8 of the eighth type of sub-window, and the total number M of sub-windows are respectively:
[0148]
[0149]
[0150]
[0151] w6=W-(n-1)×w;
[0152] h7=H-(n-1)×h;
[0153]
[0154] h8=H-(m-1)×h;
[0155] w8=W-(n-1)×w;
[0156] M=n×m.
[0157] (5.1.2) Calculate the color mean of each sub-window in the brightness layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows:
[0158]
[0159] Among them, L kj is the CIE L value of the jth data point extracted from the kth sub-window in the luminance layer * value; is the CIE L of all data points in the kth subwindow in the brightness layer * Mean; M is the total number of sub-windows in step (5.1.1);
[0160] (5.2) Extract the color mean of different parts in the red and green value layer of the color information matrix of the fabric image;
[0161] (5.2.1) segmenting the information matrix of the red and green value layers in the color information matrix of the CIELAB chromaticity space obtained in step (3) according to the method for segmenting the color information matrix of the luminance layer in (5.1.1);
[0162] (5.2.2) Calculate the color mean of each sub-window in the red and green value layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows:
[0163]
[0164] Among them, a kj is the CIE a of the jth data point extracted from the kth subwindow in the red and green value layer * value; is the CIE a of all data points in the kth subwindow in the red and green value layer * Mean; M is the total number of sub-windows in step (5.1.1);
[0165] (5.3) Extract the color mean of different parts in the yellow-blue value layer of the color information matrix of the fabric image;
[0166] (5.3.1) segmenting the information matrix of the yellow-blue value layer in the color information matrix of the CIELAB chromaticity space obtained in step (3) according to the method for segmenting the color information matrix of the luminance layer in (5.1.1);
[0167] (5.3.2) Calculate the color mean of each sub-window in the yellow-blue value layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows:
[0168] Among them, b kj is the CIE b of the jth data point extracted from the kth subwindow in the yellow-blue value layer * value; is the CIE b of all data points in the kth subwindow of the yellow-blue value layer * Mean; M is the total number of sub-windows in step (5.1.1);
[0169] (6) using the CMC color difference formula to calculate the color difference between the color mean obtained in step (4) and the color mean of each sub-window obtained in step (5);
[0170] (7) Calculate the color uniformity of different parts of the fabric surface. The calculation formula is:
[0171]
[0172] Among them, ΔE k is the color difference between the color mean obtained in step (4) and the color mean of each sub-window obtained in step (5) according to the calculation method in step (6), It is the color uniformity of different parts of the fabric surface. The larger the value, the worse the color uniformity of the fabric surface.
[0173] The above method is used to evaluate pure cotton dyed fabrics, and the specific process is as follows:
[0174] First, use DigiEye to take pictures of the above fabrics, and the test light source is D65 standard light source.
[0175] Then, according to step (2) in the above method, the fabric image is read and the color information matrix is converted from the RGB color space to the CIELAB color space.
[0176] Then, according to step (3), the color information of the brightness layer L, the red-green value layer a, and the yellow-blue value layer b in the color information matrix of the CIELAB color space are extracted respectively.
[0177] According to step (4), the color averages of the fabric brightness layer L, the red-green value layer a, and the yellow-blue value layer b are calculated as follows:
[0178] The number of columns and rows of the color information matrix of the above fabric image is W = 1080, H = 1440. Starting from the upper edge of the fabric image matrix, the brightness layer, red-green value layer and yellow-blue value layer of the fabric image color information matrix are segmented into m = 5 columns; starting from the left edge of the fabric image matrix, the brightness layer, red-green value layer and yellow-blue value layer of the fabric image color information matrix are segmented into n = 5 rows; the number of sub-window columns w = 216, the number of sub-window rows h = 288, and the total number of sub-windows M = 25. The color mean of each sub-window is shown in Table 1.
[0179] Table 1 Color mean of each sub-window
[0180]
[0181] Then, according to step (6), the color difference between the color mean of each sub-window and the color mean of the entire fabric is calculated. The results are shown in Table 2.
[0182] Table 2 Color difference of each sub-window
[0183]
[0184]
[0185] Finally, the color uniformity of the fabric surface is calculated, and the result is unit.
Claims
1. A method for evaluating the color uniformity of a fabric surface, characterized in that The steps include: (1) taking a fabric picture of the surface to be tested of the fabric to be tested; (2) Chromaticity space conversion: Use MATLAB software to read the fabric image in step (1), and then use the makecform() function and applycform() function in MATLAB to convert the color information of the fabric image from the color information matrix of the RGB color space to the color information matrix of the CIELAB color space; (3) respectively extracting information of different color layers in the color information matrix of the CIELAB color space obtained in step (2); L = Lab(:,:,1); a=Lab(:,:,2); b = Lab(:,:,3); Wherein, L is the brightness layer information matrix of the color information matrix of the CIELAB color space; a is the red and green value layer information matrix of the color information matrix of the CIELAB color space; b is the yellow and blue value layer information matrix of the color information matrix of the CIELAB color space; Lab is the color information matrix of the fabric image in the CIELAB color space converted in step (2); (4) Calculate the color mean of the color information matrix of the fabric image based on the information of different color layers obtained in step (3). The calculation formula is as follows: Among them, L i 、a i and b i are the CIE L values of the ith data point in the brightness layer information matrix, the red-green value layer information matrix, and the yellow-blue value layer information matrix in step (3). * Value, CIE a * Value and CIE b * Value; N is the product of the number of rows and columns of the color information matrix Lab; The CIE L values of all data points in the brightness layer information matrix L, the red-green value layer information matrix a, and the yellow-blue value layer information matrix b obtained in step (3) are respectively * Mean, CIE a * Mean and CIE b * Mean; (5) Extract the color mean of different parts in the color information matrix of the fabric image; (5.1) Extract the color mean of different parts in the brightness layer of the color information matrix of the fabric image; (5.1.1) The information matrix of the brightness layer in the color information matrix of the CIELAB color space obtained in step (3) is divided into m rows × n columns of sub-blocks. The sub-block matrices after division are recorded as sub-windows. Different sub-windows represent different parts of the color information matrix of the fabric image; and m and n satisfy: 1≤n<W; 1≤m<H; Where W and H are the number of columns and rows of the color information matrix of the fabric image respectively; m and n cannot be equal to 1 at the same time; (5.1.2) Calculate the color mean of each sub-window in the brightness layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows: Among them, L kj is the CIE L value of the jth data point extracted from the kth sub-window in the luminance layer * value; is the CIE L of all data points in the kth subwindow in the brightness layer * Mean; M is the total number of sub-windows in step (5.1.1); (5.2) Extract the color mean of different parts in the red and green value layer of the color information matrix of the fabric image; (5.2.1) segmenting the information matrix of the red and green value layers in the color information matrix of the CIELAB chromaticity space obtained in step (3) according to the method for segmenting the color information matrix of the luminance layer in (5.1.1); (5.2.2) Calculate the color mean of each sub-window in the red and green value layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows: Among them, a kj is the CIE a of the jth data point extracted from the kth subwindow in the red and green value layer * value; is the CIE a of all data points in the kth subwindow in the red and green value layer * Mean; M is the total number of sub-windows in step (5.1.1); (5.3) Extract the color mean of different parts in the yellow-blue value layer of the color information matrix of the fabric image; (5.3.1) segmenting the information matrix of the yellow-blue value layer in the color information matrix of the CIELAB chromaticity space obtained in step (3) according to the method for segmenting the color information matrix of the luminance layer in (5.1.1); (5.3.2) Calculate the color mean of each sub-window in the yellow-blue value layer; the color mean of all data points extracted from the k-th sub-window is calculated as follows: Among them, b kj is the CIE b of the jth data point extracted from the kth subwindow in the yellow-blue value layer * value; is the CIE b of all data points in the kth subwindow of the yellow-blue value layer * Mean; M is the total number of sub-windows in step (5.1); (6) using the CMC color difference formula to calculate the color difference between the color mean obtained in step (4) and the color mean of each sub-window obtained in step (5); (7) calculating the color uniformity of different parts of the fabric surface, the calculation formula is: Where, ΔE k is the color difference between the color mean obtained in step (4) and the color mean of each sub-window obtained in step (5) according to the calculation method in step (6), It is the color uniformity of different parts of the fabric surface. The larger the value, the worse the color uniformity of the fabric surface.
2. A method for evaluating color uniformity of a fabric surface according to claim 1, characterized in that: The photo was taken using a DigiEye colorimeter.
3. The method for evaluating fabric surface color uniformity according to claim 1, characterized in that: When shooting, the light source is set to D65 or D50.
4. A method for evaluating color uniformity of a fabric surface according to claim 1, characterized in that: The specific process of step (2) is as follows: First, read in the fabric image and convert the data type: rgb0 = imread('image name'); rgb = im2double(rgb0); W = size(rgb, 2); H = size(rgb, 1); Among them, rgb0 is the color information matrix of the fabric image in the RGB color space; rgb is the color information matrix of the fabric image in the RGB color space, and the matrix format is double precision format; imread() is the function for reading images in MATLAB; im2double is the function for converting image format to double precision type in MATLAB; W is the number of columns of the color information matrix of the fabric image; H is the number of rows of the color information matrix of the fabric image; size() is the function for reading the matrix size in MATLAB; Then, set the conversion method: C_srgb2lab=makecform('srgb2lab','AdaptedWhitePoint',whitepoint('d65')); Among them, C_srgb2lab is the set color space conversion function; makecform() is the function of creating a color conversion structure in MATLAB; 'srgb2lab' is the color conversion type; 'AdaptedWhitePoint' is the white point adjustment option; whitepoint('d65') is the white point value of the adjusted white point; Finally, perform the color space conversion: Lab=applycform(rgb,C_rgb2lab); Among them, Lab is the color information matrix of CIELAB color space; applycform() is a function for performing color space conversion.
5. The method for evaluating color uniformity of a fabric surface according to claim 1, characterized in that: In step (5.1), according to the relationship between W and n, H and m, the number of rows and columns of the sub-windows and the total number of sub-windows are calculated in the following four cases: (a) When is an integer, and When is also an integer, the number of rows in each subwindow is the same, the number of columns in each subwindow is the same, and the number of columns w and rows h of each subwindow and the total number of subwindows M are respectively: M = m × n; (b) When Not an integer, When it is an integer, the division starts from the upper left corner, and the number of columns w and the number of rows h of each sub-window from the 1st column to the n-1th column are the same, which are recorded as the first type of sub-windows; the number of columns w2 and the number of rows h2 of each sub-window in the nth column are the same, which are recorded as the second type of sub-windows; The number of columns w1 and rows h1 of the first type of sub-window, the number of columns w2 and rows h2 of the second type of sub-window, and the total number M of sub-windows are respectively: w2=W-(n-1)×w; M = m × n; Among them, Int() is the rounding function to negative infinity in MATLAB; (c) When is an integer, When it is not an integer, the division starts from the upper left corner. The number of columns w3 and the number of rows h3 of each sub-window from the 1st row to the m-1th row are the same, and they are recorded as the third type of sub-windows; the number of columns w4 and the number of rows h4 of each sub-window in the mth row are the same, and they are recorded as the fourth type of sub-windows. The number of columns w3 and rows h3 of the third type of sub-window, the number of columns w4 and rows h4 of the fourth type of sub-window, and the total number M of sub-windows are respectively: h4=H-(m-1)×h; M = n × m; (d) When Not an integer, When it is not an integer, the division starts from the upper left corner. The sub-windows located in the 1st column to the n-1th column and the 1st row to the m-1th row have the same column number w5 and row number h5, which are recorded as the fifth type of sub-windows; the sub-windows located in the nth column and the 1st row to the m-1th row have the same column number w6 and row number h6, which are recorded as the sixth type of sub-windows; the sub-windows located in the mth row and the 1st column to the n-1th column have the same column number w7 and row number h7, which are recorded as the seventh type of sub-windows; the sub-window located in the nth column and the mth row is recorded as the eighth type of sub-window; The number of columns w5 and the number of rows h5 of the fifth type of sub-window, the number of columns w6 and the number of rows h6 of the sixth type of sub-window, the number of columns w7 and the number of rows h7 of the seventh type of sub-window, the number of columns w8 and the number of rows h8 of the eighth type of sub-window, and the total number M of sub-windows are respectively: w6=W-(n-1)×w; h7=H-(n-1)×h; h8=H-(m-1)×h; w8=W-(n-1)×w; M=n×m。
Citation Information
Patent Citations
Color digital comparison system and method
CN106226249A
Color difference analysis / detection method and system for fair-faced concrete
CN111681289A