There are about 90 different varieties of chickpeas around the world. In Iran, where this study takes place, there are five species that are the most popular (Adel, Arman, Azad, Bevanij and Hashem), with different properties and prices. However, distinguishing them manually is difficult because they have very similar morphological characteristics. In this research, two different computer vision methods for the classification of the variety of chickpeas are proposed and compared. The images were captured with an industrial camera in Kermanshah, Iran. The first method is based on color and texture features extraction, followed by a selection of the most effective features, and classification with a hybrid of artificial neural networks and particle swarm optimization (ANN-PSO). The second method is not based on an explicit extraction of features; instead, image patches (RGB pixel values) are directly used as input for a three-layered backpropagation ANN. The first method achieved a correct classification rate (CCR) of 97.0%, while the second approach achieved a CCR of 99.3%. These results prove that visual classification of fruit varieties in agriculture can be done in a very precise way using a suitable method. Although both techniques are feasible, the second method is generic and more easily applicable to other types of crops, since it is not based on a set of given features.