Image Analysis as a Method of the Assessment of Yarn for Making Flat Textile Fabrics


 During the technological processing of staple fibers into yarn drafting, waves are formed which increase the irregularity of yarn linear density and consequently affect the yarn quality. Even a correctly performed technological process does not allow one to completely eliminate yarn faults (thin and thick places, neps) and yarn irregularity. All the yarn imperfections distinctly become apparent in flat textiles made of such a yarn. The quality of the yarn produced should be assessed already in spinning mill, using the results obtained to conclude on the quality of woven or knitted fabrics. Modern metrological laboratories in spinning mills possess Uster Tester 5 (UT5) apparatuses that not only assess the yarn quality with respect to the irregularity of linear density, faults (thin and thick places, neps), or hairiness, but also using the test results obtained make it possible to create a digital image of the predicted appearance of a flat fabric made of the yarn tested. This article presents a computer-aided method of the analysis of the woven and knitted fabric images obtained from UT5 that allows one to assess the significance of particular yarn parameters in the predicted appearance of flat fabrics.


Introduction
Currently, customers apart from price more often focus their attention on the quality of textile fabrics. An appropriate ratio of price to quality is one of the basic conditions that must be fulfi lled by the fabric to be bought by the consumer. Producers must provide a high output of their production and permanently control its course and qualitative parameters of fabric to obtain a high quality product with an adequate price. To maintain such a state of matter, spinning mills permanently modernize their machines and use their own laboratories to permanently control the successive intermediate products in the spinning process.
The quality of the yarns manufactured is best characterized by the distribution irregularity of yarn linear density that also exerts a considerable infl uence on parameters such as elongation at break, breaking force, degree of twist, and their coeffi cients of variation [1,2].
Modern apparatuses used for yarn testing make it possible to create digital images of the predicted appearance of woven and knitted fabrics made of the yarn tested, which provides a possibility of a quick verifi cation and makes it possible to undertake an appropriate action already in the phase of yarn production. To reliably perform the assessment, the images should be subjected to computer-aided analysis allowing one to eliminate subjective conclusions.

Irregularity of the yarn linear density
The fi bers that are locked together due to imparting a proper twist to them or sizing form a cylindrical body known as yarn in the fi nal stage of spinning. To be suitable without reservations for further processing into fl at fabrics, the yarn has to possess appropriately selected qualitative parameters, which makes it possible to obtain it from woven of knitted fabrics with the best possible functional properties. The yarn quality depends on the properly selected fi bers, technological process, and the parameters of machine operation in every spinning stage. The yarn quality is assessed by means of determining appropriate quality parameters, among which the most important one is the variation coeffi cient of linear density CV% on sections with different lengths. Other quality parameters may have higher or lower signifi cance depending on the yarn application [3][4][5].
From the technological point of view, the irregularity of linear density is one of the most important parameters to assess both the fi nal product and the spinning process itself. Depending on the fi ber type used to make a yarn, the irregularity of the linear density of the fi ber stream can be caused by the fi ber thickness variability-in the case when the continuous fi laments are used-or by using different number of staple fi bers and their different linear densities.
In spinning industry, many sources of the yarn linear irregularity are defi ned. They are classifi ed as structural irregularities

Abstract:
During the technological processing of staple fi bers into yarn drafting, waves are formed which increase the irregularity of yarn linear density and consequently affect the yarn quality. Even a correctly performed technological process does not allow one to completely eliminate yarn faults (thin and thick places, neps) and yarn irregularity. All the yarn imperfections distinctly become apparent in fl at textiles made of such a yarn. The quality of the yarn produced should be assessed already in spinning mill, using the results obtained to conclude on the quality of woven or knitted fabrics. Modern metrological laboratories in spinning mills possess Uster Tester 5 (UT5) apparatuses that not only assess the yarn quality with respect to the irregularity of linear density, faults (thin and thick places, neps), or hairiness, but also using the test results obtained make it possible to create a digital image of the predicted appearance of a fl at fabric made of the yarn tested. This article presents a computer-aided method of the analysis of the woven and knitted fabric images obtained from UT5 that allows one to assess the signifi cance of particular yarn parameters in the predicted appearance of fl at fabrics.

Keywords:
Yarn, irregularity, image analysis resulting from the irregularity of the fi ber quality parameters and as structural irregularities of the products in successive production stages and faults in the operation of particular machines.
The yarn linear density irregularity infl uences the physical properties of yarn and its breakage capability during spinning, and when it periodically occurs it can contribute to the occurrence of unwanted patterns in fabrics that deteriorate their quality.
So far, many methods of the irregularity assessment of the fi ber stream linear density have been developed. Among them one can distinguish a method of irregularity gradient, a method of mobile average, and a correlational or spectral analysis. On account of a wide application, low labor intensity, and time consumption needed for performing the tests, the spectral analysis, also named harmonic analysis, is commonly used.

Spectral analysis of yarns
The spectral (harmonic) analysis allows one to test the irregularity of the yarn linear density and to detect the phenomenon of a hidden periodicity in the structure of spinning products. It also makes it possible to obtain detailed information about the structure of fi ber stream through the decomposition of its thickness into harmonic components. The harmonic analysis has found a particular use in the spinning industry as a method of controlling production processes, making it possible to detect and localize errors and faults that appear during the yarn production.
In practice, using a special apparatus such as Uster Tester 5 (UT5), the spectrograms of the fi ber stream thickness are drawn up, from which one can read up the values of harmonic components of amplitudes. The analysis of these spectrograms makes it possible to know the source of possible errors.
Technological faults reveal their presence in a spectrogram in the form of the so-called bumps consisting of clinging stripes with increased amplitude. Mechanical faults are revealed in the spectrogram of the yarn tested in the form of intensifi ed stripes, also called peaks or chimneys. Depending on whether the periodical error is sinusoidal or non-sinusoidal, the intensifi ed chimneys will occur at different intervals. For the sinusoidal errors, it will be one or two chimneys occurring directly one after the other. If a periodical error causes a non-sinusoidal mass distribution, the spectrogram will show a series of intensifi ed peaks remote from each other.
Apparatus UT5, apart from the determination of spectrograms, can simulate the appearance of woven or knitted fabric on the basis of the spectral analysis. This allows one, still before the weaving or knitting process, to assess the appearance of a fl at fabric that will be made of the yarn under analysis. However, this assessment is of a subjective character.

Apparatus UT5
UT5 constitutes a multifunctional measurement system with a modular structure allowing the determination of the basic qualitative parameters of yarns and intermediate spinning products (Figure 1).
A typical measurement UT5 set consists of the main apparatus containing the modules for measuring selected qualitative parameters of yarn: unwinding creel, printer, and computer with dedicated software.
The basic modules of UT5 include module TH for measuring humidity and temperature, module CS for measuring the fi ber stream irregularity, and module FM for a fast detecting foreign substances in yarn.
The modules optionally appearing in UT5 include MS module for measuring thick wool slivers, sensor OM dedicated for the determination of the diameter, rotundity, density, and surface structure of yarn. UT5 is equipped with sensor OH for measuring the yarn hairiness, and module OI for measuring the dust and foreign particles in the yarn structure. UT5 model S800 used in the tests was equipped with an automatic system of the exchange of the sample tested (Table 1).

Material for testing
Wool and wool-like yarns made by various spinning techniques, including classic single yarns, Siro Spun, and compact yarns were tested. Table 2 presents the characteristics of yarn. To use the wool in the technological process, in variants C, F, and G, it was treated with hypochlorite followed by resin treatment. The fabrics made of this yarn are suitable for washing and mechanical drying. Some yarns were subjected to the treatment with paraffi n wax.

Test results of the yarn qualitative parameters
The basic qualitative parameters of yarns were determined in the spinning metrological laboratory. Apart from the determination    Table 3. For each measurement of the yarns analyzed by means of UT5, a spectrogram was prepared. As the spectrograms of various yarn variants were slightly different, a typical spectrogram of yarn variant K is shown in Figure 2.
Based on the linear density distribution of the yarn analyzed, UT5 apparatus can visualize the predicted appearance of woven or knitted fabric that will be made of this yarn. Such visualization was made for each of the yarn analyzed and the typical results are presented in Figures 3 and 4.
The yarns analyzed are characterized by a relatively low quality. They were selected so as to make the analysis results and the visualization of the predicted appearance of woven and knitted fabrics distinctly distinguishable.
The direct assessment of the quality of woven and knitted fabrics on the basis of their visualization by means of UT5 is to a large extent a subjective matter. Only a digital analysis of the image can eliminate this subjectivity in assessment.

Image analysis
In the case of yarns with considerably different quality parameters, the assessment of the predicted appearance of woven or knitted fabric, presented by UT5, does not give rise to greater problems, although the criteria of this assessment are of subjective character. On the other hand, in the case of yarns with similar qualitative parameters, the images of the predicted appearance of fl at textiles will also be similar and consequently their assessment will not be unambiguous. To eliminate the subjectivity of the assessment made, one should fi nd support in programs and methods that would make the analyses performed more objective [6][7][8].
Image analysis is a tool that makes it possible to distinguish information from an image by means of appropriated program transformations. The method proposed is based on the measurement of the average brightness of digital images and determination of the standard deviation of the image brightness. The average image brightness is an arithmetic average of the matrix generated on the basis of the brightness of single pixels forming an image.
Each digital image is consisted of pixels-some quantity of the smallest homogeneous elements that represent the given color or shade of grayness. Presenting an image as a pixel network, one can build a matrix with the quantity of lines and columns corresponding to the image width and height as shown in Figure 5 [9].
The image pixels in the scale of grayness are described by means of a number from 0 to 255. Digit 0 indicates black pixel and number 255 indicates white pixel. The values between 0 and 255 constitute appropriate shades from the grayness scale. A pixel defi ned by number 100 will be darker than defi ned with number 101 or 200.
By means of appropriate computer software for each image, one can determine the basic statistic quantities such as the average image brightness that is an arithmetic average of the matrix and standard deviation. The image transformation into matrix and then the determination of image parameters can be performed by means of a script written in programing language Python. Python is a versatile language making it possible to form Internet links, image analysis or creating games, and report generation. To start the script, it is indispensable to have the Python language distributor. An example of such a program used in this study is Anaconda in the version of Python 2.7 [10].    As the yarns used in this study are weaving yarns, the computer analysis was carried out only for the images representing the predicted appearance of woven fabrics made of particular yarns. After performing a preliminary analysis and the optimization of the method, the average brightness was determined and then the standard deviation of the image was divided into 50 elements with dimensions 368 x 111 pixels. The scheme of the image division into 50 even rectangles is presented in Figure 6.
All the digital images of woven fabrics made of particular yarns were analyzed. Table 4 presents the values of the standard deviation of image brightness of the yarns tested.
Based on the measurement results of the standard deviation of the average image brightness, the diagrams of the standard deviation dependence of the average image brightness on the measurement results of the yarn qualitative parameters     Based on the measurement of the coefficient of R 2 determination, the correlation of the yarn qualitative parameters was determined in relation to the results of the image analysis performed. Table 5 presents the scale used as a base to determine the degree of fitting the regression equation to the data [9].
The measurement results of the coefficient of R 2 determination for particular qualitative parameters of yarns having an influence on the image form are listed in Table 6.

Summary
The appearance of woven fabric is significantly affected by the irregularity of the yarn linear density on short sections and thick places at a level of -40% (very good fitting) and thick places at a level of +35% and thin places at a level of -50% (good fitting). The variability of the yarn linear density on 1 m sections shows a satisfactory degree of fitting to the standard deviation of average image brightness. The remaining parameters have no significant effect on the fabric appearance (unsatisfactory fitting).
From further analysis of results, it follows that the greater the length on which the irregularity of the yarn linear density is tested, the lower is the degree of fitting to the standard deviation of the average brightness. The long-section irregularity of yarn (CV 10 m ) does not show any effect on the woven fabric appearance, but this may be conditioned by a too small size of the image under analysis. The woven fabric appearance is affected only by the periodically appearing errors-the greater the value of the yarn linear density variability, the greater the probability of the occurrence of periodical distribution of error in the yarn. Errors such as neps or thick places do not always occur on the whole yarn circumference-part of them can remain in hiding, making no visual defect on the fabric surface. The situation is different in the case of thin places. Each thin place is visible on the entire circumference of the yarn, which causes a significant impact of this parameter on the appearance of the fabric.