3.3 Other Features
After the previous features studies, we have
dedicated the last features study stage to the analysis
of other features and processes which could give
positive results in matter of cork classification. After
a deep observation of the classification parameters
used by the human experts in their classifications we
found some guidelines that were worthy to evaluate.
The two studied features have been the hole
existence in the cork area and the biggest defect size
in the cork:
• Hole study: It was observed that the cork
stoppers/disks with holes were relegated to low-
quality classes, in spite of their good cork
texture or their pore homogeneity. The followed
methodology has been to make the classification
by means of the usual Euclidean classifier, but
we have considered the number of hole pixels
when we have made the definitive
classification. This feature only has some
discrimination power in the low-quality cork
classes, concretely from class 4 to class 6 which
are those that begin to have some holes in their
area, reason why this feature must be combined
with another feature that has discrimination
power in the rest of classes. In this case, we
have chosen the defect area.
• The biggest defect size study: It was observed
that those cork stoppers/disks with big defects
also were classified in the lower classes, in spite
of the possible positive details that they could
have. The methodology followed in order to
obtain this feature has been making successive
binary erosions on the thresholded image, with a
5x5 structuring element (each iteration subtracts
two pixels from the defect perimeter). In each
iteration the remaining image percentage is
controlled. In this way, it is possible to obtain
easily the size that the biggest defect could
have, taking into account the number of
iterations required to leave the image in blank.
Finally, the optimum feature selected in this
study has been the biggest defect size in the cork
area.
4 CLASSIFIERS
In this last study, in order to classify a cork disk in a
specific class, we will use the corresponding
classification algorithm based on the four features
selected: defects area (using a static thresholding
method with a heuristically fixed threshold), texture
contrast, texture entropy, the biggest defect size. The
four classifiers chosen for this study are the
following (Shapiro, 2001) (Sonka, 1998): a Back-
Propagation neural network, a K-means classifier,
the K-nearest neighbours classification algorithm,
and a minimum Euclidean distance classifier:
• Back-Propagation neural classifier: The
network designed for this study has a 4x7x3
architecture. The weights associated to the
network interconnections are initialized
randomly and are adjusted during the learning.
The type of learning used by this neural network
is supervised.
• K-means classifier: This classification
algorithm makes reference to the existence of a
number of K classes or patterns, and therefore,
it is necessary to know the number of classes.
We know, a priori, that we have 7 classes,
reason why the algorithm is suitable for our
necessities.
• K-nearest neighbours classifier: This algorithm
is part of the methods group known as
correlations analysis methods. It consists in
classifying an unknown feature vector,
depending on the sample or K samples of the
training set that is/are more similar to it, or what
is the same, which is/are nearer to this vector in
terms of minimum distance. This is what we
know as rule of the nearest neighbours. The
classification algorithm of the K-nearest
neighbours even can be very efficient when the
classes have overlapping, and this is very
interesting for our problem (cork quality
classes). We have evaluated several K sizes (10,
20, 49,…), and the best size was 20.
• Euclidean classifier: The classification
algorithm supposes several classes with their
respective prototypes (centroids). Given an
unknown feature vector to classify, the
Euclidean classifier will associate this vector to
the class whose prototype is closest to it, that is,
the prototype whose Euclidean distance is the
smallest. Our study have been made for four
versions of the Euclidean distance: simple
Euclidean distance (see equation below),
Euclidean distance with prefiltrate (certain
corks were classified directly, without passing
the Euclidean classifier, to low-quality classes if
a hole in them was detected, that is, we used a
set of decision rules in addition to the Euclidean
classifier), scaled Euclidean distance (see
equation below) and modified scaled Euclidean
distance according to the standard deviation (see
A SOLUTION FOR EVALUATING THE STOPPER QUALITY IN THE CORK INDUSTRY
337