242
Habiba Halepoto1, 2, Tao Gong1, 2, Kashif Kaleem2
1 Donghua University, Engineering Research Center of Digitized Textile and Fashion Technology,
Shanghai 201620, China
2 Donghua University, College of Information Science and Technology, Shanghai 201620, China
Real-Time Quality Assessment of Neppy Mélange Yarn
Manufacturing Using Macropixel Analysis
Ocenjevanje kakovosti proizvodnje nopkaste melanžne preje
v realnem času z analizo makrotočk
Original Scientific Article/Izvirni znanstveni članek
Received/Prispelo 6-2019 • Accepted/Sprejeto 8-2019
Abstract
The aim of this paper is to provide a simple MATLAB-based model to determine the real-time homogenei-
ty of neppy mélange yarn fabrics. Currently, the mélange yarn industry relies solely on visual assessment
and experience. This algorithm, however, proposes a solution for the mélange yarn industry. The designed
algorithm presented in this paper, which is based on kernel density function and macropixel analysis, was
implemented for the real-time nep detection of neppy mélange yarns and calculated an inhomogeneity of
neps of around 91%. This strategy would be useful for the mélange yarn industry and can also be used in
other types of fashion yarns.
Keywords: computer vision, neppy yarn, macropixel analysis, real-time
Izvleček
V članku je predstavljen preprost model, zasnovan v programu MATLAB, za določitev homogenosti pletiv iz me-
lanžne preje v realnem času. Danes se v industriji pri izdelavi melanžne preje opirajo le na vizualne ocene in izkuš-
nje, zato je predlagani algoritem rešitev za industrijsko proizvodnjo melanžne preje. Zasnovani algoritem temelji
na oceni gostote jedra in analizi makrotočk za sprotno zaznavanje nopkov v melanžni preji. Izračunana nehomo-
genost efektne preje je bila približno 91-odstotna. Ta strategija je uporabna v proizvodnji melanžne preje in tudi
drugih tipov modnih prej.
Ključne besede: računalniški vid, nopkasta preja, analiza makrotočk, realni čas
1 Introduction a certain number of neps are introduced to achieve
unique aesthetics.
Blending different fibres yields different types of Textile image processing has gained a great deal of at-
fancy yarns [1]. There is still strong market poten- tention recently. To date, several researchers have fo-
tial for fancy yarns, which remain more eye-catch- cused on various aspects of textile image processing,
ing than conventional yarns [2]. Mélange yarns is including defect detection in woven fabrics [6−7],
one type of fancy yarn [3]. Mélange yarns come in a fabric weave pattern recognition and yarn colour rec-
wide variety of looks and colours [4]. This class of ognition [8−9]. To the best of our knowledge, howev-
yarns is produced by either mixing different col- er, none of the researchers have focused on textile
oured fibres in a blow room, or by mixing or blend- image processing for the mélange yarn industry.
ing in draw frames [5]. One of the major classes of Quality assurance and textile testing constitute one
these mélange yarn is neppy mélange yarn, in which of the central departments of any yarn spinning
Corresponding author/Korespondenčni avtor: Tekstilec, 2019, 62(4), 242-247
Tao Gong DOI: 10.14502/Tekstilec2019.62.242-247
E-mail:
[email protected]ORCID: 0000-0003-0248-9404
Real-Time Quality Assessment of Neppy Mélange Yarn 243
Manufacturing Using Macropixel Analysis
operation. Some quality tests, including yarn count, This dimensional distribution might be analysed in
evenness, tenacity, elongation at break, shade terms of regularity in a histogram (statistically), in
matching, variation and the visual appearance of parallel lines (structurally) with empiric prototypi-
finished goods, are performed before shipment in cal (model-based) and post-wavelet transformation
order to avoid the cancelation of orders. A couple of (transform-based) [12]. Haralick et al proposed a
decades ago, shade matching and variation were one grey-level co-occurrence matrix by generating a ma-
of the main reasons for the cancelation of orders. trix through clustering and correlating those clus-
Thus, in past decades, too much research was per- ters with their neighbouring clusters [10]. In the
formed on shade matching and minimising varia- grey-level co-occurrence matrix, the scale of scruti-
tion. As a result, various technologies have been de- ny is a critical step for ensuring all important infor-
veloped to avoid the rejections of orders. mation is present [13].
Despite a great deal of research regarding other In this paper, we have proposed a simple MATLAB-
quality parameters, less attention has been given to based algorithm to determine the homogeneity of
assessing the visual appearance of finished goods. neppy mélange yarn, which might be useful for the
Even today, neppy yarn texture recognition relies on textile mélange yarn industry for determining the
human skills and experience, and is thus performed textural effect, together with shade matching and
manually by visual inspection. The method of visual other quality parameters.
inspection is, of course, inadequate, laborious and
time-consuming, and leads to problems of subjec-
tive human factors, monotony and fatigue, physical 2 Experimental
and mental overload, and low efficiency. In order to 2.1 Materials
fully understand the aesthetics of mélange yarn, Xinjiang medium-grade cotton from the Wuxi No.
however, full image feature extraction or image seg- 1 cotton-spinning mill for routine production was
mentation is necessary to understand the different used for this study. Basic fibre and yarn properties
spatial/lattice positions and range/colour domain of are presented in Table 1.
a single element in an image (simply matching the
shade of yarn is insufficient). This might be under- Table 1: Basic properties of fibre and yarn
stood easily by two related features, i.e. tone and
texture, in terms of greyscale in which each pixel in Property Value
an image has its own intensity value [10]. In this pa- Fibre staple length 28.7 mm
per, tone is defined as the variation in the grey level
Fibre finenessa) 4.38 μg/inch
of an image, while texture is defined as the dimen-
sional distribution of tone as a cluster of pixel inten- Yarn count 295.25 dtexb)
sities that repeats itself in a specific region of an im-
Nep content 3%
age [11]. To date, the mélange yarn industry has
relied solely on spectrophotometry which, despite a) Micronaire value, b) 20 Ne
being very expensive, fails to determine the homo-
geneity or inhomogeneity of the yarn texture gener- 2.2 Methods
ated by neps in mélange yarn. We made a real-time video of the manufacturing of
Two images would have a similar greyscale tone his- neppy mélange yarn fabric using a digital camera
togram if both images have similar elements, but a (Canon EOS 6D S, 20.2 megapixels with pixel di-
different dimensional distribution due to the same mensions of 5472 × 3648 and pixel size of 6.54 μm).
number of pixels and pixel resolution from the same Simulations of all images and the analysis of the
elements. Thus, the tone level characterisation in it- continuous-level moving block algorithm were per-
self is insufficient to fully understand an image, as it formed using MATLAB v2017b (Mathworks, MA,
might only be good for analysing colour distribution. USA). The aim of this paper was to define real-time
Consequently, texture must also be considered to monitoring for final neppy yarn. Initially, we moni-
match the requirement of similar aesthetics and ap- tored and studied a real-time analysis of neppy mé-
pearance, which vary from fully disorganised to high- lange fabric during the manufacturing process (see,
ly systematic in terms of dimensional distribution. Figure 1). For the first time, we have proposed a
Tekstilec, 2019, 62(4), 242-247
244 Real-Time Quality Assessment of Neppy Mélange Yarn
Manufacturing Using Macropixel Analysis
strategy for the real-time monitoring of neps and dimensions I' × J', the total number of possible sublev-
the homogeneity thereof in neppy yarn fabrics by els of an image can be calculated using equation 2,
installing a digital camera adjacent to the produc- while the shift of sub-windows is illustrated in Figure 2.
tion line. In this study, the rotation speed of the sock
sampling machine was set at 80 rpm during the pro- TOTALsI'J' = [I – (I' – 1)] × [J – (J' – 1)] (2)
duction of single-jersey fabric from cotton yarn of
295.25 dtex (20 Ne).
Figure 2: Three examples of sub-windows, i.e. 2, 3
and 4 squared pixels
The standard deviation (SD)for each sublevel can be
determined using equation 3.
∑i'=1 ∑j'=1
I' J''
Figure 1: Test image of neppy mélange yarn fabric (TOTALS –s ) –
I'J'
SDSI'J' = (3)
PIXSI'J' –1
2.2.1 Kernel density function
Kernel density function is one of the most popular Consequently, the mean standard deviation (Sw) for
non-parametric density functions. The multivariate each sublevel can be determined using equation 4.
kernel density function, with the points xi, I = 1, 2, Their corresponding values are plotted in Figure 3.
3 … n, characterises the population and unknown
∑STDSI'J'
density functions f(x) [14−15] and which is mathe- SwI'J' = (4)
TOTALSI'J'
matically expressed as equation 1:
n x – xi
fˆ(x) = 1 d ∑ K
nh i=1 h (1),
where K is the kernel (a non-negative function) and
h is the bandwidth smoothing parameter, which is
greater than 0.
2.2.2 Macropixel analysis
Macropixel analysis scrutinises the self-information
contained in an image at different sublevels (mac-
ropixels) to generate a homogeneity curve using the
collective standard deviation of all sublevels [16]. Mac-
ropixel analysis works through the collaborative scan- Figure 3: Corresponding value of the mean standard
ning of discrete level tiling and the continuous-level deviation of all the sub-windows
moving block, which uses non-coinciding tiles and all
possible sublevels of an image, respectively. Moreover, Because the image size plays a vital role, the calcu-
it should be assumed that the elements that form an lated standard values should be comparable be-
image are indivisible and that images are binary, i.e. tween images. This comparison might be done us-
they only contain object values of either 0 or 1. ing the relative size of macropixels (r) in the image,
Consider the images shown in Figure 2: if, these im- which can be determined using equation 5:
ages have dimensions I × J which are divided into
r = I' J' (5).
sublevels SI'J' and each square is indivisible with the IJ
Tekstilec, 2019, 62(4), 242-247
Real-Time Quality Assessment of Neppy Mélange Yarn 245
Manufacturing Using Macropixel Analysis
3 Results and discussion This binary conversion of images would result in
3.1 Nep detection the better analysis of homogeneity in order to
We first obtained results from the application of an avoid the surficial and textural effects of the neppy
algorithm. This algorithm was applied to segmented mélange fabric.
images of the dataset of neppy mélange yarn fabric.
Segmentation was performed according to the pix- 3.2 Homogeneity analysis
els of images. The performance of the proposed Analysing the homogeneity of neppy mélange
method was tested. The kernel density estimation yarn fabric is very beneficial for this segment of
plots of neppy yarn fabric are illustrated in Figure 4. the textile industry in terms of discussing the ho-
This kernel function helped to determine the neps mogeneity parameter, together with other param-
in real-time during the manufacturing of neppy mé- eters to meet the relevant standards and avoid the
lange yarn fabric. cancelation of orders. Actual homogeneity, and
A total of 388 frames were analysed for the neppy modelled homogenous and inhomogeneous nep-
yarns, and their corresponding coloured images py mélange yarn fabric are illustrated in Figure 6a.
transformed into binary images, as shown in Figure 5. The matching sample was less homogenous and
a) b)
Figure 4: Kernel density estimation plots of neppy mélange yarn fabric: a) 3D view, b) top view
a) b)
Figure 5: Nep detection of neppy mélange yarn fabric (a); and neps detection using 388 frames (b) – original
frame from 388 frames
Tekstilec, 2019, 62(4), 242-247
246 Real-Time Quality Assessment of Neppy Mélange Yarn
Manufacturing Using Macropixel Analysis
a)
b) c)
Figure 6: Homogeneity analysis of neppy mélange yarn fabric (a), actual homogeneity and modelled homoge-
nous and inhomogeneous neppy mélange yarn fabric; (b) histogram of actual neppy mélange yarn fabric; and
(c) homogeneity curve showing a homogeneity of 9%
was thus more similar to the inhomogeneous sam- 4 Conclusion
ple. It is also useful to see the distribution of ho-
mogeneity, which is shown in the histogram of ac- In this study, a simple MATLAB-based model was
tual neppy mélange yarn fabric (see Figure 6b). In proposed for determining the real-time homogenei-
addition, a homogeneity curve showing a homo- ty of neppy mélange yarn fabrics. This might serve
geneity of neps over the fabric of 9% is presented as a helpful tool for quality assessment in the textile
in Figure 6c. mélange yarn industry with the aim of replacing the
Because homogeneity was only 9%, the curve of current inconsistent visual assessment based solely
neppy fabric is close to the inhomogeneous curve. on experience. The neps from neppy mélange yarn
The inhomogeneity of the image can be calculated fabric production were identified using kernel den-
using equation 6. This means that the fabric was sity algorithm. We determined that the inhomoge-
more inhomogeneous, i.e. 91%. This inhomogeneity neity determined using the MATLAB code was as
is desired for aesthetic functionality and for attract- high as 91%, which is, of course, impossible to de-
ing the observer’s attention to the design of neppy termine using only the bare eye. It is therefore very
mélange yarn. helpful for the textile industry and can also be used
in other different types of fashion yarns. This re-
IH = 100 – H% (%) (6) search may be expanded in several ways, i.e. by
Tekstilec, 2019, 62(4), 242-247
Real-Time Quality Assessment of Neppy Mélange Yarn 247
Manufacturing Using Macropixel Analysis
studying the effect of homogeneity on mechanical 8. KHAN, Babar, WANG, Zhijie, HAN, Fang, IQ-
properties using an image processing technique. BAL, Ather, MASOOD, Rana Javed. Fabric we-
The surficial effect of a fabric, which requires a 3D ave pattern and yarn color recognition and
model and thus pixel analysis in three dimensions, classification using a deep ELM network. Algo-
can also be analysed. Moreover, multi-coloured rithms, 2017, 10(4), 117−129, doi: 10.3390/
neps might also be analysed directly without con- a10040117.
verting them to greyscale. 9. KHAN, Babar, FANG, Han, WANG, Zhijie,
MASOOD, Rana J. Bio-inspired approach to in-
variant recognition and classification of fabric
References weave patterns and yarn color. Assembly Auto-
mation, 2016, 36(2), 152−158, doi: 10.1108/AA-
1. BEHERA, B. K., HARI, P. K., BANSAL, S., SIN- 11-2015-100.
GH, R. Effect of different blending methods and 10. HARALICK, Robert Martin, SHANMUGAM,
blending stages on properties of mélange yarn. K., DINSTEIN, Its’Hak. Textural features for
Indian Journal of Fibre and Textile Research, image classification. IEEE Transactions on Sy-
1997, 22, 84−88. stems, Man, and Cybernetics, 1973, SMC-3(6),
2. GONG, R. H., WRIGHT, R. M. Structures and 610−621, doi: 10.1109/TSMC.1973.4309314.
formation of fancy yarns. In Fancy yarns: their 11. BHARATI, Manish H., MACGREGOR, John F.
manufacture and application. Boca Raton, FL: Texture analysis of images using principal com-
CRC Press, Cambridge : Woodhead Publishing, ponent analysis. In SPIE/Photonics Conference
2002, pp. 33−59, doi: 10.1533/9781855737525. on Process Imaging for Automatic Control : pro-
33. ceedings. Boston : The International Society for
3. MOGHASSEM, Abdolrasool. Damaging of Optical Engineering, 2001, pp. 27−37, doi: 10.
dyed cotton fibers with direct dye in spinning 1117/12.417179.
processes and its effect on the properties of cot- 12. BHARATI, Manish H., LIU, Jay, MACGRE-
ton mélange yarn. International Journal of Engi- GOR, John F. Image texture analysis: methods
neering – Transactions B: Applications, 2007, and comparisons. Chemometrics & Intelligent
20(2), 203−210. Laboratory Systems, 2004, 72(1), 57−71, doi: 10.
4. KAN, Chi-Wai, WONG, Wai-Yin. Color pro- 1016/j.chemolab.2004.02.005.
perties of cellulase-treated cotton denim fabric 13. MISSIAEN, J. M., THOMAS, G. Homogeneity
manufactured by torque-free ring spun yarn. characterization of binary grain mixtures using
Textile Research Journal, 2011, 81(9), 875−882, a variance analysis of two-dimensional numeri-
doi: 10.1177/0040517510391699. cal fractions. Journal of Physics Condensed Mat-
5. GHAREHAGHAJI, Ali Akbar, TAVANAIE, H., ter, 1995, 7(15), 2937−2948, doi: 10.1088/0953-
KARIM, S. Study on the interactions between 8984/7/15/002.
mélange yarn properties and fiber damage. Ara- 14. FUKUNAGA, Keinosuke, HOSTETLER, Larry
bian Journal of Geosciences, 2011, 4(7−8), 1117− D. The estimation of the gradient of a density
1130. function, with applications in pattern recognition.
6. ZHANG, Kaibing, YAN, Yadi, LI, Pengfei, JING, IEEE Transactions on Information Theory, 1975,
Junfeng, LIU, Xiuping, WANG, Zhen. Fabric 21(1), 32−40, doi: 10.1109/TIT.1975.1055330.
defect detection using salience metric for color 15. COMANICIU, Dorin I. Nonparametric robust
dissimilarity and positional aggregation. IEEE methods for computer vision : thesis. New Brun-
Access, 2018, 6(1), 49170−49181, doi: 10.1109/ swick : Rutgers The State University of New Jer-
access.2018.2868059. sey, 2000.
7. LI, Yundong, ZHAO, Weigang, PAN, Jiahao. 16. HAMAD, Mazen L., ELLISON, Christopher D.,
Deformable patterned fabric defect detection KHAN, Mansoor, LYON, Robbe C. Drug pro-
with fisher criterion-based deep learning. IEEE duct characterization by macropixel analysis of
Transactions on Automation Science & Enginee- chemical images. Journal of Pharmaceutical Sci-
ring, 2017, 14(2), 1256−1264, doi: 10.1109/TASE. ences, 2007, 96(12), 3390−3401, doi: 10.1002/
2016.2520955. jps.20971.
Tekstilec, 2019, 62(4), 242-247