Classification of Pistachio Nuts Using a String Matching Technique

A modified cyclic string matching algorithm was developed and applied to classify four classes of pistachio nuts, based on their two-dimensional shapes. In this method, a pistachio nut was represented by a string consisting of N angularly equispaced radii extending from the centroid to the boundary. An algorithm was also developed for determining a prototype for each class. The recognition algorithm, based on a string matching technique, calculated the cumulative distance between an unknown and a class prototype. The class of the unknown was determined by the minimum-distance classification rule. The developed algorithm gave an overall accuracy of 90%. This procedure could be extended to classify other agricultural materials.