A new high-speed foreign fiber detection system with machine vision is proposed for removing foreign fibers from raw cotton using optimal hardware components and appropriate algorithms designing. Starting from a specialized lens of 3-charged couple device (CCD) camera, the system applied digital signal processor (DSP) and field-programmable gate array (FPGA) on image acquisition and processing illuminated by ultraviolet light, so as to identify transparent objects such as polyethylene and polypropylene fabric from cotton tuft flow by virtue of the fluorescent effect, until all foreign fibers that have been blown away safely by compressed air quality can be achieved. An image segmentation algorithm based on fast wavelet transform is proposed to identify block-like foreign fibers, and an improved canny detector is also developed to segment wire-like foreign fibers from raw cotton. The procedure naturally provides color image segmentation method with region growing algorithm for better adaptability. Experiments on a variety of images show that the proposed algorithms can effectively segment foreign fibers from test images under various circumstances.

1. Introduction

Before cotton fiber can be spun, the raw cotton must be sorted to remove any foreign particles and fibers. While foreign particles can be clearly distinguished from the raw cotton by color, contrast, and structure, foreign fibers such as polypropylene (PP) or polyethylene (PE) films are often light and transparent, making them difficult to detect using conventional foreign fiber separators. Even very low content of foreign fibers in cotton, such contaminants often appear as a discoloration in the fabric, reducing its value when they end up in finished cotton products, and this may lead to great economic loss for cotton textile enterprises [1].

The nature and extent of foreign fiber contamination are strongly dependent on the origin of the cotton [2]. US and Australian cotton, which are 100% machine picked, do not have significant problems with foreign fiber. Cotton from Turkey contains many red ribbon-shaped contaminants. In China, mills are battling threads from bleached cotton as well as white fluorescent PP ribbons. Cotton from Central Asia is contaminated with white, nontransparent packaging residues. These are just a few examples.

Currently, foreign fibers are generally eliminated by hand-picking method using human eyes inspection in most Chinese textile mills; this is inefficient and laborious. Various techniques have been developed to implement automatic inspection and elimination of foreign fibers in cotton, including ultrasonic-based inspection, sensor-based inspection, and machine-vision-based inspection [3, 4]. Earlier research work on foreign fiber detection in cotton was designed for cotton grading. The recent research efforts at improving the sensitivity of these systems have generated a few improvements [5, 6]. These include better separation machinery, use of more sophisticated image analysis technique, and more effective sample preparation mechanisms. In the recent years, some machine vision techniques have been applied to textile industries for inspection and elimination of foreign fibers in cotton.

A traditional machine-vision-based foreign fiber detection system mainly consists of line scan camera, frame-grabber, personal computer (PC), and high-pressure gas nozzle [7]. Images of cotton layer are first acquired through camera and then are manipulated to reduce noise and to enhance contrast. After that, images are segmented to distinguish foreign fibers from the cotton background according to the differences of image features. The positions of the foreign fibers in processed images are transmitted to the separator to control the solenoid valves, which switch the high-pressure compressed air on or off to blow the foreign fibers off the cotton tufts. However, this device suffers from fundamental limitation of PC such as central processing unit’s (CPU-) long-time overload, and it will frequently lead to undetected foreign fibers in real-time inspection.

Modern manufacturing processes must produce right first time. This is of the highest importance in fiber opening and preparation. In spinning, second-quality or contaminated yarns must be avoided. One obstacle for top-quality yarn is the increasing amount of foreign fibers. This paper, based on experience and information of traditional foreign fiber separator, presents a new high-speed foreign fiber detection system with machine vision to solve the problem of foreign fibers in ginning and spinning.

Image segmentation is the primary stage in image processing of the machine-vision-based foreign fiber detection system. The aim of image segmentation is to partition the image into meaningful connected-components to extract the features of the objects. In the recent years, many segmentation methods have been developed such as segmentation based on fuzzy C means and its variants, mean shift filters, and nonlinear diffusion [811].

In our research, a specialized lens with lateral chromatic aberration correction and ultraviolet light illumination for transparent foreign fiber detection were firstly introduced; and then a high-performance embedded controller based on digital signal processor (DSP) and field-programmable gate array (FPGA) was designed to perform all the complex computations of image acquisition and processing freeing the host PC from time-consuming task. A rectangular chute cooperating with specially designed compressed air nozzles perpendicular to it was finally selected to separate foreign fibers from cotton tufts. To overcome disadvantage of the undefined velocity of cotton tufts and foreign objects, some nonlinear control methods should be needed in such circumstance [1222]. In order to improve detection speed and accuracy, an image segmentation algorithm based on fast wavelet transform is proposed to identify block-like foreign fibers, and an improved canny detector is also developed to segment wire-like foreign fibers from raw cotton. The procedure also provides color image segmentation method with region growing algorithm for better adaptability.

2. The System

2.1. Sensors

Photo sensors are relatively cheap sensors that are arranged in-line and detect differences in brightness in the passing flow of fibrous tufts. Ultrasonic sensors, also arranged in-line, detect foreign parts with solid, sound-reflecting surfaces but cannot detect foreign fibers, threads, and strings [23].

Color sensors, or 1-CCD (charged couple device) cameras, are line-scan cameras with a single CCD chip. Sensitivity depends on the resolution of these cameras and the scanning width. Because these cameras work with three adjacent scan lines—red, green, and blue—with a certain offset, the color recognition of moving objects is limited and results in a so-called color noise effect.

Much more effective, although more expensive, are 3-CCD cameras. The three basic colors—red, green, and blue—are separated by a prism and simultaneously directed onto three CCD chips [24]. This system is also called a true-color system. Thanks to this simultaneous process, the variable speed of objects in the material flow no longer has a negative effect. Currently, 3-CCD cameras represent the high-end approach to foreign fiber detection.

To correct for the possible aberrations of the triple-channel prism used in the camera, we used a specialized lens design. Lateral chromatic aberration was minimized by aligning within less than 2 microns. Another central aspect is appropriate color splitting in the triple prism by dielectric color-splitting coatings. To produce high-fidelity color images, two coatings were used in the beamsplitter. While the first coating reflects blue and lets red and green pass, the second reflects red and lets green pass. Figure 1 illustrates mounting location of cameras with specialized lenses.

2.2. Illumination

Another important factor in determining object detectability is the type of illumination. Cameras, as well as the human eye, can detect only objects that distinguish themselves in color, contrast, structure, or luster from cotton tufts. For this reason, the type of illumination applied in foreign fiber detection system plays an essential role. Today’s standard is illumination units with fluorescent tubes operating in reflected light mode.

Polarized transmitted light is the ideal system for detecting transparent and semitransparent objects, such as PE foil or PP fabric from bale packaging. To detect such foreign fibers and separate them safely, the raw cotton is illuminated under polarized light, ultraviolet (UV) light, for instance, as showed in Figure 2, making the foreign plastic fibers appear colored. In this way, the foreign fibers can be distinguished from the raw cotton and separated. Such objects may include pieces of polyester (PET), PP, or even bleached cotton treated with optical brighteners [25]. With polarized reflected light and the corresponding camera filters, differences in surface luster of foreign objects can be detected. The system reaches its limits with dull objects. The presence of these particles often results in the dreaded foreign fiber claim.

2.3. Image Acquisition and Processing Controller

High-performance embedded controller, which features a TMS320DM648 DSP (TI Corp) and an XC2S300E-7PQ208C FPGA (Xilinx Corp) is designed to significantly reduce image acquisition and processing times for PC-based platform. With its 8800 MIPS processor, 5 configurable video ports, and 1 GBps total system bandwidth, the embedded controller is ideal for high-speed image acquisition and processing systems in foreign fiber detection. The controller performs all the complex computations of image acquisition and processing, freeing the host PC from this time intensive task. Figure 3 illustrates the architecture of image acquisition and processing controller, and Figure 4 shows the assembly status of controllers in industrial PC (IPC). The detailed designing method will be introduced in another paper.

2.4. Material Presentation

The presentation of the fibrous material to the sensors also affects the performance of foreign fiber separators. Almost all systems on the market monitor the tuft flow in a rectangular chute. One major disadvantage is the undefined velocity of cotton tufts and foreign objects. Because the velocity is not constant, the downstream separation nozzles must be activated for a longer period of time. This inevitably results in an increasing loss of good fibers. However, one advantage that should not be underestimated is the gentle treatment of cotton fibers, which are not mechanically stressed. Systems that feature detection on or close to the surface of a rotating needle roll have three very important advantages. First is the accurately defined material velocity and, hence, the minimal loss of good fibers during removal. Second, accurately detecting the position of foreign objects is advantageous, as there are no problems due to differences in illumination intensity depending on chute depth, as is the case with chute-based systems. The third advantage lies in the high degree of material opening and the associated excellent exposure of the foreign objects. Figure 5 shows the rectangular chute of tuft flow.

2.5. Foreign Fiber Blowing

The designed air scavenging system and a separation device provided with at least eight compressed air nozzles which are perpendicular to pneumatic cotton tufts conveying conduit are successively mounted in a direction of conveyance, wherein said fiber conveying conduit is provided with a removing opening arranged in front of the compressed air nozzles. Contrary to state of the art of actual methods and devices, the foreign fibers are not removed to a substantially pressure-tight separation container. According to our design, the removing opening is connected to a derivation in which a permanent airflow for transporting separated foreign fibers away is maintained. Figure 6 illustrates the compressed air tank, and Figure 7 illustrates the solenoid valves at the right side.

3. Foreign Fiber Detection Methods

3.1. Image Segmentation Algorithm Based on Fast Wavelet Transform

In the original image, cotton can be treated as background, while foreign fibers are expressed as foreground. Consequently, edge detection is a feasible way to our problem. When digital images are to be viewed or processed at multiple resolutions, the discrete wavelet transform (DWT) is the mathematical tool of choice [2629]. In this paper, the fast wavelet transform (FWT) is adopted to achieve the edge feature extraction. It is defined as where and —the expansion coefficients—are called scaling and wavelet vectors, respectively. They are the filter coefficients of the FWT, an iterative computational approach to the DWT shown in Figure 8.

2D wavelet transform is a direct promotion of 1D wavelet transform [3032]. It is one of the most prevalent techniques for edge detection and texture extraction. Through the 2D wavelet decomposition, symlets wavelet in this paper, the original cotton image is transformed to 4 parts, () denotes the detail component in diagonal orientation, (j,m,n) denotes the detail component in vertical orientation, () denotes the detail component in horizontal orientation, () denotes the morphology component. In three detail components, high frequency features are enhanced and the contrast is indicated by the wavelet coefficients.

Here, we propose an algorithm based on FWT to segment foreign fiber from input image. The algorithm can be described as follows.(1)Input the original input image, denoted as (2)The horizontal, vertical, and directionality of the single-scale wavelet transform of with respect to “sym4” wavelets, described as .(3)To merge above information into a single edge image, just zero the approximation coefficients of the generated transform, compute its inverse, and take the absolute value. The resulting edge image is . The inverse FWT uses the equivalent computation as follows: where and denote upsampling along and , respectively.(4)Region growing is used to segment the foreign fiber from . The values of initial seed points and threshold are empirical data, in general is between 10 and 20, and is between 20 and 40. The resultant image is .

Figure 9 illustrates the segmentation process of the given algorithm.

3.2. An Improved Canny Detector

The canny detector is the most powerful edge detector provided by function edge [33]. Here, the improved edge feature extraction algorithm can be summarized as follows.(1)Instead of using Gaussian smoothing filter, the improved algorithm carries on the smoothing operation by an adaptive median filter for the characteristics of input image.(2)The local gradient, , and edge direction, , are computed at each point. An edge point is defined to be a point whose strength is locally maximum in the direction of the gradient.(3)The edge points determined in () give rise to ridges in the gradient magnitude image. The algorithm then tracks along the top of these ridges and sets to zero all pixels that are not actually on the ridge top so as to give a thin line in the output, a process known as nonmaximal suppression. The ridge pixels are then thresholded using two thresholds, and , with . Ridge pixels with values greater than are said to be “strong” edge pixels. Ridge pixels with values between and are said to be “weak” edge pixels.(4)The algorithm performs edge linking by incorporating the weak pixels that are 8 connected to the strong pixels.(5)Finally, a modified closing operation in mathematics morphology is applied to fill up gaps in detection result.

The morphological closing of by denoted is a dilation followed by an erosion: Geometrically, is the complement of the union of all translations of that do not overlap, and it generally joins narrow breaks fills long thin gulfs, and fills holes smaller than the structuring element. However wire-like foreign fibers are relatively difficult to be processed by virtue of their narrow and twining objects. To make the wire-like foreign fibers more clear, a modified closing operation is given by where is a larger structuring element for dilation and is relatively a smaller one for erosion.

Figure 10 illustrates the result of the above algorithm.

3.3. Region Growing Color Image Segmentation Algorithm

The aim is to segment the color image and extract foreign fiber regions. Suppose that the objective is to segment objects of a specified color range in an RGB image. Given a set of sample color points representative of a color of interest, we obtain an estimate of the “average” or “mean” color that we wish to segmentation. Let this average color be denoted by the RGB pixel in an image as having a color in the specified range or not. To perform this comparison, we need a measure of similarity. One of the simplest measures is the Euclidean distance. Let denote an arbitrary point in the RGB space. We say that is similar to if the distance between them is less than a specified threshold, . The Euclidean distance between and is given by [26] where is the norm of the argument, and the subscripts , , and , denote the RGB components of vectors and . The locus of points such that is a solid sphere of radius . By definition, points contained within, or on the surface of the sphere, satisfy the specified color criterion; points outside the sphere do not.

The algorithm starts with a seed pixel, examines local pixels around it, determines the most similar one, which is then included in the region if it meets certain criteria. This process is followed until no more pixels can be added. The definition of similarity may be set in any number of different ways. Figure 11 illustrates the images segmentation.

4. Results and Discussion

The close examination of the different sensors, illumination systems, and methods of material presentations clearly shows that there is no single ideal system. However, by using systems precisely adapted to the actual requirements, one can come very close to this ideal. An optimum solution consists of an intelligent combination of different systems.

To balance quality and cost, we used two 3-CCD cameras illuminated by UV lights and two gray cameras with fluorescent lights. Some typical foreign fibers like PP twine, color thread, and hair were selected for the experiments. The foreign fibers were mixed into pure cotton and then made into uniform thin layer. The test images were captured by a 24-bit scanner with nearly 17 million colors offline, and some of them were transformed into gray images before image processing. Matlab 7.04 was used to implement and validate algorithms before the final burn program gets close to real environment. An Intel Pentium IV 2.66 GHz CPU personal computer with 1 GB SDRAM was chosen as the test environment and Windows XP sp2 was selected as the operation system.

4.1. Deficiency of Edge Feature Extraction Algorithms

Three tests were performed to evaluate the segmentation performance of the foreign fiber detection. In test 1 (Section 3.1), the original gray image was used, and segmentation results of the images listed in Figure 9. The results indicated that different segmentation results occurred when different types of algorithms were used. The images of block-like foreign fibers received good segmentation in Figure 9(b) by the proposed algorithm, while the other algorithms did not obtain the expected results. It informs that the proposed algorithm in Section 3.1 is more suitable for block-like foreign fibers detection than the traditional edge detectors.

In test 2 (Section 3.2), the original gray image was processed first by an adaptive median filter, and then it was segmented by the canny operator; finally it was enhanced by the modified closing operation. The result indicates that the canny operator is very useful for wire-like foreign fiber detection. As other edge operators such as sobel and prewitt are not as good as canny operator and the algorithm proposed in Section 3.1 cannot segment wire-like foreign fiber at all; the comparative segment results are not list in this paper.

4.2. About Color Image Segmentation

A large variety of segmentation methods are available at present, but speed and accuracy of an algorithm are key factors for the online visual inspection system [34]. Hence, in addition to ensuring the segmentation accuracy, algorithms with faster speed are more attractive. Therefore, in most cases the methods of foreign fiber detection are not suitable for using the color image segmentation algorithm. However ultraviolet light can make the PE or PP foreign plastic fibers appear colored as the above mentioned in Section 2.2, under such circumstance, color image is very useful and necessary.

Common approaches for color image segmentation are clustering algorithms such as -means [35] or Mixture of Principal Components [36]; however these algorithms do not take spatial information into account. Furthermore, clustering algorithms require prior information regarding number of clusters, which is a difficult or ambiguous task, requiring the assertion of some criterion on the very nature of the clusters being formed. Some progress has been made on this issue; however much experimentation still needs to be done [37]. An alternative set of algorithms exists which uses color similarity and a region-growing approach to spatial information [38]. Region-growing algorithms have been used mostly in the analysis of grayscale images, and some significant work has been completed in the color realm by Tremeau and Borel [39]. They discuss the segmentation of color regions which are homogeneous in color (i.e., no illumination effects are considered) thus restricting the application domain. They use a set of thresholds when calculating whether a color pixel is part of a region or not, and the Euclidean distance is used as the measure of similarity between two color vectors. It is well established [40] that the human perception of color similarity is poorly modeled by the Euclidean distance. More researches about color segmentation will be carried out in the future work.

5. Conclusion

A new high-speed foreign fiber detection system has been developed in this research, and images of foreign fibers can be processed more effectively and efficiently using optimal hardware components and appropriate algorithms designing. An image segmentation algorithm based on fast wavelet transform is proposed to identify block-like foreign fibers, and an improved canny detector is also developed to segment wire-like foreign fibers from raw cotton. The color image segmentation with region growing algorithm is introduced for better adaptability. The effectiveness of foreign fiber detection algorithms is demonstrated on a variety of test images. Some quantitative image segmentation methods are used to assess the results.

More rapid and stable foreign-fiber detection methods are now being considered. The useful and effective algorithms will be burned to the designed image acquisition and processing controller soon. A complete system debugging for cotton foreign fibers detection will be carried out very shortly.


This work was partly supported by the National Natural Science Foundation of China (NSFC) under the Project Grant nos. 60703106, 60573125, and 60873264.