SlideShare a Scribd company logo
1 of 11
Download to read offline
See	discussions,	stats,	and	author	profiles	for	this	publication	at:	https://www.researchgate.net/publication/258196156
Grading	of	Yarn	Appearance	Using	Image
Analysis	and	an	Artificial	Intelligence
Technique
Article		in		Textile	Research	Journal	·	March	2006
DOI:	10.1177/0040517506056868
CITATIONS
12
READS
30
5	authors,	including:
Some	of	the	authors	of	this	publication	are	also	working	on	these	related	projects:
Evaluating	Piezoelectric	Performance	of	PVDF	Composite	Nanofibers	Pressure	Sensor	with
Metal	Nanoparticle	View	project
Functional	Fibrous	Materials	View	project
Dariush	Semnani
Isfahan	University	of	Technology
84	PUBLICATIONS			292	CITATIONS			
SEE	PROFILE
Masoud	Latifi
Amirkabir	University	of	Technology
153	PUBLICATIONS			696	CITATIONS			
SEE	PROFILE
Mohammad	Amani	Tehran
Amirkabir	University	of	Technology
81	PUBLICATIONS			384	CITATIONS			
SEE	PROFILE
Ali	Akbar	Merati
Amirkabir	University	of	Technology
59	PUBLICATIONS			334	CITATIONS			
SEE	PROFILE
All	content	following	this	page	was	uploaded	by	Masoud	Latifi	on	30	May	2016.
The	user	has	requested	enhancement	of	the	downloaded	file.	All	in-text	references	underlined	in	blue	are	added	to	the	original	document
and	are	linked	to	publications	on	ResearchGate,	letting	you	access	and	read	them	immediately.
Textile Research Journal Article
Textile Research Journal Vol 76(3): 187–196 DOI: 10.1177/0040517506056868 www.trj.sagepub.com © 2006 SAGE Publications
Figures 2–4 appear in color online: http://trj.sagepub.com
Grading of Yarn Appearance Using Image Analysis and an
Artificial Intelligence Technique
Dariush Semnani1
, Masoud Latifi,
Mohammad Amani Tehran
Textile Department, Amirkabir University of Technology,
Hafez Avenue, Tehran, Iran
Behnam Pourdeyhimi
College of Textiles, North Carolina State University,
Raleigh, North Carolina, 29695, USA
Ali Akbar Merati
Faculty of Engineering, Gifu University, Yanagido, 1-1,
Gifu, Japan
Section D2255 of ASTM presents a standard method for
grading of short staple spun yarns [1]. In this method, the
inspection is based on direct observation in which a skilled
specialist compares the wound table with standard images of
six categories of yarn count. In each category, there are four
images that are labeled A, B, C and D. The image labeled by
letter A represents the best quality and the others are pro-
gressively lower quality. In the standard method, a specialist
judges the quality of the yarn samples according to the
standard definition. Therefore this method of inspection is
dependent on human vision.
Furthermore, there are two limitations, one of them is
error of human vision in which the results of evaluations by
various persons are different, and the other is the inade-
quacy of this method for other types of yarn [1].
Recently, attempts have been made to replace the
direct observation method of ASTM with computer vision
to resolve the limitation of human vision. In most of these
studies, the image of a single yarn was considered to spec-
ify the fault features of the yarn. In the method developed
by Cybulska, the edge of yarn body was estimated from the
image of a thread of yarn and the thickness and hairiness
of the sample yarn was measured [2]. Other studies were
based on the classification of events along a thread of yarn
and measuring the percentage of the different classes of
events [3–7]. In all above-mentioned methods, although it
was possible to define a classification for yarn appearance
based on unevenness a classification of faults and grading
of yarn sample based on standard images was found to be
impossible.
Furthermore, there are many similar methods for meas-
uring the parameters of fabric and individual types of yarn
such as false twist bulked yarns and blended staple yarns
[8, 9], but a general method for classification of various
types of yarn faults based on standard parameters and
grading them has not been presented yet.1
The objective of this research was to extend the limits of
previous methods, to provide an inspection method suita-
ble for every type of yarn using image processing and to
design a classifier for any category of yarn counts. Our
technique can be defined as a general method of yarn
appearance grading.
Abstract In this research, a new method is used
for grading of yarn appearance based on yarn
images of ASTM standard (section D 2255), by
using an image processing technique and an artifi-
cial intelligence technique. In this method, grad-
ing of yarn appearance is based on computer
vision and analyzing the images of standard picto-
rial boards of yarn. Therefore this method is very
similar to human vision. The logic of the classifi-
cation by ASTM is considered and then a new def-
inition for classification of yarn appearance grade
is presented. In this method of classification, the
grading procedure is not dependent on yarn struc-
ture and raw materials. Thus it is possible to use
this method for grading of any type of yarn based
on apparent features.
1
Corresponding author: tel.: +98 21 6641 9527; fax: +98 21
6640 0245; e-mail: dariush_ semnani@hotmail.com
188 Textile Research Journal 76(3)TRJTRJ
Methodology and Experiments
Definition of Apparent Features of Yarn
Based on Various Kinds of Fault
The appearance quality of yarn is directly related to the
configuration of fibers on its surface and a greater uneven-
ness in the yarn surface implies poorer apparent quality.
There are four categories for faults of yarn surface in sec-
tion D 2255 of ASTM [1]. In this standard, the yarn grade
is based on fuzziness, nepness, unevenness and visible for-
eign matter. In almost all definitions of yarn appearance
features, the grading method is based on the surface con-
figuration of the yarn [1, 10–12].
Regarding the standard definition, yarn faults that have
an effect on its appearance are classified in following cate-
gories.
Nep with thickness of less than three times of yarn
diameter.
Nep with thickness of more than three times of yarn
diameter.
Foreign trash.
Entangled fibers with a thickness of less than three
times the yarn diameter such as a small bunch, slug, or
slub.
Entangled fibers with thickness of more than three
times of yarn diameter such as large bunch, slug, or slub.
Unevenness in the coating of the yarn surface or poor
covering of the yarn with excessive fuzziness.
Untangled fiber ends that protrude from the surface of
a yarn. These fibers are named fuzz. The fuzz should not
be confused with the cover of yarn with excessive fuzziness.
It is possible to define these categories to form classes
of apparent faults of yarn.
Class 1: Large and entangled faults which are tightened
fibers with uniform configuration. This class of faults
includes thick neps, trash and extended entangled fibers
such as bunches, slugs or slubs. The thickness of these
faults is approximately more than three times the yarn
diameter.
Class 2: Large faults with less area in comparison with
first category (Class I). In this class, small neps, foreign
trash and slug or bunches of fibers are classified. The thick-
ness of these faults is approximately less than three times
the yarn diameter.
Class 3: Non uniform and extended faults with spread
configuration. This class includes free fibers on the yarn
surface that are defined as fuzz. In addition various coating
fibers, some long and with non uniform configuration may
belong in this class.
Class 4: Small spread faults such as non-uniform coat-
ing fibers and short tangled hairs. Although the total area
of these faults is noticeable, it is not very effective on yarn
appearance, because the area of these faults is generally
small and in different sections of the yarn image.
This method of classification is dependent on the shape
and configuration of those faults that are not located in an
area of the yarn body; in which the type of fault can be rec-
ognized from its shape. Therefore, the definition is con-
firmed by previous classification logic.
The most important merit of this kind of classification is
its applicability for different types of yarn, independent
from raw material, and the method of spinning such as
woollen, worsted, buckled, filament and different short sta-
ple yarns.
Measuring Methods
We first summarize the method and then describe the vari-
ous steps in greater detail. The photographs of standard
yarn boards of four grades were scanned using a scanner.
The images were then converted to binary form using a
defined threshold. The binary image consists of the yarn
body, the background and the faults. We only need the
image of faults, and so we need to detect and eliminate the
yarn body and background. In the original images, the
threads of yarn were not completely in the vertical direc-
tion. This was a major obstacle to the elimination of the
yarn body in one stage. Therefore it was necessary to
divide the original image into narrow tapes. The bodies of
threads could then be eliminated from the binary images.
In the scanned images of the yarn boards, which were
divided into uniform tapes, there were some columns of
pixels without the image of yarn body and faults; this is
called the image of background. To obtain the images of
faults, these columns were also eliminated using a small
threshold from the image of the yarn board. After elimi-
nating the yarn body and background columns, the remain-
ing image of the tapes were connected to each other end by
end in a longitudinal order. The resulting long, narrow
tape is called the fault image. The fault image of each
grade was divided into uniform blocks. For each image, the
blocks were classified according to newly defined fault
classes based on area and configuration of faults. Each
block of fault image was classified on the basis of the num-
ber and adherence of fault pixels in it. The classified blocks
were counted and four fault factors were calculated from
the counted blocks. For each category of yarn count, the
calculated fault factors and index of yarn degree were pre-
sented to an artificial neural network. After training of
each neural network, a grading criterion was calculated.
Elimination of Yarn Body from Picture of Yarn
Board
The scanned images were 152 mm by 254 mm in size, reso-
lution of 300 dpi and gray-scale level of 256. The gray-scale
image was converted to binary form by a calculated thresh-
old.
Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 189 TRJ
A matrix of faults of each image is first calculated by
subtracting the matrix of the yarn body from the total
image. This method is the reverse of an image restoration
method in which the faults image is subtracted from the
original image [14]. In our view, the matrix of the original
image is the sum of the matrix of the yarn body and that of
the faults and can be shown as equation (1).
(1)
where F is the matrix of the original image, G is the matrix
of the yarn body and N is the matrix of the fault image. If the
image of the yarn body is available, matrix N could be deter-
mined by subtracting matrix G from matrix F (N = F – G).
In the yarn boards, each image is composed of M rows
and H columns. The mean of intensity in each column of
board image can be calculated. According to the binary
form of the image, the mean of intensity for each column is:
(2)
where , is an element of matrix F located in ith raw and
jth column of the image.
After calculation of vector µ it is possible to recognize
the bodies of the yarn threads by estimating the threshold
between the yarn body and other parts of the image.
If the threshold of the mentioned areas is assumed to be
T, the following separating function can be used to elimi-
nate the body of yarn threads.
(3)
(4)
where and are elements of the matrices G and N
located in the ith row and jth column.
After separating matrices G and N from the original
matrix F, all elements of the matrix G are replaced by zero.
By this procedure the body of yarn is replaced by the back-
ground of the image which is black. This procedure is
described by the equation N = F – G.
In the actual pictures, the threads of yarn are not com-
pletely in the vertical direction and usually there is a small
angle between the threads and the vertical direction (Fig-
ure 1a). This causes a notable error in the calculation of
the mean vector along the threads, especially, near the
edges of the threads. If the angles were uniform it might be
possible to use the contour tracing method for determining
of threads edges [13], but because of the variation among
the angles of the different threads it is necessary to look for
a new method to reduce the mentioned error.
For this purpose we divided the original image into hor-
izontal tapes of equal heights (Figure 1b). If α is the angle
of the threads with the vertical direction and L is the length
of the thread, the maximum deviation of the thread direc-
tion from the vertical line will be L tan α. When the length
of threads is reduced to l (height of tape), the deviation is
reduced to l/L. A suitable height for the tapes is deter-
mined from the yarn count.
After completing the body elimination for all of the
tapes (Figure 1c), the resulting images of the tapes are
reassembled into one image in their original order. At this
stage of the process, the size of the obtained image is the
same as the original image.
Generating a BINARY image
To convert the primary image into a binary image, a suita-
ble threshold T should be calculated. By doing a suitable
conversion with the correct threshold, the probability of
missing the edge of the threads will be reduced. This
should also reduce the effect of lighting error during the
photographing of the boards.
The correct threshold should be determined using the
configuration of the image histogram. By analyzing the
image histogram of different boards, we found that there
are two peaks of intensity in each histogram, which are
close to the mean value of the image matrix. This is
because of the nature of our original images, which have
white parts of yarn body image and black parts of back-
ground. There are few pixels in the region between the
mentioned peaks. The height of the first peak is greater
than that of the second peak. Therefore, a suitable thresh-
old point is located between the mean value and first peak.
In practice, we found that a suitable threshold is T = µt – σt
where µt and σt are the mean and standard deviation of the
image matrix, respectively. By using this threshold, the loss
of hairs and other sensitive pixels was minimized for all
images.
Calculating the Heights of Tapes
After converting original grayscale image to binary image,
the binary image is divided to equal height tapes. As has
been described, the height of the tapes has a major effect
on the elimination of the error of yarn body. As a starting
point for the determination of the tape height, the image
of the thickest yarn (65 Tex) was considered. In a 300 dpi
image of this yarn, the mean of the yarn diameter is 8 pix-
F G N+=
µj fi j, M⁄
i 1=
M
∑= i 1 2 3 … M and j 1 2 3 … H, , , ,=, , , ,=
fi j,
gi j,
fi j, if µj T≥
0 if µj T<


=
i 1 2 3 … M j 1 2 3 … H, , , ,=, , , ,=
ni j,
fi j, if µj T<
0 if µj T≥


=
i 1 2 3 … M j 1 2 3 … H, , , ,=, , , ,=
gi j, ni j,
190 Textile Research Journal 76(3)TRJTRJ
els. If the maximum angle of slope of the yarn from the
vertical direction is assumed to be α°, the maximum devia-
tion from the vertical direction will be x. In this situation,
the acceptable height of the tape l can be calculated by
equation (5).
(5)
We found that the maximum slope for threads in the
board, was less than 5°. For the mean of yarn diameter x =
8 pixels, the height of tapes is approximately 100 pixels
(equation (5)).
To develop this calculation for other yarn counts N
(Tex), the relation between the yarn count and the yarn
diameter is given in equation (6).
(6)
where d0 is the yarn diameter of 65 Tex, and N0 is the yarn
count of 65 Tex.
For equal angles, the relation between different devia-
tions and tapes heights can be evaluated from equation (5).
(7)
From equations (6) and (7):
(8)
Then
(9)
The optimum heights of tapes l for various counts of
yarn on standard boards can be calculated by equation (9),
where the tape height of N0 = 65 tex yarn was l = 100 pix-
els. Table 1 shows the optimum tape heights for various
yarn counts.
Figure 1 A sample for elimination
of yarn body from yarn board. (a)
original image; (b) image of divided
tapes; (c) image of faults of one
tape; (d) consequent image from
processed tapes.
l
x
tgα
--------=
d
d0
----- N
N0
------=
x
x0
----
d
d0
-----
l
l0
---= =
l
l0
---
N
N0
------=
l 12.4 N=
Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 191 TRJ
Detection of Yarn Body
By using the values of Table 1, each image is divided into
uniform tapes of known height and we then need to calcu-
late a suitable threshold for detection of the yarn body in
each tape.
A simple method is used to determine the optimum
threshold according to the graph of the sorted mean vector
of the columns of tapes. The sorted mean vector is a vector
that is obtained from sorting of mean of columns values for
whole tapes in ascending order. According to our experi-
ments, for all of the mean vectors, the curve of the graph
has a point at which the graph changes its direction from
ascending to descending. Our experiments showed that if
we drew a line which connected the end point of the curve
and cross through this point, then the integral of this line
and the curve of the graph were approximately equal. As
shown in Figure 2, most of the white and black values of 1
and 0 respectively could be classified using this point of the
curve.
As shown in Figure 2, line “cb” is crossed from point
“a” and point “b” (the end point of the curve). The area
between line “cb” and the horizontal axis is the nominal
integration of the line from point “c” to point “b”, where
the area between the curve and the horizontal axis is the
integral of the curve from the zero point to point “b”. The
greater the equality between the integrated values of the
curve and line “cb” the better is the estimation of the men-
tioned point (equation (10)). The height of point “a” is the
desired threshold for yarn body elimination, Th.
(10)
In equation (10) µi is the ith value of the sorted mean
vector of tape columns and ml is the length of the sorted
mean vector. From equation (10) the intensity value of
point “c”, h could be calculated. Therefore, the equation of
line “cb” is shown by equation (11):
(11)
In the nominal method, point “a” is located where the
difference between the vector of line “cb” and the sorted
mean vector (curve) is a minimum.
Table 1 Suitable Tape and block size for body elimination of threads and classification of faults in images of standard
boards.
Category
Region of yarn count
(Tex)
Yarn count of board
(Tex)
Tape height
(pixels)
Block size
(pPixels)
I
II
III
IV
V
VI
4–8
8–12
12–16
16–25
25–50
50–590
8
12
16
20
50
65
35
40
50
60
90
100
16 × 16
20 × 20
25 × 25
30 × 30
45 × 45
50 × 50
Figure 2 A typical sorted vector of
means of intensity value of image
columns and threshold of body
elimination (ASTM Category VI,
Grade D).
h 1+( )X 2⁄ µi
i 1=
m
∑= i 1…ml=
y
1 h–
x
------------
 
  x h+=
192 Textile Research Journal 76(3)TRJTRJ
The mean value for each column of a tape is calculated.
Each column that has a mean value which is less than the
threshold value is replaced by zero intensity. The other col-
umns are not changed. In consequence, the images of the
bodies of the threads are replaced by the background,
which is black; therefore the result is the faults image (N)
which is calculated by subtraction of the bodies image from
the original image (Figure 1c).
Elimination of Background from Faults Image
After replacing the columns of yarn body with columns of
zero pixels (black pixels), both the yarn body and back-
ground columns are columns of black pixels in the faults
image. It is necessary to eliminate these columns from the
faults image before fault classification. Most of the large
faults are separated on two sides of the yarn by black pixels
that are replaced instead of the yarn body. Therefore, it is
necessary to merge the two parts of the fault together by
eliminating the black columns. For this purpose, a simple
procedure with a small value of threshold of column means
is used to remove the black columns from the faults image
(Figure 1d). In each tape of the faults image, the means of
the columns are compared with a small defined threshold
value. The columns with means that are less than the
threshold are black columns and are removed from the
tape in the faults image.
Finally, the tapes of image are attached together in a
horizontal row according to their order in the original
image. The reason for doing this is the variation among the
lengths of the tapes after removing the black columns. The
consequent matrix is a long matrix with the width of the
tape height and length of the total remaining columns of
tapes (Figure 1e).
Counting and Classification of Faults
In the present study, a method similar to box counting in
image processing was used to classify the faults from its
matrix [14]. Both the size and adherence of the fault are
the main parameters for its recognition and classification.
The size of the fault is defined by the mean of the intensity
values of the pixels in each block of the matrix and its
adherence is estimated by the deviation of the intensity val-
ues of the pixels in a block.
In the classification process, the matrix of faults should
be divided into blocks of estimated size. The ideal classifi-
cation would be obtained when each individual fault is
located in one block. However, as the faults sizes are dif-
ferent and the image of the faults has to be divided into
blocks of equal size, the ideal classification is impossible.
The best possible classification with this method was
obtained by considering the best block size for each image
that could be estimated from the deviation of the means of
blocks in the image. If the block size is too large, different
faults are included in same block. Furthermore, if the
block size is too small, a large fault may be divided into
more than one block. In both cases, the deviation of means
of blocks is very small. Such block sizes cause poor classifi-
cation of the faults. Therefore a suitable block size is
defined as a block size that provides the maximum devia-
tion of means of blocks (point “m” in Figure 3). The results
of using this procedure for images of standard boards are
shown in Table 1.
After the determination of a suitable block size, the
faults matrix is divided into blocks of equal size. For each
block, the mean and deviation of the intensity values of the
pixels are calculated. Then the means and deviations are
sorted in two separate vectors in ascending order. Figure 4
shows a typical graph of a sorted vector of block mean
intensities. The sorted vector of intensity deviations of the
blocks could be also shown in the same manner as Figure 4.
The point of inflection for each curve of the sorted vec-
tor, is selected as a classification threshold (Tf); thus there
are two thresholds for a fault matrix [4]. One of them is the
threshold of means of blocks (Tfm) and the other is the
threshold of deviations (Tfv). “Tfm” classifies the blocks
according to fault size and “Tfv” classifies them based on
the distribution of faults.
The blocks of the fault matrix are classified in four defi-
nition classes by a decision tree algorithm based on the cal-
culated thresholds for the means and deviation of pixel
blocks using the following conditions:
Class 1: .
Figure 3 A typical graph of variation of block means for
various block size (ASTM Category VI, Grade D).
µbi 1.2Tfm≥
Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 193 TRJ
Class 2: .
Class 3: .
Class 4: Any other blocks which are not classified in
above classes.
In above conditions, µb and νb are the mean and devia-
tion of the ith block, respectively. Only a 20% increase in
the means of the blocks causes a block to be classified in
class 1. In class 2, two conditions are compared for classify-
ing entangled faults. In this class, there is a tight condition
for the mean of blocks but there is a wide region for devia-
tion of blocks. Class 3 is similar to class 2 for mean thresh-
old but the deviation threshold classifies spread faults in
this class. The small faults are classified in class 4.
After the classification of the fault blocks to the above
classes, the numbers of blocks classified in each class are
counted and shown as N1, N2, N3 and N4 for classes 1, 2, 3
and 4, respectively. Then fault factor of each class is calcu-
lated by equations (12)–(15). The faults factors of PFF,
PHF, PLF and PNF shows the percentage of faults of
classes 1, 2, 3 and 4, respectively.
(12)
(13)
(14)
(15)
In these equations, K × K is block size; M and N are
length and width of original image before body elimina-
tion, respectively.
Grading of Yarn Appearance Based on Fault
Factors
It is necessary to describe criteria for the index of yarn
appearance. The index of yarn appearance is assigned to
the grade of appearance by fuzzy conditions.
In this research, a linear criterion is used for the estima-
tion of grading criteria similar to constrained fuzzy criteria
[15]. The index of the degree for yarn appearance ID could
be calculated by equation (16), for fault factors vector P
and weight of faults W, the following linear criteria can be
presented:
(16)
In this equation, W is a 1 by 4 vector of weights of the
faults and P is a 4 by 1 vector of fault factors that can be
shown as equation (17).
(17)
Results and Discussion
Faults factors were calculated from standard images after
elimination of body and background. The thresholds val-
ues for the classification of fault blocks and the calculated
faults factors for images of standard boards are shown in
Table 2.
In the classification process, if a large fault is located
between two tapes of image, it might be classified in the
wrong class. In the case of small faults, the probability of
classifying a block in the wrong class is not noticeable,
because these faults are classified in same class even after
dividing into parts. However, for large faults it is important
to consider the probability of wrong classification. In the
worst situation, for thinnest yarn (4 tex), the threshold is
about 0.3 (Tables 1 and 2), the block size is 16 pixels by 16
pixels and tape height is 35 pixels. As shown in Figure 5,
the length of a large fault is more than 5 pixels and it is
located between two blocks. In this case, the fault will be
classified in the wrong class. In the case of a fault with
Figure 4 A typical graph of sorted vector of blocks means
intensities (ASTM Category VI, Grade D).
Tfm µbi 1.2Tfm & vbi Tfv≤≤≤
Tfm µbi 1.2Tfm & vbi Tfv≥≤≤
PFF
N1 K K××
M N×
--------------------------- 100×=
PHF
N2 K K××
M N×
--------------------------- 100×=
PLF
N3 K K××
M N×
--------------------------- 100×=
PNF
N4 K K××
M N×
--------------------------- 100×=
ID W.P=
P
PFF
PHF
PLF
PNF
=
194 Textile Research Journal 76(3)TRJTRJ
length of 5 pixels, the probability of positioning this fault
between two blocks is 2 × (5 – 1)/(48 – (5 – 1))= 0.19. From
Table 2, the maximum factor of faults of class 1 and 2 is
0.19%, so the probability of wrongly classifying large faults
is 19% × 0.19% = 0.036. Thus the probability for the thick-
est yarn is about 2.5% and so the error of wrongly classify-
ing of large faults is acceptable.
Images of standard boards are used for the estimation
of the fault weights (W vector). We defined a numerical
range from 0 to 100 for regions of apparent grades as pre-
sented in Table 3. It is possible to define any other range
for the region of apparent grades, but we used this kind of
region to present a scale similar to the percentage values.
There is an indicator value for each grade region. A grade
region is defined on the basis of the frequency of faults in
standard images. In grade A for the best quality, there are
many small faults, so the starting value is selected as 20
instead of zero. Other regions are defined with equal
ranges. As shown in Table 3, the indicator values for grades
Table 2 Threshold values for classification of fault blocks and calculated factors for images of standard boards.
Category Grade Tfm Tfv PFF PHF PLF PNF
I
A
B
C
D
0.32
0.31
0.28
0.29
0.16
0.15
0.16
0.16
0.01
0.19
0.03
0.12
0
0
0
0
0.91
3.16
1.37
3.46
25.94
39.49
48.12
58.28
II
A
B
C
D
0.35
0.40
0.30
0.32
0.18
0.19
0.16
0.17
0
0
0.11
0.12
0
0
0
0
1.01
1.46
1.26
2.03
50.44
56.39
43.1
39.25
III
A
B
C
D
0.25
0.26
0.30
0.29
0.13
0.13
0.17
0.18
0.01
0.11
0.77
1.86
0
0
0
0
1.26
1.61
10.49
8.24
31.03
34.75
29.8
29.4
IV
A
B
C
D
0.24
0.20
0.20
0.20
0.11
0.14
0.14
0.15
0.02
2.75
5.07
7.54
0
0.11
2.18
7.32
1.07
6.25
5.36
0
23.53
14.26
10.57
6.41
V
A
B
C
D
0.37
0.21
0.16
0.16
0.20
0.15
0.12
0.13
5.72
6.03
18.26
15.19
0
13.45
0
14.06
11.81
5.16
13.65
1.64
36.78
22.51
7.26
8.38
VI
A
B
C
D
0.18
0.25
0.20
0.19
0.13
0.15
0.15
0.15
2.96
6.06
14.4
17.3
4.74
0
12.31
17.43
10.54
14.4
3.66
0
23.17
24.88
14.71
10.35
Figure 5 Various states of a 5 pixel fault which is located
between two blocks for the thinnest yarn.
Table 3 Region of grades indexes and indicator values of
standard boards.
Grade of
appearance
Indicator value ID
Region of apparent
grade
A 25 Less & 20–40
B 50 40–60
C 70 60–80
D 90 80–100 & above
Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 195 TRJ
B, C and D are the middle values of the related regions. In
grade A, the indicator value is selected near to the starting
value for the tighter condition of this grade.
To obtain the best fault weights, the initial weights are
selected for different categories by the trial-and-error
method. Then the initial weights are introduced to a Per-
ceptron artificial neural network (Figure 6). For each cate-
gory, there is an independent neural network with its
category weights and grade indicator value. The networks
are Perceptron neural nets with two layers [16]. The pri-
mary layer has four nodes as input and the secondary layer
is a fuzzy layer with one fuzzy node. The secondary layer is
a nominal node during training procedure of network, but
for grading usage, this node is converted to a fuzzy node
with grading condition (Table 3).
The neural nets are trained using the initial weights and
indicator values with 10 000 epochs and a training rate of
0.1. Calculated weights and minimum error of training for
each category are shown in Table 4.
As shown in Table 4, weights of faults seem to be
dependent on the yarn count region in the different cate-
gories. The difference between the weight of large faults
W1 and others for thin yarns seems more than thick yarns.
These weights are confirmed by related faults classes based
on their shape and configuration. This is a good reason for
confidence in the presented grading method.
In category I, the weight of class 1 of faults W1 is more
important among weights. Therefore, for this category
Figure 6 Perceptron artificial neural network with a fuzzy
layer.
Table 4 Fault weights which are calculated from image of standard boards by neural nets and minimum error of training for
neural nets.
Category Grade W1 W2 W3 W4
Grade index by
modified weight
factor from ANN
SSE Minimum error
I
A
B
C
D
29.999 1.999 1.999 1.199
33.221
59.363
61.334
80.393
322.649 18.666
II
A
B
C
D
249.99 24.99 24.99 0.241
37.397
50.077
69.375
90.190
154.117 12.711
III
A
B
C
D
24.891 1.891 1.891 1.041
34.934
41.957
70.024
92.485
169.539 14.654
IV
A
B
C
D
6.377 5.077 2.877 0.977
26.195
50.008
69.147
91.509
4.432 1.923
V
A
B
C
D
3.697 2.397 0.167 0.027
24.112
56.002
69.983
90.359
36.942 3.995
VI
A
B
C
D
4.136 0.939 0.789 0.189
29.389
41.128
76.785
89.876
144.028 11.282
196 Textile Research Journal 76(3)TRJTRJ
large faults have more effect on the grading of the appar-
ent quality of the yarn. This situation is seen for categories
II and III too. Therefore, it appears that the effect of large
and medium faults is similar for these categories, so all of
the tightened faults are classified in class 1 of faults.
In categories IV and V, the weights of tangled faults are
important. In these categories, both PFF and PHF have
effects on yarn appearance. The effect of spread faults is less
than tangled faults, but the difference between these faults
andh tangled faults is less than in the previous categories.
In category VI, which is related to thick yarns, small and
spread faults have more effect on yarn appearance in com-
parison with the previous categories, although the weight
of these faults is less than that of tangled faults.
The results show that the estimated weights for whole
categories are confirmed by the nature of the faults. Fur-
thermore, the minimum errors of training for neural nets
are acceptable (Table 4). Consequently this method of
grading can be used for grading of every type of yarn inde-
pendent of the raw material and the spinning process. In
spite of this, it is possible to subdivide the grade of appear-
ance of the yarn from four grades of ASTM to more
detailed grades as suggested in Table 5.
Conclusion
In this research, we attempted to develop a computer
vision method for detecting and classifying of yarn faults. A
new method has been presented for the grading of yarn
appearance based on standard images by using neural nets
to define the linear classifiers for each category of yarn
count. In this method, the grading of yarn appearance is
based on computer vision and analyzing the images of yarn
wound on a board. The maximum error of the training for
neural nets is not very great and so it is possible to use cal-
culated weights in linear classification criteria for each cat-
egory of yarn count. This method is similar to human vision
and its experimental conditions are based on the ASTM
standard method. The results showed that this method can
be used for classification of apparent faults of various yarn
counts and grading them in different classes.
The presented method is independent of the nature of
the faults and it performs on the basis of their apparent
parameters such as entanglement and size of faults. There-
fore it should be possible to develop this method for the
grading of other types of yarn such as worsted, woolen, fila-
ment, high bulk and textured yarns.
Literature Cited
1. Mahli, R. S., and Batra, H. S., Standard Method for Grading
Cotton Yarns for Appearance, Annual Book of ASTM Stand-
ard , Part-24, Section D 2255, 343–348 (1972).
2. Cybulska, M., Assessing Yarn Structure with Image Analysis
Method, Textile Res. J. 69(5), 369–373 (1999).
3. Neval, A., Lawson, J., Gordon, J., Kendall, W., and Bonneau,
D., System for Electronically Grading Yarn, U.S. Patent
No.5541734 (1994).
4. Neval, A., Lawson, J., Gordon, J., Kendall, W., and Bonneau,
D., System and Method for Evaluation Predicted Fabric Qual-
ities, U.S. Patent No.6130746 (1994).
5. Nevel, A., Avser, F., and Rosales, L., Graphic Yarn Grader,
Textile Asia 27(2), 81–83 (1996).
6. Rong, G. H., and Slater, K., Analysis of Yarn Unevenness by
Using a Digital Signal Processing Technique, J. Textile Inst.
86(4), 590–599 (1995).
7. Rong, G. H., Slater, K., and Fei, R., The Use of Cluster Anal-
ysis for Grading Textile Yarns, J. Textile Inst. 85(3), 389–396
(1995).
8. Morris, W. J., and Roberts, A. S., Some Causes of Variation in
False Twist Bulked Yarns, J. Textile Inst. 57, 217–229 (1966).
9. Zhu, R., and Ethridge, M. D., Prediction Hairiness for Ring
and Rotor Spun Yarns and Analyzing the Impact of Fiber
Properties, Textile Res. J. 67(9), 694–698 (1997).
10. Booth, J. E., “Principles of Textile Testing,” Third Edition,
Butterworths, London, 1974.
11. Grosberg, P., and Iype, C., “Yarn Production,” The Textile
Institute, Manchester, UK, 1999.
12. Howell, H. G., Mieszkis, K. W., and Tabor, D., “Friction in
Textiles,” The Textile Institute, Manchester, UK, 1959.
13. Strack, L., “Image Processing and Data Analysis,” Cambridge
University Press, Cambridge, UK, 1998.
14. Fukunaga, K., “Statistical Pattern Recognition,” Second Edi-
tion, Academic Press, West Lafayette, IN, 1990.
15. Zimmermann, H. J., “Fuzzy Set Theory,” Third Edition, Klu-
wer Academic Publishers, Massachusetts, 1996.
16. Fausett, L., “Fundamentals of Neural Networks,” Prentice
Hall International, NJ, 1994.
Table 5 Suggested grades for grading of yarns based on
appearance.
Grade of yarn appearance
based on ASTM grading
Developed
grades
Region of index
of degree
A
A+
A
A–
0–20
20–30
30–40
B
B+
B
40–50
50–60
C
C+
C
60–70
70–80
D
D+
D
D–
80–90
90–100
Above 100
View publication statsView publication stats

More Related Content

What's hot

Electronic Yarn Clearers – A Systematic Approach
Electronic Yarn Clearers – A Systematic ApproachElectronic Yarn Clearers – A Systematic Approach
Electronic Yarn Clearers – A Systematic ApproachSunil Kumar Sharma
 
Fiber configuration at different stages of spinning department
Fiber configuration at different stages of spinning departmentFiber configuration at different stages of spinning department
Fiber configuration at different stages of spinning departmentsandeepsharma1099
 
3D Woven Profile Structure
3D Woven Profile Structure3D Woven Profile Structure
3D Woven Profile StructureAshutosh Shukla
 
Effect of-flexural-rigidity-in-textile-97
Effect of-flexural-rigidity-in-textile-97Effect of-flexural-rigidity-in-textile-97
Effect of-flexural-rigidity-in-textile-97Mehrab Rashed
 
Cotton Yarn Quality Depends on Mixing Strategy
Cotton Yarn Quality Depends on Mixing StrategyCotton Yarn Quality Depends on Mixing Strategy
Cotton Yarn Quality Depends on Mixing StrategySunil Kumar Sharma
 
Study On Various Fiber Properties
Study On Various Fiber PropertiesStudy On Various Fiber Properties
Study On Various Fiber PropertiesMd Rakibul Hassan
 
A review on study of composite materials in presence of cracks
A review on study of composite materials in presence of cracksA review on study of composite materials in presence of cracks
A review on study of composite materials in presence of crackseSAT Journals
 
Textile testing and quality control
Textile testing and quality controlTextile testing and quality control
Textile testing and quality controlFuad Ahmed
 
Yarn unevenness and its empact on quality
Yarn unevenness and its empact on qualityYarn unevenness and its empact on quality
Yarn unevenness and its empact on qualityArNesto WaHid
 
Comparison between capacitive and photoelectric yarn measuring heads
Comparison between capacitive and photoelectric yarn measuring headsComparison between capacitive and photoelectric yarn measuring heads
Comparison between capacitive and photoelectric yarn measuring headsSohail AD
 
3D Fabric & Its Application in Clothing
3D Fabric & Its Application in Clothing3D Fabric & Its Application in Clothing
3D Fabric & Its Application in ClothingAshutosh Shukla
 
Guidelines for selection of yarn
Guidelines for selection of yarnGuidelines for selection of yarn
Guidelines for selection of yarnRavikeerthi Rao
 
The relevancy of textile physics in practically
The relevancy of textile physics in practically The relevancy of textile physics in practically
The relevancy of textile physics in practically Mahbubay Rabbani Mim
 

What's hot (20)

Yarn Hairiness
Yarn HairinessYarn Hairiness
Yarn Hairiness
 
Electronic Yarn Clearers – A Systematic Approach
Electronic Yarn Clearers – A Systematic ApproachElectronic Yarn Clearers – A Systematic Approach
Electronic Yarn Clearers – A Systematic Approach
 
Fiber configuration at different stages of spinning department
Fiber configuration at different stages of spinning departmentFiber configuration at different stages of spinning department
Fiber configuration at different stages of spinning department
 
3D Woven Profile Structure
3D Woven Profile Structure3D Woven Profile Structure
3D Woven Profile Structure
 
Effect of-flexural-rigidity-in-textile-97
Effect of-flexural-rigidity-in-textile-97Effect of-flexural-rigidity-in-textile-97
Effect of-flexural-rigidity-in-textile-97
 
Cotton Yarn Quality Depends on Mixing Strategy
Cotton Yarn Quality Depends on Mixing StrategyCotton Yarn Quality Depends on Mixing Strategy
Cotton Yarn Quality Depends on Mixing Strategy
 
Study On Various Fiber Properties
Study On Various Fiber PropertiesStudy On Various Fiber Properties
Study On Various Fiber Properties
 
A review on study of composite materials in presence of cracks
A review on study of composite materials in presence of cracksA review on study of composite materials in presence of cracks
A review on study of composite materials in presence of cracks
 
Fiber test
Fiber testFiber test
Fiber test
 
Textile testing and quality control
Textile testing and quality controlTextile testing and quality control
Textile testing and quality control
 
Yarn unevenness and its empact on quality
Yarn unevenness and its empact on qualityYarn unevenness and its empact on quality
Yarn unevenness and its empact on quality
 
Comparison between capacitive and photoelectric yarn measuring heads
Comparison between capacitive and photoelectric yarn measuring headsComparison between capacitive and photoelectric yarn measuring heads
Comparison between capacitive and photoelectric yarn measuring heads
 
paper
paperpaper
paper
 
Hairiness of-yarns
Hairiness of-yarnsHairiness of-yarns
Hairiness of-yarns
 
3D Fabric & Its Application in Clothing
3D Fabric & Its Application in Clothing3D Fabric & Its Application in Clothing
3D Fabric & Its Application in Clothing
 
Yarn evenness_AyBee Marwat
Yarn evenness_AyBee MarwatYarn evenness_AyBee Marwat
Yarn evenness_AyBee Marwat
 
Guidelines for selection of yarn
Guidelines for selection of yarnGuidelines for selection of yarn
Guidelines for selection of yarn
 
Test for Yarn Dr.Ash
Test for Yarn Dr.AshTest for Yarn Dr.Ash
Test for Yarn Dr.Ash
 
3D Fabric
3D Fabric3D Fabric
3D Fabric
 
The relevancy of textile physics in practically
The relevancy of textile physics in practically The relevancy of textile physics in practically
The relevancy of textile physics in practically
 

Similar to Grading Yarn Appearance Using Image Analysis

International conference textiles and fashion
International conference textiles and fashionInternational conference textiles and fashion
International conference textiles and fashionVijay Prakash
 
Effect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabricEffect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabriceSAT Publishing House
 
Effect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabricEffect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabriceSAT Journals
 
Importance, Effect & Testing of Yarn Evenness
Importance, Effect & Testing of Yarn EvennessImportance, Effect & Testing of Yarn Evenness
Importance, Effect & Testing of Yarn EvennessAmirul Eahsan
 
Variation in linear density of combed yarn due to
Variation in linear density of combed yarn due toVariation in linear density of combed yarn due to
Variation in linear density of combed yarn due toeSAT Publishing House
 
Variation in linear density of combed yarn due to dyeing with reactive dye in...
Variation in linear density of combed yarn due to dyeing with reactive dye in...Variation in linear density of combed yarn due to dyeing with reactive dye in...
Variation in linear density of combed yarn due to dyeing with reactive dye in...eSAT Journals
 
Chemical_Science_Review_and_Letters_Char.pdf
Chemical_Science_Review_and_Letters_Char.pdfChemical_Science_Review_and_Letters_Char.pdf
Chemical_Science_Review_and_Letters_Char.pdf3665
 
Journal of Engineered Fibers and Fabrics
Journal of Engineered Fibers and FabricsJournal of Engineered Fibers and Fabrics
Journal of Engineered Fibers and FabricsPARESHPD1977
 
Influence of Gas Yarn Singeing On Viscose Spun Yarn Characteristics
Influence of Gas Yarn Singeing On Viscose Spun Yarn CharacteristicsInfluence of Gas Yarn Singeing On Viscose Spun Yarn Characteristics
Influence of Gas Yarn Singeing On Viscose Spun Yarn Characteristicsiosrjce
 
Micro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using Fea
Micro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using FeaMicro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using Fea
Micro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using Featheijes
 
Experimental investigations of milling on fiber composites
Experimental investigations of milling on fiber compositesExperimental investigations of milling on fiber composites
Experimental investigations of milling on fiber compositesIRJET Journal
 

Similar to Grading Yarn Appearance Using Image Analysis (20)

International conference textiles and fashion
International conference textiles and fashionInternational conference textiles and fashion
International conference textiles and fashion
 
Yarn pacxking density
Yarn pacxking densityYarn pacxking density
Yarn pacxking density
 
Fr3510071011
Fr3510071011Fr3510071011
Fr3510071011
 
Effect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabricEffect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabric
 
Effect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabricEffect of count and stitch length on spirality of single jersey knit fabric
Effect of count and stitch length on spirality of single jersey knit fabric
 
NewDev.Part-I.pdf
NewDev.Part-I.pdfNewDev.Part-I.pdf
NewDev.Part-I.pdf
 
Importance, Effect & Testing of Yarn Evenness
Importance, Effect & Testing of Yarn EvennessImportance, Effect & Testing of Yarn Evenness
Importance, Effect & Testing of Yarn Evenness
 
Variation in linear density of combed yarn due to
Variation in linear density of combed yarn due toVariation in linear density of combed yarn due to
Variation in linear density of combed yarn due to
 
Variation in linear density of combed yarn due to dyeing with reactive dye in...
Variation in linear density of combed yarn due to dyeing with reactive dye in...Variation in linear density of combed yarn due to dyeing with reactive dye in...
Variation in linear density of combed yarn due to dyeing with reactive dye in...
 
Drawing and texturising
Drawing and texturising Drawing and texturising
Drawing and texturising
 
Chemical_Science_Review_and_Letters_Char.pdf
Chemical_Science_Review_and_Letters_Char.pdfChemical_Science_Review_and_Letters_Char.pdf
Chemical_Science_Review_and_Letters_Char.pdf
 
A04460107
A04460107A04460107
A04460107
 
Journal of Engineered Fibers and Fabrics
Journal of Engineered Fibers and FabricsJournal of Engineered Fibers and Fabrics
Journal of Engineered Fibers and Fabrics
 
Types of seam
Types of seamTypes of seam
Types of seam
 
Evaluation of physico mechanical properties of 1×1 interlock cotton knitted f...
Evaluation of physico mechanical properties of 1×1 interlock cotton knitted f...Evaluation of physico mechanical properties of 1×1 interlock cotton knitted f...
Evaluation of physico mechanical properties of 1×1 interlock cotton knitted f...
 
Influence of Gas Yarn Singeing On Viscose Spun Yarn Characteristics
Influence of Gas Yarn Singeing On Viscose Spun Yarn CharacteristicsInfluence of Gas Yarn Singeing On Viscose Spun Yarn Characteristics
Influence of Gas Yarn Singeing On Viscose Spun Yarn Characteristics
 
Effect of stitch length on physical and mechanical properties of single jerse...
Effect of stitch length on physical and mechanical properties of single jerse...Effect of stitch length on physical and mechanical properties of single jerse...
Effect of stitch length on physical and mechanical properties of single jerse...
 
Sewing
SewingSewing
Sewing
 
Micro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using Fea
Micro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using FeaMicro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using Fea
Micro Mechanical Modeling of Fiber / Epoxy Unidirectional Laminates Using Fea
 
Experimental investigations of milling on fiber composites
Experimental investigations of milling on fiber compositesExperimental investigations of milling on fiber composites
Experimental investigations of milling on fiber composites
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Grading Yarn Appearance Using Image Analysis

  • 1. See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/258196156 Grading of Yarn Appearance Using Image Analysis and an Artificial Intelligence Technique Article in Textile Research Journal · March 2006 DOI: 10.1177/0040517506056868 CITATIONS 12 READS 30 5 authors, including: Some of the authors of this publication are also working on these related projects: Evaluating Piezoelectric Performance of PVDF Composite Nanofibers Pressure Sensor with Metal Nanoparticle View project Functional Fibrous Materials View project Dariush Semnani Isfahan University of Technology 84 PUBLICATIONS 292 CITATIONS SEE PROFILE Masoud Latifi Amirkabir University of Technology 153 PUBLICATIONS 696 CITATIONS SEE PROFILE Mohammad Amani Tehran Amirkabir University of Technology 81 PUBLICATIONS 384 CITATIONS SEE PROFILE Ali Akbar Merati Amirkabir University of Technology 59 PUBLICATIONS 334 CITATIONS SEE PROFILE All content following this page was uploaded by Masoud Latifi on 30 May 2016. The user has requested enhancement of the downloaded file. All in-text references underlined in blue are added to the original document and are linked to publications on ResearchGate, letting you access and read them immediately.
  • 2. Textile Research Journal Article Textile Research Journal Vol 76(3): 187–196 DOI: 10.1177/0040517506056868 www.trj.sagepub.com © 2006 SAGE Publications Figures 2–4 appear in color online: http://trj.sagepub.com Grading of Yarn Appearance Using Image Analysis and an Artificial Intelligence Technique Dariush Semnani1 , Masoud Latifi, Mohammad Amani Tehran Textile Department, Amirkabir University of Technology, Hafez Avenue, Tehran, Iran Behnam Pourdeyhimi College of Textiles, North Carolina State University, Raleigh, North Carolina, 29695, USA Ali Akbar Merati Faculty of Engineering, Gifu University, Yanagido, 1-1, Gifu, Japan Section D2255 of ASTM presents a standard method for grading of short staple spun yarns [1]. In this method, the inspection is based on direct observation in which a skilled specialist compares the wound table with standard images of six categories of yarn count. In each category, there are four images that are labeled A, B, C and D. The image labeled by letter A represents the best quality and the others are pro- gressively lower quality. In the standard method, a specialist judges the quality of the yarn samples according to the standard definition. Therefore this method of inspection is dependent on human vision. Furthermore, there are two limitations, one of them is error of human vision in which the results of evaluations by various persons are different, and the other is the inade- quacy of this method for other types of yarn [1]. Recently, attempts have been made to replace the direct observation method of ASTM with computer vision to resolve the limitation of human vision. In most of these studies, the image of a single yarn was considered to spec- ify the fault features of the yarn. In the method developed by Cybulska, the edge of yarn body was estimated from the image of a thread of yarn and the thickness and hairiness of the sample yarn was measured [2]. Other studies were based on the classification of events along a thread of yarn and measuring the percentage of the different classes of events [3–7]. In all above-mentioned methods, although it was possible to define a classification for yarn appearance based on unevenness a classification of faults and grading of yarn sample based on standard images was found to be impossible. Furthermore, there are many similar methods for meas- uring the parameters of fabric and individual types of yarn such as false twist bulked yarns and blended staple yarns [8, 9], but a general method for classification of various types of yarn faults based on standard parameters and grading them has not been presented yet.1 The objective of this research was to extend the limits of previous methods, to provide an inspection method suita- ble for every type of yarn using image processing and to design a classifier for any category of yarn counts. Our technique can be defined as a general method of yarn appearance grading. Abstract In this research, a new method is used for grading of yarn appearance based on yarn images of ASTM standard (section D 2255), by using an image processing technique and an artifi- cial intelligence technique. In this method, grad- ing of yarn appearance is based on computer vision and analyzing the images of standard picto- rial boards of yarn. Therefore this method is very similar to human vision. The logic of the classifi- cation by ASTM is considered and then a new def- inition for classification of yarn appearance grade is presented. In this method of classification, the grading procedure is not dependent on yarn struc- ture and raw materials. Thus it is possible to use this method for grading of any type of yarn based on apparent features. 1 Corresponding author: tel.: +98 21 6641 9527; fax: +98 21 6640 0245; e-mail: dariush_ semnani@hotmail.com
  • 3. 188 Textile Research Journal 76(3)TRJTRJ Methodology and Experiments Definition of Apparent Features of Yarn Based on Various Kinds of Fault The appearance quality of yarn is directly related to the configuration of fibers on its surface and a greater uneven- ness in the yarn surface implies poorer apparent quality. There are four categories for faults of yarn surface in sec- tion D 2255 of ASTM [1]. In this standard, the yarn grade is based on fuzziness, nepness, unevenness and visible for- eign matter. In almost all definitions of yarn appearance features, the grading method is based on the surface con- figuration of the yarn [1, 10–12]. Regarding the standard definition, yarn faults that have an effect on its appearance are classified in following cate- gories. Nep with thickness of less than three times of yarn diameter. Nep with thickness of more than three times of yarn diameter. Foreign trash. Entangled fibers with a thickness of less than three times the yarn diameter such as a small bunch, slug, or slub. Entangled fibers with thickness of more than three times of yarn diameter such as large bunch, slug, or slub. Unevenness in the coating of the yarn surface or poor covering of the yarn with excessive fuzziness. Untangled fiber ends that protrude from the surface of a yarn. These fibers are named fuzz. The fuzz should not be confused with the cover of yarn with excessive fuzziness. It is possible to define these categories to form classes of apparent faults of yarn. Class 1: Large and entangled faults which are tightened fibers with uniform configuration. This class of faults includes thick neps, trash and extended entangled fibers such as bunches, slugs or slubs. The thickness of these faults is approximately more than three times the yarn diameter. Class 2: Large faults with less area in comparison with first category (Class I). In this class, small neps, foreign trash and slug or bunches of fibers are classified. The thick- ness of these faults is approximately less than three times the yarn diameter. Class 3: Non uniform and extended faults with spread configuration. This class includes free fibers on the yarn surface that are defined as fuzz. In addition various coating fibers, some long and with non uniform configuration may belong in this class. Class 4: Small spread faults such as non-uniform coat- ing fibers and short tangled hairs. Although the total area of these faults is noticeable, it is not very effective on yarn appearance, because the area of these faults is generally small and in different sections of the yarn image. This method of classification is dependent on the shape and configuration of those faults that are not located in an area of the yarn body; in which the type of fault can be rec- ognized from its shape. Therefore, the definition is con- firmed by previous classification logic. The most important merit of this kind of classification is its applicability for different types of yarn, independent from raw material, and the method of spinning such as woollen, worsted, buckled, filament and different short sta- ple yarns. Measuring Methods We first summarize the method and then describe the vari- ous steps in greater detail. The photographs of standard yarn boards of four grades were scanned using a scanner. The images were then converted to binary form using a defined threshold. The binary image consists of the yarn body, the background and the faults. We only need the image of faults, and so we need to detect and eliminate the yarn body and background. In the original images, the threads of yarn were not completely in the vertical direc- tion. This was a major obstacle to the elimination of the yarn body in one stage. Therefore it was necessary to divide the original image into narrow tapes. The bodies of threads could then be eliminated from the binary images. In the scanned images of the yarn boards, which were divided into uniform tapes, there were some columns of pixels without the image of yarn body and faults; this is called the image of background. To obtain the images of faults, these columns were also eliminated using a small threshold from the image of the yarn board. After elimi- nating the yarn body and background columns, the remain- ing image of the tapes were connected to each other end by end in a longitudinal order. The resulting long, narrow tape is called the fault image. The fault image of each grade was divided into uniform blocks. For each image, the blocks were classified according to newly defined fault classes based on area and configuration of faults. Each block of fault image was classified on the basis of the num- ber and adherence of fault pixels in it. The classified blocks were counted and four fault factors were calculated from the counted blocks. For each category of yarn count, the calculated fault factors and index of yarn degree were pre- sented to an artificial neural network. After training of each neural network, a grading criterion was calculated. Elimination of Yarn Body from Picture of Yarn Board The scanned images were 152 mm by 254 mm in size, reso- lution of 300 dpi and gray-scale level of 256. The gray-scale image was converted to binary form by a calculated thresh- old.
  • 4. Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 189 TRJ A matrix of faults of each image is first calculated by subtracting the matrix of the yarn body from the total image. This method is the reverse of an image restoration method in which the faults image is subtracted from the original image [14]. In our view, the matrix of the original image is the sum of the matrix of the yarn body and that of the faults and can be shown as equation (1). (1) where F is the matrix of the original image, G is the matrix of the yarn body and N is the matrix of the fault image. If the image of the yarn body is available, matrix N could be deter- mined by subtracting matrix G from matrix F (N = F – G). In the yarn boards, each image is composed of M rows and H columns. The mean of intensity in each column of board image can be calculated. According to the binary form of the image, the mean of intensity for each column is: (2) where , is an element of matrix F located in ith raw and jth column of the image. After calculation of vector µ it is possible to recognize the bodies of the yarn threads by estimating the threshold between the yarn body and other parts of the image. If the threshold of the mentioned areas is assumed to be T, the following separating function can be used to elimi- nate the body of yarn threads. (3) (4) where and are elements of the matrices G and N located in the ith row and jth column. After separating matrices G and N from the original matrix F, all elements of the matrix G are replaced by zero. By this procedure the body of yarn is replaced by the back- ground of the image which is black. This procedure is described by the equation N = F – G. In the actual pictures, the threads of yarn are not com- pletely in the vertical direction and usually there is a small angle between the threads and the vertical direction (Fig- ure 1a). This causes a notable error in the calculation of the mean vector along the threads, especially, near the edges of the threads. If the angles were uniform it might be possible to use the contour tracing method for determining of threads edges [13], but because of the variation among the angles of the different threads it is necessary to look for a new method to reduce the mentioned error. For this purpose we divided the original image into hor- izontal tapes of equal heights (Figure 1b). If α is the angle of the threads with the vertical direction and L is the length of the thread, the maximum deviation of the thread direc- tion from the vertical line will be L tan α. When the length of threads is reduced to l (height of tape), the deviation is reduced to l/L. A suitable height for the tapes is deter- mined from the yarn count. After completing the body elimination for all of the tapes (Figure 1c), the resulting images of the tapes are reassembled into one image in their original order. At this stage of the process, the size of the obtained image is the same as the original image. Generating a BINARY image To convert the primary image into a binary image, a suita- ble threshold T should be calculated. By doing a suitable conversion with the correct threshold, the probability of missing the edge of the threads will be reduced. This should also reduce the effect of lighting error during the photographing of the boards. The correct threshold should be determined using the configuration of the image histogram. By analyzing the image histogram of different boards, we found that there are two peaks of intensity in each histogram, which are close to the mean value of the image matrix. This is because of the nature of our original images, which have white parts of yarn body image and black parts of back- ground. There are few pixels in the region between the mentioned peaks. The height of the first peak is greater than that of the second peak. Therefore, a suitable thresh- old point is located between the mean value and first peak. In practice, we found that a suitable threshold is T = µt – σt where µt and σt are the mean and standard deviation of the image matrix, respectively. By using this threshold, the loss of hairs and other sensitive pixels was minimized for all images. Calculating the Heights of Tapes After converting original grayscale image to binary image, the binary image is divided to equal height tapes. As has been described, the height of the tapes has a major effect on the elimination of the error of yarn body. As a starting point for the determination of the tape height, the image of the thickest yarn (65 Tex) was considered. In a 300 dpi image of this yarn, the mean of the yarn diameter is 8 pix- F G N+= µj fi j, M⁄ i 1= M ∑= i 1 2 3 … M and j 1 2 3 … H, , , ,=, , , ,= fi j, gi j, fi j, if µj T≥ 0 if µj T<   = i 1 2 3 … M j 1 2 3 … H, , , ,=, , , ,= ni j, fi j, if µj T< 0 if µj T≥   = i 1 2 3 … M j 1 2 3 … H, , , ,=, , , ,= gi j, ni j,
  • 5. 190 Textile Research Journal 76(3)TRJTRJ els. If the maximum angle of slope of the yarn from the vertical direction is assumed to be α°, the maximum devia- tion from the vertical direction will be x. In this situation, the acceptable height of the tape l can be calculated by equation (5). (5) We found that the maximum slope for threads in the board, was less than 5°. For the mean of yarn diameter x = 8 pixels, the height of tapes is approximately 100 pixels (equation (5)). To develop this calculation for other yarn counts N (Tex), the relation between the yarn count and the yarn diameter is given in equation (6). (6) where d0 is the yarn diameter of 65 Tex, and N0 is the yarn count of 65 Tex. For equal angles, the relation between different devia- tions and tapes heights can be evaluated from equation (5). (7) From equations (6) and (7): (8) Then (9) The optimum heights of tapes l for various counts of yarn on standard boards can be calculated by equation (9), where the tape height of N0 = 65 tex yarn was l = 100 pix- els. Table 1 shows the optimum tape heights for various yarn counts. Figure 1 A sample for elimination of yarn body from yarn board. (a) original image; (b) image of divided tapes; (c) image of faults of one tape; (d) consequent image from processed tapes. l x tgα --------= d d0 ----- N N0 ------= x x0 ---- d d0 ----- l l0 ---= = l l0 --- N N0 ------= l 12.4 N=
  • 6. Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 191 TRJ Detection of Yarn Body By using the values of Table 1, each image is divided into uniform tapes of known height and we then need to calcu- late a suitable threshold for detection of the yarn body in each tape. A simple method is used to determine the optimum threshold according to the graph of the sorted mean vector of the columns of tapes. The sorted mean vector is a vector that is obtained from sorting of mean of columns values for whole tapes in ascending order. According to our experi- ments, for all of the mean vectors, the curve of the graph has a point at which the graph changes its direction from ascending to descending. Our experiments showed that if we drew a line which connected the end point of the curve and cross through this point, then the integral of this line and the curve of the graph were approximately equal. As shown in Figure 2, most of the white and black values of 1 and 0 respectively could be classified using this point of the curve. As shown in Figure 2, line “cb” is crossed from point “a” and point “b” (the end point of the curve). The area between line “cb” and the horizontal axis is the nominal integration of the line from point “c” to point “b”, where the area between the curve and the horizontal axis is the integral of the curve from the zero point to point “b”. The greater the equality between the integrated values of the curve and line “cb” the better is the estimation of the men- tioned point (equation (10)). The height of point “a” is the desired threshold for yarn body elimination, Th. (10) In equation (10) µi is the ith value of the sorted mean vector of tape columns and ml is the length of the sorted mean vector. From equation (10) the intensity value of point “c”, h could be calculated. Therefore, the equation of line “cb” is shown by equation (11): (11) In the nominal method, point “a” is located where the difference between the vector of line “cb” and the sorted mean vector (curve) is a minimum. Table 1 Suitable Tape and block size for body elimination of threads and classification of faults in images of standard boards. Category Region of yarn count (Tex) Yarn count of board (Tex) Tape height (pixels) Block size (pPixels) I II III IV V VI 4–8 8–12 12–16 16–25 25–50 50–590 8 12 16 20 50 65 35 40 50 60 90 100 16 × 16 20 × 20 25 × 25 30 × 30 45 × 45 50 × 50 Figure 2 A typical sorted vector of means of intensity value of image columns and threshold of body elimination (ASTM Category VI, Grade D). h 1+( )X 2⁄ µi i 1= m ∑= i 1…ml= y 1 h– x ------------     x h+=
  • 7. 192 Textile Research Journal 76(3)TRJTRJ The mean value for each column of a tape is calculated. Each column that has a mean value which is less than the threshold value is replaced by zero intensity. The other col- umns are not changed. In consequence, the images of the bodies of the threads are replaced by the background, which is black; therefore the result is the faults image (N) which is calculated by subtraction of the bodies image from the original image (Figure 1c). Elimination of Background from Faults Image After replacing the columns of yarn body with columns of zero pixels (black pixels), both the yarn body and back- ground columns are columns of black pixels in the faults image. It is necessary to eliminate these columns from the faults image before fault classification. Most of the large faults are separated on two sides of the yarn by black pixels that are replaced instead of the yarn body. Therefore, it is necessary to merge the two parts of the fault together by eliminating the black columns. For this purpose, a simple procedure with a small value of threshold of column means is used to remove the black columns from the faults image (Figure 1d). In each tape of the faults image, the means of the columns are compared with a small defined threshold value. The columns with means that are less than the threshold are black columns and are removed from the tape in the faults image. Finally, the tapes of image are attached together in a horizontal row according to their order in the original image. The reason for doing this is the variation among the lengths of the tapes after removing the black columns. The consequent matrix is a long matrix with the width of the tape height and length of the total remaining columns of tapes (Figure 1e). Counting and Classification of Faults In the present study, a method similar to box counting in image processing was used to classify the faults from its matrix [14]. Both the size and adherence of the fault are the main parameters for its recognition and classification. The size of the fault is defined by the mean of the intensity values of the pixels in each block of the matrix and its adherence is estimated by the deviation of the intensity val- ues of the pixels in a block. In the classification process, the matrix of faults should be divided into blocks of estimated size. The ideal classifi- cation would be obtained when each individual fault is located in one block. However, as the faults sizes are dif- ferent and the image of the faults has to be divided into blocks of equal size, the ideal classification is impossible. The best possible classification with this method was obtained by considering the best block size for each image that could be estimated from the deviation of the means of blocks in the image. If the block size is too large, different faults are included in same block. Furthermore, if the block size is too small, a large fault may be divided into more than one block. In both cases, the deviation of means of blocks is very small. Such block sizes cause poor classifi- cation of the faults. Therefore a suitable block size is defined as a block size that provides the maximum devia- tion of means of blocks (point “m” in Figure 3). The results of using this procedure for images of standard boards are shown in Table 1. After the determination of a suitable block size, the faults matrix is divided into blocks of equal size. For each block, the mean and deviation of the intensity values of the pixels are calculated. Then the means and deviations are sorted in two separate vectors in ascending order. Figure 4 shows a typical graph of a sorted vector of block mean intensities. The sorted vector of intensity deviations of the blocks could be also shown in the same manner as Figure 4. The point of inflection for each curve of the sorted vec- tor, is selected as a classification threshold (Tf); thus there are two thresholds for a fault matrix [4]. One of them is the threshold of means of blocks (Tfm) and the other is the threshold of deviations (Tfv). “Tfm” classifies the blocks according to fault size and “Tfv” classifies them based on the distribution of faults. The blocks of the fault matrix are classified in four defi- nition classes by a decision tree algorithm based on the cal- culated thresholds for the means and deviation of pixel blocks using the following conditions: Class 1: . Figure 3 A typical graph of variation of block means for various block size (ASTM Category VI, Grade D). µbi 1.2Tfm≥
  • 8. Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 193 TRJ Class 2: . Class 3: . Class 4: Any other blocks which are not classified in above classes. In above conditions, µb and νb are the mean and devia- tion of the ith block, respectively. Only a 20% increase in the means of the blocks causes a block to be classified in class 1. In class 2, two conditions are compared for classify- ing entangled faults. In this class, there is a tight condition for the mean of blocks but there is a wide region for devia- tion of blocks. Class 3 is similar to class 2 for mean thresh- old but the deviation threshold classifies spread faults in this class. The small faults are classified in class 4. After the classification of the fault blocks to the above classes, the numbers of blocks classified in each class are counted and shown as N1, N2, N3 and N4 for classes 1, 2, 3 and 4, respectively. Then fault factor of each class is calcu- lated by equations (12)–(15). The faults factors of PFF, PHF, PLF and PNF shows the percentage of faults of classes 1, 2, 3 and 4, respectively. (12) (13) (14) (15) In these equations, K × K is block size; M and N are length and width of original image before body elimina- tion, respectively. Grading of Yarn Appearance Based on Fault Factors It is necessary to describe criteria for the index of yarn appearance. The index of yarn appearance is assigned to the grade of appearance by fuzzy conditions. In this research, a linear criterion is used for the estima- tion of grading criteria similar to constrained fuzzy criteria [15]. The index of the degree for yarn appearance ID could be calculated by equation (16), for fault factors vector P and weight of faults W, the following linear criteria can be presented: (16) In this equation, W is a 1 by 4 vector of weights of the faults and P is a 4 by 1 vector of fault factors that can be shown as equation (17). (17) Results and Discussion Faults factors were calculated from standard images after elimination of body and background. The thresholds val- ues for the classification of fault blocks and the calculated faults factors for images of standard boards are shown in Table 2. In the classification process, if a large fault is located between two tapes of image, it might be classified in the wrong class. In the case of small faults, the probability of classifying a block in the wrong class is not noticeable, because these faults are classified in same class even after dividing into parts. However, for large faults it is important to consider the probability of wrong classification. In the worst situation, for thinnest yarn (4 tex), the threshold is about 0.3 (Tables 1 and 2), the block size is 16 pixels by 16 pixels and tape height is 35 pixels. As shown in Figure 5, the length of a large fault is more than 5 pixels and it is located between two blocks. In this case, the fault will be classified in the wrong class. In the case of a fault with Figure 4 A typical graph of sorted vector of blocks means intensities (ASTM Category VI, Grade D). Tfm µbi 1.2Tfm & vbi Tfv≤≤≤ Tfm µbi 1.2Tfm & vbi Tfv≥≤≤ PFF N1 K K×× M N× --------------------------- 100×= PHF N2 K K×× M N× --------------------------- 100×= PLF N3 K K×× M N× --------------------------- 100×= PNF N4 K K×× M N× --------------------------- 100×= ID W.P= P PFF PHF PLF PNF =
  • 9. 194 Textile Research Journal 76(3)TRJTRJ length of 5 pixels, the probability of positioning this fault between two blocks is 2 × (5 – 1)/(48 – (5 – 1))= 0.19. From Table 2, the maximum factor of faults of class 1 and 2 is 0.19%, so the probability of wrongly classifying large faults is 19% × 0.19% = 0.036. Thus the probability for the thick- est yarn is about 2.5% and so the error of wrongly classify- ing of large faults is acceptable. Images of standard boards are used for the estimation of the fault weights (W vector). We defined a numerical range from 0 to 100 for regions of apparent grades as pre- sented in Table 3. It is possible to define any other range for the region of apparent grades, but we used this kind of region to present a scale similar to the percentage values. There is an indicator value for each grade region. A grade region is defined on the basis of the frequency of faults in standard images. In grade A for the best quality, there are many small faults, so the starting value is selected as 20 instead of zero. Other regions are defined with equal ranges. As shown in Table 3, the indicator values for grades Table 2 Threshold values for classification of fault blocks and calculated factors for images of standard boards. Category Grade Tfm Tfv PFF PHF PLF PNF I A B C D 0.32 0.31 0.28 0.29 0.16 0.15 0.16 0.16 0.01 0.19 0.03 0.12 0 0 0 0 0.91 3.16 1.37 3.46 25.94 39.49 48.12 58.28 II A B C D 0.35 0.40 0.30 0.32 0.18 0.19 0.16 0.17 0 0 0.11 0.12 0 0 0 0 1.01 1.46 1.26 2.03 50.44 56.39 43.1 39.25 III A B C D 0.25 0.26 0.30 0.29 0.13 0.13 0.17 0.18 0.01 0.11 0.77 1.86 0 0 0 0 1.26 1.61 10.49 8.24 31.03 34.75 29.8 29.4 IV A B C D 0.24 0.20 0.20 0.20 0.11 0.14 0.14 0.15 0.02 2.75 5.07 7.54 0 0.11 2.18 7.32 1.07 6.25 5.36 0 23.53 14.26 10.57 6.41 V A B C D 0.37 0.21 0.16 0.16 0.20 0.15 0.12 0.13 5.72 6.03 18.26 15.19 0 13.45 0 14.06 11.81 5.16 13.65 1.64 36.78 22.51 7.26 8.38 VI A B C D 0.18 0.25 0.20 0.19 0.13 0.15 0.15 0.15 2.96 6.06 14.4 17.3 4.74 0 12.31 17.43 10.54 14.4 3.66 0 23.17 24.88 14.71 10.35 Figure 5 Various states of a 5 pixel fault which is located between two blocks for the thinnest yarn. Table 3 Region of grades indexes and indicator values of standard boards. Grade of appearance Indicator value ID Region of apparent grade A 25 Less & 20–40 B 50 40–60 C 70 60–80 D 90 80–100 & above
  • 10. Grading of Yarn Appearance Using Image Analysis and Artificial Intelligence Technique D. Semnani et al. 195 TRJ B, C and D are the middle values of the related regions. In grade A, the indicator value is selected near to the starting value for the tighter condition of this grade. To obtain the best fault weights, the initial weights are selected for different categories by the trial-and-error method. Then the initial weights are introduced to a Per- ceptron artificial neural network (Figure 6). For each cate- gory, there is an independent neural network with its category weights and grade indicator value. The networks are Perceptron neural nets with two layers [16]. The pri- mary layer has four nodes as input and the secondary layer is a fuzzy layer with one fuzzy node. The secondary layer is a nominal node during training procedure of network, but for grading usage, this node is converted to a fuzzy node with grading condition (Table 3). The neural nets are trained using the initial weights and indicator values with 10 000 epochs and a training rate of 0.1. Calculated weights and minimum error of training for each category are shown in Table 4. As shown in Table 4, weights of faults seem to be dependent on the yarn count region in the different cate- gories. The difference between the weight of large faults W1 and others for thin yarns seems more than thick yarns. These weights are confirmed by related faults classes based on their shape and configuration. This is a good reason for confidence in the presented grading method. In category I, the weight of class 1 of faults W1 is more important among weights. Therefore, for this category Figure 6 Perceptron artificial neural network with a fuzzy layer. Table 4 Fault weights which are calculated from image of standard boards by neural nets and minimum error of training for neural nets. Category Grade W1 W2 W3 W4 Grade index by modified weight factor from ANN SSE Minimum error I A B C D 29.999 1.999 1.999 1.199 33.221 59.363 61.334 80.393 322.649 18.666 II A B C D 249.99 24.99 24.99 0.241 37.397 50.077 69.375 90.190 154.117 12.711 III A B C D 24.891 1.891 1.891 1.041 34.934 41.957 70.024 92.485 169.539 14.654 IV A B C D 6.377 5.077 2.877 0.977 26.195 50.008 69.147 91.509 4.432 1.923 V A B C D 3.697 2.397 0.167 0.027 24.112 56.002 69.983 90.359 36.942 3.995 VI A B C D 4.136 0.939 0.789 0.189 29.389 41.128 76.785 89.876 144.028 11.282
  • 11. 196 Textile Research Journal 76(3)TRJTRJ large faults have more effect on the grading of the appar- ent quality of the yarn. This situation is seen for categories II and III too. Therefore, it appears that the effect of large and medium faults is similar for these categories, so all of the tightened faults are classified in class 1 of faults. In categories IV and V, the weights of tangled faults are important. In these categories, both PFF and PHF have effects on yarn appearance. The effect of spread faults is less than tangled faults, but the difference between these faults andh tangled faults is less than in the previous categories. In category VI, which is related to thick yarns, small and spread faults have more effect on yarn appearance in com- parison with the previous categories, although the weight of these faults is less than that of tangled faults. The results show that the estimated weights for whole categories are confirmed by the nature of the faults. Fur- thermore, the minimum errors of training for neural nets are acceptable (Table 4). Consequently this method of grading can be used for grading of every type of yarn inde- pendent of the raw material and the spinning process. In spite of this, it is possible to subdivide the grade of appear- ance of the yarn from four grades of ASTM to more detailed grades as suggested in Table 5. Conclusion In this research, we attempted to develop a computer vision method for detecting and classifying of yarn faults. A new method has been presented for the grading of yarn appearance based on standard images by using neural nets to define the linear classifiers for each category of yarn count. In this method, the grading of yarn appearance is based on computer vision and analyzing the images of yarn wound on a board. The maximum error of the training for neural nets is not very great and so it is possible to use cal- culated weights in linear classification criteria for each cat- egory of yarn count. This method is similar to human vision and its experimental conditions are based on the ASTM standard method. The results showed that this method can be used for classification of apparent faults of various yarn counts and grading them in different classes. The presented method is independent of the nature of the faults and it performs on the basis of their apparent parameters such as entanglement and size of faults. There- fore it should be possible to develop this method for the grading of other types of yarn such as worsted, woolen, fila- ment, high bulk and textured yarns. Literature Cited 1. Mahli, R. S., and Batra, H. S., Standard Method for Grading Cotton Yarns for Appearance, Annual Book of ASTM Stand- ard , Part-24, Section D 2255, 343–348 (1972). 2. Cybulska, M., Assessing Yarn Structure with Image Analysis Method, Textile Res. J. 69(5), 369–373 (1999). 3. Neval, A., Lawson, J., Gordon, J., Kendall, W., and Bonneau, D., System for Electronically Grading Yarn, U.S. Patent No.5541734 (1994). 4. Neval, A., Lawson, J., Gordon, J., Kendall, W., and Bonneau, D., System and Method for Evaluation Predicted Fabric Qual- ities, U.S. Patent No.6130746 (1994). 5. Nevel, A., Avser, F., and Rosales, L., Graphic Yarn Grader, Textile Asia 27(2), 81–83 (1996). 6. Rong, G. H., and Slater, K., Analysis of Yarn Unevenness by Using a Digital Signal Processing Technique, J. Textile Inst. 86(4), 590–599 (1995). 7. Rong, G. H., Slater, K., and Fei, R., The Use of Cluster Anal- ysis for Grading Textile Yarns, J. Textile Inst. 85(3), 389–396 (1995). 8. Morris, W. J., and Roberts, A. S., Some Causes of Variation in False Twist Bulked Yarns, J. Textile Inst. 57, 217–229 (1966). 9. Zhu, R., and Ethridge, M. D., Prediction Hairiness for Ring and Rotor Spun Yarns and Analyzing the Impact of Fiber Properties, Textile Res. J. 67(9), 694–698 (1997). 10. Booth, J. E., “Principles of Textile Testing,” Third Edition, Butterworths, London, 1974. 11. Grosberg, P., and Iype, C., “Yarn Production,” The Textile Institute, Manchester, UK, 1999. 12. Howell, H. G., Mieszkis, K. W., and Tabor, D., “Friction in Textiles,” The Textile Institute, Manchester, UK, 1959. 13. Strack, L., “Image Processing and Data Analysis,” Cambridge University Press, Cambridge, UK, 1998. 14. Fukunaga, K., “Statistical Pattern Recognition,” Second Edi- tion, Academic Press, West Lafayette, IN, 1990. 15. Zimmermann, H. J., “Fuzzy Set Theory,” Third Edition, Klu- wer Academic Publishers, Massachusetts, 1996. 16. Fausett, L., “Fundamentals of Neural Networks,” Prentice Hall International, NJ, 1994. Table 5 Suggested grades for grading of yarns based on appearance. Grade of yarn appearance based on ASTM grading Developed grades Region of index of degree A A+ A A– 0–20 20–30 30–40 B B+ B 40–50 50–60 C C+ C 60–70 70–80 D D+ D D– 80–90 90–100 Above 100 View publication statsView publication stats