Abstract
This series of studies aims to propose the automatic machine embroidery image color analysis system to solve the problem of lack of manpower for machine embroidery fabric drafting and to shorten drafting time. The studies included three parts: (1) machine embroidery image color separation, (2) search of repeated pattern images, (3) machine embroidery color analysis system integration.
This study aimed to find the optimal clustering algorithm and cluster validity indices for the automatic color separation process of machine embroidery fabric drafting in order to shorten drafting time. To improve image quality for computer analysis, this study used the color hybrid median filter to filter noise and the color bilateral filter to smoothen fabric and embroidery texture for subsequent color separation. By extracting the color a* component and b* component of the machine embroidery image in CIE L*a*b* color system, this study used the Gustafson-Kessel clustering algorithm for color separation. The Gustafson-Kessel clustering algorithm in machine embroidery image color separation can improve color separation accuracy, and its result is compared with that of the clustering algorithms commonly used in the color separation of color images. This study implemented the chromatography of the color separation results, and used the cluster validity indices to prove that the application of Gustafson-Kessel clustering algorithm in the machine embroidery image color separation system has better results than K-means, K-medoid, fuzzy C-means (FCM), and self-organizing map (SOM) clustering algorithm. The results meet the classifications as expected by human eyes.
Keywords
Introduction
Today’s machine embroidery manufacturing process can be divided into drafting and automatic machine embroidery work. Drafting relies on expertise and manpower to draft embroidery software by visual observation and description of colors in various pattern areas in a time-consuming and laborious process. Since there is no study relating to the machine embroidery image analysis system, this study discusses the application of an image analysis system for machine embroidery drafting. The process first filters the image noise, removes the embroidery texture, and then determines the optimal clustering algorithm and cluster validity indices for the automatic color separation process of machine embroidery fabric drafting in order to shorten drafting time.
Since machine embroidery has pattern and texture with a certain thickness, noise will appear in the image capturing process. Kuo et al. 1 used color median filter to remove the noise of the color printed fabric images. However, the color median filter with good filtering results has the disadvantage of damaging image feature edge. Kuo et al. 2 used the color center weighted median filter to lower the embroidery fabric image noise but it has disadvantage of damaging image feature edge. Hence, this study used the hybrid median filter 3 to reduce image noise to address the problem of noise filtering of the machine embroidery images.
The complexity of the machine embroidery image is far greater than images of other fabrics. As different types of embroideries have different stitches to create different textures, this may affect the color separation results; the fabric texture and embroidery texture of machine embroidery also vary. Kuo et al.4,5 adopted the Learning Vector Quantization networks (LVQN) and Fuzzy C-means (FCM) to recognize the fabric nature and type of weaving texture. And these authors 6 proposed using the texture fitting method to separate embroidery color and texture, since this system can simulate that to enable the comparison to real fabric. Pan et al. 7 proposed the automatic testing system for yarn-dyed fabrics that uses a steering filter to enhance the characteristics of textures in specific directions for further periodic extraction. However, the stitches used in machine embroidery are different and may result in different shadows, leading to different periodic changes that may affect the color separation results. This study used a color bilateral filter 8 to smoothen the texture of the embroidery fabric in order to effectively smoothen the texture and to retain the important edges.
Technologies commonly used in color image color separation include the unsupervised clustering method and the supervised clustering method. Xu et al. 9 used the unsupervised SOM and FCM in the color separation of printed fabric at a higher color separation calculation speed than that of the supervised clustering method. Kuo et al.10,11 proposed the supervised Backward-Propagation Neural Network (BPNN) and Probabilistic Neural Network (PNN) to determine the colors corresponding to the selected areas. However, the color separation calculation time is longer. To improve the color separation efficiency of machine embroidery, the unsupervised clustering algorithm is more suitable for the calculation of embroidery fabric images. This study explored and discussed the embroidery textile color system clustering problem.
To address the problems of the noise caused by capturing the machine embroidery images, as well as the impact of fabric texture and embroidery texture on color separation results, this study used the color hybrid median filter to remove noise. Moreover, it used the color bilateral filter to smoothen fabric texture and embroidery texture while keeping important characteristic edges. The Gustafson-Kessel clustering algorithm was applied in color separation, and compared with the commonly used clustering algorithm for color image color separation. Chromatographic observation of the results was conducted, and the cluster validity index was used to verify the applicability of the Gustafson-Kessel clustering algorithm in machine embroidery color separation system.
Research framework
The experimental instruments used in this study included the image acquisition equipment, a scanner (Epson Perfection 1650 Model), MATLAB 7.12.0 language for programming, MATLAB for integrated design of operational image display and GUI writing.
The framework for this study is as shown in Figure 1. We first used a scanner to acquire the images of the embroidery fabric, and then transferred the images into the CIE L*a*b* color domain. Next, we used the color hybrid median filter to remove image noise before using the color bilateral filter to smoothen fabric texture and embroidery texture to make the subsequent color separation more accurate. Then, the Gustafson-Kessel clustering algorithm was applied in the color separation of the a* and b* components of the processed images, and compared with the commonly used color separation clustering algorithms. We used the clustering image labels for subsequent analysis and the cluster validity to verify the applicability of the Gustafson-Kessel clustering algorithm in machine embroidery color separation.
Research framework.
Image processing
To address the problems of image noise caused in machine embroidery image acquisition and the impact of fabric texture and embroidery texture on the color separation results, the images should be processed in advance before using the filter to remove image noise and smooth the embroidery fabric texture for improving color separation accuracy.
CIE L*a*b* color system
The CIE L*a*b* color system
12
is the CIE-established color system that is relatively consistent with human vision, where L* denotes the color luminance, a* denotes the colors from green to red, b* denotes colors ranging from blue to yellow as represented by numbers. The color domain is as shown in Figure 2.
CIE L*a*b* color system.
In the CIE L*a*b* color system, the overall colors a*, b* of the image can be corrected without changing the color luminance, L*. The equation for converting RGB into CIE L*a*b* is as shown below:
Color hybrid median filter
Machine embroidery images have patterns with a certain thickness. To avoid the noise in image acquisition, a hybrid median filter
3
was used for noise filtering, as shown in Figure 3. In addition to the weight of the median filter, other weights should also be considered. If the mask range is 3 × 3 then take the median values of Mask 1 and Mask 2 and the value of Mask 3. The median value of the above three values is used to replace the block central point.
One layer hybrid median filter.
Color bilateral filter
The machine embroidery images have fabric texture and embroidery texture. To avoid the impact of texture on subsequent color separation results, this study used the color bilateral filter that can effectively smooth image noise and keep important edges. The bilateral filter is an adjacent point filter developed from the Gaussian smooth filter. To remove the noise of each pixel of the image, the filter calculates according to two characteristics of each point in the area, including the distance between the point and the central point, as well as the color difference with the central point. The greater distance and gray-scale difference lead to smaller weight. Tomasi et al.
8
suggested that the CIE L*a*b* color system is better than the RGB color system. The bilateral filter’s gray values can be extended as the calculation of L*, a*, b* components before combined conversion. The image calculation equation of the bilateral filter is as shown below:
13
The equation to calculate the weights of pixels by Gaussian distribution function is as below:
Unsupervised clustering method
The unsupervised learning applies the internal clustering rules between the inputs and outputs to measure the data distance to determine output clusters of a similar level. This study used the Gustafson-Kessel clustering algorithm to carry out the machine embroidery image color separation of the image color a* component and b* component as extracted in this study. It also compared the results with other types of clustering algorithms including K-means, K-medoid, FCM and SOM clustering algorithms, using the cluster validity index to determine the applicability of the clustering algorithm in machine embroidery color separation. Different clustering algorithms calculate distances in different ways. The Gustafson-Kessel clustering algorithm used in this study applies the Manhattan distance, while other algorithms use the Euclidean distance.
Fuzzy C-means (FCM)
The FCM clustering algorithm
14
uses the membership level to measure the belonging of each element to a certain cluster. The FCM algorithm divides n data vectors, xk into c fuzzy categories, and determines the clustering center of each category for the further minimization of the fuzzy target function. The fuzzy clustering target function is as shown below:
Gustafson-Kessel clustering algorithm
Gustafson-Kessel clustering algorithm
15
differs from the FCM clustering algorithm. The FCM clustering algorithm is a cluster prototype with one center of gravity location, while the Gustafson-Kessel clustering algorithm is a cluster prototype of volume, each of which contains the relevant covariance matrix and center of gravity location. Hence, each data set has a sub-clustering center of gravity location and data set distribution information. This study proposed the Gustafson-Kessel clustering algorithm for machine embroidery image color separation. The distance function is defined as below:
K-means
K-means
16
is a clustering algorithm used mainly to simplify and classify data to summarize similar individuals in a cluster, which minimizes the intra-cluster difference and maximizes the inter-cluster differences. With the average value of the data in the cluster as the clustering center, K-means requests the number of clusters to be set in advance, and to input information data to determine the minimized value of the distance between data to optimize the clustering by the equation, as below:
K-medoid
The K-medoid clustering algorithm and the K-means clustering algorithm are similar. 17 However, K-means uses the clustering center of gravity as the central point, the location of which may be affected if the data are outliers. On the contrary, the K-medoid clustering algorithm uses the object that is closest to the central point of the cluster as the clustering central point to determine the minimized value of the data distance by using equation 16 to optimize clustering.
Self-organizing map
First proposed by Kohonen,
18
the self-organizing map (SOM) links the input vectors of any dimension to the characteristic mapping diagram of lower dimension by the characteristic mapping method as shown in Figure 4. According to the rivalry between neurons of input vectors, SOM then adjusts weight vectors. The neurons on the final output layer display the input vectors in the output space in the form of topological structure, which can reflect the input vector distribution relationship. Hence, SOM can be applied in a group of unlabelled samples to find out similar characteristics.
SOM structure.
Cluster validity
Clustering is to classify the collected data into categories and distinguish them into clusters. The process of evaluating the clustering results is known as the clustering validity analysis. In general, the intra-cluster distance minimization and the inter-cluster distance maximization are the optimal clustering results. To test the applicability of various clustering algorithms in the machine embroidery color separation system, this study used the following different cluster validity indices for judgment.
1. Partition index
This study used the partition index as defined by Bensaid
19
with its equation as below:
A smaller SC value can get the optimal clustering number c.
2. Separation index
This study used the separation index as defined by Bensaid
19
with its equation as below:
A smaller S value can get the optimal clustering number c.
3. Dunn index
The Dunn index
20
is used to calculate the clustering result closeness and separation degrees, and its equation is as below:
A smaller DI value can get the optimal clustering number c.
Results and discussion
This study discussed the performance of clustering algorithms in the data clustering of the a* and b* components of the CIE L*a*b* color system for an embroidery fabric image, and the color separation results. We used the cluster validity indices to evaluate and analyze the performance of the clustering algorithms.
This study used the scanner to acquire the machine embroidery image, as shown in Figure 5, then converted the image into the CIE L*a*b* color domain. Due to the noise in the acquisition of the machine embroidery image, the color hybrid median filter was used to remove the noise, as shown in Figure 6, and then the color bilateral filtering was carried out to smoothen the machine embroidery texture, as shown in Figure 7. The color a* component and b* component of the CIE L*a*b* color domain were used as the clustering data, as shown in Figure 8, for the comparison of different clustering methods. After the clustering, this study used different colors for chromatography of the clustering results as the clustering category labels. As shown in Figure 9 to Figure 13, the SOM clustering category label has the greatest difference from the clustering results of other methods. This study then made the clustering index labels of the corresponding original image of the clustering results. It can be observed by human eye that for the clustering index label, as shown in Figure 14 to Figure 18 by cross-observation of the clustering index label that is corresponding to green leave in the original image, Gustafson-Kessel clustering is more suitable for human eye recognition in terms of color separation results, that the SOM clustering effects were the worst, and thus, cluster validity index was not used to discuss the SOM clustering algorithm applicability. The chromatographic treatment results as shown in Figure 19 to Figure 23 suggest that the color separation effects of Gustafson-Kessel are the best. Finally, the objective cluster validity indices were used to validate the calculation of intra-cluster minimized difference by various clustering algorithms using cluster validity indices, including the partition index SC, the separation index S, and the Dunn index DI, as shown in Table 1. The Gustafson-Kessel clustering results were confirmed by cluster validity indices of the partition index SC, the separation index S, and the Dunn index DI, thus proving that the Gustafson-Kessel clustering algorithm is very suitable for the machine embroidery image color separation system.
Original machine embroidery image. Use color hybrid median filter to remove noise of machine embroidery image in image acquisition. Use color bilateral filter to smooth machine embroidery image texture. Machine embroidery image a* component and b* component clustering data. Gustafson-Kessel clustering category label. K-means clustering category label. K-medoid clustering category label. FCM clustering category label. SOM clustering category label. Gustafson-Kessel clustering index label. K-means clustering index label. K-medoid clustering index label. FCM clustering index label. SOM clustering index label. Analysis after chromatography of Gustafson-Kessel clustering index label. Analysis after chromatography of K-means clustering index label. Analysis after chromatography of K-mediod clustering index label. Analysis after chromatography of FCM clustering index label. Analysis after chromatography of SOM clustering index label. Cluster validity index results


















Conclusions
This study transferred the image into the CIE L*a*b* color domain for the color hybrid median filter to remove the noise generated in image acquisition, and used the color bilateral filter to smooth fabric texture and embroidery texture. The results showed that the method can effectively filter noise, smoothen the machine embroidery texture, and improve machine embroidery color separation accuracy.
This study used the Gustafson-Kessel clustering algorithm for machine embroidery image color separation. It compared the results with K-means, K-medoid, FCM, SOM clustering algorithms using cluster validity indices, including partition index SC, separation index S, and Dunn index DI for clustering evaluating and the cross-discussion of clustering results of various clustering algorithms. The results showed that it is better to transfer the image into the CIE L*a*b* color system and extract the color a* component and b* component of the machine embroidery image to use the Gustafson-Kessel clustering algorithm for color separation. The color separation effects are better than K-means, K-medoid, FCM, SOM clustering algorithms because the data set of the Gustafson-Kessel clustering algorithm has data set distribution information, in addition to the location of the center of gravity. The application of the Gustafson-Kessel clustering algorithm in machine embroidery image color separation will have good results.
Footnotes
Funding
This work was supported by the National Science Council of the Republic of China (grant number 97-2221-E-011-030-MY3).
