Vous êtes sur la page 1sur 4

AUTOMATIC WOVEN FABRIC CLASSIFICATION

BASED ON SUPPORT VECTOR MACHINE


P.F. Li, J. Wang*, H.H. Zhang, J.F. Jing

* School of Electronic and Information, Xian Polytechnic University, China, wj86723@163.com,029-82330522

Keywords: Woven fabric, Automatic classficaition, Local


binary pattern, Gray level co-occurrence matrix, Support 2 Methods
vector machine.

Abstract 2.1 Local binary pattern

In the textile industry, the classfication of woven fabric is Local binary pattern (LBP) is the binary relation between the
usually manual. To improve work efficiency, this paper pixel and the pixel around in the gray image. It can extract the
purposes a novel approach to extract image features for texture information of the local image, and it is invariant
woven fabrics recognition automatically. Firstly, the local against illumination variation. The original LBP operator
binary pattern method and the gray level co-occurrence processing[5] is analogous to the template operation of the
matrix are adopted to compute the fabric image features. Then, filtering process. The operator labels the pixels of an image
the principal component analysis is utilized to reduce the high by the threshold of the 3h3 neighborhood of each pixel with
dimensional feature data. Lastly, a support vector machine is the center value and considering the result as a binary number.
used as a classifier to recognize the woven fabric type. The Then the histogram of the labels can be used as a texture
experiments show that these methods can automatically and descriptor (see Figure 1).
accurately classify the plain weave fabrics, twill weave
fabrics and satin weave fabrics.

1 Introduction
With the development of science and technology, the
recognition of a woven fabric has changed from the manual
work to automatic model. The automatic model not only
speed up the production, but also liberate large quantities of
labour force. This paper intrduced the image processing into Figure 1: The basic operator.
the texture classification to achieve the goal, the automatical
classification of the woven fabric types. The LBP Label can be defined as:
P 1
The fabric texture has been studied since the mid-1980s,
which progresses from optical computing to the digital image
processing. The digital image processing methods include
LBP P , R
i 0
s ( g i  g c ) u 2i
structural method, statistical method, model method and (1)
spectral method. There are some particular ways in the image g
Where c represents the center pixel, gi (i 0,1, 2...P  1) is
processing: the co-occurrence matrix[3], the multi-resolution the i-th neighbor pixel, P is the total number of neighbor pixel.
wavelet transform[6], the Gauss filtering[4],and the Gabor R is the circle radius, which determines how far the neighbor
transform[1,2]. However, there is a drawback that these pixels are located away from the center pixel, and the S is a
aforementioned methods only achieve the texture orientation sign function, which expresses as:
information. To gain the rotation invariant information, it 1 x t 0
used the Local binary pattern to describe the relation between s(x) (2)
0 x  0
the pixel and the adjacent pixel.
This paper proposed an new method to extract the texture To improve the presentation skill, ojala et al.[9] extended the
features by Local binary pattern and gray level co-occurrence. the basic LBP. If we suppose the value of R and P, taking the
In addition, the principal component analysis is used to select center pixel as the centre of a circle, it can equally sample P
feature vectors of these texture images. Lastly, support vector points in the circle with the radius R. The neighbor pixel's
machine as a classifier, is applied to recognize the woven value calculates by the bilinear interpolation. Meanwhile, the
fabric types. extended LBP has many advantages, such as local resolution,
rotational invariance and illumination invariance.

581
2
Generally speaking, when the same texture element rotates to N 1 N 1

certain angle, it could be taken for the different binary pattern. Q1


i 0 j 0
[C (i, j )]
In order to solve this problem, the uniform LBP[8] has been (3)
introduced. If the corresponding binary label sequence has no Contrast:
2
more than two transitions between "0" and "1" among all N 1 N 1
pairs of the adjacent binary labels, it is uniform LBP, which Q2 k 2
.C ( i , j ) k i j
has rotational invariance (see Figure. 2).Otherwise, it is non- i 0 j 0
(4)
uniform LBP. For a texture image, it has the P+1 uniform Entropy:
LBP, and all the non-uniform LBP has been marked the same N 1 N 1
label. The circle neighborhood's LBPP , R can be written as: Q3  C (i, j ).log 2 C (i, j )
i 0 j 0
(5)
correlation:
N 1 N 1


i 0 j 0
i . j .C ( i , j )  P x . P y

Q 4 2 2
V x .V y
(6)
Figure 2: The rotational invariance of uniform LBP.
with
N 1 N 1
2.2. Gray level co-occurrence matrix
Px i C (i, j )
i 0 j 0
The gray level co-occurrence matrix of an image can reflect (7)
the comprehensive informations of image gray level [4], N 1 N 1
which are about directions,adjacent interval and rangeability.
It has been proved a good method of texture analysis in
Py j C (i , j )
j 0 i 0
(8)
theory and experiment. GLCM was brought out in 1973 by 2 N 1
N 1
Haralick. It describes the grey value i and j ,the 2 pixels'
frequency correlation matrix P(i,j,d, ) of the N-graylevel
V x2 (i  P ) C (i, j )
i 0
x
j 0
image in direction and distance d. P(i,j,d,), the element (9)
N 1 2 N 1
of graylevel co-occurrence matrix in i-row and j-
column,expresses all appeared probability of the grey value i V y2 ( j  P ) C(i, j)
j 0
y
i 0
and j in direction and distance d. is the angle of the x (10)
axis and the two pixels' line, and the angle of is
0,45,90,135. Distance d is related to the image, generally 2.3 Principal Component analysis
according to the test to determine (see figure 3). When
Principal Component Analysis (PCA) is a multivariable
calculating of two pixel grayscale appeared probability,
analysis method, which descends dimension by the linear
GLCM should be normalized.
combination of the features. It virtually makes the high
dimensional data project into the low dimension data on
condition that low dimension data can represent original data
well. Therefore, principal component analysis obtains the
projection matrix actually, then the high dimension data
multiply this projection matrix to get the low dimension data,
whose dimension we can specify.
The most import thing in the Principal Component Analysis is
solving the transformation matrix T . Then , Obtaining the
low dimension data by Y XT .

2.4 Support Vector Machine


Figure 3: The diagram of gray level co-occurrence matrix.
Support Vector Machine (SVM) is a machine learning
algorithm based on statistical theory. Support Vector Machine
Ulaby and others have found that: although there are 14
is an effective binary-class classification method based on
texture features in GLCM, only 4 features are not relevant,
Structural Risk Minimization. That is to say, SVM can
which are convenient for computation and can give a higher
balance the minimization between training error (empirical
accuracy of classification. Generally people use these 4
risk) and testing error (expected risk), which depends on the
common features to extract image texture features: energy,
selection of classification model and model parameters.
contrast, correlation and entropy.
Energy:

582
Figure 4: The optimal hyperplane.

SVM algorithm needs to get optimal hyperplane to separate


the two-class data points in the n-D space. The optimal
hyperplane not only correctly divides the two-class data 
Figure 6: The fabric image and frequency histogram.
points, but also achieves the maximal classified interval. In
the linearly separable situation, there are so many planes
divided the two samples. But in the Figure 4, the optimal Taking the plain weave for example, there is no obvious
hyperplane correctly divide the two-class data points, and difference between the original plain weave and the image
obtain the maximal margin M. The margin between the two with reduced grayscale from 256 to 16 (see Figure 7). The
planes H1 and H2 is 2 / w , and the maximal margin boils results of the features of three fabrics GLCM shown as table 1.
down to the optimization problem about variable w and b. When the value of is 0 , 90 , and the distance (d) is
SVM is a two-class classifiers, and it only can classify the 1,calculating four features (energy, contrast, correlation,
two-class samples. So we should extend SVM to settle entropy) .
multiple classes.

3 Experimental results
In this study, the experimental fabrics include plain, twill, and
satin weaves. Under the same external condition, it acquired
45 groups woven fabric images, with the size 200x200 pixels 
and 600 dpi. Figure 5 shows the three basic woven fabrics: (a)The original plain weave (b)The reduced grayscale image
plain, twill and satin weave. To achieve the better images, we Figure 7: The mean and standard deviation of three filtered
use median filter and histogram equalization as fabric image fabric images.
preprocessing.
Energy Contrast Entropy correlation
Plain(0) 0.009965 6.688065 7.026869 -50.75467
Plain(90) 0.010847 6.365402 6.984174 -50.65222
Twill(0) 0.014492 3.502186 6.580797 -50.54763
Twill(90) 0.011611 7.660176 7.004591 -50.65662
Satin(0) 0.016130 3.721080 6.479973 -50.29330
Satin(90) 0.010867 12.779196 7.111671 -50.23056
Figure5: Three basic woven fabric images. Table 1: The features of three fabrics GLCM.

3.1. Experiment I 3.2. Experiment II


After preprocessing the woven fabric images, it can calculate Through the feature extraction, each fabric image has 62
the frequency histogram of the uniform local binary patterns. characteristic parameters. In order to keep the useful
When the radius R = 1, 2, 3 with neighborhood P = 8, 16, 24, information and reduce the redundant information, this paper
the dimension of the local binary pattern histogram separately introduces Principal Component Analysis. PCA is found to
is 10, 18, 26. These three features using together reveals the achieve good effect and can specify characteristics of the
best representation of the LBP. Figure 6 shows that the fabric images by lesser dimension. Figure 8 is the variance
preprocessing plain weave image and its frequency explained by Principal Components, and the front PCA
histograms. contribution rate is higher than the latter. It selects the number
of reducing the dimension is 3, because the accumulative

583
contributing rate of the third principal component more than 4 Conclusions
95%.
It is obvious that a good feature extraction can gain a good
pattern recognition result. In the present study of the fabric
structure classification, the LBP method and the gray level
co-occurrence matrix method could extract the texture feature
of plain, twill and satin weave efficiently, and the support
vector machine can classify the fabric structure texture
accurately. Compared with using LBP method and the gray
level co-occurrence matrix method only, the experimen shows
that the best classification accuracy is using these methods
together. In order to enlarge the range of its application, it can
add the samples of knitted fabric and non-woven fabric.

Figure 8: Variance explained by Principal Components

At the end of the process, the 45 woven fabrics should be Acknowledgements


classified by support vector machine [15]. First of all, taking
the training samples of the 30 woven fabrics as the input data The authors would like to thank for the support of Scientific
of SVM to produce the network by training and learning. Research Program Funded by Shaanxi Provincial Education
Secondly, the testing samples of the 15 woven fabrics as the Department (Program No. 11JK0910) Research and
input data of SVM to test by the formed network. The testing Development Project of science and technology(Project NO.
result displays that the classification accuracy using this 2011K07- 25), Shaanxi, PRC.
method is 87.77%. Figure 9 is the training samples, and
Figure 10 is the testing samples. After testing the 15 woven References
fabrics, two twill weaves have been mistaken as plain weaves.
There are two reasons: the similar structure between twill and [1] A. C. Bovik, M. Clark, W. S. Geisler. Multichannel
plain; the variety of the twill weave. texture analysis using localized spatial filters, IEEE
Transactions on Pattern Analysis and Machine
Intelligence, 12, pp. 55-73, (1990).
[2] D. Gabor. Theory of communication, Journal of the
Institution of Electrical Engineers, 93, pp. 429-457,
(1946).
[3] R. M. Haralick, K. Shanmugam, I. Dinstein. Textural
Features for Image Classification, IEEE Trans.Systems
Man Cybernet, 3, pp. 610-621, (1973).
[4] T. J. Kang, C. H. Kim, K. W. Oh. Automatic
recognition of fabric weave patterns by digital image
analysis, Textile Research Journal, 69, pp. 77-83,
(1990).
[5] S. Liao, M. W. K. Law, A. C. Chung. Dominant local
binary patterns for texture classification, IEEE
Transactions on Image Processing, 18, pp. 1107-1117,
Figure 9: The training samples.
(2009).
[6] S. Mallat. Wavelets for a vision, Proceedings of the
IEEE , 84, pp. 604-614, (1996).
[7] J. Melendez, M. A. V, D. Puig. Efficient distance-based
per-pixel texture classification with Gabor wavelet
filters, Pattern Anal. Appl, pp. 365-372, (2008).
[8] L. Nanni, S. Brahnam, A. Lumini. Selecting the best
performing rotation invariant patterns in local
binary/ternary patterns, IPCV'10, pp. 369-375, (2010).
[9] T. Ojala, M. Pietikinen, D. Harwood. A comparative
study of texture measures with classification based on
featured distribution , Pattern Recogniton, 29, pp. 51-
59, (1996).
[10] A. S. Tolba. Fast defect detection in homogeneous at
surface products, Expert Systems with Applications, 38,
pp. 12339-12347, (2011).
Figure 10: The testing samples

584

Vous aimerez peut-être aussi