Documente Academic
Documente Profesional
Documente Cultură
ABSTRACT
Image analysis has been widely accepted as an objective method for evaluating fabric
appearance. This paper presents the development of an image analysis system that aims at
characterizing and rating fabric pilling appearance. The procedures and examples of using the
Fast Fourier Transform (FFT) and other techniques to correct image defects, such as non-
uniform background and low contrast, are shown. A novel approach that splits a fabric image
into periodic and non-periodic structures is explained. A template-matching technique used for
extracting pills from the non-periodic image is discussed. Pill properties are characterized by
density, size and contrast, and the measurements on the ASTM photographic standards are used
to build the empirical grading equations of fabric pilling.
tangled fibers held to the surface. This unpleasant appearance can seriously compromise the
fabrics’ acceptability for apparel. Pills are developed on a fabric surface in four main stages:
fuzz formation, entanglement, growth, and wear-off [3]. In normal wear, a piece of a garment
may take a long time to be pilled. To expedite the pilling evaluation, a number of testing
machines have been designed to simulate the pilling that occurrs in normal wear. Fabrics are
forced to form typical pills by tumbling, brushing, or rubbing specimens with abrasive materials
in machines, and then are compared with visual standards, which may be actual fabrics or
photographs of fabrics, to determine the degree of pilling on a scale ranging from 5 (no pilling)
to 1 (very severe pilling) [1,2]. In the ASTM D3511 and D3512 pilling resistance test methods,
an observer is guided to assess the pilling appearance of a tested specimen based on a combined
impression of the density and size of pills, and degree of color contrast around pilled areas.
Counting the pills and weighting their number with respect to their size and contrast as a
combined measure of the pilling appearance is not recommended, because this requires excessive
time if done manually [1]. A frequent complaint about the visual evaluation method is its
1
Journal of Textile Institute, 88, 488-500, 1997.
inconsistency and inaccuracy of the rating results. More reliable and objective methods for
Computer vision technology provides one of the best solutions for the objective
evaluation of pilling. Researchers in various institutions have been exploring image analysis
techniques effective for pill identification and characterization [6, 8, 9]. A typical set-up of an
image analysis system for pilling evaluation includes a CCD camera, frame grabber, computer
and the analysis software. The suitable hardware is generally available on the market, but the
analysis software often requires a great deal of customization or new development. A pilling
evaluation program needs to perform at least two procedures: pill identification and feature
fabric follows a common principle that pills are brighter than their surrounding areas, and
therefore can be differentiated by selecting a proper threshold. As pointed out in [8], it may be
very difficult to identify pills in the image of a patterned fabric captured with a CCD camera
since pills appear in different intensities over differently-colored regions. Rangulam et. al. used
a laser scanning mechanism to acquire fabric images to avoid the difficulty in identifying pills on
a patterned fabric. The laser scanning, however, is a much slower process than the camera
Ideally, an image analysis system developed for pill evaluation should be consistent with
current visual standards, applicable to samples that have different colors or patterns, independent
of the system operators, and reasonably fast. To achieve these goals, the following issues still
need to be addressed. How can pills be correctly identified and extracted? What features of pills
need to be measured to characterize pilling appearance? What relationships are among the
features? If a CCD camera or scanner is used, how does the system deal with patterned fabrics?
2
Journal of Textile Institute, 88, 488-500, 1997.
The present research attempts to seek solutions for these problems. Since removing colored
patterns in a patterned image is still part of the on-going research, discussions regarding this
The image analysis system used in the research follows the basic set-up described in
previous publications [12], except for the following changes. To accommdate for differences in
fabric color, an auto-iris lens is used so that a consistent brightness can be maintained over dark
and bright samples. A 3-chip color CCD camera is used to provide accurate color information
for pattern-removing in the continuing study. Since pills observed in worn garments vary
appreciably in size and appearance, the system should be capable of capturing and analyzing
multi-frame images of the sample at various locations to generate more reliable statistical data.
To avoid the human interference, a stage was designed to automatically transport the sample
under the camera (Figure 1). The stage, driven by a DC motor, moves in one direction and has a
travel of 12 inches. Two limit switches are mounted at each end of travel to prevent false
operations. The number of positions and the interval between two positions can be set from the
computer interface (Figure 2). The computer checks and adjusts the input interval to warrant the
total moving distance not to exceed the maximum travel. The stage starts to move from one end,
and stops at each position to let the camera capture a still image. The pause time is adjustable
using the software. When the stage moves to the next position (the time needed depends on the
interval distance), the computer takes the chance to conduct certain image-processing and
measurement tasks. All these movements are controlled by the computer and a specially-
3
Journal of Textile Institute, 88, 488-500, 1997.
designed circuit that is connected to the computer parallel port. This simplified stage greatly
cuts the price of commercially available mechanical stages, while perfectly satisfying the need
4
Journal of Textile Institute, 88, 488-500, 1997.
IMAGE ENHANCEMENT
Since the development of pills may be accompanied by other surface phenomena such as
loss of cover, color change, or the development of fuzz [1], the image of a tested fabric often
contains non-uniform background, varying contrast, and other defects. It is necessary to correct
or reduce the image defects to facilitate pill identification. Several examples of the functions
that are effective in enhancing images are briefly discussed here. More details can be found
from the author’s previous publications [11] and image processing references [5, 10].
A fabric may result in a low-contrast image under a normal image capturing condition in
which yarn structures, pills and other details are barely visible. For a low-contrast image, a
contrast mapping technique can be used to maximize the contrast of the image [5, 11]. The
reason for the low contrast in an image is that the image histogram takes advantage of only the
narrow band of the gray-scale range that a computer system provides. A modern PC computer
can easily display 256 gray levels simultaneously (255 for white and 0 for black). One can
a b
original enhanced
Figure 3 Contrast Stretching
perform the following mapping to make optimal use of the available gray-scales when displaying
5
Journal of Textile Institute, 88, 488-500, 1997.
the image. The darkest pixels in the original image are forced to be black, the brightest pixels to
be white, and an intermediate gray level to be a value which is linearly interpolated between
black and white. This mapping will not change the number of gray levels and the relative
frequency of each level, but will stretch the histogram to cover the entire gray-scale range (see
the histogram of the enhanced image in Figure 3). Having been processed by this method, the
the overall intensity. A gradual variation in intensity may exist in the image due to non-uniform
illumination. For example, the center part of image b in Figure 3 appears brighter than other
regions. This slow change can be considered as the background of the image, since its variation
does not reflect the interesting texture of the image. This defect can be minimized by fitting a
background function into the image [10, 11]. It takes three steps to conduct the background
leveling. First, a number of pixels are sampled throughout the image. When deciding how many
pixels should be sampled, two conflicting factors, fitting accuracy and computation time, should
a b
background leveled
Figure 4 Background leveling
6
Journal of Textile Institute, 88, 488-500, 1997.
be balanced. It seems appropriate to sample 1/5 to 1/10 of the total pixels of an image. Then, a
two-dimensional function that approximates the background is determined by using the least-
square fitting technique [11]. A second-order polynomial function is one of the most common
functions used for the background approximation. Finally, the background function is subtracted
from the image, and a new image that does not contain the background variation is generated.
Figure 4 shows the background function of image b in Figure 3 and the leveled image.
Some pilled fabrics may contain complex color variation (shading) that the leveling
technique described above is unable to correct (image a in Figure 5). Fourier filtering is an
effective way to eliminate this type of defect [10, 14]. In general, shading is a more irregular,
slower intensity change than the intensity alteration of the fabric structure, and therefore can be
frequency terms to the image can be obtained by performing the Fourier transform. Frequency
terms in the spectrum are independent and separable. Therefore, one can delete the frequency
terms in a particular region which result from undesirable signals in the original image. The
modified power spectrum is used to reconstruct the image through the inverse Fourier transform.
Frequency terms corresponding to shading should be concentrated in a region near the origin of
the spectrum (low frequencies). A circle centered at the origin may be used to select these
frequency terms. If the terms inside the circle are excluded when reconstructing the image,
shading will not appear in the reconstructed image. Obviously, the size of the circle is crucial.
For the purpose of reducing the degree of shading, the circle should not enclose any prominent
peaks because they represent the structures of the image. Figure 6 shows one example of
applying Fourier filtering to suppress shading. Image a is one of the ASTM pill photographs,
image b is its power spectrum, image c displays the modified power spectrum, and image d
7
Journal of Textile Institute, 88, 488-500, 1997.
shows the reconstructed image. It is worthwhile to reiterate here that the Fourier transform and
its inverse transform can be greatly expedited by the application of a fast Fourier transform
algorithm (FFT).
a b
c d
PILL EXTRACTION
Pills often appear in comparable brightness and size to those of floating yarns. It is
extremely difficult to discern pills from yarn points simply by imposing the intensity and/or size
thresholds. They, however, possess totally different spatial structures from which a new
differentiation clue may be derived. Pills are localized minor disturbances [3] randomly
distributed on the surface, while yarn floating points, which are part of the fabric structure,
appear to be periodical and associated only with the pattern of interlacing (weave) or
8
Journal of Textile Institute, 88, 488-500, 1997.
interlooping (knit). The periodic structure of a fabric will result in prominent peaks in its power
specturm, and non-periodic components such as pills will generate frequency terms spreading in
the background of the spectrum. Images a in Figure 6 shows the power spectrum of Images b in
Figure 4 obtained through the 2D FFT (see more detailed explanations about spectrum in a
previous paper [14]). Since it is much more convenient and precise to locate peaks in the
spectrum than to find the periodic structure in the original image, the FFT technique can play an
a b
c d
A region-growing method is then employed to locate peaks in the power spectrum. Peaks
are small, bright regions that can be detected by using a power threshold. The threshold usually
needs to be set to a reasonably high value, e.g., the mean power plus three times the standard
9
Journal of Textile Institute, 88, 488-500, 1997.
deviation, to prevent noisy areas from being detected. The pixels whose powers are above the
threshold are considered as the core parts of peaks. Each peak expands by merging with its
neighboring pixels that are above half of the highest power in this peak region (see the black
marks in image b of Figure 6). The spectrum is now divided into the non-peak portion and the
peak portion, which can be used in the inverse FFT to reconstruct two images, respectively. The
image reconstructed through the non-peak spectrum presents the non-periodic structure including
pills (image c), and that from the peak spectrum shows the fabric weaving or knitting pattern
(image d). The non-periodic image, of course, contains all noise elements, which differ
significantly in size and shape. Since most pills appear to be solid circular regions, a template-
matching technique is suitable to the further detection of pills in the non-periodic image.
template is designed to be a small square which contains a centered white circle surrounded by
black pixels. Note that the size of the template should be equivalent to the size of the repeating
units in the fabric, which can also be determined by using the FFT techniques [14]. Template
matching is the process of moving the template over the entire image, and calculating the
similarity between the template and the covered window on the image. The normalized
correlation is one commonly used measure of similarity to determine match. If the image and
the template are denoted as f(x,y) and t(x,y), the correlation coefficient at point (m,n) is given by
[10]
∑ ∑ [ f ( x, y) − f xy ][t ( x − m, y − n) − t ]
x y
r ( m, n) =
2 2
∑ ∑ [ f ( x, y) − f xy ] [t ( x − m, y − n) − t ]
x y
10
Journal of Textile Institute, 88, 488-500, 1997.
where, f xy is the average intensity of image pixels within the window that is translated across the
entire image, and t is the average intensity of the template. The double summations are carried
out over the moving template and the covered window. This equation can be further simplified
M ∑ ∑ [ f ( x, y) t ( x − m, y − n)] − f xy t
x y
r ( m, n) =
2
[ M ∑ ∑ f 2 ( x, y) − f xy ][ M ∑ ∑ t 2 ( x − m, y − n) − t 2]
x y x y
After the template matching, a new image, named as a matching map, can be generated
from r(m,n) to visually display locations at which the template best fits the image (image a in
Figure 7). The bright areas in the matching map indicate pill locations, and can be readily
segmented using a global threshold because the map is free from the fabric patterns and shading
(image b in Figure 7). Tiny particles in the thresholded image need to be removed by running
the morphological opening operation [4], since they correspond to fuzz (image b in Figure 7).
a b
11
Journal of Textile Institute, 88, 488-500, 1997.
PILL CHARACTERIZATION
In the visual evaluation, observers intend to rate the pilling appearance of a fabric by
comparing pill properties such as density, size and height, to those of the visual standards. After
DENSITY
Pill density is the first impression that an observer probably will get when examining a
pilled sample. The density is often estimated by the number of pills in a unit area. This
definition is accurate only if pills are randomly or uniformly distributed over the area selected
for counting pills [7, 13]. When clumping occurs the result will substantially vary with the area.
A more rational estimator of pill density can be constructed based on the distances of pills to
their nearest neighbors. The nearest distance of two pills is the length between the two centers.
The center of a convex-shape object such as a pill can be given by its mass center, whose x-y
coordinates are equal to the first-order moments [5]. Since the analyzed area is only a small
portion of the entire sample, a random sampling procedure is needed for estimating the
population density. Inside the mass-center image (Figure 8), the computer randomly generates a
number of points (triangles). At each of these points, the computer searches a pill (dot) closest
to the point, and measures the nearest distance ri. Inside a circle whose radius is ri, only one pill
exists. Then, the computer searches the nearest pill to this found pill, and measures their nearest
distance xi. Inside a circle whose radius is xi, two pills exist. After n random points are counted,
the total areas of the two sets of circles are π ∑ (r i2) and π ∑ ( x i2) , respectively, and a
12
Journal of Textile Institute, 88, 488-500, 1997.
xi
ri
2n
D=
π ∑ (r i2) ∑ ( x i2)
The denominator in the formula is the geometric average of the areas of the two sets of circles.
This estimator is insensitive to the spatial pattern of the mass-center image [7].
SIZE
The average size of pills is another important factor influencing pilling appearance. The
computer can locate each pill, count the pixels in the pill, and calculate the following statistical
data: mean, standard deviation, maximum, minimum and area percentage, which is equal to the
ratio of the total area of pills to the image area. The size distribution curve can be calculated as
well.
CONTRAST
The contrast between a pill and its surrounding region reflects the height of the pill. In a
gray-scale image, the contrast between two regions is measured by the difference in intensity.
To locate surrounding regions of pills, pilled areas in image b of Figure 7 are first enlarged by
13
Journal of Textile Institute, 88, 488-500, 1997.
several layers (morphological dilation [4]). The dilated (image a in Figure 9) and undilated
(image b in Figure 7) images are then subjected to a logical operation: xor, in which two
coincidental pixels in the two images result in a white pixel if both are identical, or a black pixel
otherwise. Xoring generates a new image showing the surrounding regions of pills (image b in
Figure 9). Based on the locations of pills and their surrounding regions, the computer can
measure the intensities for these two regions in the original gray-scale image, and then calculate
a b
PILLING EVALUATION
In order to make the rating results generated by the pilling evaluation system consistent
with the visual standards, the ASTM photographic pilling standards (Figure 10) were first
analyzed using the system and the rating equations were built based on the measurements of pill
properties of these photographs (Table I). Although the average size of pills has a decreasing
trend when the pilling grade increases, there is no significant difference between grades 1 and 2.
This is because pills will be worn off as their sizes increase to a certain level. Hence, the
average pill size alone is not sufficient for rating pilled samples. The density and % area of pills
show relatively coherent decreases with the pilling grade, though the relationships are non-linear
14
Journal of Textile Institute, 88, 488-500, 1997.
1 4.68 3.28 13.56 1.12 3.57 97 116.66 36.56 1.05 1.05 1.05
2 4.53 3.19 20.3 1.85 2.27 64 77.98 52.36 1.91 1.92 1.92
3 2.26 1.29 5.51 1.02 0.60 34 27.15 43.75 3.04 2.92 2.98
4 1.74 0.86 4.24 1.02 0.29 21 23.15 45.08 3.81 4.23 4.02
5 1.48 0.55 2.68 1.02 0.15 13 14.53 37.27 5.10 4.83 4.97
15
Journal of Textile Institute, 88, 488-500, 1997.
16
Journal of Textile Institute, 88, 488-500, 1997.
does not show a constant trend with the changes in pilling grade, and therefore becomes
unreliable if used as a rating factor. The empirical rating equations of pilling can probably be
built on pill density and % area by using regression techniques. Since the non-linear regression
(negative exponential) did not provide a good fit, the segment linear regression was conducted to
generate lines that fit two separate data groups (Figure 11). The rating equation based on the
G =6
53. 64 − 2. 22 * 10 D −2
( D > 27 per10 × 10 cm ) 2
7 d
7. 28 − 0.15 D ( D ≤ 27 per10 × 10 cm ) 2
G =6
53. 44 − 0. 67 S ( S > 0. 6)
7 s
5. 47 − 4. 25S ( S ≤ 0. 6)
here, Gd and Gs are the two different grades. Gd and Gs are assigned to zero when their calculated
values are negative. The final grade G for the pilling appearance may be given by the average of
Gd and Gs. If a calculated G passes the low limit (1) or the high limit (5), it will be set to the
limit. Table I also shows the rating grades of the ASTM standards by the system. The rating
5 5
4 4
Gd 3 Gs 3
2 2
1 1
0 20 40 60 80 100 120 0 1 2 3 4
D (10*10 cm2) AREA (%)
17
Journal of Textile Institute, 88, 488-500, 1997.
RESULTS
Four washed socks (s1~s4) and four naturally worn garmets (g1~g2) were tested using
the system. The samples represent various degrees of pilling, and have different colors and
structures (Figures 12 & 13). Table II shows the measured results. Besides the detailed
information about pill properties, the computer also gave a rating of pilling appearance, which
highly agreed with the visual impression. In some cases (e.g., s3 and g3), Gds are significantly
different from Gss. This is because some fabrics tend to generate a larger number of pills with
smaller sizes than others. G, combining both factors, should be more realistic. g2 has relatively
few pills, which explains the high ranking by density and % area, but its pills are very intense. If
the contrast is taken into account, g2 should have a lower pilling grade. Unfortunately, the
s1 s2 s3 s4
Figure 12 Washed Socks (s1~s4), top row: original images; bottom row: pills
18
Journal of Textile Institute, 88, 488-500, 1997.
g1 g2 g3 g4
Figure 13 Worn Garments (g1~g4), top row: original images; bottom row: pills
s1 1.50 0.39 2.32 0.98 0.17 9 17.65 52.75 4.6 4.7 4.6
s2 1.78 0.96 5.00 0.85 0.87 39 79.21 52.21 1.9 2.9 2.4
s3 2.39 1.29 8.54 0.97 2.10 70 147.03 55.50 0.4 2.0 1.2
s4 3.87 2.24 9.76 1.46 4.65 96 179.39 50.41 0 0.5 1
g1 1.87 0.62 2.93 0.73 0.63 27 44.89 11.22 2.6 3.0 2.8
g2 1.31 0.55 2.56 0.85 0.13 8 10.64 33.04 5.7 4.9 5
g3 1.31 0.54 2.68 0.72 1.54 94 180.64 11.71 0.0 2.4 1.2
g4 1.47 0.65 2.93 0.73 0.87 47 79.46 16.15 1.9 2.9 2.4
CONCLUSION
analysis. The image of a pilled fabric usually contains image defects, such as uneven
background and low contrast, which need to be minimized prior to any feature measurement.
19
Journal of Textile Institute, 88, 488-500, 1997.
Floating-yarn points in the image are another barrier for identifying pills, because those points
and pills often have similar sizes and intensities. The FFT techniques provide an effective way
to separate pills from float-yarn points. Peaks in the power spectrum of the image are the
frequency terms resulting from the periodic structure such as floating-yarn points. When the
fabric image is reconstructed from the power spectrum, the periodic structure can be removed
from the image by deleting peaks in the power spectrum. Pill regions in the non-periodic image
can be located by using the template-matching technique and extracted by thresholding the
image. Density, size and contrast are the important properties of pills that describe the degree of
pilling, and are used as in+dependent variables in the grading equations of pilling.
ACKNOWLEDGEMENT
This material is based upon work supported by the National Science Foundation of the
United States under Grant No. DMI-9522943, and by the United States Agriculture Department
REFERENCE
1. ASTM D 3511-76, Standard Test method for Pilling Resistance and other Related Surface
changes of Textile Fabrics: Brush Pilling Tester Method.
2. ASTM D 3512-76, Standard Test method for Pilling Resistance and other Related Surface
changes of Textile Fabrics: Random Tumble Pilling Tester Method.
3. Cooke, W.D., Pilling Attrition and Fatigue, Textile Research Journal, 55, 409-414, 1985.
4. Dougherty, E.R. and Giardina, C.R., “Mathematical Methods for Artificial Intelligence and
Autonomous Systems”, Prentice-Hall, Inc., 1988.
5. Jain, A. K., "Fundamentals of Digital Image Processing", Prentice-Hall,Inc. 1989.
6. Konda, A., Xin, L., Takadera, M., Okoshi, Y. and Toricimi, K., J. Text. Mach. Soc. Japan,
36, 96-99, 1988.
7. Krebs, C.J., “Ecological Methodology”, Harper & Row, NY, 1989.
8. Ramgulam, R.B., Amirbayat, J. and Porat, I., The Objective Assessment of Fabric Pilling,
Part I: Methodology, J. of Textile Institute, 84, 221-226, 1993.
20
Journal of Textile Institute, 88, 488-500, 1997.
9. Ramgulam, R.B., Amirbayat, J. and Porat, II., The Objective Assessment of Fabric Pilling,
Part II: Experimental Work, J. of Textile Institute, 85, 397-401, 1994.
10. Russ, J.C., “The Image Processing Handbook”, CRC Press, 1993.
11. Xu, B. and Y.L. Ting, Fiber Image Analysis: Part I: Fiber Image Enhancement, J. of Textile
Institute, in press.
12. Xu, B. and Y.L. Ting, Fiber Image Analysis: Part II: Fiber Characteristics Measurement, J.
of Textile Institute, in press.
13. Xu, B., Assessing Carpet Appearance Retention by Image Analysis, Textile Research
Journal, 64, 697-709, 1994.
14. Xu, B., Identifying Fabric Structures with Fast Fourier Transform Techniques, Textile
Research Journal, in press.
21