Texture Representation and Application of Colored Spun Fabric Using Uniform Three-Structure Descriptor


 The local binary pattern (LBP) and its variants have shown their effectiveness in texture images representation. However, most of these LBP methods only focus on the histogram of LBP patterns, ignoring the spatial contextual information among them. In this paper, a uniform three-structure descriptor method was proposed by using three different encoding methods so as to obtain the local spatial contextual information for characterizing the nonuniform texture on the surface of colored spun fabrics. The testing results of 180 samples with 18 different color schemes indicate that the established texture representation model can accurately express the nonuniform texture structure of colored spun fabrics. In addition, the overall correlation index between texture features and sample parameters is 0.027 and 0.024, respectively. When compared with the LBP and its variants, the proposed method obtains a higher representational ability, and simultaneously owns a shorter time complexity. At the same time, the algorithm proposed in this paper enjoys ideal effectiveness and universality for fabric image retrieval. The mean Average Precision (mAP) of the first group of samples is 86.2%; in the second group of samples, the mAP of the sample with low twist coefficient is 89.6%, while the mAP of the sample with high twist coefficient is 88.5%.

(GLCM). Wang et al. [12] constructed a two-dimensional local binary pattern (2D-LBP) for the LBP operator and used it for texture image recognition, which easily ignored the correlation between image mode values.
Different from single-colored textiles, colored spun fabric (colored spun fabric are as shown in Figure 1) uses dyed fibers as the basic carrier, during the course of spinning or weaving, and the dyed fibers appear as a spiral shape related to twist. Moreover, the fibers are stacked and aggregated with each other, rendering the texture structure to have rich layers with uneven spatial distribution. The proposed methods of the LBP operator and its variants mentioned above ignore the spatial contextual information in the process of the extracting texture feature. Therefore, they could not effectively describe the nonuniform complex modes.
In this paper, the model of a uniform three-structure descriptor (UTSD) was proposed by three different structure discriminant functions to describe the local nonuniform texture structure of fabric. At the same time, the uniform mode is used to simplify the complexity of the descriptor in the coding process. In addition, UTSD could reflect the underlying troubles, which the LBP operator lacks, of the ability to describe the local spatial structure information.

Uniform Three Structure Descriptor
The original LBP encodes the relationship between a pixel and its neighborhoods of a local 3×3 window in one image, and it describes the local information around this pixel. The main idea of the proposed UTSD is to first take a certain pixel as the center pixel, and take the inner and outer circles as the domain pixels and compare them with the central pixel value, respectively. Then it forms three different binary coding modes according to the three kinds of discriminant functions. Finally, it obtains the three-structure descriptor.
1. The gray value of the center pixel point is C l , inner circle radius is R , and P pixels are evenly distributed on the inner circle with a radius of R ; the inner circle pixels are described as , , ( 0,1, 2, 1)

2.
In order to compare with the inner circle pixels, the outer circle radius is 1 R + , and 2P pixels are evenly distributed on the outer circle with a radius of 1 R + . Taking the average gray value between the adjacent pixels on the outer circle into account, the new outer circle pixels are described as  ; the average value of the outer  circle can be written as follows:   1   1, ,  1,2 ,2  0   1 , 0,1, 2, 1 2 indicates the new outer circle with a radius of 1 R + and P pixels, and 1,2 ,2 R P M k l + + represents the outer circle with a radius of 1 R + and 2P pixels.
3. On this basis, the local differences are obtained by comparing the central pixel with the inner circle pixels and the inner circle pixels with the new outer circle pixels, respectively; the formulas are defined as follows:  4. By comparing the local differences 1 2 , q q D D , three kinds of coding structures can be obtained, among which the discriminant function formulas are as follows: where 1 2 3 , , g g g indicate the three kinds of discriminant functions of the three-structure descriptor.
The three-structure descriptor is defined by the following formula: where 1 2 3 , , G G G represents three kinds of encoding of the three-structure descriptor accordingly.
Next, the encoding calculation process of the three-structure descriptor is introduced in detail, as shown in Figure 2.
As shown in Figure 2, a local area in the image is represented as follows: the gray value of the central pixel is 8, the radius R is 1, and the number of sampling points in the inner circle is 8. In order to compare with the inner circle, the area pixels with a The texture representation ability of the UTSD is related to parameters such as the radius of the inner and outer circles and the number of pixels in the inner and outer circles. It also needs to be selected in combination with specifi c analysis objects. In order to simplify the analysis process, the parameters of the UTSD are set to 1, 8 R P = = .

Materials
There are many factors that affect the texture change of precolored fi ber blends, including the mass ratio of the dyed fi ber, the kinds or character traits of the dyed fabric, the twisting coeffi cient, and so on. These factors can change the texture caused by a change in the adjustment of the mass ratio signifi cantly and directly. The cotton fi bers used in the experiment had a linear density of 13.5 dtex, fi neness of 17 µm, and average length of 38 mm. The fi ve selected colors of cotton fi bers are red, yellow, blue, black, and white. Among them, all blended yarns are spun by their ring spinning. The warp and weft yarn density of the fabric is 20 tex, the twist coeffi cient is 350, and the fabric specifi cations are 30 cmx30 cm, 160 gsm, 6 epi, 5 ppi; the fabric structure is a plain weave. It adopts No. 130 reed and the lower weft density is 280 threads/(10 cm).
According to the differences in color and the proportion of fi bers, 18 samples were divided into two groups. One group, shown in Table 1, included 10 samples, which were mainly composed of three kinds of dyed fi bers: white, red, and yellow. The change in mass ratio among the samples varies randomly from 0.8% to 4.3%. The second group included 8 samples as shown in Table  2, which were mainly composed of three kinds of dyed fi bers: white, black, and blue. The difference in mass ratio among the samples alters regularly from 0.2% to 8%. Colored spun fabric samples of the fi rst and second groups are shown in Figure 4.  , , G G G are the binary values after encoding.
The three-structure descriptor possesses a strong ability to describe the local spatial structure, but it has a complex and ineffi cient encoding method. According to the theory of uniform mode, patterns with high probability of occurrence should include more local texture information in the process of pattern coding, and have a stronger ability for texture description. Therefore, this paper is proposed to establish a UTSD by using the value of U to represent the number of jumps of two adjacent binary values on the fi nal encoded circle. When the value of U is >2, this mode is defi ned as the uniform mode, and it is shown in Figure 3.
Suppose the parameter of the inner circle pixel of the model is P , and there are a number of ( 1) 2 P P × − + uniform modes, concurrently all nonuniform models are classifi ed as one. Thus, the dimensions of eigenvector of the dimension of UTSD is  between the texture characteristics of the fabric surface and the mass ratio of dyed fi bers. In this paper, the correlation between the extracted value of local spatial texture feature and the difference value of the mass ratio of dyed fabric is quantitatively analyzed to explain the validity of the texture representation model.
The Pearson correlation coeffi cient can measure the degree of linear correlation [13], whose defi nition is as follows: , where i r and j r represent the difference value of normalized local spatial texture feature and the difference value of normalized mass ratio of dyed fi bers of colored spun fabrics, respectively; N indicates the number of samples.
The Pearson correlation coeffi cient ranges from −1 to 1, and the greater the absolute value has, the higher the degree of linear correlation. In order to simplify the calculation results, based on the Pearson correlation formula, the normalization method is combined to form the following formula: In addition, as shown in Table 3, in order to comprehensively analyze the texture representation ability of the UTSD for fabrics with different fabric structures, another 30 colored spun fabrics made of polyester-dyed fi bers blended into yarns were prepared. All the samples were woven by mixing the white, red, and green-dyed fi bers into yarn. The dyed fi ber is 38 mm in length, the linear is 1.65 dtex in density, the twist direction of the double yarn is S-twist, and the mass ratio of dyed fi ber varies from 0.5%∼ to 4.0%. The organizational structure of the fabric adopted the classical plain weave, twill weave (three up and one right diagonal twill), and stain weave (fi ve two-fl y warn satin) structures. Some colored spun fabric samples in the third group are shown in Figure 5.

Quantitative analysis of correlation
Although there exist many factors that affect the texture change of precolored fi ber blends, overall, there is a linear relationship   parameter correction are performed on the DigiEye system camera through the pantone before the acquisition processes. Each sample image is segmented to obtain four sample images of 4,096x2,048 pixels.
The texture analysis of the first group of 10 samples of colored spun fabric was carried out by using the optimized UTSD, and the specific results are shown in Table 4, where T Div indicates the normalized differences in local texture features, while M Div indicates the normalized difference in mass ratio.
The above statistical analysis shows that the extracted texture feature values of textile are highly consistent and correlate with the change in the mass ratio of the sample dyed fibers; hence the nonuniform texture structure can be accurately characterized due to the change in proportion. Meanwhile, the correlation coefficients of different samples are analyzed independently, and the results are shown in Table 5.
The average correlation coefficient between the local texture feature value and the mass ratio is 0.027 Cor = , and the variance of correlation coefficient Cor is 0.026. The analysis shows that there exists a low correlation coefficient value between the normalized difference of the texture feature value of the first group of samples and the normalized difference of the mass ratio. It means that the correlation between the two is high, that is to say, the established UTSD texture representation model possesses statistical effectiveness and stability for different samples. It also indicates that the UTSD texture representation model can recognize the changes in fabric texture on the mass ratio of colored spun fibers.
The normalized characteristic difference in the texture feature and its mass ratio are shown in Figures 6 and 7. Table 6 shows the results of the texture feature extraction for the second group of samples, for which a similar conclusion can be drawn. Table 7 shows the results of correlation analysis, and it can be found that the established UTSD texture representation model also has ideal validity and stability for testing samples The value range of ( , ) i j Cor r r is from 0 to 1. Moreover, the smaller the value is, the stronger the correlation, that is to say, the algorithm has a higher image quality upon characterization of the texture.

Experimental results and analysis
The DigiEye Digital Imaging System is used to acquire image data of the samples at a relative humidity of 65%, and its standard light source is D65. Moreover, white balance and      The normalized characteristic difference in texture feature and its mass ratio are shown in Figures 8 and 9.
As shown in Figure 10, it is worth noting that abnormal fluctuations in the testing indexes occurred in some testing experiments. After the analysis and detection of the samples, it is found that there is a large area of abnormal aggregation of dyed fibers in the color measurement samples, which is caused by the weaving process, as shown in Figure 11.

Fabric image retrieval based on UTSD
To verify the effectiveness and practicability of the descriptor proposed in this paper for texture representation, a fabric image retrieval based on UTSD was carried out. According to the differences in the mass ratios of different dyed fibers among the fabrics, and the smaller difference in the mass ratio as the distribution principle, the fabrics in the first and second groups are divided into 10 categories; there are 100 images in each category, that is, a total of 1,000 images. During the   http://www.autexrj.com/ experimental process, 15 images were randomly selected from each category for retrieval, and a total of 150 queries were carried out. The top 10 most similar images were selected as the experimental results in each retrieval. The precision ratio and mean Average Precision (mAP) are used as the experimental performance evaluation criteria; the retrieval results are shown in Table 8. The formulas of precision ratio and mAP are defined as follows: b P a =    Calculating the retrieval precision ratio in Table 8 shows the average retrieval precision ratio to be 91.4%; this shows that the texture features extracted by UTSD can retrieve fabrics with different color quality ratios, and the value of mAP is 86.2%, which is scientific and feasible for fabric texture description.
In addition, in order to comprehensively analyze the universality of the UTSD, texture features of the third group of samples with different organizational structures are extracted, and then image retrieval is performed; the retrieval experiment results are shown in Tables 9 and 10.
It can be seen from the table that when the twist coefficient of the fabrics with three kinds of fabric structures is 330, the average retrieval precision ratios of plain weave, twill, and stain weave are 87.9%, 91.9%, and 90.8%, respectively. When it is 370, the average retrieval precision ratios of plain weave, twill, and stain weave are 87.9%, 91.9%, and 90.8%, respectively. This shows that UTSD can retrieve fabric images with different fabric structures. Among them, the retrieval precision ratio of twill weave is the highest, and the retrieval effect is the best, which verifies the effectiveness of the operator. In addition, when the twist coefficient is 330, the mAP value of the image is 89.6%, while when the twist coefficient is 370, the mAP value of the image is 88.5%. This indicates that UTSD can retrieve images of fabrics with different twist coefficients, and the retrieval effect is better for fabrics with a low twist coefficient.
Taking the two groups of experimental results, for example, it can be seen that the UTSD image retrieval algorithm established in this paper has ideal robustness and effectiveness for colored spun fabric with different fabric structures, and can also accurately retrieve fabric images with different twist coefficients.

Comparative experimental results and analysis
Furthermore, in order to comprehensively compare and analyze the effectiveness and stability of the UTSD in this paper, the first group experimental samples are used as the object. Three methods, rotation invariant uniform LBP [7] (marked as: Method. 1), rotation invariant uniform LBP + GLCM [11] (marked as: Method. 2), and 2DLBP [12] (marked as: Method. 3), were used to establish the contrast experimental model. The parameters of the different methods have been optimized in combination with references and testing sample set, and quantitative comparative analysis has been carried out through formula (11); the experimental results are shown in Table 11, where T Div indicates the normalized difference in local texture feature.
The results of analysis of feature similarity and variants are shown in Table 12, where Cor indicates the value of correlation and Var indicates variance between the values of correlation. The contract results explain that compared with the three typical methods, the model proposed in this paper possesses stronger texture representation capabilities, and the overall relevance value reaches to 0.027. At the same time, the variance in the correlation value is 0.001, which possesses ideal stability. The experimental results of partial comparison are shown in Figure 12.

Conclusions
It is difficult to accurately characterize the texture features of colored spun fabrics using the LBP method. Based on UTSD, a texture representation model of colored spun fabric is proposed. In this model, three kinds of discriminant functions are used to describe the local structure of fabric image. At the same time, uniform mode is introduced into the pattern encoding process to simplify the computational complexity of the representation model. The testing results indicate that the established UTSD texture representation model possesses statistically effectiveness and stability for different samples, and the correlation coefficient between the texture feature value and mass ratio are 0.027 and 0.024, respectively. At the same time, the UTSD image retrieval algorithm established in this paper has ideal robustness and effectiveness for colored spun fabric with the different fabric structures, and can also accurately retrieve fabric images with different twist coefficients. In addition, compared with the LBP and its two improved algorithms, the established UTSD is optimal. The research in this paper provides technical support for the texture representation and fabric retrieval of colored spun fabrics. How to adjust and select the best parameters of UTSD for further improvement of the description ability of texture information needs further research.