Abstract
Most photoelectric and imaging methods for yarn hairiness measurements often provide underestimated data of hairy fibers measured from light projection, which ignores the spatial orientations and shapes of protruding fibers. In this project, a three-dimensional (3D) system was developed to detect hairy fibers from multiple perspectives and to reconstruct a 3D model for the yarn that permits fibers to be traced spatially. The system utilized two angled planar mirrors to view a yarn from five different perspectives simultaneously, and a digital camera to capture the multiple images in one panoramic picture. The image-processing techniques were used to dissect the panoramic picture into five sub-images containing separate views of the yarn, and to segment the sub-images to obtain yarn silhouettes showing the edges of the yarn and hairy fibers. A 3D model of the yarn could be built by merging the five silhouettes with the angles defined by the scene geometry of the dual mirrors. From the 3D model, hairy fibers protruding from the yarn core could be traced in the space for accurate length measurements. The system represents a simple and practical solution for the 3D measurement of yarn hairiness.
Yarn hairiness, the number of protruding fibers outside the yarn core, has an adverse effect on the weaving or knitting production and on the appearance of end-use products.1,2 The development of yarn hairiness measurement methods can be dated back to the 1950s. 3 Since then, various methods, including singeing, microscopy, photoelectric and image-processing techniques, have been adopted for hairiness measurement. The singeing method was used to estimate the total weight of hairy fibers by contrasting the weight change before and after singeing the yarn. 4 This method suffers from difficulty in the singeing time control to prevent the yarn core from being burned. In the microscopic method, inspectors had to arbitrarily determine a hairiness level by comparing the observed to the control samples.3,5 Due to their laborious and subjective nature, both singeing and microscopic methods have been gradually replaced by automatic photoelectric methods, which measure the yarn hairiness by counting the electrical pulses generated by light-activated triodes when interacting with the projected light of hairy fibers. Two famous photoelectric yarn testers, the Uster Hairiness Tester, 6 and the Uster Zweigle Hairiness Meter, 7 have been widely used in the industry. Due to the complex configurations of hairy fibers in the space, the accuracy of the projection counting method has been questioned. 8 Haleem and Wang 9 found that the hairiness data of the Zweigle and Uster testers had a significant discrepancy with the precise manual counting of hair numbers and length.
Starting from the late 1990s, image-processing technology has been adopted to advance yarn hairiness measurement. 10 Cybulska 11 used image analysis techniques to estimate yarn thickness, hairiness and other structural parameters. Kuzański and Jackowska-Strumiłło 12 described an edge-detection algorithm for computing the amount of protruding fibers around a yarn. Guha et al. 13 developed an algorithm to analyze yarn images captured from a projection microscope and proposed the “hair area index” for hairiness measurement. Carvalho et al. 14 developed a customized LabVIEW© application to automatically determine yarn hairiness. Fabijańska and Jackowska-Strumiłło 8 developed image-processing and analysis algorithms to extract the hair area index and the hair length index to quantify yarn hairiness. Yuvaraj and Nayar 2 constructed a simple imaging system for measuring yarn hairiness and proved the method was promising for routine use. Wang et al. 1 presented the multi-focus image fusion method to solve the off-focus problem in microscopic imaging so that hairy fibers can be traced more accurately. Although the imaging technology has greatly advanced the approach for hairiness measurements, most of the current photoelectric and imaging methods for yarn testing are based on the projection of a yarn onto a two-dimensional (2D) plane, ignoring the three-dimensional (3D) nature of protruding fibers around the yarn and thus underestimating their true lengths in the space.
In this project, a simple device was designed to view hairy fibers from multiple perspectives and to create a 3D model for the yarn that enables the yarn 3D hairiness measurement. The system was based on two angled plane mirrors used to generate yarn images from five perspectives, and a digital camera used to capture the multiple views in one panoramic image. This paper first illustrates the principle of acquiring multi-view images with two angled mirrors, describes the image-processing techniques used for separating the panoramic image into five sub-images and segmenting yarn silhouettes from each sub-image, and then explains the reconstruction of a 3D model of the yarn through the transformation of the five silhouettes into one (x, y, z) coordinate using the perspective angle of each view.
Experimental setup
In principle, two plane mirrors can create multiple reflections of an object when it is placed in front of both mirrors. The number of viewable reflections depends on the angle between the two mirrors. Considering the resolution of the images to be analyzed, we adjusted the mirror angle to form a five-view scene visible to a camera placed on the middle axis perpendicular to the intersection line of the two mirrors. Figure 1 illustrates the five views of an object created by two angled mirrors ( Five views of an object created by two angled mirrors.
Figure 2 presents the experimental setup, which consists of two mirrors for creating five views of a yarn, a microscope for magnifying the object, a digital camera for capturing the image of five views in a single snapshot and an illuminator for a consistent light condition. The gain and the exposure time of the camera can be adjusted to make the image brightness maintain in a proper range. In our setup, they were set at 9 dB and 92 ms, respectively.
The experimental setup: (a) camera; (b) microscope; (c) illuminator; (d) two mirrors; (e) yarn.
Figure 3 shows one captured image that contains the five views of a small pin with a spherical head. The image is an eight-bit grayscale image that has the size of 1280 × 1024 pixels and a resolution of 30 pixels/mm. In this test, the angle between the two mirrors was adjusted to make sure the real object was in the middle and the five views were evenly distributed in the image. The central image is the real object, the two images farther out on the left- and right-hand sides are the virtual objects, that is, the first reflections of the real object, and the two immediate neighbors of the central image are two virtual objects generated by double reflections of the real object. Because of the differences in the light path, the pin head images in R, V1 and V3, or in R, V4 and V2, have been scaled down. The scaling ratios from R to V1 to V3 and from R to V4 to V2 can be estimated using the measured sizes in the five views through the image process. After the image segmentation,
15
the five elliptical regions of the pin head can be extracted to determine the scaling ratios in the height and width dimensions. It was found that R is 1.09 times larger than V1 and V4, and 1.28 times larger than V2 and V3. The angle (θ) between A spherical pin head in the five perspectives.
When a yarn image is captured using this multi-perspective viewing system, the yarn should be positioned on the same path as the pin. Figure 4 shows a captured image of a 58.3-tex yarn (Yarn 1). It is clear that the same hairy fiber in different views exhibits different shapes and lengths. Figure 4 will be used to describe the procedures of constructing realistic 3D yarn images from these five perspective images and measuring yarn hairiness in the 3D space in the following sections.
Five perspective views of Yarn 1 in one image.
Yarn silhouette segmentation in multi-views
Figure 4 can be equally divided into five sub-images, each displaying one silhouette of the yarn in one perspective. The yarn silhouette can be then separated into the yarn core (the main body of the yarn) and hairy fibers for yarn uniformity and yarn hairiness measurements. The yarn in each view defines a reference frame to be used for building a 3D yarn model, which requires the four virtual views, V1–V4, to be scaled up to the same size as R by using the found scaling ratios.
Yarn core segmentation
In each sub-image, the yarn core can be located through the image thresholding and morphology operations. 8 In this image, the gray values of the pixels belonging to yarn are higher than those of the background pixels. Thus, the contrasts between adjacent pixels are the main clue for separating the yarn and hairy fibers from the background.
Four major steps, thresholding, morphological opening, morphological dilation and pixel contrast, were taken to extract the yarn core. The first three steps were adopted to eliminate hairy fibers and to find the searching range of the yarn core. We first applied the Otsu thresholding algorithm
15
to convert the original image to a binary image, and the morphological opening to remove thin fibers in the binary image.
1
The structuring elements selected for the opening were a disk-shaped template of 4 pixels in radius. We then executed the dilation operation in the image with a disk-shaped template of 2 pixels in radius. The area between the left- and right-hand edges of the yarn and background was the detecting range of pixel contrast. For example, a part of the R view is shown in Figure 5(a). It is processed by thresholding (Figure 5(b)), opening and dilation to determine the detecting range of yarn core. In the fourth step, the detecting range highlighted in Figure 5(c) was the left- and right-hand margins after the dilation operation. In the fourth step, the pixel contrast of the 795th row of R marked by a horizontal line in Figure 5(c) is plotted in Figure 5(d). The pixel contrast was higher when the adjacent pixels were near the edge of the yarn than when both pixels were on the yarn. Thus, the two peaks could be used as the locations of the yarn edges. After the edge of yarn core was extracted, a binary image of the yarn core was constructed. To smooth the serrated edges, the opening operation was performed, and the result is shown in Figure 5(e).
Yarn core segmentation: (a) original image; (b) threshold image; (c) detecting range of yarn core; (d) the pixel contrast of the 795th row of R; (e) the extracted yarn core.
Hairy fiber segmentation
The dynamic thresholding algorithm is applied to extract the protruding fibers. The hairy fibers are segmented after the pixels that belong to yarn core are replaced by black pixels. Firstly, the pixels that belong to the yarn core in Figure 4 are replaced by black pixels. Thus, there are only hairy fibers left in the figure. Then, the intensity values in the grayscale image are adjusted from [0.2, 0.6] to [0, 1] to highlight the hairy fibers. There is no universal threshold that can generate consistent results across the entire image.
16
Therefore, the dynamic thresholding method is used to segment the hairy fibers. The image is divided into multiple sub-windows of size 7 × 7 pixels. The pixels not belonging to yarn core in a sub-window are used to obtain the threshold of themselves based on the Otsu algorithm.
15
The opening operation is applied to prevent the emergence of discontinuous fibers. As a result, the fibers can be extracted from the background. The binary images of the five views, including yarn core and fibers, are shown in Figure 6.
The binary images of Yarn 1 after image processing.
Figure 6 demonstrates that the hairy fibers can be precisely extracted from the background with the dynamic thresholding method. Hairy fibers in different views appear in different lengths and shapes, providing essential information for building a 3D model of this yarn in the next step.
Three-dimensional yarn model via silhouette transformation
To build a 3D yarn model from multiple views, the reference frames and their transforming directions should be determined. The five views of the hairy yarn in Figure 6 are the reference frames, and the viewing directions of these reference frames (R, V1 and V3) are as shown in Figure 7.
Schematic of the two-mirror imaging system in top view.
In Figure 7(a), vector
The specula reflections of the yarn in the two angled mirrors are shown in Figure 7(b). Vector
Regarding the second reflection (from V1 to V3), the viewing direction from the focal point to V3 (
Once the transforming direction of each view is known, the transformation of the silhouette in a virtual image (V1, V2, V3 or V4) into R can be executed using the relationships between the view and its viewing direction. As an example to illustrate this transforming method, Figure 8 shows a straight line representing a hairy fiber captured from the top view. ( The silhouette transformation from V1 to R.
The silhouette points in the four virtual images (V1, V2, V3 and V4) in Figure 6 were transformed into R and merged in the (x, y, z) space to form dense 3D points of the yarn surface. Three-dimensional points were firstly grouped into a series of (x, z) datasets with an incremental y, and then the datasets were saved as bitmap images. The bitmap images were loaded into an open-source software, called ImageJ,
17
to reconstruct a rotatable, zoomable 3D yarn model, as displayed in Figure 9. The hairy fibers on the 3D model can be clearly displayed and fully traced
18
in the 3D space.
Three-dimensional model of Yarn 1.
Results and discussion
Snapshots of the 3D model of Yarn 1 were taken from perspectives V1, V2, R, V3 and V4 (transforming angles) and are shown in Figure 10, displaying five poses of the computed 3D yarn model. By comparing them to the images in Figure 4, one can see that the 3D model presents a reasonable approximation to the true shape of the yarn.
Multi-poses of the three-dimensional model of Yarn 1 at the five transforming angles.
In addition to Yarn 1, one thinner yarn—Yarn 2 (34.3 tex) and one thicker yarn—Yarn 3 (388.7 tex), were used as further examples of the above method. Figure 11 shows the captured images of Yarn 2 in (a) and Yarn 3 in (b), and Figure 12 displays the five poses of the 3D models of these yarns. It can be seen that the five poses of the 3D yarn models in Figure 12 are highly consistent with their five corresponding views in Figure 11.
Multi-views of the two additional yarns: (a) Yarn 2 (34.3tex); (b) Yarn 3 (388.7 tex). Multi-poses of the three-dimensional models of Yarn 2 (a) and Yarn 3 (b).

Lengths (mm) of hairy fibers measured with three-dimensional models and the manual method
In Table 1, we set the shortest length of hairy fiber to be detected at 0.7 mm, approximately 21 pixels in the image. The numbers of detected hairy fibers of Yarns 1, 2 and 3 in a given distance are 11, 15 and 20, respectively, meaning that Yarn 3 has the most hairy fibers. The length of the longest fiber on Yarn 2 (3.3 mm) is shorter than those on Yarn 1 (5.3 mm) and Yarn 3 (5.2 mm). When hairy fibers were measured manually, they needed to be straightened as much as possible. However, if hairy fibers are shorter than 1 mm or entangled with other fiber ends, it was difficult to measure them manually. This is why there are a few unavailable Lm data in Table 1. Comparing the L and the available Lm data, we found the standard deviation of (L – Lm) was 0.1 mm and the correlation coefficient (r) between L and Lm was 0.998, demonstrating that the 3D measurements are highly consistent with the manual measurements, and hairy fibers can be traced accurately on the 3D models regardless of their spatial orientations and shapes.
Lengths (mm) of hairy fibers measured from the images in individual views
The fiber length measurements generated by the 3D models can be further expressed as the Uster Hairiness Index (H), which equals the total length (in cm) of protruding fibers within 1 cm length of the yarn, or the Zweigle hairiness index (S3), which gives the number of protruding fibers more than 3 mm in length in 100 m length of the yarn. The H-value of Yarn 1 was 6.4 when measured by the 3D model, and 2.8, 4.0, 3.6, 3.9 or 4.2 when measured separately in V1, V2, R, V3 and V4. For Yarn 2 and Yarn 3, the H-values were 6.7 and 11.0, which were also higher than those measured from their individual views. The S3 value of Yarn 1 obtained from the 3D model was 8571. Since the 3D models allow more accurate length measurements, we can generate the number of fibers whose length is less than 1 mm (S1) or 2 mm (S2) when it is needed.
Conclusions
This paper presents a novel method for yarn hairiness measurement using one picture containing five images of a yarn generated by two angled planar mirrors. The use of mirrored images enables the multi-perspective views of a yarn to be captured simultaneously in one snapshot. A 3D model of the yarn can be built by merging the yarn silhouettes segmented from the five images based on their transforming directions, which are dictated only by the geometry of the double mirror scene and the camera’s focal length. The length and number of hairy fibers on a yarn measured with the 3D model are found to be highly consistent with the manual method (r = 0.998). The 3D model also allows more accurate and comprehensive hairiness index measurements (H, S3, S2 or S1) than the measurement from a single view. In a follow-up project, more verification tests on this 3D approach for yarn hairiness measurement will be carried out.
Footnotes
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship and/or publication of this article.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by A Project Funded by the Priority Academic Program Development of Jiangsu Higher Education Institutions, the Fundamental Research Funds for the Central Universities (No. JUSRP51631A), Top-notch Academic Programs Project of Jiangsu Higher Education Institutions (PPZY2015B14).
