In this activity, we studied pattern recognition. In image processing, features are defined as quantifiable properties such as color, shape, size etc. A pattern is a set of features. A class, on the other hand, is a set of patterns that share a common property. The aim in pattern recognition is to decide if a given feature belongs to one of several classes [1].
To understand the concept further, let's consider an image of a plant with its flower and leaves. Our task is to identify a leaf from a flower. The leaf and flower are both classes that are composed of patterns that make these classes unique from one another. For this example, we may use color, size, eccentricity and even shape as features to identify a flower from a leaf. After which we are now ready to classify the classes. We have to know to if a class belongs to a group of another class. To be able to do such decisions, classifiers are needed.
Classifiers attempt to find decision boundaries that separate the classes. Depending on the features employed the decision boundaries may be a plane, a convex or concave surface, or arbitrary closed regions in feature space [1].
For this activity, the classifier used is the minimum distance classification. With this type of classifier class membership is calculated by computing for the distance d expressed in the following equation.
where m is the mean pattern for each class. A class x belongs to class j with mean m if the calculated distance d is maximum.
In this activity, four different objects were classified: long leaf, rectangular leaf, flower and 25 centavo coin.
Each of these groups of objects were cropped from the image shown above. For each set of objects, 5 were used as training while the other five were used as test objects. The features used are: quotient of the area and the squared of the perimeter, and the quotient of the perimeter and the width of the object(length of in the y-direction). As can be observed the features used are both unit-less. This is because a much as possible, it is desired that the feature used be scale-invariant. This means that the setting and other condition (height of the camera from the object) won't affect classification.
The graph above shows the plot of the classes extracted from the training set. As can be noticed the class of the flower and 25 cents are far from the rest of the classes. However, it can be observed that the class of the long leaf and the rectangular leaf are near from one another.
After applying the minimum distance classification in order to classify to what class the remaining 20 test objects (five for each kind of four objects) belongs. The following results were obtained.
The tables above shows the calculated distances for each of the test objects. Class membership is determined by the largeness of the calculated value. In the first table, the five test objects are from the long leaf class. As can be observed, the calculated distance was maximum at the long leaf column for all test objects. This means that the test objects were correctly classified as long leaves. This is the same for the remaining three graphs: rectangular leaf, flower and 25 cents test objects.
For this activity I give myself a grade of 10 for I was able to use features that resulted to 100% accuracy of the classification.
I would like to thank Irene Crisologo, Jica Monsanto and Thirdy Buno for useful discussions.
References:
[1] Activity 12: Pattern Recognition Manual