8.4. IDENTIFICATION OF TRASH IN COTTON 263
dynamic allocation of cleaning equipment to produce high-quality cotton. In
this example, we describe a computer-vision-based system for on-line identifica-
tion of trash types. A fuzzy inference system(FIS),namelyANFIS,isusedto
classify trash types.
For the purposes of this study, trash is classified into four types: bark, stick,
leaf, or pepper trash. Each training sample contained a single type of trash, and
two sets of training samples were prepared for each type of trash. Trash objects
were chosen from a bale of cotton to include all possible extremes with regards
to size and shape of the trash types. The features used to provide distinguishing
characteristics among the trash types were
ïarea(the number of pixels within the feature)
ïsolidity(area/convex area)
ïEdif(the difference between extent measures at 0 ◦and 45 ◦,whereextent
= Net Area/Bounding Rectangle)
These shape descriptors are numerical values and for any classifier to perform
with a high degree of classification accuracy, it is required that these numerical
values are distinct among the trash types. This requires that the trash objects
commonly found in ginned cotton have forms or shapes that prescribe to the
definition of a typical trash type. These definitions can be easily expressed
based on human perception and judgment. This is based on the experience and
knowledge humans have acquired over a long period of time. Based on certain
physical attributes associated with each trash type, it is possible to describe a
certain type of trash object as bark, stick, leaf, or pepper.
In this section, an adaptive network is described that is functionally equiv-
alent to a fuzzy inference system used for the classification of the trash types.
The architecture that is used in the development of the classifier is referred to
as an adaptive network-based fuzzy inference system (ANFIS).
To understand better the performance of the structure, the ANFIS archi-
tecture is presented for a system with two inputs and a single output. The
principle is expanded in developing a system to classify the trash types using
area,solidity,andEdifas inputs to the structure. Fuzzy rules developed for
the structure are also presented and the classification results for thefive test
samples are examined to evaluate the performance of the ANFIS as a classifier.
ANFIS architecture Consider a fuzzy inference system that has two inputs
xandyand a singletonzas its output. For afirst-order Sugeno model, a
common rule set with two fuzzy ìIf... then... î rules is as follows:
Rule 1 :IfxisA 1 andyisB 1 thenz=f 1 =a^10 +a^11 x+a^12 y
Rule 2 :IfxisA 2 andyisB 2 thenz=f 2 =a^20 +a^21 x+a^22 y
(8.3)
Figure 8.12 (a) shows the reasoning mechanism for this Sugeno model. The
corresponding equivalent ANFIS architecture, which we discuss now, is shown