Professional Documents
Culture Documents
BY IMAGE PROCESSING
by
A Thesis
In
ELECTRICAL ENGINEERING
MASTER OF SCIENCE
IN
ELECTRICAL ENGINEERING
Approved
Hamed Sari-Sarraf
Chairperson of the Committee
Eric Hequet
John Borrelli
Dean of the Graduate School
May,2007
Copyright 2007, Huapeng Wang
Texas Tech University, Huapeng Wang, 05/2007
ACKNOWLEDGEMENTS
ii
Texas Tech University, Huapeng Wang, 05/2007
CONTENTS
ACKNOWLEDGEMENTS ........................................................................................ ii
ABSTRACT............................................................................................................... iv
LIST OF TABLES ...................................................................................................... v
LIST OF FIGURES ................................................................................................... vi
1 INTRODUCTION .................................................................................................. 1
1.1 Motivation....................................................................................................... 1
1.2 Introduction..................................................................................................... 2
1.3 Thesis Organization ........................................................................................ 4
2 RESEARCH APPROACH FOR FIBER LENGTH MEASUREMENT................ 5
2.1 Previous Approaches....................................................................................... 5
2.2 Fiber Length Measurement Algorithm ........................................................... 7
3 RESEARCH APPROACH FOR FIBER MATURITY MEASUREMENT......... 47
3.1 Motivation..................................................................................................... 47
3.2 Research Approach for Fiber Maturity Estimation....................................... 47
4 GUI FOR FIBER LENGTH MEASUREMENT .................................................. 49
4.1 Single Fiber Mode......................................................................................... 49
4.2 Batch Mode ................................................................................................... 52
5 EXPERIMENTS, ANALYSIS AND RESULTS ................................................. 57
5.1 Experiments for Testing the Fiber Length Calculation Algorithm ............... 57
5.2 Experiments for Testing the Fiber Maturity Calculation Algorithm ............ 73
6 CONCLUSIONS AND FUTURE WORKS ......................................................... 80
REFERENCES.......................................................................................................... 81
iii
Texas Tech University, Huapeng Wang, 05/2007
ABSTRACT
In this thesis, we intended to design and realize an imaging system for the
accurate measurement of cotton fiber length. A secondary objective was to incorporate
fiber maturity estimation into the system. Commercial systems measure fiber length in
a reasonable time span, however, the accuracy is questionable. Image processing
might be seen as an alternative method to the conventional systems, but the processing
time is an issue. Our prototype system is composed of an off-the-shelf scanner that
generates a grayscale image of multiple fibers, followed by customized image
processing algorithms that compute the length of each fiber in the image. Although the
system requires some degree of separation between the individual fibers, it is shown to
produce highly accurate length measurements that are invariant to fiber orientation,
shape, inter-fiber intersections, and intra-fiber crimps and crossovers. Hence, in its
present state, the proposed system serves as an excellent reference method for
assessing the efficacy of commercially available length measurement systems.
iv
Texas Tech University, Huapeng Wang, 05/2007
LIST OF TABLES
5.1 Length of the 4-inch optical fiber with different shapes .................................... 59
5.2 Length statistics for cotton fibers used in AFIS and the proposed algorithm.... 66
5.3 Error rate of the proposed algorithm.................................................................. 72
5.4 Mean length (L(n)) comparison table ................................................................ 72
v
Texas Tech University, Huapeng Wang, 05/2007
LIST OF FIGURES
1.1 Scanned fiber images (a) single fiber (b) multiple fibers.................................... 1
2.1 DSSs for the digital region S............................................................................... 5
2.2 (a) Original cotton fiber image (b) MA by using distance transform ................. 6
2.3 Flowchart of fiber length measurement algorithm.............................................. 7
2.4 Four forbidden fiber arrangements...................................................................... 8
2.5 Average filter mask ............................................................................................. 9
2.6 Fiber smoothing (a) Fiber image before smoothing
(b) Fiber image after smoothing.......................................................................... 9
2.7 (a) Image with less noise in the background and more fibers
(b) Image with more noise in the background and less fibers........................... 10
2.8 Histograms of the images in Figure 2.7 ............................................................ 11
2.9 Scale-space representations of the histogram curves ........................................ 12
2.10 Binary images of the original images in Figure 2.7.......................................... 12
2.11 (a) Binary image before image closing (b) Binary image after image closing . 13
2.12 (a) Binary image before noise removal (b) Binary image after noise removal. 13
2.13 (a) Original image (b) Binary image after thresholding and background noise
removal.............................................................................................................. 14
2.14 Eight mask groups............................................................................................. 15
2.15 Four masks in mask group 1 ............................................................................. 15
2.16 Weight mask ..................................................................................................... 16
2.17 Boundary pixels removal by mask group 1 ...................................................... 16
2.18 An example of skeletonizing (a) Original Image (b)-(i) Images after being
consecutively skeletonized by eight mask groups (j) Medial axis.................... 17
2.19 Medial axis image of cotton fibers.................................................................... 18
2.20 (a) endpoint (b) medial point (c) junction point.............................................. 19
2.21 Junctions caused by four different conditions................................................... 19
2.22 Junction categories............................................................................................ 20
2.23 Three conditions that may cause junction a ................................................... 21
2.24 Flowchart of junction a identification ............................................................ 21
2.25 (a1) Before junction range removal (a2) After junction range removal ........... 21
2.26 Flowchart for the modification of junction a.................................................. 22
2.27 (a) Junction a before branch removal (b) Junction a after branch removal . 22
2.28 A special case for longer branch removal ......................................................... 23
2.29 (a) Medial axis with L corner (b) Two new endpoints
(c) L corner is replaced by a straight line ....................................................... 24
2.30 Flowchart of junction b identification ............................................................ 25
2.31 (b1) Before junction range removal (b2) After junction range removal........... 25
2.32 Flowchart for the modification of junction b ................................................. 25
2.33 (a) Junction b before branch removal (b) Junction b after branch removal (c)
Junction b after endpoint extension................................................................ 26
2.34 Medial axis image before and after modification ............................................. 26
2.35 X junction ....................................................................................................... 27
2.36 T junction ....................................................................................................... 27
2.37 Flowchart for the modification of junction c and junction d ....................... 27
vi
Texas Tech University, Huapeng Wang, 05/2007
ix
Texas Tech University, Huapeng Wang, 05/2007
CHAPTER 1
INTRODUCTION
1.1 Motivation
Length is one of the most important properties of cotton fibers. Length is highly
related to other cotton fiber characteristics such as strength, fineness and maturity.
Because longer fibers are generally stronger, finer and more uniform than shorter
fibers, they have a much higher price in the market. Furthermore, fiber length
distribuction also affects the yarn quality such as strength, hairiness and evenness.
Therefore, it is important to determine the accurate length distribution of cotton fibers.
This thesis explores a new algorithm to measure fiber length by using the scanned
images of cotton fibers (Figure 1.1). The new algorithm gives an accurate
measurement of fiber length, which could be used as reference data for other indirect
measurements of cotton fiber length. The algorithm analyzes and modifies the medial
axis representation, producing accurate length measurements, while providing the
ability to process multiple fibers (Figure 1.1 (b)) in the same image. The digitization
errors are curtailed using a piecewise polynomial curve fitting with adaptive control
point selection (ACPS). We have designed a Matlab Graphical User Interface (GUI) to
test the algorithm and our to-date experiments clearly indicate that the proposed
method can provide accurate fiber length measurements (i.e., relative errors of 1% or
less) with invariance to inter- and intra-fiber crossovers.
Figure 1.1: Scanned fiber images (a) single fiber (b) multiple fibers
1
Texas Tech University, Huapeng Wang, 05/2007
1.2 Introduction
Oiled-Plate method and Array method are two of the research approaches for fiber
length measurement. They are both time-consuming and need a skilled operator in
order to get accurate results. The current commercial systems that are used for fiber
length measurement include High Volume Instrumentation (HVI) and the Advanced
Fiber Information System (AFIS) [1-3]. The HVI system scans fiber beard and based
on the amount of light that passes the beard, this method can indirectly calculate the
number of fibers to different extension. The HVI system is not efficient for measuring
Short Fiber Content (SFC) since many of the short fibers are hidden from the clamp
while scanning and they are ignored by the system. The Advanced Fiber Information
System (AFIS) is the most preferred for fiber length measurement. This system uses
mechanical means to individualize the fibers of a lint sample and then proceeds to
measure their various physical characteristics, including fiber length. Simply put,
AFIS accomplishes this by transporting the individualized fibers aerodynamically to
thread an assembly of a photodetector and an illumination source. The change in the
detector signal is then recorded as the fiber passes through the beam of light.
Ultimately, the fiber length is calculated by multiplying the speed of the fiber with the
time duration of the recorded signal. As AFIS uses a single detector, it is oblivious to
the orientation and curvature of the fibers in the air stream. This causes, among other
problems, an underestimation of fiber length or, equivalently, an overestimation of the
short fiber content (SFC) of the sample [4].
Much research has demonstrated that important cotton properties are measurable
by image processing. In previous research, Ikiz et al. [5-6] showed that an imaging
system could provide more accurate and precise measurements of fiber length. His
work shows great improvement over the current industry systems in terms of accuracy.
This research was the impetus for the work by Stroupe [7], who proposed a method of
cotton fiber delivery from a lint sample to an imaging system. Ikiz uses a CCD camera
with 256 gray levels to acquire the fiber images. Then he arranges the fibers in such a
way that there is either an individual fiber or only two fibers crossing over in each
image. A global thresholding is implemented to distinguish between the background
and the fibers. The centerpiece of the method proposed by Ikiz [6] is the computation
2
Texas Tech University, Huapeng Wang, 05/2007
of the medial axis from the captured images, which is used together with an ad hoc
adjustment formula, to estimate the fiber length. This method, while taking a major
step in the right direction, suffers from two main shortcomings. First, it attempts to
account for the digitization errors, which are introduced by representing the
curvilinear fiber with its medial axis, by introducing an adjustment formula. Secondly,
it cannot handle an image that contains multiple fibers. U.Heitmann [8] compares the
image-analysis measurement method with other test methods. This approach can
handle multiple-fiber image of certain fiber arrangements, but the accuracy is
questionable since in this work, the image analysis Mean Length by number is 2mm
shorter than AFIS Mean Length and we know that AFIS underestimates fiber length.
Cross-Sectional [9] and longitudinal [10] methods are two approaches to measure
the fiber maturity by image processing. They are both based on the microscopy system
and the fibers must be carefully cropped before acquiring the images.
In this thesis, for fiber length measurement, we have developed a new algorithm
that can process multiple-fiber images with both inter-fiber and intra-fiber crossings.
All the images are acquired under controlled conditions with an off-the-shelf scanner.
After getting the medial axis (MA) by morphology-based operations, we modify the
MAs to ensure that they have one pixel width without disconnectivity, which is useful
for fiber individualization. Then, a piece-wise polynomial curve fitting with adaptive
control point selection (ACPS) is designed for each individualized fiber to compensate
for the digitization error. We also intend to incorporate the fiber maturity estimation
with the fiber length measurement.
The long-term objectives of this work are as follows,
Capture a high-resolution image of multiple cotton fibers in real time while the
fibers are airborne.
From the captured image and using image processing techniques, extract defining
characteristics of the cotton fibers. These will certainly include the true fiber
length, but other features such as fiber maturity, fiber crimp and twist may also be
ascertained.
3
Texas Tech University, Huapeng Wang, 05/2007
In this thesis, we only focus on investigating the feasibility to calculate the true
fiber length and estimate the fiber maturity by image processing. The next step is to
set up a real-time system.
The thesis is organized as follows: Chapter 2 proposes and explains the length
measurement algorithm in detail and chapter 3 bring forward a way to estimate fiber
maturity. In chapter 4, we explain the designed Matlab Graphical User Interface (GUI)
for testing the algorithm. Then all the experimental results for the new algorithm are
shown and analyzed in chapter 5. Finally, chapter 6 points out our future work.
4
Texas Tech University, Huapeng Wang, 05/2007
CHAPTER 2
MEASUREMENT
Figure 2.2: (a) Original cotton fiber image (b) MA by using distance transform
2.2.1 Prepare cotton fiber samples and acquire the images (step1)
This step involves the acquisition of images of cotton fibers using a commercial
scanner. In order to make the background as clean as possible, we first spread some
ethanol on the screen of the scanner. Then we use a piece of cloth to clean it until there
is no visible mark on the screen. By using the tweezers, we carefully pick up
7
Texas Tech University, Huapeng Wang, 05/2007
individual fibers from sample bags and put them on the screen. We can allow some
crossings as well as loops for multiple fibers, but some degree of manual separation is
needed to make sure none of the following fiber arrangements appears:
More than two fibers cross at the same point (Figure 2.4 (a)).
Overlap of two fibers is six times longer than the fiber width (Figure 2.4 (b)).
A. The distance of the crossing point from any endpoint is less than two times the
fiber width (Figure 2.4 (c)).
Two fibers cross in more than one point and these points are less than six times
the fiber width apart (Figure 2.4 (d)).
We will explain the reasons for these forbidden cases later in section 2.2.5.
After setting down the fibers on the scanner bed, we put clean glass slides on top
of the fibers. In order to eliminate the noise in the background, we open the scanner
cover while scanning so that most of the noise in the background is out of focus. The
resolution of the scanned images is a big concern in this method, since high resolution
images will require long processing times and low resolution images will not contain
adequate information for length measurement. The scanner resolution is set at 1000
dpi to ensure that cotton fibers, whose ribbon widths range from 20 to 30 m, are
represented with at least one pixel. Note that undersampling in this way is not
8
Texas Tech University, Huapeng Wang, 05/2007
expected to cause any problems because, clearly, length measurements do not require
us to resolve the width of the fibers. In fact, fewer pixels in the radial direction will
render the ensuing medial axis computation more efficient. In the scanned images, the
area covered by fibers has significantly higher gray values than the background, and
pixels near the fiber edges have intermediate gray values, forming a transition band
between the fiber and the background.
Figure 2.6 Fiber smoothing (a) Fiber image before smoothing (b) Fiber image after smoothing
2.2.2.2 Threshold the grayscale images
9
Texas Tech University, Huapeng Wang, 05/2007
In this algorithm, we can simply use a global threshold value to binarize the
scanned images since the images are acquired under controlled conditions and the
background is kept out of focus. We use two methods to pick up the gray value for
thresholding.
a. Based on our experiments with hundreds of fiber images, a fixed gray value of 15
can be applied to the whole image. When the intensity value of a pixel is higher
than 15, it will be set to white in the binary image, and otherwise set to black.
b. By analyzing the histogram of the scanned fiber images, we can pick up an
adaptive gray value for global thresholding. This method can dynamically adjust
the threshold value to compensate for changes in the size of the images and the
number of fibers in each image.
A histogram is a distribution of the pixels against the gray scale, revealing
allocations of pixels belonging to the fibers and background. The histograms of the
two images in Figure 2.7 are presented in Figure 2.8. Based on our experiments,
since the gray values in the range of 0 to 10 always represent the background, we
simply make the histogram value in that range to be 0. As shown in Figure 2.8,
both histograms have two distinct modes and the pixel counts decrease gradually
toward the valley between the two peaks. The mode towards the high gray values
corresponds to the fibers in the scanned image. The other mode corresponds to the
background noise. The valley between the two peaks indicates both the fiber and
the background noise.
Figure 2.7 (a) Image with less noise in the background and more fibers (b) Image with more
noise in the background and less fibers
10
Texas Tech University, Huapeng Wang, 05/2007
At this point, the valley value (Gv) between the two peaks seems to be a
reasonable threshold value that separates the fiber from the background. The
approximate value of Gv is obtained from a scale-space representation and then
refined using equation (2.1).
Threshold = Gv c * ( Sb / S f ) (2.1)
11
Texas Tech University, Huapeng Wang, 05/2007
Figure 2.10 shows the binary images obtained from the original images in Figure 2.7.
2.2.3 Bridging broken fiber segments and removing noise from the background
After global thresholding, image closing [17] and noise removal are necessary
steps to bridge the gaps of cotton fibers and to remove the noise from the background.
2.2.3.1 Bridging broken fiber segments by image closing
Closing is one of the fundamental operations in morphological image processing
[17]. It generally fuses narrow breaks, eliminates small holes, and fills gaps in the
contours.
In this algorithm, we use a disk structuring element with a radius of 3. The reason
for picking such a structuring element is that in most experiments, the gap size was
found to be less than 5 pixels in length. Figure 2.11 shows the result before and after
image closing.
12
Texas Tech University, Huapeng Wang, 05/2007
Figure 2.11 (a) Binary image before image closing (b) Binary image after image closing
Figure 2.12: (a) Binary image before noise removal (b) Binary image after noise removal
In what follows, we use a typical image with multiple cotton fibers to explain the
remaining steps of the proposed algorithm. Figure 2.13 (a) is the original grayscale
image and Figure 2.13 (b) is the binary cotton fiber image after thresholding and
13
Texas Tech University, Huapeng Wang, 05/2007
removing background noise. As shown in Figure 2.13 (a), five fibers are arranged in
this image. Two of them are relatively short (2, 4) and two of them have loops (3, 5).
Figure 2.13 (a) Original image (b) Binary image after thresholding and background noise
removal
23 24 25
26 27 28
Take mask 1 in Figure 2.15 as an example. The valid code for this mask is
calculated by equation 2.2.
After creating the valid codes (23, 55, 31 and 63) for mask group 1, we scan
the weight mask over the entire image A, calculate a code for each overlapped
region using SOM and compare this code with the valid codes for mask group 1. If
there is a match, which means the pattern of this region in image A is the same as
one of the masks in mask group 1 (hit), the center pixel of this region is set to
white, otherwise (miss), it is set to black.
b. In the binary image B, we set the white pixel to black and black pixel to
white, so we build the inverse image ~B.
c. The boundary pixels are removed by the operation A and (~B).
Figure 2.18 An example of skeletonizing (a) Original Image (b)-(i) Images after being
consecutively skeletonized by eight mask groups (j) Medial axis
From this example, we can see that each mask group is responsible for removing
the boundary pixels in one specific direction. The iteration continues until no further
pixels are removed from the boundary of the object.
2.2.4.3 Medial axis image of multiple cotton fibers
The medial axis image for multiple cotton fibers is shown Figure 2.19. From this
point on, when we use the term delete or remove, it means setting the white pixel,
which correspond to the medial axis, values to black.
17
Texas Tech University, Huapeng Wang, 05/2007
2.2.5 Modify the medial axis and individualize the fibers by analyzing junctions
(Step5)
In this step, we basically try to modify four types of junctions (a, b, c, d). Junction
a and junction b are modified separately while we treat junction c and junction d
together.
2.2.5.1 Medial axis pixel definition
We introduce some definitions of the medial axis pixels in advance. Since the
medial axis is continuous and has one pixel in width, we divide the medial axis pixels
into 3 categories based on how many white neighbors a medial axis pixel has (Figure
2.20):
The medial axis pixels that have one white neighbor are defined as endpoints
(Figure 2.20 (a)).
The medial axis pixels that have two white neighbors are defined as medial
points (Figure 2.20 (b)).
The medial axis pixels that have 3 or more white neighbors are defined as
junction points (Figure 2.20 (c)).
18
Texas Tech University, Huapeng Wang, 05/2007
In Figure 2.21, each junction point is indicated by a small black circle. We notice
that for junction a and junction b, there is always one group of junction points in
the junction range. For junction c and junction d, in most of the cases, two groups
of junction points are in the junction range while sometimes one group of junction
points is in the junction range.
We subdivide junction c into X1 junction and T1 junction. Also junction d can
be subdivided into X2 junction and T2 junction. All the sub-categories
for junction c and junction d will be explained later in this section.
The category map of all junctions is shown in Figure 2.22. Junction a, junction b
and junction c are generated by one fiber while junction d is generated by two
fibers. We cannot treat the condition that more than two fibers cross at the same point
(Figure 2.4 (a)).
20
Texas Tech University, Huapeng Wang, 05/2007
Identification of junction a
The following flowchart shows the process by which to identify junction a:
Figure 2.25: (a1) Before junction range removal (a2) After junction range removal
Shorter branch
removal
Branch Replace the L corner
categorization by a straight line
Longer branch
removal
Figure 2.26: Flowchart for the modification of junction a
Branch categorization: If the small branch is shorter than twice the fiber width,
we come to the shorter branch removal block. On the other hand, if the branch is
in the range from twice the fiber width to six times the fiber width, we come to the
longer branch removal block. In our algorithm, we simply divide the number of
white pixels in the binary image (Figure 2.13 (b)) by the number of white
pixels in the medial axis image (Figure 2.19) to get an approximate fiber width.
Shorter branch removal: The small branch is removed from the fiber medial axis
as shown in Figure 2.27 (b). Notice that there is still a point of branch remaining in
Figure 2.27 (b). But after doing the L corner replacement, which is explained
later, this point will be deleted.
Figure 2.27 (a) Junction a before branch removal (b) Junction a after branch removal
22
Texas Tech University, Huapeng Wang, 05/2007
If the noise in the background happens to contact the fiber (Figure 2.23 (a)),
a longer branch may appear. Based on our experiments, this kind of branch is
always in the range from twice the fiber width to six times the fiber width.
b Introduce direction information in longer branch removal:
In this case, we need to make sure whether the segment to be removed is a
branch or a part of the medial axis. As shown in Figure 2.28 (a), a branch is
near the tip of the fiber. After deleting the junction range, if object 2 in Figure
2.28 (b) is less than twice the fiber width, we delete it since it will not affect
the fiber length significantly. But if object 2 is in the range defined for longer
branch, we can not delete it, so the trend of object 2 must be introduced in
order to keep it.
We calculate the vector from the start center to the end center (vector 1
in Figure 2.28 (c)). This vector indicates the junction trend of object 2. We also
use the same approach to calculate the direction vector of the main object
(vector 2 in Figure 2.28 (c)).
We find the angle ( ) between the two vectors as:
vector1 vector 2
= cos( ) (2.3)
vector1 vector 2
Figure 2.29 (a) Medial axis with L corner (b) Two new endpoints (c) L corner is replaced
by a straight line
24
Texas Tech University, Huapeng Wang, 05/2007
Junction point group detection and junction range removal: These two steps
are the same as the steps in junction a identification.
Junction b identification: After the removing step, in junction b, we can
detect three objects and two of them are relatively short. We consider them as
branches. Based on our experiments, these branches are usually shorter than twice
the fiber width.
Figure 2.31: (b1) Before junction range removal (b2) After junction range removal
Branch removal: The small branches as well as the junction point group are
removed from the fiber medial axis as shown in Figure 2.33 (b).
Extend endpoints of the medial axis to the fiber boundary: After deleting the
branches, we need to extend the medial axis to the fiber boundary. We use the
same method explained before to get a normalized vector indicating the direction
of the medial axis tips. We extend the medial axis in the direction of this vector
until the new extended endpoint of the medial axis is outside the fiber. Outside
means the current pixel to be extended is black in the binary fiber image (Figure
2.13 (b)). The result after extension is shown in Figure 2.33 (c).
Figure 2.33 (a) Junction b before branch removal (b) Junction b after branch removal (c)
Junction b after endpoint extension
All junction a and junction b are modified before the next step and the result is
shown in Figure 2.34 (b).
26
Texas Tech University, Huapeng Wang, 05/2007
27
Texas Tech University, Huapeng Wang, 05/2007
At first, we need to group the junction points that belong to the same X
junction. We do the grouping based on the fact that the junction bar is normally
less than six times the fiber width. If the two junction point groups as shown in
Figure 2.38 (X) are connected by a small bar which is less than six times the fiber
width, we group them together.
To make this grouping step work properly, we need to set some restrictions on
the image acquisition step.
As shown in Figure 2.39 (a), if the overlap part of two fibers is six times
longer than the fiber width, which may create a junction bar longer than six
times the fiber width, the algorithm can not group the junction points for the
same X junction.
As shown in Figure 2.39 (b), if two fibers cross in more than one point and
these points are less than six times the fiber width apart, the algorithm may
group together the junction points that belong to different X junction.
28
Texas Tech University, Huapeng Wang, 05/2007
b. Delete pixels in junction range and group the new endpoints for each junction
Pick up one group of junction points each time, then delete the small
rectangular range around this junction. Note that for X junction, there is always a
small junction bar inside (Figure 2.38 (X)), so make sure that the small bar is
within the deletion range. We can categorize all the junctions in Figure 2.40 (a)
into X junction and T junction by counting the number of new endpoints after
each deletion.
29
Texas Tech University, Huapeng Wang, 05/2007
d. Sub-categorize the type of junctions, reconstruct the junction range and re-
assign the labels
In this step of the algorithm, X1 junction and X2 junction are treated in the
same way while T1 junction and T2 junction are treated differently.
a) X junction
The occurrence of X1 junction and X2 junction
Self-crossing causes X1 junction while the crossing by two fibers causes
X2 junction.
Identification of X1 junction and X2 junction
As shown in Figure 2.42, if the four new endpoints introduced by junction
deletion have three different labels, the junction is defined as an X1 junction.
Similarly, if the four new endpoints introduced by junction deletion have four
different labels, the junction is defined as an X2 junction.
30
Texas Tech University, Huapeng Wang, 05/2007
Figure 2.42: Medial axis image with all X1 junction and X2 junction categorized
Modify the medial axis in X junction range and re-assign the labels
Each time one X1 junction or one X2 junction is picked, we reconstruct
the junction in the following way:
1) Connect the four new endpoints by two straight lines in such a way that
these two lines make a crossing inside the deletion range.
2) For the components connected by the same line, compare the label of
the two components and then assign the smaller label to both. Also assign
the smaller label to the straight line that connects these two components.
We show the reconstruction results of X junction as follows:
31
Texas Tech University, Huapeng Wang, 05/2007
b) T1 junction
The occurrence of T1 junction
For a self-crossing, if the distance of the crossing point (point 1 in Figure
2.44 (a)) from the endpoint (point 2 in Figure 2.44 (a)) is less than two times
32
Texas Tech University, Huapeng Wang, 05/2007
the fiber width. The segment between point 1 and point 2 in Figure 2.44 (a)
will be deleted after junction a modification. This will create a T1 junction
instead of an X1 junction.
Figure 2.44: Medial axis of self-crossing before and after junction a modification
Identification of T1 junction
If the three new endpoints introduced by junction deletion have two
different labels, the junction is defined as a T1 junction.
c) T2 junction
The occurrence of T2 junction
T2 junction is originally an X2 junction as shown in Figure 2.47 (a), but
after junction a modification, it becomes a T2 junction as shown in Figure
2.47 (b) since the small branch is deleted. We try to avoid this condition when
acquiring the images because it will shorten the fiber in length.
Figure 2.47: One special case that needs to be avoided in image acquisition
Identification of T2 junction
If the three new endpoints introduced by junction deletion have three
different labels, the junction is defined as a T2 junction.
34
Texas Tech University, Huapeng Wang, 05/2007
35
Texas Tech University, Huapeng Wang, 05/2007
2.2.7 Least Square Polynomial Curve fitting with ACPS (Adaptive Control Point
Selection)
Curve fitting method is used here because the digitized error is produced while
acquiring the image. In this chapter, the principle of least squares polynomial curve
fitting will be discussed first. Then a novel curve fitting method, least square
polynomial curve fitting with adaptive control point selection (ACPS), is proposed.
This method is specifically designed for curvy objects, like fibers.
2.2.7.1 Least squares polynomial curve fitting [19-20]
Least squares method is a mathematical procedure for finding the best fitting curve
to a given set of points by minimizing the sum of the squares of the offsets (the
residuals) of the points from the curve. The sum of the squares of the offsets is used
instead of the offset absolute values because this allows the residuals to be treated as a
continuous differentiable quantity.
36
Texas Tech University, Huapeng Wang, 05/2007
(a) (b)
Figure 2.51: (a) Vertical offsets (b) perpendicular offsets
In practice, the vertical offsets (Figure 2.51 (a)) from a line (polynomial, surface,
hyperplane, etc.) are almost always minimized instead of the perpendicular offsets
(Figure 2.51 (b)). This allows uncertainties of the data points along the x- and y-axes
to be incorporated simply, and also provides a much simpler analytic form for the
fitting parameters than would be obtained using a fit based on perpendicular offsets. In
addition, the fitting technique can be easily generalized from a best-fit line to a best fit
polynomial when sums of vertical distances are used. In any case, for a reasonable
number of noisy data points, the difference between vertical and perpendicular fits is
quite small.
Since least squares polynomial fitting is used in the algorithm, only principle of
polynomial fitting is discussed below. The kth degree polynomial can be written as:
y = a0 + a1 x + + ak x k , (2.4)
The residual, therefore, is given by:
n
R = [ yi (a0 + a1 xi + + ak xik )]2 ,
2
(2.5)
i =1
2 2
In order to make R minimum, the partial derivative of R with respect to the
polynomial coefficients should be zeros,
( R 2 ) n
= 2 [ yi (a0 + a1 xi + ak xik )] = 0, (2.6)
a0 i =1
37
Texas Tech University, Huapeng Wang, 05/2007
( R 2 ) n
= 2 [ yi (a0 + a1 xi + ak xik )]xi = 0, (2.7)
a1 i =1
( R2 ) n
= 2 [ yi (a0 + a1 xi + ak xik )]xik = 0, (2.8)
ak i =1
We can rewrite the equations from 2.6 to 2.8 in the matrix form as follows,
n n yi
n n k
x x
i =1 i i =1 i
a0 i =1
n x k +1 xy
i =1 i 1 = i =1 i i ,
n 2 n n
x
i =1 i
x
i =1 i
a
(2.9)
n k
i =1 xi k +1
i=1 i i =1 i i
ak n x k y
n n
x
i =1 i
x 2k
This is a Vandermonde matrix which can be decomposed into two matrices
multiplied together,
n
n n k
x
i =1 i
x
i =1 i
1 1 1 1 x1 x1k
n x
x k +1 x1 x2
i =1 i
n n
2
x x2k 1 x2 x2k
i =1 i i =1 i =
, (2.10)
n k xk xk
xnk 1 xn xnk
i =1 xi k +1
i=1 xi 1 2
n n 2k
x
i =1 i
n yi
i =1 1 1 1 y1
n x y x1 x2
x2k y2
i =1 i i = ,
(2.11)
n k xk xk
i =1 xi yi 1 2 xnk yn
38
Texas Tech University, Huapeng Wang, 05/2007
y1 1 x1 x1k a0
y
2 = 1 x2 x2k a1
, (2.12)
yn 1 xn xn ak
k
y = Xa, (2.13)
X T y = X T Xa (2.14)
a = ( X T X ) 1 X T y. (2.15)
2.2.7.2 Least Square Polynomial Curve Fitting with Adaptive Control Point Selection
(ACPS)
For very curvy objects like fibers, only one polynomial is not enough to fit the data
so as to describe the shape of the fiber properly. Normally, piece-wise curve fitting
methods are used. The common piece-wise curve fitting methods use certain number
of control points to divide the whole fiber medial axis into segments and then fit each
segment to a polynomial curve of certain order. This will sometimes create improper
fitting since the changes of shape from one segment to another can be large. For curve
fitting with adaptive control point selection, the segment is divided in a way to make
sure that there is at most one critical point within each segment. For each segment, a
5th order polynomial is used to fit the data.
We show the flowchart of curve fitting with ACPS as follows:
39
Texas Tech University, Huapeng Wang, 05/2007
Check Accuracy
1 2 3
8 4
7 6 5
40
Texas Tech University, Huapeng Wang, 05/2007
Since the modified medial axis of a fiber has one pixel in width, we can trace
the data points sequentially from one end to the other. We show the algorithm
flowchart for setting the critical points as follows,
41
Texas Tech University, Huapeng Wang, 05/2007
As shown in Figure 2.55, we follow the flowchart in Figure 2.54 from endpoint
1 to endpoint2. Finally, grid 11 and 16 are the critical points we found.
Figure 2.56 shows the critical points in the medial axis of a cotton fiber.
Figure 2.56 Modified medial axis with critical points indicated in gray.
42
Texas Tech University, Huapeng Wang, 05/2007
If there are no critical points in the medial axis, we simply trace the medial
axis from one endpoint to the other and then set a control point after 40
consecutive pixels.
If there is at least one critical point in the medial axis, the following steps
are used for setting the control points.
Break the medial axis at the critical points as shown in Figure 2.57.
By counting the number of pixels in each segment, we define three
categories of segments.
Figure 2.57: Medial axis with critical points in gray and endpoints in white
For setting control points, a different method is used for each category.
If the segment has less than 5 pixels, no control point is set in this
segment. (Segment 1 in Figure 2.58)
If the segment has less than 40 pixels but more than 5 pixels, a control
point is set in the middle of the segment. (Segment 4 and 5 in Figure 2.58)
Figure 2.58: Medial axis with control points indicated in empty circle, critical points in
gray and endpoints in white
43
Texas Tech University, Huapeng Wang, 05/2007
Figure 2.59: Medial axis with control points indicated in empty circle, critical points in
gray and endpoints in white
After setting all the control points, the segment between two consecutive
control points contains either a maximum, a minimum, or a short segment without
a change in direction. Each segment is then used for curve fitting.
Figure 2.60 Medial axis with control points indicated in empty circle and critical points in
gray
d. Check Accuracy
After the piece-wise curve fitting, we compare all the fitted data points with
the original data points accordingly. If the distance between these two is larger
than 3 pixels, which means the fitted curve at this position is far away from the
original medial axis, the coordinates of the original data point are used to calculate
the fiber length instead of the fitted data point.
45
Texas Tech University, Huapeng Wang, 05/2007
distance. So as shown in Figure 2.62 (b), we keep all the other fitted data points as
well as the marked three original data points when calculating the length.
2.2.8 Fiber length calculation
We calculate the Euclidean distance between two consecutive data points and add
all the distances to get the fiber length. For pixels p and q with coordinates (x, y) and
(s, t), the Euclidean distance between p and q is defined as:
1
De ( p, q) = ( x s)2 + ( y t )2 2 (2.16)
46
Texas Tech University, Huapeng Wang, 05/2007
CHAPTER 3
MEASUREMENT
The current image analysis based methods can provide direct measurements on
fiber fineness and maturity [9-10], which is used as reference data to calibrate high
speed instruments. The fiber maturity can be assessed from fiber cross sections [9].
This measurement is highly dependent on two main steps: cross sectioning and image
segmentation. Fiber cross sections are prepared and transported to the microscopy
system for image acquisition. Image segmentation separates fiber cross sections from
the background and from each other. Fiber maturity can be directly validated from
parameters calculated from each fiber cross section: perimeter of a cross section,
average thickness of the wall. For fiber maturity estimation from the longitudinal
view [10], the fibers are cropped into segments, spread on a glass slide and then
imaged by a video camera. For each segment, the maximum, minimum, mean and
standard deviation of fiber width is derived by this longitudinal method and the data
are repeatable and highly related to the data obtained from other test methods. In this
thesis, we intend to develop a combined method that can calculate the fiber length and
estimate the fiber maturity for the scanned image of whole fibers.
3.1 Motivation
Compared with the immature fibers, mature fibers have thicker walls. When we
acquire the images of whole cotton fibers with a scanner, the pixel gray values along
the fiber medial axis are expected to exhibit differences between mature and immature
fibers. Also, the immature fibers are flatter than the mature fibers since the lumens of
the immature fibers collapse, which means the mature fibers are more likely to twist.
So for immature fibers, the pixel values along the medial axis should have less
variation than mature fibers.
47
Texas Tech University, Huapeng Wang, 05/2007
48
Texas Tech University, Huapeng Wang, 05/2007
CHAPTER 4
In order to make the fiber length calculation algorithm more convenient and
friendly to users, a Matlab based GUI program has been developed. In this GUI, there
are two processing modes: single fiber mode and batch mode. The single fiber mode is
used for testing, while the batch mode is used for processing a number of images and
calculating the length distribution as well as other useful parameters. In this chapter,
we describe the functions of these two modes in detail.
Single fiber mode can process only one image at a time. In this mode, every
intermediate result is shown in a pop-up Matlab figure. This mode is used for the user
to validate the algorithm and make sure every step is working properly.
49
Texas Tech University, Huapeng Wang, 05/2007
We create a list of two options on top right corner of the GUI to display images.
The options include original and complement. Switching the option will
change the way the image is displayed, as shown in Figure 4.2.
Figure 4.2 Display options in single fiber mode: Original (left) and Complement (right)
50
Texas Tech University, Huapeng Wang, 05/2007
Crop images - By clicking on the crop button, the users can select their range of
interest (ROI) on the image displayed in the right window. And this cropped
image will be shown on the left window in text box 3.
Save cropped images - After clicking on the save button, a pop-up dialog box
(Figure 4.4) appears and the users can save the cropped image in the directory
they want. This option is used to prepare images for batch mode processing.
Figure 4.4 Pop-up dialog box for saving the cropped image
Process image - The cropped image will be processed after clicking on the
process button. While processing, a waiting bar (Figure 4.5) shows up is
displayed.
In single fiber mode, four kinds of Matlab figures are displayed during the
processing (Figure 4.6): (a) Binarized image after preprocessing; (b) Medial axis
after modifications; (c) Separate detected fibers; (d) Fitted curves for detected
fibers. The users can validate the whole process from these figures. If the fiber is
touching the boundary of the cropped image, the program will not detect this
fiber.
51
Texas Tech University, Huapeng Wang, 05/2007
Figure 4.6 Four intermediate figures (a) Binarized image (b) Medial axis image after
axis modifications (c) Individualized fiber (Here, only one fiber is shown) (d) Fitted
curve of each fiber
When the user switches the radio button to batch mode, the interface will change
correspondingly. Batch mode is the actual working mode. It can process all the images
52
Texas Tech University, Huapeng Wang, 05/2007
with multiple fibers in the current working directory and produce the length
distribution as well as several useful parameters.
Processing setup - Before processing, the user needs to select the folder that contains
the images to be processed. It can be done by changing the working directory (Figure
4.8). Whenever the working path changes, the list box below will show all the files
inside the current directory. If necessary, we may also need to change the resolution of
the images to be processed.
45 90
40 80
35 70
Cumulative Percent
Number Percent
30 60
25 50
20 40
15 30
10 20
5 10
0 0
0 0.5 1 1.5 2 2.5
Length (inch)
The users can also save or print the length distribution by clicking the save or
print buttons on the batch mode interface. Two pop-up windows (Figure 4.10)
will show up after clicking.
(a) (b)
Figure 4.10 (a) Dialog for saving the length distribution (b) Dialog for printing the length
distribution
54
Texas Tech University, Huapeng Wang, 05/2007
The user can also mark the detected fibers. This option is in text box 4 of batch
mode. In this case, for each image in the current working directory, a new
image (Figure 4.12), which indicates all the detected fibers, will be created and
saved.
Useful parameters - After batch mode processing, some very useful parameters
are also calculated and displayed on the GUI interface (Figure 4.13).
55
Texas Tech University, Huapeng Wang, 05/2007
56
Texas Tech University, Huapeng Wang, 05/2007
CHAPTER 5
In this section, we describe the results of five experiments with the proposed
system for fiber length measurement. The first of these is set up to verify the impact of
the two main components of our algorithm; namely, medial axis modification and
curve fitting with ACPS. The second experiment aims to show the improvement in
accuracy by curve fitting with ACPS. Also, we can clearly see the consistency of the
algorithm with respect to different resolutions and shapes. The third and fourth
experiments are performed using cotton fibers from samples that have been processed
with AFIS. In experiment 5, we create and process images with multiple fibers,
compare the parameters calculated from our algorithm with the ones form AFIS, and
calculate the error rate of the proposed algorithm.
57
Texas Tech University, Huapeng Wang, 05/2007
5.1.2 Experiment 1
In the first experiment, the 4-inch optical fiber is scanned at a resolution of 1000
pixels/inch in five different orientations and shapes (Horizontal, Vertical, Inclined,
Curved, and Curved with a loop). The measured lengths obtained before medial axis
modification (BMAM), after medial axis modification (AMAM), and after curve
fitting with ACPS (ACF) were then compared (Table 5.1). For BMAM and AMAM,
the following equation is used to calculate the length of the MA:
Num1 + ( 2 1) Num 2 / 2
Fiber Length (inch) = (5.1)
resoltion ( pixels / inch)
where Num1 is the number of pixels in MA. We visit the MA pixels one by one, and
each time, we count the number of MA pixels that are in grid 1, 3, 5 or 7 of the
visiting pixel. In the end, we add up all these numbers to get Num2.
1 2 3
8 4
7 6 5
58
Texas Tech University, Huapeng Wang, 05/2007
Experimental results
Table 5.1: Length of the 4-inch optical fiber with different shapes
Optical Fiber Place in the proposed Measured length
Relative error
Shape algorithm (inch)
BMAM 4.1535 3.89%
Horizontal AMAM 4.1457 3.61%
ACF 4.0118 0.3%
BMAM 4.1575 3.94%
Vertical AMAM 4.1496 3.74%
ACF 4.0197 0.49%
BMAM 4.1614 3.99%
Inclined AMAM 4.1496 3.75%
ACF 4.0157 0.39%
BMAM 4.1811 4.53%
Curved AMAM 4.1693 4.24%
ACF 4.0315 0.79%
BMAM 4.1890 4.70%
Curved with a
AMAM 4.1772 4.41%
loop
ACF 4.0276 0.69%
Analysis
A number of important conclusions may be reached by observing this data. First,
without curve fitting, as noticed by Yuksel Ikiz [7-8], the measured length is always
longer than the true length by about 3.5% to 4.5% and this error increases with the
complexity of the shape. Second, as expected, the orientation and shape of the fiber
impact the accuracy with which its length is estimated. Third, following digitization,
all measurement schemes tend to overestimate the fiber length. Fourth, on average, the
medial axis modification step of the proposed algorithm reduced measurement errors
by 0.2%. This reduction is expected to be far greater for cotton fibers that may exhibit
inter-fiber crossovers and whose structures can differ drastically from the perfect
cylindrical shape of an optical fiber. Finally, it is observed that the curve fitting with
ACPS component of the algorithm consistently reduces the measurement error to
under the desired target of 1%.
59
Texas Tech University, Huapeng Wang, 05/2007
5.1.3 Experiment 2
The polynomial curve fitting with ACPS is an essential step before calculating
the fiber length since the fiber shape is well preserved by this method and it can
decrease the digitized error as shown in Figure 5.3.
Figure 5.3: (a) MA before curve fitting (b) MA after curve fitting
Although we can visually see the improvement by polynomial curve fitting with
ACPS in Figure 5.3, it is still important to know how much it affects the measured
length with respect to different fiber shapes. In this experiment, a 1.5 inch nylon fiber
is scanned in three different shapes as shown in Figure 5.4(vertical, C-shape and S-
shape) with four different resolutions (100dpi, 200dpi, 300dpi and 600dpi). For each
shape, we compared the measured length under two conditions: no curve fitting and
polynomial curve fitting with ACPS.
Figure 5.4: 1.5-inch nylon fiber (a) shape 1 (b) shape 2 (c) shape 3
60
Texas Tech University, Huapeng Wang, 05/2007
Experimental results
Analysis
As shown from Figure 5.5 to Figure 5.7, in general, the polynomial curve fitting
with ACPS method decreases the error for all the 3 shapes with 4 different resolutions.
The algorithm works better when the resolution is picked larger than 300dpi. At
600dpi resolution, although the measured length before curve fitting shows a large
61
Texas Tech University, Huapeng Wang, 05/2007
difference between different shapes of the same fiber, the curve fitting algorithm
consistently decreases the relative error to within 1% The curve fitting method with
ACPS needs longer processing time, so when time is the primary concern, the user can
consider using piece-wise curve fitting without ASCP.
5.1.4 Experiment 3
Cotton fiber samples of known length are used here to validate the algorithm. We
randomly pick 20 fibers from each sample bundle with known length (3/16 inch, 5/16
inch, 7/16 inch, 9/16 inch, 11/16 inch, 13/16 inch, 15/16 inch, 17/16 inch, 19/16 inch,
21/16 inch and 23/16 inch) and each fiber is scanned in three different resolutions:
1000 dpi, 1200 dpi and 1500 dpi.
Experimental results
We show the length distributions of each bundle with different resolutions as follows,
Figure 5.8: Length distribution of 3/16 (0.1875 inch) bundle at three different resolutions
Figure 5.9: Length distribution of 5/16 (0.3125 inch) bundle at three different resolutions
62
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.10: Length distribution of 7/16 (0.4375 inch) bundle at three different resolutions
Figure 5.11: Length distribution of 9/16 (0.5625 inch) bundle at three different resolutions
Figure 5.12: Length distribution of 11/16 (0.6875 inch) bundle at three different resolutions
63
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.13: Length distribution of 13/16 (0.8125 inch) bundle at three different resolutions
Figure 5.14: Length distribution of 15/16 (0.9375 inch) bundle at three different resolutions
Figure 5.15: Length distribution of 17/16 (1.0625 inch) bundle at three different resolutions
64
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.16: Length distribution of 19/16 (1.1875 inch) bundle at three different resolutions
Figure 5.17: Length distribution of 21/16 (1.3125 inch) bundle at three different resolutions
Figure 5.18: Length distribution of 23/16 (1.4375 inch) bundle at three different resolutions
65
Texas Tech University, Huapeng Wang, 05/2007
Analysis
The fiber length calculated by the proposed algorithm is close to the known length.
The algorithm can detect the length difference of cotton fibers in the same bundle,
which makes the length distributions spread out. 1000 dpi resolution is working
consistently for cotton fibers with different length.
5.1.5 Experiment 4
In this experiment, 458 cotton fibers are randomly selected from a sample of 3000
fibers that have been processed with AFIS. These fibers are scanned at a resolution of
1000dpi and processed in batch mode with results shown in Figure 5.19 and Table 5.2.
Experimental results
Figure 5.19: Length distribution by AFIS and by proposed image analysis system
Table 5.2: Length statistics for cotton fibers used in AFIS and the proposed algorithm
Proposed
Proposed Algorithm
Algorithm
AFIS (w/ adaptive
(w/ static
threshold)
threshold)
Number of
3,000 458 458
fibers
Mean length
0.65 0.74 0.73
(inch)
SFC
35.3 25.8 25.2
(%)
66
Texas Tech University, Huapeng Wang, 05/2007
Analysis
Although the sample size for the proposed system is only 15% of that used for AFIS,
the corresponding length distribution (Figure 5.19) still exhibits a clear local peak in
the range around 0.5 inch. A similar peak was noticed by Schneider [21], who
attributed it to fiber breakage during ginning. Length distribution calculated by our
algorithm is more compact than the one calculated by AFIS. Furthermore, it is
observed that while our system finds no fibers to be longer than 2 inch, AFIS indicates
the presence of some unusually long fibers. This known problem with AFIS occurs
when one or more short fibers delivered to its photodetector appear as one long fiber.
In Table 5.2, the mean length indicates the average length of all the fibers in the test
specimen. The short fiber content (SFC) is the percentage of fibers in the test
specimen that are shorter than 0.5 inch in length, as defined by ASTM Standards [22].
As expected, the mean length is significantly larger with image analysis, while the
short fiber content (SFC) is lower. The discrepancy in the mean length is due to the
fact that to AFIS, even a properly oriented long fiber with crimps will appear shorter
than it is, leading to a global underestimation of fiber length. The proposed system
also substantiates the well-known problem that AFIS tends to overestimate the SFC.
Finally, Table 5.2 shows the effectiveness of the adaptive thresholding method
introduced before. It is observed that the results obtained by this method are nearly
identical to those obtained by using a manually-selected static threshold value.
5.1.6 Experiment 5
In this experiment, the samples named P271, P297, P341, P401, P472, P028,
P435, P476, P243 and P238 are taken from five cotton bales. For each sample, a
database of about 100 multiple-fiber images is created in 1000 dpi. For each sample,
we process all the images in batch mode and save an image with every detected fiber
marked (Figure 5.20 (b)). During the processing, we visually compared each
individualized fiber with the corresponding one in the original image and counted the
number of erroneously detected fibers. For the original image in Figure 5.20 (a), fiber
3, 7 and 10 are erroneously detected fibers. The reason for the wrong detection of this
particular image is overlap of two fibers is six times longer than the fiber width.
67
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.20: (a) Original fiber image (b) Saved image with detected fibers indicated
Experimental results
Two histograms are created for each sample: one from the whole data and the
other from the data that corresponds to the properly detected fibers. We show the
experimental results as follows:
Figure 5.21: Sample P271 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
68
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.22: Sample P297 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
Figure 5.23: Sample P472 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
Figure 5.24: Sample P028 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
69
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.25: Sample P401 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
Figure 5.26: Sample P341 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
Figure 5.27: Sample P435 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
70
Texas Tech University, Huapeng Wang, 05/2007
Figure 5.28: Sample P476 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
Figure 5.29: Sample P243 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
Figure 5.30: Sample P238 (a) Histogram from the accurate data set (b) Histogram from the
whole data set
71
Texas Tech University, Huapeng Wang, 05/2007
Analysis
The main reason that causes the algorithm to produce erroneous length data is that
the scanned images have some forbidden arrangements as explained in Chapter 2. As
shown in Table 5.3, except for P297, compared with the 97% rejection rate of AFIS,
our image analysis method shows an error rate less than 7%. Table 5.4 compares the
AFIS mean length (ML) by number with the image analysis mean length by number.
72
Texas Tech University, Huapeng Wang, 05/2007
Although compared with AFIS, the size of each sample for this analysis is relatively
small, some of the image analysis length distributions still present a clear local peak in
the range around 0.5 inch. Again the mean length by number is significantly larger
with image analysis for all the 10 samples. For a given bale ID, the AFIS length is
larger for DII slivers than for card slivers. This is due to the crimp removal performed
with the drawing operation. It confirms that the measured AFIS length is influenced
by the amount of crimp. An inverse situation is observed for the image analysis results.
Indeed, the mean length by number is shorter for the DII slivers. This is a logical
result because drawing can and will break some fibers.
One sample of extremely mature fibers and one sample of extremely immature
fibers are used here to test our algorithm. In experiment 1, we randomly pick 20 fibers
from each sample and get the grayscale image for each fiber with a resolution of 8000
dpi. Then the algorithm explained in Chapter 3 is used to get the mean and variance of
the pixel values along the medial axis of each fiber. Our hypothesis is that the means
and variations in gray level along a fiber should be linked to fiber maturity. We use the
same algorithm for experiment 2, in which we pick 30 fibers from each sample and
calculate the mean and variance in 7 different channels (red, green, blue, hue,
saturation, value, grayscale).
Results for experiment 1
74
Texas Tech University, Huapeng Wang, 05/2007
75
Texas Tech University, Huapeng Wang, 05/2007
76
Texas Tech University, Huapeng Wang, 05/2007
77
Texas Tech University, Huapeng Wang, 05/2007
Analysis
On average, there are obvious differences between the two samples for both mean
values and variance. The mean of pixel values along the fiber medial axis for the
78
Texas Tech University, Huapeng Wang, 05/2007
mature fiber is consistently higher than immature fibers in grayscale, red, green, blue
and value channels, but smaller in hue and saturation channels. The variance of pixel
values along the fiber medial axis for the mature fiber is consistently higher than
immature fibers in all the 7 channels. The red channel appears to have a better
discriminatory power than the other channels.
79
Texas Tech University, Huapeng Wang, 05/2007
CHAPTER 6
Fiber length is, to the textile industry, one the most important properties in
marketing and processing. In general, longer fibers are stronger so they have a much
higher price. The length property is not only related to other cotton fiber properties
like strength and fineness, but it is the fundamental property that determines the yarn
quality, which finally contributes to fabric quality. Also, several mechanical
processing steps, such as spinning, knitting and weaving, are highly affected by the
fiber length and its distribution. So generally speaking, accurately measure the fiber
length and its distribution is crucial for the textile industry. The current commercial
systems for fiber length measurement all have their own problems. Oiled-Plate and
Array method both need manual operations while the HVI system measures fiber
length indirectly. The AFIS system processes cotton fibers in a reasonable time span,
but it overestimates both the SFC and longer fibers. Also the AFIS length distribution
is highly influenced by fiber crimp, so the mean length by AFIS is smaller than the
actual mean length.
In this thesis, we have presented an imaging system intended for use as a reference
method for the accurate measurement of cotton fiber length. In its present state, the
system is composed of a scanner and customized image processing algorithms that
compute the length of each fiber in the image with relative errors well within 1%.
Although the system requires some degree of separation between the individual fibers
at scan time, it is shown to produce highly accurate length measurements that are
invariant to fiber orientation, shape, inter-fiber intersections, and intra-fiber crimps
and crossovers. The presented system provides significant improvements in terms of
ease of use and accuracy over the existing imaging system, introduced by Ikiz [7-8]. It
should be noted, however, that in its present state, the proposed algorithm can not
handle several cases, but it obviously lowers the requirements for fiber
individualization, which will decrease the complexity for system implementation.
Currently, we are investigating the possibility of adapting the proposed method for
real-time operation.
80
Texas Tech University, Huapeng Wang, 05/2007
REFERENCES
2. ASTM, Standard D 1440-96, Standard Test Method for Length and Length
Distribution of Cotton Fibers (array Method), Annual Book of ASTM Standards.
Vol. 07.01, 334-339, 2006.
3. ASTM, Standard D 1447-00, Standard Test Method for Length and Length
Distribution of Cotton Fibers by Fibrograph Measurement, Annual Book of ASTM
Standards. Vol. 07.01, 357-361, 2006.
4. Bragg, C.K. and Shofner, F.M. A Rapid, Direct Measurement of Short Fiber
Content. Textile Research Journal 63 (1993): 171-176.
5. Ikiz, Y., Rust, J., Trussel, J., and Jasper, W. Fiber Length Measurement by Image
Processing, Textile Research Journal 71 (2001): 905-910.
7. Stroupe, S.P. Method for Preparation and Delivery of Cotton Fibers for Digital
Imaging. Master thesis, North Carolina State University, 2002.
9. B.Xu and Y.Huang. Image Analysis for Cotton Fibers, Part II: Cross_Sectional
Measurement. The University of Texas at Austin.
10. B.Xu and Y.Huang Image Analysis for Cotton Fibers, Part I: Longitudinal
Measurements. Textile Research. Journal 72(8) (2002): 713-720.
12. Ferreira, Afonso and Ubeda, Stephane Computing the Medial Axis Transform in
Parallel With Eight Scan Operations. IEEE PAMI 21 (3) (March 1999).
81
Texas Tech University, Huapeng Wang, 05/2007
14. Arcelli, C. and Sanniti Di Baja, G. On the Sequantial Approach to Medial Line
Thinning Transform. IEEE Trans. Systems, Man, and Cybernetics SMC-8, 2
(1978): 139-144.
16. Pratt, William K, eds. Digital Image Processing. John Wiley & Sons, Inc.,1991.
17. Rafael C. Gonzalez and Richard E. Woods, eds. Digital Image Processing.
18. Haralick, Robert M., and Linda G.Shapiro, eds. Computer and Robot Vision,
Volume I. Addison-Wesley, 1992, pp 28-48.
19. http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html
21. Schneider, T., Rettig, D. and Mussig, J. Single Fiber Based Determination of
Short Fiber Content, Proc. Beltwide Cotton Conferences Cotton Quality
Measurements, 1511-1513, San Diego, CA, 1994.
82
Texas Tech University, Huapeng Wang, 05/2007
PERMISSION TO COPY
degree at Texas Tech University or Texas Tech University Health Sciences Center, I
agree that the Library and my major department shall make it freely available for
research purposes. Permission to copy this thesis for scholarly purposes may be
granted by the Director of the Library or my major professor. It is understood that any
copying or publication of this thesis for financial gain shall not be allowed without my
further written permission and that any user may be liable for copyright infringement.
________________________________________ _________________________
Student Signature Date