Wednesday, August 26, 2009

Activity 14 | Pattern Recognition

Sorting or classifying objects using visual information depends on the features of the objects. The human brain can draw, process and manipulate these features from a previous encounter to identify objects. This ability is being implemented in computer vision although it is not on the same level as the human brain.

In this activity, we implemented pattern recognition using images of different groups of objects and obtained sets of features to describe the objects and to use for recognizing new sets of objects. The groups of objects I used in this activity are 10 coins, 10 fasteners, and 10 leaves as shown by Figures 1-3. The features that were obtained are the area, perimeter and the sum of the RGB values of the object images.


Figure 1. Object group 1: coins.


Figure 2. Object group 2: fasteners.


Figure 3. Object group 3: leaves.

The first five objects of each group is used as the training set or the first set of examples where we get the basis for pattern recognition. The last five objects of each group is used as the testing set or the prediction set which will be used for testing the basis features. The same features was obtained for the test set and will be used for predicting which group of objects it belongs.

The features were obtained using basic image processing techniques such as segmentation by thresholding then counting of the number of pixels of the segmented image to get the area. The perimeter was obtained by getting the length of the contour of the segmented image while the RGB sum is simply the sum of the RGB values of the object image. The basis for pattern recognition is the mean of the features of the five sample objects for each group.

An object is classified into a group by computing the Minimum Distance of its features with respect to the basis vector or the mean feature vector. The test object is then classified into the group with the smallest feature distance. The figures below show the test objects and the Euclidean Distance for each feature. The highlighted areas represent the group with the minimum distance and thus the group where the test object is classified.


Figure 4. Euclidean Distances for test objects composed of coins.


Figure 5. Euclidean Distances for test objects composed of fasteners.


Figure 6. Euclidean Distances for test objects composed of leaves.

All in all the accuracy of the pattern recognition is 100%. I give myself a grade of 10 for this activity for the successful implementation of the Minimum Euclidean Distance for object classification.

No comments:

Post a Comment