Conventional color fastness mainly includes color fastness to rubbing, color fastness to washing and color fastness to perspiration[
18,
19,
20], etc. This paper mainly studies the color fastness to rubbing. The overall flowchart of the proposed method is shown in
Figure 1. Firstly, the fabric samples are prepared for color fastness modeling. The fabrics are paired samples, one of them will be rubbed as tested and another remains as a reference. After the rubbing test, all the samples will be visually graded by a specially trained professional under standard grading conditions. So, the ground truth of each tested sample is acquired as a reference for digital grading model construction. Then, the spectral reconstruction technology is used to reconstruct the spectral reflectance of the modeling samples, and the color data of the modeling sample is calculated by colorimetry theory. Based on the calculated color data, we can acquire the color difference (such as CIEDE2000) and color attribute difference (such as Δ
L, Δ
a, and Δ
b) of each paired sample. Finally, the BP neural network is adopted to construct the color fastness model between the input data (color difference and color attribute difference) and the visually graded color fastness result. Using the constructed color fastness prediction model, the color fastness grade of the newly tested samples will be easily predicted.
2.1. Color Data Acquisition Based on Spectral Reconstruction
In this study, spectral reconstruction technology was used to calculate the color data of fabric samples. The first step is to take digital images of fabric samples and spectral characterization samples (such as the X-rite ColorChecker color chart or custom fabrics chart) with a digital camera. With uniform illumination of daylight light source in a closed light box of ColorEye, the sample is placed on the sample platform and the optical path of the digital camera is perpendicular to the plane of the platform. The geometric diagram of the uniformly illuminated light box is shown in
Figure 2a and the rendering effect of light box is shown in
Figure 2b. The real product of light box is presented in
Figure 2c and the inner illumination uniformity of the imaging area over the platform that checked with the X-rite gray card and Nikon D7200 digital camera are plotted in
Figure 2d. To set the appropriate imaging parameters such as ISO, shutter speed, and aperture size, we make sure the RGB values of the white and black patch in the X-rite ColorChecker 24 color chart are approximately 235 and 35, respectively. Therefore, we set the ISO as 100, the shutter speed as 1/20 second, and the aperture size as f/5.6 with a focal length of 35mm. In the experiment, we use these imaging parameters to capture the samples.
Using the set imaging parameters, the digital images of fabric samples and spectral characterization samples are captured in the light box by a digital camera, and the average RGB values of each fabric sample and each color patch in the modeling samples are extracted. If we set the extract area as m × n pixels, the average RGB response values in the extraction area is calculated as shown in Equation (
1),
where
i indicates the
ith pixel in the extracted area, r
, g
, and b
are the red, green, and blue channel RGB response values of the
ith pixel, and
d is the response value vector with the dimension of 1 × 3. It should be noted that the raw format digital response values that without post-processed by the digital camera ISP (Image Signal Processing) module is used in this study. Compared to the normal RGB response values commonly used in current methods, the raw format response values is cleaner and linearity than post-processed RGB values, which will benefit the higher spectral reconstruction accuracy. Because the response of each channel is no longer linear after processing the raw image, but is better represented by a more complex non-linear law. Additionally, the post-processing methods of different camera manufacturers often differ and are difficult to accurately simulate or describe, making it challenging to model post-processing steps accurately[
21,
22].
The spectral characterization of digital camera is carried out in the second step utilizing a pseudo-inverse technique based on polynomial expansion. As is illustration, the raw response value from the spectral characterization sample is extended into a second-order polynomial, as given in Equation (
2), which has a total of 10 expansion items.
where
d is the vector of digital response values following polynomial expansion, the superscript
T denotes the transpose, and
r,
g, and
b are the red, green, and blue channel raw response values of any sample. Equation (
3) is the expanded matrix of digital response values of the spectral characterization samples after polynomial expansion.
where
j is the
jth spectral characterization sample, P indicates the total number of spectral characterization samples,
d stands for the extended vector of numerical response values for the
jth sample, and
D is the extended matrix of spectral modeling samples.
As indicated in Equation (
4) to Equation (
7), in the proposed method, we use the Tikhonov regularization to regularize the solution of the spectral reconstruction matrix. Firstly, the singular value decomposition (SVD) algorithm is applied to the expanded response matrix
D of the spectral modeling samples. Then a very small number
is added to the eigenvalues to obtain the constrained eigenvalues to reduce the condition number of the expanded response matrix. After that, we reconstruct the response expansion matrix
D. Finally, the spectral reconstruction matrix
Q is obtained by solving with pseudo-inverse (PI) algorithm and to obtain the spectral reconstruction model.
where
R is the spectral matrix of the spectral modeling samples,
U and
V are the orthogonal decomposition matrices obtained by SVD algorithm,
S and
P are diagonal matrices containing eigenvalues,
I is the unit matrix, and
pinv(·) is the mathematical function of pseudo-inverse algorithm.
In the next step, we use the established spectral reconstruction model to reconstruct the spectral reflectance of the newly tested fabric sample. The extracted raw response
d of the newly tested fabric is first expanded using the polynomial as in Equation (
1), to get the expanded response vector
d. Then the spectral reflectance of tested fabric samples are reconstructed using the spectral reconstruction matrix
Q, as indicated in Equation (
8).
where
r is the reconstructed spectral reflectance of the tested fabric sample and matrix
Q is the established spectral reconstruction matrix.
Using the constructed spectral reflectance above, the corresponding color data of the fabric samples are calculated based on the colorimetry theory. The tristimulus values of the fabric samples are calculated as indicated in Equation (
9) and Equation (
10).
where,
where
x(λ),
y(λ), and
z(λ) are standard observer color matching functions,
E(λ) is the fabric samples spectral reflectance,
S(λ) is the relative spectral power distribution function of the light source,
is the wavelength,
k is the adjustment factor, and
X,
Y, and
Z are the three stimulus value data of the fabric sample.
Then, the CIELab color data of the fabric samples are calculated from the corresponding tristimulus. According to the theory of chromaticity, the method of calculating the corresponding CIELab color data from the tristimulus value data is shown in formula (11) to formula (12).
where,
where
L,
a, and
b represent the lightness, red-green, and yellow-blue color values of the fabric sample in the CIELab color space, respectively.
X,
Y, and
Z are the three stimulus value data of the fabric, and
X,
Y, and
Z are the three stimulus value data of the reference light source. In Equation (
12),
H and
H represent the three stimulus values of the fabric and reference light source, respectively.
With the CIELab color data of fabric samples, the next step is to calculate the color difference and color attribute difference in order to perform the color fastness test. Using the CIELab color data of the fabric sample pair, the CIEDE2000 color difference value of the fabric sample pair and the corresponding Δ
L, Δ
a, and Δ
b color difference values are calculated. The CIEDE2000 color difference formula is shown in formula (13).
where Δ
L, Δ
C, and Δ
H represent the lightness, chroma, and hue differences of the fabric sample pair in the CIELCh color space, which are automatically converted from the CIELab color space when calculating the color difference.
k,
k, and
k are the weights for hue, lightness, and chroma when calculating the color difference. For fabric samples,
k is usually set to 1.5, and
k and
k are set to 1.
S,
S, and
S are the weighting functions for lightness, chroma, and hue, respectively, and
R is the adjustment term for color difference calculation. The calculation of the color differences Δ
L, Δ
a, and Δ
b are shown in equations (14) to (16).
where (
L,
a,
b) and (
L,
a,
b) are the CIELab color data of the reference sample and the color fastness test sample in the fabric sample pair, respectively.