Measuring Reflectance Spectra of Textile Fabrics by Scanner

Copyright: © 2011 Shams-Nateri A, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.


Introduction
A calibration procedure is unavoidable for high quality color reproduction by low-cost color devices such as digital color cameras, scanner etc. Each device has a different gamut and its own color space defined by the relationship between the input colors and the corresponding RGB codes used to represent them. A simple method of converting scanner or digital camera RGB responses to estimates of object tristimulus coordinates is to apply a linear transformation to the RGB values. The transformation parameters are selected subject to minimization of some significant error measure. The basic idea of color target-based characterization is to use a reference target that contains a certain number of color samples. Typical methods like least squares polynomial modeling tristimulus, neural networks and threedimensional lookup tables with interpolation and extrapolation can be used to derive a transformation between RGB values and XYZ values [1][2][3][4][5][6][7][8].
Estimation spectral information from digital color image has become a field of much interest and practical importance during the last few years. The color reproduction based on trichromatic data is often insufficient to obtain the device in dependent color, e.g. XYZ. In addition, an accurate illumination correction is impossible from tri chromatic data, which is required when the color image is reproduced under different illuminations from the one used in the recording. Conversely, the spectral reflectance of an object is its intrinsic characteristic, which can be obtained by recording a spectral reflectance image. The device independent color under the any illumination light can be cal culated from spectral reflectance. Various kinds of multi-band cameras have been developed for the pur pose of spectral reflectance image achievement. A considerable number of studies have been also conducted on the spectrum estimation method from multi-band image data. A practical problem in the estimation of spec tral reflectance images is that spectrum estimation depends on the spectral prop erties of the camera and the light illuminating the object. In order to obtain their properties, a spectral measurement device, such as spectropho tometer, is generally used [3,4,[7][8][9][10][11].
The spectral characterization consists in approximating the different spectral characteristics of the sensor. A multispectral image is an image where each pixel contains information about the spectral reflectance of the imaged scene. Multispectral images carry information about a number of spectral bands: from three components per pixel for RGB color images to several hundreds of bands for hyperspectral images.
Multispectral imaging is relevant to several domains of application, such as remote sensing, astronomy, medical imaging, and analysis of museological objects, cosmetics, medicine, high-accuracy color printing, or computer graphics. Multispectral scanners are mostly based on a point-scan scheme and are thus too slow and expensive [12,13].
Principal component analysis is a basis of new statistical method for data analysis. This has been used in data analysis and compression. Principal component analysis is a basis of latest data analysis, which has been called one of the most important results from applied linear algebra. PCA is used abundantly in all forms of analysis such as neuroscience and image processing. It is a simple, non-parametric method of extracting relevant information from confusing data sets. Principal components analysis generates a new set of variables, called principal components. Each principal component is a linear combination of the original variables and all the principal components are orthogonal to each other. There are numerous ways to construct an orthogonal basis for a set of spectral data. The first principal component accounts for as much of the variability in the data as possible, and each subsequent component accounts for as much of the remaining variability as possible. By grading the eigenvectors for descending eigenvalues, so that largest is first, one can create an ordered orthogonal method with the first eigenvector having the direction of largest variance of the data. In this way, we can find directions in which the data set has the most significant amounts of energy and variation [13][14][15][16][17][18][19].
In color science, principal component analysis has been used mainly for data compression and defines the principal directions that a set of data orient. A number of researchers have since investigated to estimation spectral information from tristimulus and application of principal components analysis in the recovering spectral information. The colorimetric data can be easily calculated from spectral data, but the computation of spectral data from colorimetric values is not

Neuro-fuzzy
The fuzzy inference system (FIS) is a computing system based on the concepts of fuzzy set theory, fuzzy IF/THEN rule and fuzzy reasoning to make relationship between an input space into an output space. The basis for fuzzy logic is the basis for human communication. Fuzzy reasoning contains very simple mathematical concepts. The fuzzy system can match any set of input-output data. This process is made particularly easy by adaptive techniques like adaptive neurofuzzy inference systems. ANFIS is about taking a fuzzy inference system and training it with a backpropagation algorithm, well known in the artificial neural network (ANN) theory, based on some collection of input/output data. The basic structure of fuzzy inference system consists of three conceptual components: A rule base, database or dictionary which defines the membership functions used in the fuzzy rules, and reasoning mechanism which performs the inference procedure upon the rule and a given condition to derive a reasonable output or conclusion [25][26][27].
The present study describes a new technique based on principal component analysis, polynomial regression, neural network and neuro-fuzzy techniques that attempts to reconstruction reflectance spectra from the scanner RGB values.

Materials and Methods
The Benq 5550T color scanner was used for scanning and imaging the colored fabrics. The fabrics were scanned under the condition of 600 pixels/inch and 24 bit /pixel. The reflectance spectra of dyed fabrics were measured by using Texflash spectrophotometer of Datacolor Corporation. The colored fabrics were consisting of polyester fabrics dyed with disperse dyestuff in varieties of colors. The chromaticity of fabrics is shown in Figure 1 under condition of 10 degree standard observer and D65 illuminant. A set of 141 patches of fabrics were used as training data and 41 patches were kept for testing. The lightness of training and testing samples are shown in Figures 2 and 3, respectively. All computations were performed by using MATLAB software.

sRGB method
In this method, the relationship between the reflectance spectra and scanner RGB values was obtained by using sRGB equation. The experimental procedure is outlined below: • Scan fabrics by scanner and obtain the scanner RGB responses from colored fabrics images.
• Then RGB value of scanner was converted to CIEXYZ by follow: • Measuring the reflectance spectra of training samples by spectrophotometer.
• Calculating principal components of reflectance spectra.
• Calculating the tristimulus of principal components (XYZ PC ): XYZ are tristimulus values of testing samples which is evaluated in previous stage. XYZ PC is tristimulus of principal components with highest eigenvalue.
• Application: calculating reflectance spectra by using principal component weighting (transformation matrix) in Equation 11.

XYZ-polynomial regression method
In this method, the relationship between the reflectance spectra and scanner RGB values was obtained by means of polynomial regression technique. The experimental procedure is outlined below: • Scan fabrics by scanner and obtain the scanner RGB responses from colored fabrics images.
• Measure the reflectance spectra and CIEXYZ values of colored fabrics by spectrophotometer.
• Derive a transfer matrix that matches scanner RGB to CIEXYZ values of color fabrics by multiple polynomial regression by Equation 12. The polynomial functions are shown in Table 1.
( , , , ) • Measuring the reflectance spectra and the tristimulus values (XYZ) of training samples by spectrophotometer.
• Calculating principal components of reflectance spectra.
• Calculating the tristimulus of principal components (XYZ PC ) by equations 7, 8 and 9.
• Calculating the transformation matrix (principal component weighting) by Equation 10.
• Application: calculating reflectance spectra by using principal component weighting (transformation matrix) in Equation 11.

PCA-polynomial regression method
The relationship between the reflectance spectra and scanner RGB values was achieved by means of polynomial regression and principal component analysis techniques. The procedure of calibration is outlined below: • Scan samples by scanner and obtain the scanner RGB responses from their image.
• Measure the reflectance spectra of samples by spectrophotometer.
• Calculating principal components of reflectance spectra of training dataset.
• Calculating principal component weighting. where M n is weighting of n principal components and A n is a n×n where M is transformation matrix (principal component weighting), Calculate reflectance spectra by using principal component weighting and average of training samples reflectance spectra in Equation 15.

ANNET method
In this method, the relationship between the reflectance spectra and scanner RGB values was obtained by means of artificial neural network. The experimental procedure is outlined below: • Scan fabrics by scanner and obtain the scanner RGB responses from colored fabrics images.
• Measure the reflectance spectra values of training samples by spectrophotometer.
• Calculating principal components of reflectance spectra.
• The used multilayer perceptrons neural networks contain three inputs as scanner RGB responses, and three outputs as CIEXYZ values. Figure 4 shows the structure of neural network with three inputs, three outputs and one hidden layer, which contain 4 nodes. The topologies details of neural networks are shown in Table 3.
• The neural network was trained with backpropagation algorithm, which was continued over 500 epochs. The trained neural networks were used to evaluate the CIEXYZ values of testing samples from their RGB values.
• Measuring the reflectance spectra of training samples by spectrophotometer • Calculating principal components of reflectance spectra.
• Calculating the tristimulus for principal components by Equations 7, 8 and 9.
• Calculating the transformation matrix (principal component weighting) by Equation 10: • Application: calculating reflectance spectra by using principal component weighting (transformation matrix) in Equation 11.

PCA-ANNET method
In this section, neural network and principal component analysis were used for construction relationship between the reflectance spectra and scanner RGB values. The experimental procedure is outlined below: No.
Number of terms Polynomial terms (   • Measure the reflectance spectra of samples by spectrophotometer.
• Calculating principal components of reflectance spectra.
• Neural networks with multi-layer perceptron configuration applied to conversion scanner RGB values to principal component weighting. The neural network has 3 inputs as scanner RGB values and three to five outputs as coefficients first principal components ( Figure 5). Several topologies were tested to make relation between principal component weighting and scanner RGB values. The neural network was trained with backpropagation algorithm. The error goal was 0.0001 and neural network training was continued over 1000 epochs by back propagation algorithm.
• Application: convert scanner RGB into principal component weighting by trained neural network and calculate reflectance spectra by means of principal component weighting (Equation 15).

Neuro-Fuzzy method
In this method, the relationship between the reflectance spectra and scanner RGB values was obtained by means of neuro-fuzzy. The experimental procedure is outlined below: • Scan fabrics by scanner and obtain the scanner RGB responses from colored fabrics images.
• Measure the reflectance spectra and CIEXYZ values of training samples by spectrophotometer.
• Three ANFIS systems have been used. Each system has three input nods referred to the scanner RGB values and one output referred to one of the tristimulus values ( Figure 6). Several membership functions such as gbellmf (Generalized bellshaped built-in membership function), gauss2mf (Gaussian combination membership function), gaussmf (Gaussian curve built-in membership function) and dsigmf (Built-in membership function composed of the difference between two sigmoidal membership functions) were used for input nodes. Different numbers of membership functions have been also used for each input node. The neuro-fuzzy system has been trained by a hybrid method consisting of back propagation for the parameters associated with the input membership functions, and the least squares estimation for the parameters associated with the output membership functions.
The trained neuro fuzzy were used to evaluate the CIEXYZ values of testing samples from their RGB values.
• Calculating principal components of reflectance spectra.
• Calculating the tristimulus for principal components by Equations 7, 8 and 9.
• Calculating the transformation (principal component weighting) matrix by Equation 10.
• Application: calculating reflectance spectra by using principal component weighting (transformation matrix) in Equation 11.

PCA-Neuro fuzzy method
In this method, the relationship between the reflectance spectra and scanner RGB values was obtained by means of neuro fuzzy and principal component analysis techniques. The experimental procedure is outlined below: • Scan fabrics by scanner and obtain the scanner RGB responses from colored fabrics images.
• Measure the reflectance spectra and CIEXYZ values of training samples by spectrophotometer.
• Calculating principal components of reflectance spectra.
• Three, four and five ANFIS systems have been used. Each system has three input nods referred to the scanner RGB values and one output referred to one of principal component ( Figure  7). gbellmf (Generalized bell-shaped built-in membership function), gauss2mf (Gaussian combination membership function), gaussmf (Gaussian curve built-in membership function) and dsigmf (Built-in membership function composed of the difference between two sigmoidal membership functions) were used for input nodes. Different numbers of membership functions was also used for each input node. The neuro-fuzzy system was trained by a hybrid method consisting of back propagation for the parameters associated with the input membership functions, and the least square estimation for the parameters associated with the output membership functions.
• The trained neuro-fuzzy was used to evaluate the weight of principal components of testing samples with highest  • Application: principal components can be converted into reflectance spectral by means of transformation matrix and mean reflectance Equation 15.

Results and Discussion
The principal component analysis was applied on 141 reflectance spectra of training databases for extraction principal component and understanding the statistical nature of reflectance spectra. The principal components were calculated and their eigenvector are shown in Figure  8. The eigenvalues of principal components are also shown in Figure 9. From this figure, three initial principal components have highest and significant value and others are insignificant.
We tried to estimate the textile fabrics color by using scanner. The characterization was done by several methods such as sRGB, polynomial regression, PCA-polynomial regression, neural network, PCA-neural network, neuro-fuzzy and PCA-neuro fuzzy. The recovery performance was evaluated by spectrophotometric and colorimetric method. The spectrophotometric accuracy was calculated by the root mean square (RMS) error of the spectral fit. Colorimetric accuracy was evaluated by using CIELAB color difference equation under illuminant D65 and 1964 standard observer.  The results of polynomial regression method are shown in Tables  3 and 4 as spectrophotometric accuracy and colorimetric accuracy, respectively. As illustrated in these tables, the spectrophotometric recovery error changed from 0.0097 to 0.0899 RMS and 5.79 to 21.19 ∆E*ab. It is recognized that high order polynomials will fit the experimental data better. From the mathematical point of analysis, as with series increase, a better approximation is obtained by adding additional terms to an equation. The best reflectance estimation is obtained by polynomial with 14 terms with 0.0820 RMS and 5.79 ∆E*ab.
The results of PCA-polynomial regression method are shown in Tables 5 and 6 as spectrophotometric accuracy and colorimetric accuracy, respectively. As illustrated in these tables, the spectrophotometric recovery error changed from 0.0317 to 0.1484 RMS and 6.71 to 23.46 ∆E*ab. It is recognized that high order polynomials will fit the experimental data better. In addition, the accuracy of       The accuracy of reflectance spectra by sRGB method are shown in Table 7 as spectrophotometric accuracy and colorimetric accuracy. As shown in this   colorimetric accuracy, respectively. As illustrated in these tables, the spectrophotometric recovery error changed from 0.0817 to 0.1104 RMS and 4.14 to 9.58 ∆E*ab. The best reflectance estimation is obtained by neural network with one hidden layers and 7 nods with 14 terms with 0.0817 RMS and 4.14 ∆E*ab.   network (PCA-ANNET) method are shown in Tables 10, 12 and 14 as  spectrophotometric accuracy and Tables 11, 13 and 15 as colorimetric accuracy. As illustrated in these tables, the spectrophotometric recovery error changed from 0.0297 to 0.1668RMS and 6.14 to 22.12 ∆E*ab. The best reflectance estimation is obtained by neural network with two hidden layers, respectively with 2 and 5 nods, and five principal components with 0.0297 RMS and 6.14 ∆E*ab.   In neuro-fuzzy method, several membership function such as Generalized bell-shaped built-in membership function, Gaussian combination membership function, Gaussian curve built-in membership function and Built-in membership function composed of the product of two sigmoidally-shaped membership functions were used for input nodes. The results of neuro-fuzzy method are shown in Tables 16 and 17           accuracy, respectively. As illustrated in these Tables, the reflectance recovery error changed from 0.0815 to 0.2310 RMS and 4.36 to 24.23 ∆E*ab. The best reflectance estimation is obtained by neuro-fuzzy with Gaussian curve built-in membership function (gaussmf) (Figure 10) with 14 terms with 0.0839 RMS and 4.36 ∆E*ab.
In PCA-neuro-fuzzy method, several membership function such as Generalized bell-shaped built-in membership function, Gaussian combination membership function, Gaussian curve built-in membership function and Built-in membership function composed of the product of two sigmoidally-shaped membership functions were used for input nodes. The results of neuro-fuzzy method are shown in Tables 18, 20 and 22 as spectrophotometric accuracy and Tables  19, 21 and 23 as colorimetric accuracy. As illustrated in these tables, the reflectance recovery error changed from 0.0328 to 0.1183 RMS and 6.42 to 24.27∆E*ab. The best reflectance estimation is obtained by neuro-fuzzy with 2 Gaussian curve built-in membership function (gaussmf) for each input and 5 principal components with 0.0328 RMS and 6.42 ∆E*ab.

Conclusions
This article explained a numerical method based on principal component analysis, polynomial regression, neural network and neuro-fuzzy techniques to measure the reflectance spectra by scanner.
In polynomial method, estimation error is 0.0820 RMS and 5.79 ∆E*ab. The reflectance estimation error in PCA-polynomial method is 0.0317 RMS and 6.71 ∆E*ab. In sRGB method, the estimation error is 0.1173 RMS and 14.99 ∆E*ab. The reflectance estimation error of neural network method is 0.0817 RMS and 4.14 ∆E*ab. In PCA-ANNET method, the estimation error is 0.0297 RMS and 6.14 ∆E*ab. The reflectance estimation error of neuro-fuzzy method is 0.0839 RMS and 4.36 ∆E*ab. In PCA-neuro-fuzzy method error is 0.0328 RMS and 6.42 ∆E*ab. Obtained results indicate that the recovery error decreases with increase number of principal component and number of terms in a polynomial. Also, application of principal component increase accuracy of reflectance measurement. The reflectance estimation performance of PCA-ANNET method is better than others.