Documente Academic
Documente Profesional
Documente Cultură
Jun Xiang,
Measuring the Geometrical Parameters
Lei Wang,
Ning Zhang,
of Slub Yarn Using a Computer Vision Based
Jing-an Wang,
Ruru Pan,
Image Sequencing Technique
Weidong Gao*
DOI: 10.5604/01.3001.0013.0739
Jiangnan University, Abstract
Ministry of Education, This article presents a computer vision method for measuring the geometrical parameters
School of Textiles and Clothing, of slub yarn based on yarn sequence images captured from a moving slub yarn. An image
Key Laboratory of Eco-textiles, segmentation method proposed by our earlier work was applied to segment sequence slub
Wuxi, Jiangsu, China yarn images to obtain overlapping diameter data. Then an image stitching method was
* e-mail: gaowd3@163.com proposed to remove the overlapped data based on the normalised cross correlation (NCC)
method. In order to detect the geometrical parameters of slub yarn, the frequency histogram,
curve fitting , and spectrogram methods were adopted to analyse the sequence diameter data
obtained. Four kinds of slub yarn with different geometrical parameters were tested using
the method proposed and Uster method. The experimental results show that the detection
results for slub amplitude, slub length, slub distance, and slub period obtained using the
method proposed were consistent with the set values and Uster results.
Key words: slub yarn sequence image, geometrical parameter measurement, image seg-
mentation, image stitching.
Introduction with the voltage signals method [5, 7-9]. array is used to collect yarn profile or
This method acquires mass data of slub diameter data as the slub yarn moves
Slub yarn is a simple fancy yarn whose yarn using a capacitance-type sensor through the tester. And then an Oscillo-
appearance is gained by the variation of first. And then the data are expressed as scope and the threshold value are utilised
yarn linear density during the spinning voltage signals through a digital storage to transform the data into a voltage sig-
process [1]. It can be produced by mod- oscilloscope or data acquisition card nal. Although this method is not affected
ifying the ring spinning frame because (DAQ) etc. The Uster Tester is usually by the test humidity or fibre blend vari-
the intermittent acceleration of the roll- utilised in this method. However, using ation, it might be by the presence of lint
ers causes varying degrees of draft [2]. a capacitance-type sensor to obtain the and yarn hairiness.
This special appearance is determined by slub yarn diameter is an indirect meth-
the different geometrical parameters of od of detecting slub geometrical param- The second is the image analysis meth-
slub yarn, including slub amplitude, slub eters. The detection result of slub yarn od [6, 12], where the slub yarn is usual-
length, slub distance, and the periodici- shows a big difference from that with ly wrapped on a black board. And then
ty rule of the slub. These parameters can the traditional visual method. The result a camera, flat scanner, etc. is adopted to
make woven fabrics have special aesthet- of this indirect method also depends on capture the slub yarn image. Next image
ic properties [3, 4]. Therefore detecting the test environment conditions because segmentation methods, which consist of
the geometrical parameters of slub yarn the capacitors are usually affected by the threshold , Gabor Filter and morpho-
is extremely significant for designing the the temperature and humidity. The res- logical algorithm methods, are applied to
aesthetic properties of fabric [5]. olution of this method is relatively low, obtain the diameter data. Finally the data
where the capacitors sample data every are processed using the Histogram meth-
The traditional method for analysing the 8 mm (e.g. old versions of the Uster test- od, Cluster method, etc. However, a fast
geometrical parameters of slub-yarn is er) [10]. device for obtaining a slub yarn image
to count slubs in the yarn based on the continuously has not been presented thus
black boards, which demands special The Constant Tension Transport (CTT) far. And an accurate image processing
experience from workers. However, this Tester method [11] was developed by the method has also not beenproposed to de-
method cannot get enough length of slub Lawson and Hemphill Company. In the tect the geometrical parameters of slub
yarn to detect the geometrical parameters tester, a Charged Coupled Device (CCD) yarn from yarn sequence images.
because the slub has no repeat in a short
length [6]. The method is also very tedi-
ous and time-consuming. Table 1. Advantages and disadvantages of the methods for measuring the geometrical
parameters of slub yarn.
In recent years, many methods for Methods Advantages Disadvantages
measuring slub geometrical parame- Capacitance-type – Primitive and dominant method – Depends on the testing environment
sensor with voltage – Fast – Indirect method
ters automatically have been reported. signals method – Low resolution
The principles of measuring slub ge- CTT Tester method – Does not depend on testing – Affected by the presence of lint and
ometrical parameters can be classified environment yarn hairiness
– High resolution – Yarn under tension reduces the
into three main categories, which are diameter measured
summarised with their pros and cons in Image analysis method – Pixel-level resolution – No detection instrument is formed
Table 1. These methods are as follows: – Not affected by yarn hairiness
combining a capacitance-type sensor – More accurate
26 Li Z, Xiang J, Wang L, Zhang N, Wang J, Pan R, Gao W. Measuring the Geometrical Parameters of Slub Yarn Using a Computer Vision Based Image Sequencing Technique.
FIBRES & TEXTILES in Eastern Europe 2019; 27, 3(135): 26-35. DOI: 10.5604/01.3001.0013.0739
For slub period measurement, spectrograms produced by the FFT method are adopted. A
andom
rn by anslub yarn, BL
area-scan i is arranged
CCD randomly.
camera with a resolution of 1024 × 768 pixels. A closed imaging box is used
the yarn, and to stabilise the yarn tension.
the image acquisition platform to
SL
shield from the disturbanceSLof2 ambient light. Meanwhile
Figure 3 shows the integrated structure
a special
1 of this system.
sthe
themean
meanofofthe
thetemplate
templateandandf uf,vu ,that of f(x, y) in the region under the template. These
x 1
y 1
(3)
f ((uu, v
(3)
) x, v y)x 1 y 1 (3)TEST 2 image).0.5
u 1, 2,,, M H 1
(1)
1 1y
x1 y1 1 a5)-b5)Hgray-hairiness
u , v
W x 1 y 1 images (TEST 1 and v 1, 2,,, N N 1 (1)
M N 2 M N 2
f u ,v f (u x , v y ) (3) T ( x, y ) T f (u x, v y ) f u ,v
H W Here,
x 1 y if1 u-x < 0 or v-y < 0 then f(u-x, x 1 y 1 x 1 y 1
x<0ororv-y<0
<0 v-y<0then f(u-x,
then f(u-x, v-y)=0,
v-y)=0,andandf(0, 0)=TEST(1,1),1),f(0,
f(0,0)=TEST(1, f(0,1)=TEST(1,
1)=TEST(1,2),2),and andsosoon.on.
v-y) = 0,
Here, if u-x<0 and orf(0,0) = TEST(1,1),
v-y<0 then f(u-x,Step f(0,1)
v-y)=0, and f(0, 0)=TEST(1, 1), f(0, 1)=TEST(1, 2), and so on.
4: Image stitching. The normalised cross correlation (NCC) method[14-16] is applie
n f(u-x, v-y)=0,= TEST(1,
and f(0, 0)=TEST(1,2), and so1), on.f(0, 1)=TEST(1, Where, 2),Tand so on.
isEquation
the mean of the template and f u ,v that of f(x, y) in the region under the template. These
(1).
calculate as: position between the TEST 1 image and TEST 2 image in this paper. The N
can be definedstitch
FIBRES & TEXTILES in Eastern Europe 2019, Vol. 27, 3(135)the 29
Here, if u-x<0 or v-y<0 then f(u-x, v-y)=0, and f(0, 0)=TEST(1, 1), f(0, 1)=TEST(1, 2), and so on.
Geometrical parameter
analysis and discussion
M N
M N
TT (( xx,, yy)) TT ff
x 1y 1
u ,v
u ,v ff ((uu
xx,, vv
yy ))
1,
uu 2,,, M
1, 2,,, M H
H 11
((uu,, vv))
x 1y 1
(1)
MM NN 2 M N 0.5
2 0.5
1,
vv 2,,, N
1, 2,,, NN
N 11 (1) Explanation of terms
T ( x, y ) T
M N
2
T ( x , y ) T 2
f (u x , v y ) f
y 1
f (u x, v y ) f uu ,,vv Widthy of
Template W
Reference level
x 1
y 1 x 1
x 1
y 1 x 1
y 1
F2 function
sed
ed on
onthis
thisreference
referencelevel.
level.Using
Using
P2this
thisline,
line,the
theslub
slubpart
partcan
canbe
beseparated
separatedfrom
fromthe
theslub
slubyarn.
yarn.Thus
Thus
F2 function
ermination
terminationof
ofthe
thereference
referencelevel
levelisisvery
veryimportant
importantfor
forthe
theinspection
inspectionof
ofthe
thegeometrical
geometricalparameters
parameters
D1 D3 D D2
Slub yarn diameter
slub
slubyarn.
yarn.InInthis
thispaper,
paper,we
weuse
usethe
DD
theGaussian
Gaussiandistribution
distributionfunction
functionof
ofthe
theslub
slubyarn
yarndiameter
diameterdata
datatoto
D1 D3 2
Slub yarn diameter
Figure 8. Frequency histogram of
Distance, cm
slub yarn diameter data.
nfirm
nfirmthe
thereference
referencelevel
levelvalue
valueautomatically.
automatically.As
Aswe
weknow,
know,there
thereare
aremore
morethan
thantwo
twowave
wavecrests
crestsinin
Figure 8. Figure
Frequency histogram
8. Frequency of slubofyarn
histogram diameterFigure
slub yarn 2. Slub
data. 9. Smoothed Amplitude
diameter data signal.
diameter data. Figure 9.
efrequency
frequencyhistogram
histogramof
of slub
slubyarn
yarndiameter
diameterdata
data[6,
[6,10].
10].Take
TakeFigure
Figure asSmoothed
88as an diameter
anexample,
example,there data
are signal.
thereare
e In this paper, the slub amplitude (SA) is defined as:
30 FIBRES & TEXTILES in Eastern Europe 2019, Vol. 27, 3(135)
st
t two
twowave
wavecrests
crestsininthe
thefrequency 4. Slub Period
frequencyhistogram,
histogram, which
whichmeans
meansthis
thisslub
slubyarn
yarnhas
hasjust
justone
onetype
typeof
ofslub.
slub.
Di 1
slub amplitude (SA) is defined as: SAi 100% i
1, 2,..., N (
D1
of functions F1 and F2. After the function approximation and cross point calculation, the D1, D2, D3,
D1 and D2 are the diameter values of the first and second wave crest, respectively.
D, and SA values of the four kinds of slub yarn are listed, shown in Table 3.
amplitude.
D1 to represent the diameter of the base yarn part, and D2 to represent the diameter of
b)
om the frequency histogram,a)we can also find
3. Slub Lengthbetween
a valley (SL) andthe
Slub
firstDistance (SD)
wave crest
When
crest, which can be determined by fitting the the reference
histogram values. level is determined,
In order to determinethe slub part can be separated from the yarn. As shown in
Frequency
Frequency
Figure
el value, the Gaussian distribution functions (F1 and F2)ith
9, the of slub length
all the wave(SL are ith slub distance (SDi) can be calculated based on the
i) and
crests
reference
ssing point D3 (as shown in Figure 8) between level
D1 and D2from
can abesmoothed diameter
calculated. Finallydata signal.
D2 D3
D Slub Yarn Diameter Value/pixels (6) Slub Yarn Diameter Value/pixels
2
c) d)
F1 function
P1
Frequency
Frequency
P2
F2 function
D1 D3 D D2 4. Slub Period
Slub yarn diameter Slub Yarn Diameter Value/pixels Slub Yarn Diameter Value/pixels
The spectrogram is an ideal tool to check the repeat pattern of slubs. In order to obtain the slub
Figure 10.histogram
Figure 8. Frequency Frequencyofhistograms
slub yarnand Gaussian
diameter data.distribution functions of four kinds of slub yarn.
Figure 10. Frequency histograms and Gaussian distribution functions of four kinds of slub yarn.
period, the Fast Fourier Transform (FFT) is used to analyse the spectrogram base for 1D continuous
e
Slub amplitude slub yarn diameter data yarnindiameter
this paper. data in this paper.
Wavelengths (Wl) Wave- second
are calculated basedwave crest,
on the of the D3 rep-
respectively.
resolution
In this paper, the slub amplitude (SA) is lengths (W ) are calculated based on the resents the diameter
slub amplitude (SA) is defined as:
defined as:
Table 3. Five numerical resolution
l
of
results
the slub
ofimage,
yarn
four askinds in
of slub
point of
yarn.F1 andofF2.theAfter
functions
value crossing
the
slub yarn image, as in equation (8).
Equation (8). function approximation and cross point
Di 1
SAi Slub
D1 yarni
100% 1, 2,..., N (7) (7) N calculation, the D1, D2, D3, D, and SA
D1/pixels Wl D2/pixels i
D
N i [0,1,..., N
3/pixels
t ] (8) values D/pixels
of the four kinds of
(8) SA slub(%)
yarn are
Where, SAisample
represents the ith slub ampli- Nt t listed, shown in Table 3.
ith slub
represents thetude, andamplitude, and Di+1 value
Di+1 the diameter the diameter
of the value of theNti+1th
Where, is thewave total length of the 1D
i+1 th wave crest #1 in the frequency Where, 49
Nt is thecontinuous
histo- 97
total lengthslub
of theyarn
1D continuous
diameter data, 65 yarn
slub Δt diameter
It can be 81
data, Δt from
seen Table 3198
the resolution of the D1
that
gram.
uency histogram. D1the
D1 is is the diameter
diameter value
value of the
of the firstfirst the resolution
wave crest of the slub yarn image, and values of the four samples are #4<#3<#2
in the frequency
wave crest in the #2frequencythehistogram.
slub yarn45 If Δt
image, = Δt
and 5.21 μm62
=5.21μm in in
thisthis
paper.
paper. 55 & #1. Those 59 of #1 and #2 138 are simi-
lar, which is consistent with the actu-
re are just twothere
wavearecrests #3
justintwo
the wave crests
frequency in the
histogram, 29
fre-
there is only one type39 of slub 37 38 134
quency histogram, there is only one type Experimental results and discussion al base yarn count of the four samples:
of slub amplitude.#4 21 Frequency histogram 29 26 #4<#3<#2=#1. 28 In the Table, 138the reference
In order to determine the reference level line values D of the four samples deter-
3.2 Experimental results and discussion
Slub length (SL) and slub distance value D and slub amplitude SA, the fre- mined are 81, 59, 38, and 29 pixels. It
It can
(SD) be seen from the table above quency that
histogramsthe ofDfour1 values
kinds ofof slubthe canfouralso samples
be found thatare the #4<#3<#2
SA values of & #1.
When the reference level is determined, yarn are shown in Figure 10. In these fig- the four samples (198%, 138%, 134%,
the slub part can be separated from the ures, the Gaussian distribution functions 138%) are close to the set values (200%,
Those of #1
yarn. Asand
shown #2 in are similar,
Figure slub F1isand
9, the ith which F2 of each slub yarn are fitted 150%, 140%, 150%). Thus the method
consistent with the actual base yarn count of the four samples:
length (SLi) and ith slub distance (SDi) can based on the histograms. D1 and D2 rep- proposed can be applied to inspect the
be calculated based on the reference level resent the diameter values of the first and slub amplitude.
from a smoothed diameter data signal.
Table 3. Five numerical results of four kinds of slub yarn.
Slub period
The spectrogram is an ideal tool to check Slub yarn sample D1/pixels D2/pixels D3/pixels D/pixels SA, %
#1 49 97 65 81 198
the repeat pattern of slubs. In order to
#2 45 62 55 59 138
obtain the slub period, the Fast Fourier
#3 29 39 37 38 134
Transform (FFT) is used to analyse the
#4 21 29 26 28 138
spectrogram base for 1D continuous slub
d4). From these figures, we can see that the outliers in the blue dotted rectangles are almost (b) sample #2
(a) sample #1
oved or combined.
Diameter value,
Diameter value,
pixels
pixels
Distance, cm Distance, cm
Diameter value,
Diameter value,
pixels
pixels
Distance, cm Distance, cm
0 1 Signal
0 1 Signal
Distance, cm Distance, cm
0 1 Signal
0 1 Signal
Distance, cm Distance, cm
(b) sample#1
a) sample #2 (c)b)sample
sample#3
#2
(a) sample #1
Diameter value,
Diameter value,
pixels
pixels
Distance, cm Distance, cm
Diameter value,
Diameter value,
pixels
pixels
Distance, cm Distance, cm
0 1 Signal
0 1 Signal
Distance, cm Distance, cm
0 1 Signal
0 1 Signal
Distance, cm Distance, cm
c) sample #3 d) sample #4
(c) sample #3 (d) sample #4
Figure 11. Part diameter data of four samples: a1)-a4) Original sequence diameter data, b1)-b4) Smoothed diameter data, c1)-c4) Original
“0 and 1” data signals, d1)-d4) The processed “0Figure
and 1”11.
dataPart diameter data of four samples: a1)-a4) Original sequence diameter data, b1)-b4)
signals.
Smoothed diameter data, c1)-c4) Original ―0 and 1‖ data signals, d1)-d4) The processed ―0 and 1‖
Slub length and slub distance analysis ures 11.c1-11.c4, we can see that although duction [6]. Therefore if N1, i < 2 cm,
Since irregular variation of slub yarn di- the original data have been smoothed first, N0, i <2 cm, and N0, i +1 < 2 cm, the
ameter data exists, there are some burrs there are also some outliers, as shown in data in N1, i will be considered as the
and noises in the original sequence di- the dot blue rectangle. In order to obtain base yarn part and set as 0.
ameter data. These may cause some er- accurate results, the following steps are n Step 3: If N1, i > 2 cm, N0, i < 2 cm, and
rors when calculating the slub length and applied to process the “0 and 1” data sig- N0, i +1 < 2 cm, the data in N1, i and N1, i+1
slub distance using the reference level nals in Figures 11.c1-11.c4: will be combined together and set as 1.
value D. Therefore the diameter data n Step 1: Count the number of consec-
need to be smoothed first. A part of the utive 1 and 0 data from the “0 and Through the three steps above, the result-
original diameter data and the smoothed 1” data signal, and denote them as ant data of the four samples are shown
data of the four yarn samples are shown N1, i (representing the slub length se- in Figures 11.d1-11.d4. From these Fig-
in Figures 11.a1-11.a4 and 11.b1-11.b4. quence, i = 1,…, n) and N0, i (repre- ures, we can see that the outliers in the
After the diameter data is smoothed, the senting the slub distance sequence, dotted rectangles are almost removed or
smoothed data which is greater than the i = 1,…, n), as shown in Figure 11.c. combined.
reference level value D is set 1 and the n Step 2: The slub length and slub
other – set 0. The “0 and 1” data signals are distance will be not be shorter than When the processed “0 and 1” data sig-
shown in Figures 11.c1-11.c4.(d) sample #4
From Fig- 20 millimeters during the yarn pro- nals are obtained, the slub length and
othed diameter data, c1)-c4) Original ―0 and 1‖ data signals, d1)-d4) The processed ―0 and 1‖
distribution diagram of the four samples are constructed, shown in Figure 12.
counted. Then a slub length histogram, slub distance histogram and Slub Length-Slub Distance
distribution diagram of the four samples are constructed, shown in Figure 12.
distribution diagram of the four samples are constructed, shown in Figure 12.
Slub Distance/cm
Frequency
Frequency
(a) sample #1
(a) sample #1
Slub Length/cm Slub Length/cm Slub Length/cm
(a) sample #1
a) sample #1
(a) sample #1
a2) b2) c2)
Slub Distance/cm
Frequency
Frequency
(b) sample #2
Slub Length/cm Slub Length/cm Slub Length/cm
(b)b)sample
sample #2 #2
(b) sample #2
a3) b3) c3)
Slub Distance/cm
(b) sample #2
Frequency
Frequency
Slub Length/cm
(c) Slub
sample
Length/cm
#3 Slub Length/cm
c) sample #3
(c) sample #3
a4) b4)
(c) sample #3 c4)
Slub Distance/cm
Frequency
Frequency
(c) sample #3
d) sample #4
(d sample)
Figure 12. Detection results of four slub yarn samples: a1)-a4) #4
frequency histogram of slub length, b1)-b4) frequency histogram of slub
distance, c1)-c4) distribution diagram of slub length-slub distance.
(d sample) #4
Figureslub12.distance
Detection results of four slub yarn
can be counted. Then ure 10). Thus
samples:a1)-a4)
(d sample) #4 that the frequency
we can determine
histogram of slub length.
It can be seen from the table above that
Figurea slub length histogram, slub distance four samples have just one type of slub the slub length and slub distance meas-
12. Detection results of four slub yarn samples:a1)-a4) frequency histogram of slub length.
histogram and Slub Length-Slub Dis- length. The abscissa
b1)-b4) (d sample)value#4
of each crest ured are very close to the set values.
12.frequency
Figuretance Detection
distribution histogram
results
diagram of the of
offour slub
four slubdistance,
wave inyarn
c1)-c4) distribution
samples:a1)-a4)
Figures 12.a1-12.a4 is meas- frequency
This candiagram that of
the slub
histogram
prove length-slub
of slub
reference length.
level
samples are constructed, shown in Fig- ured as the slub length of each sample, as value we selected from the histogram
b1)-b4) frequency histogram of slub distance,
ure 12. c1)-c4) distribution diagram
is correct. From the of slub
Table, length-slub
we can also
Figure
distance.12. Detection results of four shown slub inyarn
Table samples:a1)-a4)
3. frequency histogram
find that sample of one
#1, which has slub length.
type
b1)-b4) frequency histogram
From Figures 12.a1-12.a4, we can find of slub distance, c1)-c4) distribution diagram of slub length-slub
of slub length and slub distance, is peri-
It can be seen from Figures 12.b1-12.b4
distance.
that although the slub length is dispersed odic slub yarn. The slub period of sam-
and Figures 12.c1-12.c4 that there are ple #1 is about 10 cm. For samples #2,
b1)-b4) frequency
in different intervals, histogram of slub
there is no obvious distance, c1)-c4) distribution diagram of slub length-slub
distance.
multimodal on these histograms. Further- one, three, six, and five dominant peaks. #3, and #4, they all have just one type
more the four samples all have two wave Thus the slub distance can be measured of slub length and different types of slub
crests in the frequency histogram of the using these peaks. The results measured distance. Thus the three samples are all
distance.
sequence diameter data (as shown in Fig- are also listed in Table 4. random slub yarn.
Amplitude
Amplitude