White Speck Detection on Dyed Fabric Using Image Analysis

White specks are undyed spots on d yed fabric, and are commonly caused by nep s. Since quality of a finished garment is determi ned by, among other things, the number of imperfection s contained within the fabric, the inclusion of white specks is detrimental to fabric quality. The manual counti g of neps is not only a time-consuming process, but a lso inconsistent and prone to error because it is very subjective. In Y.J. Han, Dep. of Agric. and Biol. Eng., Clemson University, 229 McAdams Hall, Clemson, SC 29634-0357; W.E. Lambert, Dep. of Agric. and Biol. Eng., Clemson University, 202 McAdams Hall, Clemson, SC 29634-0357; and C.K. Bragg, USDA-ARS, Cotton Quality Research Station, Clemson, SC 29634. Technical Contribution no. 4334 of the South Carolina Agriculture and Forestry Research System, Clemson University. Received 9 Aug. 1997. *Corresponding author (yhan@clemson.edu). Abbreviations : AFIS, Advanced Fiber Information System; ASTM, American Society for Testing and Materials. 92 HAN ET AL.: WHITE SPECK DETECTION ON DYED FABRIC USING IMAGE ANALYSIS this study, an image analysis system was developed to count and size white specks on dyed fabric that can minimize the variations from light fluctuations and automatically perform threshold and calibration. The performance of the white speck counter was compared with that of the traditional manual counting of white specks in terms of accuracy, repeatability, and sensitivity to different operators. Two different operators inspected 20 test lots on two fabric rolls using the white speck counter and the manual counting method. The white speck counter counted white specks faster and more efficiently than the manual counting method. The white speck counter also performed more consistently and objectively than the manual counting method. White specks are undyed spots on dyed fabric, and are commonly caused by neps. According to the American Society for Testing and Materials (ASTM D123-96, 1996), a nep is “a tightly tangled knot-like mass of unorganized fibers.” This is to be differentiated from a mote, which is another impurity found in cotton (Gossypium hirsutum L.) consisting of a seed fragment encompassed by cotton fibers. Many researchers have studied neps over the decades, including types, formation, effects, and solutions. Watson et al. (1991) classified neps into two groups, mechanical and biological, and observed that mechanical neps are similar to the classical ASTM definition, where they are formed from mechanical actions on the fibers. They also reported that fibers with low micronaire values tend to form mechanical neps because the fibers are finer and less mature, and are therefore less rigid. Biological neps are clumps of very immature fibers that can be found in seed cotton before mechanical processing has occurred. They also reported that fibers with low micronaire values (finer and immature fibers) tend to form mechanical neps because of the weak, poorly developed, less rigid fibers. Goynes et al. (1994) reported that because of low cellulose content of the undeveloped, flat, ribbon-like fibers, clumps of these fibers do not accept dye. Therefore, when a fabric is dyed, the mechanical and biological neps formed by fine or immature fibers create undyed spots in the finished fabric. These undyed spots are known as white specks. Quality of a finished garment is determined by, among other things, the number of imperfections contained within the fabric. The more imperfections found in the cloth, the less value can be added to the product by the manufacturer. Since uniform surface color is a desirable aspect for fabrics, the inclusion of white specks is detrimental to fabric quality. White specks are a result of neps being included in the raw cotton product supplied to a processor or result from ensuing mechanical treatment. The process of counting neps is very tedious and time consuming. Since the late 1930s, neps were counted manually using a back light (Helliwell, 1938) or a black background (Saco-Lowell, 1942). Even today, neps are being counted manually relying on visual inspection (Harrison and Bargeron, 1986; Hughs et al., 1988; Cheek et al., 1990; Smith, 1991). The manual counting is not only a time-consuming process, but also inconsistent and prone to error because it is very subjective. Recently, many studies focused on automatic counting of neps and white specks. The Advanced Fiber Information System (AFIS) module has been used by many researchers to detect and count seed coat neps (Ghorashi et al., 1994; Baldwin et al., 1995; Jones and Baldwin, 1996). Mor (1996) introduced a fiber contamination tester that detects sticky deposits by an electro-optical device and evaluates nonsticky parameters such as neps, trash, and seed coat fragment using an image processing system. Bel-Berger et al. (1994, 1995, 1996) used three different image processing hardware systems in analyzing the number and area of white specks found in dyed fabric. The area of white specks was calculated in terms of number of pixels. Although they were able to measure the relative area of white specks to the whole fabric, called percent white, their instrument was not calibrated in length or area to measure the absolute area of white specks. They segmented the image of fabric into a binary image by manually adjusting the threshold value on every image. Manual thresholding is very subjective and prone to variations from operator to operator and from one lighting condition to the other. The objective of this study was to develop a robust image analysis system to count and size white specks on dyed fabric that can minimize the 93 JOURNAL OF COTTON SCIENCE, Volume 2, Issue 2, 1998 Fig. 1. Schematic diagram of the illumination chamber. variations from light fluctuations, and automatically perform threshold and calibration. MATERIALS AND METHODS Design of White Speck Counter The white speck counter developed in this research consists of three major components: an illumination chamber, fabric transport mechanism, and imaging hardware. The illumination chamber was needed to provide controlled illumination on the fabric surface by blocking ambient light and furnishing a consistent light source. A schematic diagram of the illumination chamber is shown in Figure 1. It was constructed of high quality 1.3 cm (1⁄2 in) plywood, and is 58.4 cm (23 in) high, 47.0 cm (18 1⁄2 in) wide, and 52.1 cm (20 1⁄2 in) deep. Approximately 24.1 cm (9 1⁄2 in) from the top, a slit was cut 31.8 cm (12 1⁄2 in) long by 2.5 cm (1 in) high in both sides of the chamber in order for the fabric to pass through the chamber. Then a 3.2 mm (F in) aluminum plate was installed through the side slits and curled downward at the outside walls. The plate was to provide a flat, smooth surface for the fabric to slide on. An adjustable sliding shield was mounted above each slit so that the slits can be covered from ambient light after fabric was fed through. Two 45.7 cm (18 in) long fluorescent lamps were placed 17.8 cm (7 in) apart inside the top center of the chamber, and the camera was mounted at the top center of the chamber at a distance of 26.4 cm (10 G in) from the fabric. The illumination chamber was attached to a 1.3 cm (1⁄2 in) thick board approximately 102.9 cm (40 1⁄2 in) wide and 52.1 cm (20 1⁄2 in) deep. An aluminum roller was mounted on each side of the chamber at 16.5 cm (6 1⁄2 in) high from the base board and 22.9 cm (9 in) from the side of the chamber. The roller can hold a fabric roll of 15.2 cm (6 in) in diameter. A roll of dyed fabric can be mounted on a roller on one side of the chamber, and transported through the chamber to the other side of the chamber onto the second roller. After inspecting one side of the fabric, the rolled fabric can be flipped and fed back to the chamber in the opposite direction to inspect the other side of the fabric. The height of the inspection plane where the image of the fabric is taken was designed to be higher than the top of the roll of fabric so that fabric surface stays flat on the inspection plane. The image processing hardware included a PCVISIONplus frame grabber board (Imaging Technology, Inc.), running on a 50 MHZ 80486 microcomputer. The frame grabber has a 512 x 480 spatial resolution with 256 gray levels. Images were captured by a black-and-white CCD camera (Pulnix Model TM-7CN) with Fujinon HF16A-2 lens with 16 mm focal length and displayed on an RGB analog monitor (Sony Model PVM-1271Q).