Monday, September 15, 2008

..on pattern recognition

Given an image, our goal is to correctly determine which class it belongs. Specifically, we consider 10 images of leaves of each kind of three different plant: Mango, an ornamental plant (I dont know the name), and Indian tree.






Mango Leaves














Ornamental Plant Leaves












Indian Tree Leaves









We first enhance the images as to make the classification process easier. Discussed in the previous activity, we used the Gray World Algorithm in white balancing our images.


















































For each class, we divided it into two groups: the training set and the test set. We use the training set to get the characteristic features of the leaves that would easily differentiate it from the other class. In this case, we used the RGB values and the eccentricity of the shape of the leaves as our distinguishing features. This would be our feature vector x. We take the mean m of our feature vector for the entire training set. This is given by:





where j is the class index and N is the number of samples in our training set for each class . Below is the table for the mean values for each class.





To classify which class images belongs to, we use the minimum distance classification. Taking the feature vector x of an unknown image, we determine which class mean m it is nearest to. This is given by:



where




The smallest D corresponds to the class where the unknown image belongs. We do this for the 15 remaining images in the test set. The table below is the summary of the results.














We have successfully classify all the 15 test images. The success rate is 100%.

I was able to successfully accomplish the activity. I want to give myself a 10.

Acknowledgment to Rica for uploading the images.

No comments: