Professional Documents
Culture Documents
Color and Pattern Analysis of Printed Fabric by An Unsupervised Clustering Method
Color and Pattern Analysis of Printed Fabric by An Unsupervised Clustering Method
ABSTRACT
In this paper, a novel approach to color and pattern analysis is proposed for printed
fabric. An unsupervised analysis method is developed using a fuzzy C-means (FCM)
clustering algorithm and a specific cluster-validity criterion (SC criterion). First, the printed
fabric is captured by a color scanner and converted into full color digital files, then the
mean filter is used to smooth the color of the image. The search for good cluster numbers
is made by the SC criterion, and the corresponding color clusters are obtained based on the
FCM clustering algorithm. Finally, the color and pattern features of the printed fabric are
calculated. The experimental results show that this approach is very suitable for analyzing
the colors and patterns of printed fabrics.
Although digital image analysis techniques for fabrics be analyzed automatically for color numbers, color val-
have progressed, the focus has been mainly on analyzing ues, and area percentages of certain colors. And for the
gray-scale fabric images. However, since the visual per- patterns formed by each color, we can analyze the sta-
ception of color images is much more important than that tistical value of numbers, areas, centers and other related
of gray-scale images, it is highly desirable to develop an pattern characteristics.
automatic recognition system of multicolor weaves using
color image analysis techniques [1, 3].
Color and pattern are two key issues of textile appear- Research Methods
ance. They not only determine the value of the fabric, but
they also act as a necessary discriminative guide for FUZZY C-MEANS CLUSTERING METHOD
different fabrics, especially printed ones. Unlike woven
fabrics, the color patterns of printed fabrics can only be The clustering method attempts to assess the relation-
described by the color numbers, color values, and pat- ships between patterns of a data set by organizing the
terns. In addition, the patterns of printed fabrics vary, patterns into clusters. We use FCM clustering [2] to op-
causing difficulties when describing these patterns with timize the following objective function:
words or even simpler ways. This variety of printed
冘 冘u
c n
patterns also causes difficulties with automation, and it
means that all analysis, recognition, and comparison J⫽ ij
m
d ij2 (1)
i⫽1 j⫽1
needs to be done manually. Moreover, due to the influ-
ence of the undulating weave on the fabric’s appearance,
the colors displayed are more complex than other ordi- where c is the number of clusters, uij ⑀ [0,1] expresses the
nary flat materials, leading to complications with color membership degree of the data point xj belonging to the
recognition. In addition, the technique of color image ith fuzzy group, dij ⫽ 储Wi ⫺ Xj储 is the Euclidean distance
processing is still at a premature stage. Therefore, studies between the ith cluster center wi and the jth data point xj
of automatic analysis systems for colored fabrics have hit and m ⑀ (1, ⬁) is a weighting exponent that influences the
a roadblock. fuzziness of the clusters [5].
In this paper, we propose an unsupervised clustering This FCM algorithm is implemented as follows:
method to analyze colors and patterns on printed fabrics. 1. Choose the number of clusters c, the weighting
Without using samples or a priori information about data exponent to influence the fuzziness of the clusters,
structures, the clustering algorithms attempt to partition and the terminative precision .
the data set into clusters, such that data within a cluster 2. Initialize the fuzzy C-partition and set the iteration
are more similar to each other than to those belonging to counter to t ⫽ 1.
different clusters. The colors on printed fabrics can thus 3. Update the centers matrix
k ⫽ r ⫹ i, and
冘
n
共u ij *兲 mx j
冘冉 1max
ⱕ i ⱕ c冊
n 2
j⫽1 u i ij
wi ⫽
冘共u *兲
n
j⫽1
m FC ⫽ .
冘
ij
n
j⫽1 maxi uij
1ⱕiⱕc
for 1 ⱕ i ⱕ c, and the memberships degree matrix j⫽1
(U),
The maximum SC for a given number of clusters c is
冋 册
⫺1 expected to detect a well-defined fuzzy c-partition.
冘储储 xx ⫺⫺ ww 储储
c 2/共m⫺1兲
j i
u ij ⫽ 2/共m⫺1兲 .
k⫽1 j k Experimental Analysis
4. If 兩U(t ⫹ 1) ⫺ U(t)兩 ⬍⫽ stop, otherwise t ⫽ t ⫹ 1, The experimental material is a four-color printed fab-
therefore go to step 3. ric, 7 in. ⫻ 7 in., and the Matlab [4] is the software tool
used to develop this system. An Epson 2400 Photo
CLUSTER-VALIDITY ANALYSIS scanner with a resolution of 96 dpi digitizes the printed
fabric image into a full-color model. In the color space,
The aim of the classification is to generate a well- we can refer to a single pixel’s red, green, and blue
defined C-partition that is as close as possible to the values as a color pixel vector ⫺ (R, G, B). The captured
natural structure of the data. The specific cluster-validity image consists of 672 ⫻ 672 pixels. In order to reduce
criterion (SC) is used to measure the quality of the fuzzy the color differentiation caused by the undulating weave
C-partitions provided by the fuzzy clustering algorithm. structure on the fabric’s appearance, the mean filters are
This cluster-validity is based on two functions. The first used to process the scanned full-color image.
function calculates the ratio by considering geometric
and fuzzy membership properties. The second function UNSUPERVISED CLUSTERING STRATEGY
evaluates it by using only the properties of fuzzy mem-
berships. In this paper, we adopt the SC cluster-validity The search for good clustering takes the following
index introduced by Zahid et al. [6]: iteration steps:
1. Initial setting: c ⫽ 2, cmax ⫽ 10.
S FS 2. Use the FCM algorithm (m ⫽ 2, ⫽ 0.00001) to
SC ⫽ ⫺ , (2)
FC compute the cluster centers matrix, memberships
degree matrix, and SC.
where
3. Let c ⫽ c ⫹ 1; if c ⱕ cmax then go to step 2.
冘储w ⫺ w 储
c According to the definition above, the maximum SC
i value is used to examine which cluster number set is
i⫽1 better; that is, how many color clusters should the colors
S⫽ ,
c be divided into. We also record the fuzzy clustering
centers matrix and the memberships degree matrix of the
w is the mean of the whole data set, best cluster number to produce a pixel clustering distri-
bution diagram for follow-up color and pattern analysis.
冘共u 兲 储 x ⫺ w 储
n
m 2 The pixel clustering distribution diagram is created by
ij j i
冘
c
i⫽1
drawing pixels of each cluster on a new picture.
⫽ ,
冘u
n
i⫽1 COLOR AND PATTERN ANALYSIS
ij
j⫽1 For color characteristic analysis, the color value is
obtained from the cluster center of the best cluster num-
冘min共u , u 兲
n
bers. Sum the area of each cluster’s pixel for the area
2
ij kj percentage of the color. For pattern analysis, first obtain
冘冘
c⫺1 c⫺i
j⫽1
FS ⫽ , the pattern of the printed fabric by drawing pixels of each
冘min共u , u 兲
i⫽1 r⫽1
n cluster on a new picture. Then, use the morphology
ij kj operation of erosion and dilation to remove lines or
j⫽1 spots, which are classified as incorrect, on the pattern
edges caused by the processing of mean filters. Next, TABLE I. Some SC indices for different cluster numbers.
calculate the numbers and the center point locations of Cluster number
individual patterns formed by each cluster. However, in
order to avoid the influence of incomplete individual 2 4 6 8 10
patterns on the image fringes upon the analysis, eliminate Four-color printed fabric 0.40 9.57 6.12 3.49 3.12
these individual patterns before figuring out their pattern
characteristic values. Finally, calculate these character-
istic values of the individual patterns, including Area (the
actual number of pixels in the single pattern), Extent (the
Area divided by the area of the bounding box), Orienta-
tion (the angle between the x-axis and the major axis of
the ellipse that has the same second-moments as the
single pattern), and Eccentricity (the ratio of the distance
between the foci of the ellipse and its major axis length).
An ellipse whose Eccentricity is 0 is actually a circle,
while an ellipse whose Eccentricity is 1 is a line segment.
pattern shown as the ⫹ symbol on the figure and the clustering algorithm and the SC clusters-validity index, is
location of the box that surrounds this pattern. Finally, very effective for analyzing the color characteristics and
mark the related color characteristic values and pattern pattern characteristics of printed fabrics automatically.
characteristic values on Table II. From the mean and We have proved that this method can overcome the
standard deviation of the Area, Extent, Orientation, and difficulties of manual recognition and word descriptions
Eccentricity values, the patterns of these four clusters of color pattern characteristics of a printed fabric. In addi-
consist of rectangles of similar sizes. tion, since we use personal computers and color scanners
for automatic analysis and recognition of color printed
TABLE II. Color and pattern characteristics of printed fabric
fabrics, this study is very practical and economical.