Abstract
A novel method combining the characteristics of structure and region information is proposed for automatic segmentation of the color region for different kinds of fabrics. For improving image quality for computer analysis, the structure-texture decomposition processing has been used to extract the main structure from the fabric image, where the fine structure details of fabric yarn patterns have been removed. By using the CIE-Lab color system, the color structure image is then segmented by a fuzzy region-based segmentation model that can be solved efficiently through a fast numerical scheme. The experimental results show that the main disadvantage and difficulty of using color clustering-based methods and commonly used image segmentation methods for fabric color separation is overcome by the proposed method. The proposed method has high accuracy and the computation time is very reasonable. It can be applied to extract fabric color regions for different fabric structures, such as woven, knitted and embroidery structures.
Keywords
Fabric structure and color are two essential parameters in fabric texture analysis. The accuracy and efficiency of structure and color analysis play an important role in product quality control in modern manufacturing technologies, especially with the advent of high-precision weaving and knitting. In the conventional analysis methods, the structure and color parameters, such as fabric weave pattern and the layout of color yarns, are detected manually, which is very tedious and time-consuming work. With the development of computer technology, many researchers have tried to detect fabric parameters via various image-processing techniques.1–9
Since fabric possesses highly periodic properties originating from the repetition of basic weave patterns or the layout of yarns, researchers had tried to recognize the structure parameters by frequency analysis methods.2,4,10 The focus of their studies was mainly on the analysis of grayscale fabric images. In actual practice, the visual recognition for colorful fabrics is as important as grayscale fabrics. Research on image-processing techniques and digital color quality control has progressed well in recent years and the use of computers to simulate human vision in performing color analysis is becoming a research focus in the textiles community.6,7,9,11–13
Recent studies on fabric color analysis had used color clustering algorithms to separate colors in the fabric image.6,7,9 Xin et al. 6 adopted the gray projection method and an active contour grid model to detect the yarn location only for woven fabrics, in which the image intensity accumulations along warp and weft projections were classified into peak or valley points. The locations of yarns were then obtained according to the classification result of these points. The geometry information of the fabric sample, such as the small deformation and the thickness variations of the yarns, had been detected with the active contour grid model. Cross-point classification was conducted based on the different combinations of the intensities of the yarn edges. A histogram-based color clustering method 14 was then used to separate the color yarns. However, there might be some errors in their automatic clustering results and the manual rectification method was used to correct the clustering results.
Pan et al. 7 proposed using the Fuzzy C-Means (FCM) clustering method to detect the layout of color yarns in woven fabrics. The cluster validity analysis was used to determine the number of colors. In the spatial domain, the Hough Transform algorithm was adopted to detect the yarn skewness in the fabric image in order to obtain the yarn locations. Their experimental work showed that the proposed method could extract color and structure information from the fabric image. However, the performance of the clustering method was dependent on the cluster validity analysis result, which might fail to figure out the right number of yarn colors, especially for yarns with similar colors in the fabric.
Kuo et al. 9 investigated different clustering algorithms for embroidery fabric color separation and suggested that the Gustafson–Kessel algorithm was suitable for embroidery fabrics. For image enhancement processing, the median filter and the bilateral filter were used to smooth the fabric texture. The Gustafson–Kessel clustering algorithm was then employed to separate the color regions of the fabric image in the color a* and b* components of the CIE-Lab color system. The experimental result showed that the proposed method could achieve higher accuracy in fabric color separation, compared with the clustering algorithms commonly used in the color separation of color images, such as K-means, 15 K-medoid, 16 FCM 17 and Self-Organizing Map (SOM) clustering algorithm.5,18
This study aims to explore an effective fabric color separation method that has the advantage of directly separating fabric color in the spatial domain while keeping the sharpest edge response of the main structure. To address the problem of the noise caused by capturing the fabric images, as well as to reduce the influence of yarn textures on the color separation results, this study used the structure-texture decomposition method to enhance the fabric images for color separation. Different from the color clustering methods, a fuzzy region-based segmentation model was developed to separate fabric color regions. The proposed method had been shown to be effective in separating color and texture for different kinds of fabric structures.
Research framework
The technological design process of figured-pattern fabric consists of two main steps. Firstly, a figured-pattern image is separated into different regions for fabric drafting according to the colors of texture patterns. Secondly, a series of woven, knitted or embroidery structures are assigned to these regions and a production file will be generated for different machinery. This study focused on the first step of the design process for region-based color separation to solve the problem of lack of manpower for fabric drafting and to shorten drafting time.
The framework of the proposed method is shown in Figure 1. There were four steps. Firstly, the RGB color image was loaded and processed by the structure-texture decomposition method through which the image was split into two images: (1) the structure image; and (2) the texture image. Secondly, the structure image was transferred into the CIE-Lab color domain. Thirdly, a fuzzy region-based segmentation model was used to separate the color regions in the structure image and these regions were described by region membership functions. Finally, the segmentation result was obtained using an easily adjustable parameter for binarization of the region membership values.
Research framework of the fabric color separation method.
Image-processing methods
Structure-texture decomposition
Decomposing a color image into meaningful components is a helpful step in fabric image feature detection. 19 Since figured-pattern fabrics, such as Jacquard fabric and embroidery fabric, may have complex pattern and texture in the image, this study used structure-texture decomposition to describe the pattern and texture components. The general concept is that an image can be regarded as composed of a structure part, corresponding to the main large objects in the image, and a textural part, containing fine-scale details, usually with some periodicity and oscillatory nature. 20 In fact, such information in fabric images coexists with geometric microstructures, such as yarn contours, shapes and boundaries, or is embedded in coarser structures formed by yarn or dyestuff color variations.
This study proposed a simple and yet effective method to accomplish fabric structure-texture decomposition based on a variational method. Our experimental results, as demonstrated later on in the Experimental details and discussion section, confirmed that structure and texture in the fabric image are completely decomposable. Since enforcing the total variation regularizer to preserve large-scale edges does not require extensive texture information, this study used a structure-texture decomposition model based on relative total variation,
21
which is expressed as
This study adopted the numerical solution proposed by Xu et al.
21
for Equation (1). A detailed mathematical study of the numerical solution is given by Xu et al.
21
and Levin et al.
22
The regularizer term can be decomposed into a non-linear term and a quadratic term:
Fuzzy region-based structure segmentation
Once the structure image was expressed in the CIE-Lab color system, the main large objects should be recognized by the color separation algorithm. To address the problems of image color variations between different regions and blurred shadows of the region boundaries in the structure image, the color separation of the fabric image should be processed by a fuzzy region-based segmentation model. Let Ω be a bounded two-dimension domain and
For the efficiency of minimizing the energy equation, we adopted a fast total variation minimization method to solve it24,25 and took use of Chambolle’s fast dual projection algorithm.
26
To this end, auxiliary variables
According to the Chan–Vese error function,
27
The error function at
From the above equation, it can be derived that
In Equation (11), fixing ui and ai, vi can be solved by minimizing
The fast dual projection algorithm26,28 is then used to solve the above equation and the solution is shown as
In order to solve the membership function, fixing vi and ci, we obtain
(i) (ii)
To solve this optimization problem, we set
The solution of the above equation is
By projecting ui onto
Experimental details and discussion
This study discussed the performance of the image-processing steps in the proposed method and made comparison with other methods, such as clustering algorithms and fuzzy region-based segmentation methods. We used MATLAB R2009a language for programming and for integrated design of operational image display. Different image acquisition methods were used in the experimental work. Specifically, three groups of fabric images were investigated in this study, including different collection ways of fabric images. The first group was collected from the Internet. When searching in Google Images, such pictures of fabrics can be found quickly. The second group was acquired from a charge-coupled device (CCD) camera (Canon EOS 550D) and the third group was obtained from a flat scanner (BENQ Scanner, model number 5560c, scan resolution of the vertical and horizontal directions is the same at 600 DPI).
In order to capture the weave textures in the woven fabrics, the high-resolution images of the silk fabrics were obtained by using a special imaging acquisition system. As shown in Figure 2, a CIE Standard Illuminant D65 lamp was mounted above the fabric sample. The illumination system had been chosen in order to perform a repeatable and controlled acquisition able to preserve the colors in the fabrics.
31
The camera used in this study is a Canon EOS 550D and the lens model is EF-S 18-200 mm. During the experiments, the focal length was set as 100 mm. Other parameters were set as follows: F-stop f/5.6, Exposure time 1/5 s and ISO speed 100. The image resolution to the physical fabric size in our experiments is around 1376 pixels per inch. That is, one inch of the real fabric corresponds to 1376 pixels in the fabric image. The horizontal resolution and the vertical resolution adopted are the same.
The imaging acquisition system.
After the process of structure-texture decomposition, the fabric structure image was stored in a RGB color model. When the features of the fabric structure define easy distinction in the segmentation or recognizing system, it can be distinguished by different colors, which can avoid mistakes in the recognition system and promote the recognizing rate.5,7 Compared with RGB model, the CIE-Lab color system approximates human vision and aspires to perceptual uniformity. 17 In fact, while the dependence of the three coordinates on the traditional RGB metric is non-linear, 32 the L*, a*, b* metric better facilitates representing texture variation via Gaussian functions in the segmentation model.30,33 In the experiments, the CIE-Lab color system was thus used for fabric color separation. The color space conversion was conducted as follows. 31 Firstly, a conversion from the RGB space to the tristimulus values CIEXYZ, under the illuminant D65, was performed. Secondly, the knowledge of the XYZ values was used to obtain the L*, a*, b* values by the conversion method in Kuo and Kao. 5 For images with unknown illumination systems, the color space conversion process was done the same as that in Han et al., 30 Rao et al. 34 and Chen et al. 35
Our region-based segmentation method was designed for general color separation of different fabric images. In other words, segmentation performance of the proposed method should be insensitive to imaging resolution and noise cause by image acquisition. In practice, the input fashion of data acquisition can be diverse, including scanning and photography. For this reason, another objective of our method was the robustness of the color analysis method. Therefore, the analysis result should be invariant to the image resolution and insensitive to the data acquisition manner as well as the noise, such as the small fur and the rough texture of the yarn surface. On the other hand, it should be noted that the number of the separated colors depends on the texture contents of the fabric image. In this study, the number of separated colors equals the number of regions to be segmented in the fabric image. In practice, the number of colors should be chosen manually from the corresponding segmentation results. For instance, as demonstrated later on in the experimental results, a fabric image could be segmented into a different number of color regions according to the mixed texture content in some regions of the fabric image.
In the experimental work the fabric image shown in Figure 3 was collected from an embroidery website (http://www.advanced-embroidery-designs.com/). The fabric is classified as an advanced embroidery fabric, where different textures and color variations coexist. We used the color bilateral filter to smoothen the fabric texture in order to make the subsequent color separation more accurate.9,36 The filtering result is shown in Figure 4, where the image intensities of the background texture and fine details of the fabric have been weakened, while the main structure and the boundaries of different color regions have been kept to a great extent. Next, the structure-texture decomposition method was applied to separate the structure and texture components in the fabric image. As shown in Figure 5, the structure of the fabric image was extracted through the proposed method. It can be seen that the texture details had been completely removed.
Original fabric image. The fabric texture after the processing of color bilateral filtering. The structure image obtained from structure-texture decomposition.


After structure-texture decomposition, the fabric image had been split into two images: (1) the structure image; and (2) the texture image. Image intensity maps of these two images should be quite different. In fact, signal components of these images can be examined clearly in a three-dimensional intensity map. Specifically, Figures 6–8 show the original structure and texture components (mixed components), the extracted structure component and the extracted texture component, respectively. It should be noted that the corresponding images are gray intensities for the convenience of display. In the center of the images, it can be found that the petals of the flower in Figure 7 have a more uniform structure than those in Figure 6. The experimental result in Figure 7 showed that different regions indicate different contents in the structure image and these regions exhibit different intensity properties in the spatial domain, making them more easily decomposable.
The intensity map of the original fabric image. The intensity map of the extracted structure image. The intensity map of the extracted texture image.


Once the structure image had been obtained from the structure-texture decomposition method, the image was converted into the CIE-Lab color domain. The color components L*, a* and b* were then used for fuzzy region-based image segmentation. The output of the segmentation model was u in Equation (11). For a specific region i, the membership values could be displayed in a grayscale image. For instance, one region membership function Illustration of a region membership function. Note that the middle image is the enlarged part of the left image and the right image is the corresponding enlarged part of the structure image. The membership values in the region membership function shown in Figure 9. The binary values of the membership values in Figure 10.


A three-region segmentation result of the fabric image is shown in Figure 12. It shows that the fabric image can be segmented into several different color regions and each region represents different objects in the spatial domain. From the edge map in Figure 12, it can be seen that the boundaries of the segmented regions are smooth and the classification result of main large objects agrees with user observation. Furthermore, in order to separate flower color in Figure 12(c), a new segmentation process was conducted only for the flower region. The target of this segmentation process was to separate the pistil and petal regions. The final segmentation result is shown in Figure 13, where the regions of the original fabric image are given in the final segmental result. The corresponding binary result is shown in Figure 14, where the regions can be directly used for structured texture assignment during the technical design process.
The fuzzy region-based segmentation results: (a) is the background fabric texture; (b) is the leaves of the image; (c) is the flower of the image; (d) is the edge map. The final segmentation result of original fabric image. The binarization result of the segmented regions.


From the experiments shown in Figures 13 and 14, it can be found that the proposed method for structure-texture decomposition was suitable for dealing with different fabric textures. The experiments showed that the reliability and the performance of the structure-texture decomposition method were excellent when compared with those of the traditional texture filtering techniques, for example, the bilateral filters. Specifically, after the decomposition process the fine details of yarn texture, such as the long floats of individual yarns and the interstices of interwoven yarns, had been completely removed and the main structure could be segmented correctly by the fuzzy region segmentation model. However, it should be noted that the main constraint of the method is that some local boundaries were lost after the processing. For instance, some of the light-green boundaries (the binding threads around the leaves in the sewing process) of the leaves disappeared and were incorporated into one region. Therefore, in the industry the decomposition process should be implemented in a local fashion to avoid the loss of the interest of fine structures in some local boundaries. In practice, an interactive way for adjusting the extent of the decomposition could be applied to conduct texture or structure separation under human supervision. The processing results could be used for further analysis of fabric texture or structure.
In order to evaluate the effectiveness of the proposed method, comparison with other methods was made. Five other methods were considered: the FCM clustering method,
7
the Gustafson–Kessel clustering method,
9
the Expectation-Maximization segmentation method,
37
the traditional fuzzy region-based segmentation method
25
and the PCA-based fuzzy region competition method.
30
The experimental details are shown in Figure 15. The color separation results of different methods are different and the result of our method is the best. In the experimental results, it can be found that there are many tiny regions of color clustering methods, especially in the FCM clustering method. The reason for this is that the color clustering methods are not able to measure the spatial affinity of the neighboring pixels during the color separation process.
Fabric color separation results of different methods. From top to bottom, the first row, the second row, the third row, the fourth row, the fifth row and the sixth row show the segmented color regions of the fabric image by the Fuzzy C-Means clustering method, the Gustafson–Kessel clustering method, the Expectation-Maximization segmentation method, the traditional fuzzy region-based segmentation method, the Principal component analysis (PCA)-based fuzzy region competition method and the proposed method, respectively.
On the other hand, our study confirmed that the color separation result of the Gustafson–Kessel clustering method is better than that of the FCM clustering method, because the data set of the former has data set distribution information, in addition to the location of the center of gravity. 9 The experimental results suggest that the technologies commonly used in color image color separation may not be suitable for fabric color separation, for example the Expectation-Maximization segmentation method 37 and the traditional fuzzy region-based segmentation method. 9 The experimental results also show that there may be some unexpected results of these methods in that the fabric image has different weaving methods to create different textures, which may affect the color separation results. Although the PCA-based fuzzy region competition method 30 can achieve better color separation quality than the previous methods, it fails to separate fabric color where the color variation exists in the color regions. For instance, some regions of the leaves have been misclassified into the background texture due to the color variation inside the leaves.
This study also used different fabric structures for evaluating the proposed method. As shown in Figures 16–21, the experimental results confirmed the effectiveness of the proposed method for fabric color separation. The fabric structures in the experimental work included embroidery fabric, woven fabric and knitted fabric. The results showed that the structure-texture decomposition method was able to remove the texture from the fabric image. In the experiments, the fabric images have multiple color regions. For instance, Figure 16 shows an embroidery fabric image with five color regions and our method could separate the colors correctly. During the binarization processing of the fuzzy region membership function, the threshold value should be very easy to choose when the number of separated colors is chosen correctly. The range of the threshold value is the range of the membership value Five-region color separation results for an embroidery fabric image with flower figured-pattern. (a) Original fabric image. (b) The structure image. (c)–(g) The segmented color regions. (h) The edge map. The embroidery fabric image was found by searching the website of Advanced Embroidery Designs (http://www.advanced-embroidery-designs.com/). Three-region color separation results for a woven fabric image with geometrical figured-pattern (left) and an embroidery fabric image with fish figured-pattern (right). Left: (a) Original fabric image. (b) The structure image. (c)–(e) The segmented color regions. (f) The edge map. Right: (a) Original fabric image. (b) The structure image. (c)–(e) The segmented color regions. (f) The edge map. The first fabric image was found by searching the website of Houzz and the second fabric image was found by searching the website of Advanced Embroidery Designs. Color separation results for a woven fabric image with flower figured-pattern (left) and an embroidery fabric image with flower figured-pattern (right). Left: (a) Original fabric image. (b) The structure image. (c)–(e) The segmented color regions. (f) The edge map. Right: (a) Original fabric image. (b) The structure image. (c)–(g) The segmented color regions. (h) The edge map. The left fabric image was found by searching the website of Houzz and the right fabric image was found by searching the website of Advanced Embroidery Designs. Two-region color separation results for an embroidery fabric image with geometrical figured-pattern (left) and a knitting fabric image with geometrical figured-pattern (right). Left: (a) Original fabric image. (b) The structure image. (c)–(d) The segmented color regions. (e) The edge map. Right: (a) Original fabric image. (b) The structure image. (c)–(d) The segmented color regions. (e) The edge map. The left fabric image was found by searching the website of Houzz and the right fabric image was found by searching the website of Advanced Embroidery Designs. Color separation results for woven fabric images that were acquired by a camera (Canon EOS 550D). Left: (a) Original fabric image. (b) The structure image. (c)–(d) The segmented color regions. (e) The edge map. Right: (a) Original fabric image. (b) The structure image. (c)–(e) The segmented color regions. (f) The edge map. The woven fabrics were collected from a Jacquard company. Color separation results for woven fabric images that were acquired by a flat scanner (BENQ Scanner 5560c). Left: (a) Original fabric image. (b) The structure image. (c)–(d) The segmented color regions. (e) The edge map. Right: (a) Original fabric image. (b) The structure image. (c)–(e) The segmented color regions. (f) The edge map. The woven fabrics were collected from a Jacquard company.





For these fabric images and the corresponding segmentation results shown in Figures 16–21, only structure extraction and region segmentation had been applied to fabric color separation in the CIE-Lab color domain. It should be noted that the commonly used preprocessing techniques for noise reduction or texture smoothing, such as the bilateral filter and the median filter, had not been used in these experiments. Nevertheless, it can be seen that the proposed method was still able to separate fabric color for these fabric images and the results were consistent with the expectation of human eyes. In our experimental work, the parameters in the segmentation process were fixed:
Conclusions
In this paper a fuzzy region-based segmentation method for automatic fabric color separation was described. The proposed image-processing approach offered an effective analysis for separating fabric color according to the color values in different regions. The materials used in our experimental work included a wide variety of fabrics with different target regions. Different image acquisition methods were used to obtain fabric images with different structures, including woven structure, embroidery structure and knitted structure. The types of experimental samples exceeded those in previous studies. The experiments showed that the proposed method was accurately able to segment fabric color regions along their boundaries. Moreover, the tiny regions had been incorporated into the large regions so that the main large objects could be recognized and the main structure had been preserved. The preliminary experiments confirmed the effectiveness of our method.
Successful separation of fabric color by the proposed approach was mainly the result of the following three aspects. Firstly, the fabric image had been split into two components, structure and texture, and the influence of the texture component on the segmentation process had been eliminated. Secondly, in the structure domain, the image was expressed in the CIE-Lab color system, which describes the color components better than RGB color system. Thirdly, a multi-region segmentation model was used to extract the color regions in the structure image and the fuzzy membership function was used to express the blurred shadows and boundaries of color regions.
This paper showed that the proposed method was effective in separating fabric color and the computation cost was low. The experiments showed that, by using the structure-texture decomposition processing, fabric images that had not been processed by the commonly used filtering techniques, such as the bilateral filter and the median filter, still could been segmented accurately by the fuzzy region-based segmentation model. The potential applications of our method could be found in fabric texture design or content-based automatic evaluation of fabric images.
Footnotes
Funding
This research received no specific grant from any funding agency in the public, commercial or not-for-profit sectors.
