Colors of textile materials are the first parameter of quality evaluated by consumers and a key component considered in selecting printed fabric. In the textiles industry, digital printed fabric analysis is one of the basic elements in successfully utilizing a color mechanism scheme and objectively evaluating fabric color alterations. Precise color measurement, however, is mostly used in sample analysis and quality inspection which help to produce reproducible or similar product. It is important that for quality inspection, the color of the product should be measured as a necessary requirement of quality control whether the product is to be accepted or not. Presented in this study is an unsupervised segmentation of printed fabrics patterns using mean shift algorithm and color measurements over the segmented regions of printed fabric patterns. The results established a consistent and reliable color measurement of multiple color patterns and appearance with the established range without any interactions.
Color conceivably is one of the most significant features of textile materials. It is one of the basic elements considered in textiles production, garment industries and decorative application. It is however essential to attest that textile materials and clothing are of suitable color, according to the designer’s idea and fashion trends [
These factors may be based on some parameters (color measurement) that are ignored or given less attention during and after the production process. The determination and color measurement of printed fabric patterns is not only vital from the aesthetic point of view but also in determining any change that may arise and as well indicate an adjustment in some of its appearances that could lead to a desirable quality control in printed fabrics. [
The above attempt led to several researches and methodologies, which effectively came to light in addressing successful color measurement of printed textiles/fabrics. Bugao Xu and Sheng Lin [
In a related development Xu [
Lou et al. [
Even though this work is not based on DigiEye as a measuring instrument component, Lau assertion cannot entirely be accepted because DigiEye is suitable for measuring larger and small areas of printed fabric patterns with multiple colors and intricate patterns which exceed the measurement area of the spectrophotometer that is conventionally used for textiles (e.g. 30 mm in diameter) [
Neda et al. conducted a survey on two commercial spectrophotometers with different measuring geometries (GretagMacbeth Eye-One Pro) to scrutinize the measurement ambiguity in color classification of textile products [
It is then quantified by calculating Mean Color Difference from the Mean of the average color differences. On the other hand, reproducibility shows the changes between assessments of the same results in view of different measuring instruments. Identical design explains that the result obtained from reproducibility is considered inter-instrument agreement and inter-model agreement if the results of reproducibility demonstrated different design of measurement by the instruments. Although this method presented some good results, the design parameters are limited to measurement of uncertainty of geometrical shapes of textile fabrics [
In view of the above technical hitches of color measurement of textiles materials especially for printed fabrics, we employed a new method where printed fabric color patterns are segmented with mean shift algorithm and subsequently measured mathematically by converting the RGB images to Lab color space. The RGB images of fabric patterns were captured by a computer controlled DigiEye system where repeatable images are captured with high quality. Color space expresses color as three numerical values, L* for the lightness and a* and b* for the green to red and blue to yellow color components. CIELAB (Commission Internationale de l’eclairage) was considered to be perceptually uniform with respect to human color vision, meaning that the similar quantity of numerical transformation in these values match to about the same quantity of visually perceived adjustment.CIE is the universal and commonly standardized color space that is able to perform mathematical conversion.
It is also important to note that digital cameras were not designed as scientific measuring instruments rather for making peculiar images look good. For this and other reasons, our study aims at promoting effective quality inspection control in the textile printing industry by helping to resolve the complications involved with measurement of printed fabric color patterns. The color measurement of segmented printed fabric patterns will subsequently be used in the sample analysis and quality inspection where the sample will be used as process parameter to produce same or similar product. This will help in quality inspection to determine inconsistencies with respect to standards in authenticating the cause of irregularity if any [
The printed fabrics are plain cotton woven patterns. They were washed, ironed and captured using the DigiEye System (Great Britain) shown in
・ Normal―0% to 100%. Fluorescent―Greater than 100% of wavelength range
・ Light Source-CIE D65 with LED Array (Spectra TUNE Calibration Technology). Options include CWF, U35, and TL84 (840). UV Only Option (Adjustable from 0% to 100%)
・ 240 Color Patch DigiTizer Chart Calibration
・ It is supported with Nikon Cameras Models D100, D70, D80, D90 and D7000
Calibration with the white board A4 size, aims at eliminating or reducing preconception in our readings over a range of values that is expected. Each printed pattern was then computed using Matlab program with mean shift algorithm. First, the digital images were read into Matlab command window, and then the digital images were filtered with median filter with a filter size 3 × 3 which further allows pre-smoothing or reduction of noise in the images. The filtered printed patterns were obtained by the image segmentation with an enhanced parameter of mean shift algorithm by parameter tweaking in order to obtain suitable number of clusters of our printed patterns. The plain woven printed fabrics are made up of regular and irregular color patterns. The mean shift algorithm for segmenting printed patterns was implemented by equating
the original pattern values, where the points of union, and a set of labels [
・ Showing that i = 1... n run the mean shift process for xi and store the convergence point in z i
・ It was identified that clusters { C p } p = 1... m of convergence points by connecting together all which are closer than 0, 5 from each other in the joint domain.
・ For each i = 1... n assign L i = { p | z i ∈ C p }
・ Optional: eliminate spatial regions that are smaller than M pixels.
・ The RGB color space
Red, Green and Blue are the primary color space component based on the RGB color model or coordinate that is widely used through textiles. A specific RGB color space is characterized by the three coordinates corresponding to their additive primary which is liable to produce any form of desired color from well demonstrated primary colors [
A. Lab color space
Technically, color space is usually mapped onto a three-dimensional digit space for digital representation which are the L*, a*, and b* values completed with a pre-defined range. In
and b* = 0. The a* axis represents the green to red module with green in the negative direction and red in the positive direction. The b* axis represents the blue to yellow component with blue in the negative direction and yellow in the positive direction [
It is demonstrated mathematically in the intervals as:
0 ≤ L * ≤ 100 , − 128 ≤ a * ≤ 127 and − 128 ≤ b * ≤ 127
The mathematical transformation of color space was estimated using the model parameters by expressing the equation in the following below. Let f be the function which transforms the coordinate (RGB) in (L*a*b*):
( L * , a * , b * ) = f ( θ , R , G , B ) , or [ L * a * b * ] = [ f L ( θ , R , G , B ) f a ( θ , R , G , B ) f b ( θ , R , G , B ) ] (1)
where θ = [ θ 1 θ 2 ... θ m ] T is the parameter vector for model f. When f is linear, a direct linear regression method is used for the parameters. On the contrary, for non-linear functions it is important to use iterative approaches such that fminsearch function will be used to search for the minimum of the target function based on a gradient method.
The methodology used for converting RGB to L*a*b* consists of two parts.
・ The first step transforms RGB to XYZ
[ X Y Z ] = [ M ] ⋅ [ R G B ] (2)
where M is the transformational matrix
・ The second step transforms the XYZ to L*a*b*:
L * = { 116 ( Y Y n ) 1 / 3 − 16 if Y Y n > 0.008856 903.3 ( Y Y n ) if Y Y n ≤ 0.008856 } a * = 500 [ ( X X n ) 1 / 3 − ( Y Y n ) 1 / 3 ] , b * = 200 [ ( Y Y n ) 1 / 3 − ( Z Z n ) 1 / 3 ] , (3)
where X n , Y n , Z n are the values of the reference for white and M i j are the elements of a conversion matrix M between the spaces RGB and XYZ.
To reliably implement this conversion, a function f, as shown in Equation (1) is defined from Equation (3) and Equation (4). This function is received as elements parameters of the conversion matrix M, as well as the RGB and L*a*b* data from the sample obtained from the image acquisition system.
The normalized mean error in the estimate of each of the L*a*b* variables were obtained by comparing segmented measured values (L*a*b*) with un-segmented estimated values (L^*a^*b^*):
e L = 1 N ∑ i = 1 N | L i * − L i ∧ * | △ L , (4)
e a = 1 N ∑ i = 1 N | α i * − a i ∧ * | △ a , (5)
e b = 1 N ∑ i = 1 N | b i * − b i ∧ * | △ b , (6)
where L^*, a^* and b^* are the values of un-segmented measured values, and n is the number of measurements. L* values ranges from 0 to 100, and a* and b* values are between −128 to +127. The evaluation of the performance of this method was done by calculating the mean error using the equation:
e ¯ = e L + e a + e b 3 (7)
To determine the least error for this experiment, average Root Mean Square Error (RMSEL, RMSEa, RMSEb) was calculated between segmented and un-segmented measured values using the following equation:
R M S E L = ∑ i = 1 n ( L i * − L i ∧ * ) 2 n (8)
R M S E a = ∑ i = 1 n ( a i * − a i ∧ * ) 2 n (9)
R M S E b = ∑ i = 1 n ( b i * − b i ∧ * ) 2 n (10)
R M S E ¯ = R M S E L + R M S E a + R M S E b 3 (11)
According to Gonzalez, image segmentation is the partitioning of a digital image into multiple segments where pixels in a region share similar characteristics such as color, intensity or texture [
The mean shift segmentation employed for this study defines arbitrarily shaped regions by locating the modes in the density distribution space and grouped all pixels associated with the same mode. The segmentation was carried out with parameter tweaking where bandwidth were enhanced or adjusted to suit the number of clusters of printed fabric patterns. These parameters with mean shift algorithm appropriately segmented the selected patterns for this work: 0.4 for two colors fabric, 0.5 for three colors, 0.19 for four colors and 0.20 for five colors respectively.
Color measurement of printed fabric as a quality inspection is necessary because
of different colors in the fabric that may change at different rates during the production process. To suitably evaluate color measurement, individual color patterns were segmented into its homogeneity to avoid inconsistencies in the results. With digital imaging enhancement, colors in a printed fabric can automatically be partitioned and measured but for perceptual uniformity of coordinates, measurement via mathematical transformation regardless of the model or approach without human interaction is required since that correspond to equal color differences perceived by humans [
The figures below show illustrations of our method by converting RGB color units to L*a*b* color space for both segmented and un-segmented patterns data from the computer vision system for the selected printed fabric patterns. We demonstrate graphical relationship between segmented measured values and un-segmented measured values with their respective RGB values of printed fabric patterns samples used for this study. Segmented measured L*a*b* values were considered against un-segmented measured L*a*b* values, and R-square values with root mean square errors (RMSEL, RMSEa and RMSEb) for L*, a* and b* variables were calculated to determine the existence of any relationship between the segmented measured and un-segmented values for the selected printed fabric patterns. Our segmented measured results of the printed fabric are more close to the human eyes perceived even though there some amount of noise still exist.
The minimum values for R2 (R-Square) and RMSE (root mean square error) from estimated L*a*b* values, determine the efficiency of our method in this work. We compared segmented measured R2 (R-Square) and RMSE (root mean square error) values to the corresponding un-segmented measured R2 and RMSE values.
In
Segmented and un-segmented patterns in
Segmented and un-segmented patterns in both figures display close results due to the characteristics that are presented in the patterns. The L* values show
minimal, non-significant variation in lightness in
b* established good correlation on the axes indicating a trend in surface colors ranging from less red across the axes to blue yellow. The L* axis has less yellow to lightness that is not so prominent. The plot of L* and b* shows more blue surface colors with less white, more white and yellow, and also more white and less yellow unlike un-segmented values, where a* and b* illustrate less red and dominant blue across the axes with less yellow along the L* axis. R2 values are 0.827, 0.9788 for segmented measured values and un-segmented measured values while RMSE is recorded at 1.688 and 2.4891 respectively.
Colors in
R2 for segmented measured pattern is 0.8481 while un-segmented measured pattern is recorded at 0.9794 and their respective RMSE are 1.8345 and 2.4080 showing that segmented printed presents less error than un-segmented printed pattern.
The increased error (RMSE) reveals the intricate patterns in printed fabric that are homogenous and fairly uniform in color, shape and could be categorized by their colors and as well be used to classify defects from non-defects in printed fabric pattern.
In
The method used in this work was based on linear model that converts RGB ? XYZ ? L*a*b* color space. The results of this study showed that digital image processing techniques: image segmentation, employed prior to color measurement transformation help in manipulation of the digital images by observing the
SEGMENTED NORMALIZED RGB VALUES | |||||
---|---|---|---|---|---|
SAMPLES | X | Y | R2 | ||
Mean | Std dev | Mean | Std dev | ||
SMP (A) | 0.02127 | 0.01714 | 0.1804 | 0.0157 | 0.9704 |
SMP (B) | 0.2666 | 0.2878 | 0.3193 | 0.2747 | 0.9972 |
SMP (C) | 0.5122 | 0.2503 | 0.5422 | 0.2375 | 0.9618 |
SMP (D) | 0.04869 | 0.01854 | 0.03498 | 0.02378 | 0.7701 |
SMP (E) | 0.7097 | 0.2401 | 0.2536 | 0.2054 | 0.7844 |
SMP (F) | 0.3213 | 0.1812 | 0.3031 | 0.202 | 0.9655 |
SEGMENTED NORMALIZED LAB VALUES | ||||||
---|---|---|---|---|---|---|
SAMPLES | X | Y | R2 | RMSE | ||
Mean | Std dev | Mean | Std dev | |||
SMP (A) | 16.78 | 14.26 | 1.891 | 1.113 | 0.6295 | 3.245 |
SMP (B) | 54.5 | 23.44 | −14.4 | 9.808 | 0.9903 | 1.2559 |
SMP (C) | 72.35 | 19.53 | −18.8 | 2.323 | 0.9814 | 1.2566 |
SMP (D) | 34.24 | 20.04 | 11.89 | 11.04 | 0.8273 | 1.6887 |
SMP (E) | 62.02 | 14.18 | 26.3 | 22.67 | 0.8481 | 1.8345 |
SMP (F) | 58.33 | 17.99 | 3.672 | 7.875 | 0.4523 | 3.0379 |
objects that are not visible, creating better image information retrieval of image and as well distinguishing the region of interest (ROI) in the image for better
UN-SEGMENTED NORMALIZED RGB VALUES | ||||||
---|---|---|---|---|---|---|
SAMPLES | X | Y | R2 | RMSE | ||
Mean | Std dev | Mean | Std dev | |||
USMP (A) | 0.0206 | 0.01786 | 0.1736 | 0.01588 | 0.9834 | 0.0022 |
USMP (B) | 0.2714 | 0.2887 | 0.3237 | 0.2758 | 0.9973 | 0.0166 |
USMP (C) | 0.5098 | 0.247 | 0.5409 | 0.2319 | 0.9680 | 0.0047 |
USMP (D) | 0.7133 | 0.2435 | 0.2537 | 0.2105 | 0.9969 | 0.0023 |
USMP (E) | 0.04872 | 0.01833 | 0.03487 | 0.02398 | 0.9962 | 0.0070 |
USMP (F) | 0.3267 | 0.1804 | 0.3117 | 0.2048 | 0.9792 | 0.310 |
UN-SEGMENTED NORMALIZED LAB VALUES | ||||||
---|---|---|---|---|---|---|
SAMPLES | X | Y | R2 | RMSE | ||
Mean | Std dev | Mean | Std dev | |||
USMP (A) | 16.17 | 14.45 | 1.872 | 1.341 | 0.6541 | 4.2955 |
USMP (B) | 54.85 | 23.65 | −14.2 | 9.984 | 0.9911 | 1.3200 |
USMP (C) | 72.46 | 18.99 | −18.91 | 2.531 | 0.9896 | 1.3011 |
USMP (D) | 62 | 14.44 | 26.61 | 23.7 | 0.9788 | 2.4891 |
USMP (E) | 34.17 | 20.11 | 12.03 | 11.62 | 0.9794 | 2.4080 |
USMP (F) | 59.17 | 17.67 | 3.579 | 8.556 | 0.4732 | 3.4639 |
color evaluation. The segmented patterns unlike un-segmented patterns provide dimensionality more adaptable to mathematical transformation that attempt to correct systematic errors which also helps to make the processing faster in this study.
The method used in this work was based on linear model that converts RGB ? L*a*b* color space. The results of this study showed that digital image processing XYZ techniques: image segmentation, employed prior to color measurement transformation help in manipulation of the digital images by observing the objects that are not visible, creating better image information retrieval of image and as well distinguishing the region of interest (ROI) in the image for better color evaluation. The segmented patterns unlike un-segmented patterns provide dimensionality more adaptable to mathematical transformation that attempt to correct systematic errors which also helps to make the processing faster in this study.
The Lab coordinates describes channel L* to be equal to 0 and L* equal to 100 indicating black and lightness respectively. Color channel a* negative (−a*) and positive (+a*) indicate green and magenta in the range of −128 and +127 respectively. The position yellow; +127 indicates b* positive (+b*) values while blue; −128 shows b* negative (−b*) values. The feasible range of channels a* and b* coordinates are independent of the color space that have been converted due to the transformation of X and Y which originate from RGB color space indicating the red-green and yellow-blue which appear to be opposite channels computed as dissimilarities of lightness transformations of patterns [
CIELAB is chromatic color space values that imitate nonlinear response to the human eye [
In this study, two all-purpose computer vision systems namely: image segmentation based on mean shift algorithm and L*a*b* color space transformation from RGB unit were employed for selected digital printed fabric patterns. Vital information extracted from original printed patterns using mean shift algorithm and then authenticated mathematically by RGB to XYZ to L*a*b*. Comprehensive results of segmented measured values presented compared to un-segmented measured values show that the method adopted is able to effectively validate homogeneity and uniformity in colors of printed fabric.
For quality inspection control, it is necessary to have assessment of production parameters including color of printed fabric aiming at producing same or similar product. CIELAB color space needs to be evaluated to determine the perceptual uniformity between sample and original since it is authenticated to correspond to equal color differences perceived by humans. This could be a desirable approach for successful market due to the fact that audience perceptions and reactions are paramount to the growth of textiles industries.
Future research will be focused on other mathematical transformations and compared to digital devices to determine appropriate and efficient method of measuring segmented printed fabric color patterns, thus minimizing the root mean square error with little or no human interaction
The authors acknowledge the financial support of Fundamental Research Funds for the Central Universities (JUSRP 51631A).
The authors declare no conflicts of interest regarding the publication of this paper.
Kumah, C., Zhang, N., Raji, R.K. and Pan, R. (2019) Color Measurement of Segmented Printed Fabric Patterns in Lab Color Space from RGB Digital Images. Journal of Textile Science and Technology, 5, 1-18. https://doi.org/10.4236/jtst.2019.51001