| The annual fruit production in China is huge,so is the demand for production and processing.The classification of fruit is an important process of fruit production which is mainly executed by labors currently in our country.The artificial classification of fruit is slow and can be easily affected by subjective factors,resulting in low classification accuracy.The use of computer vision technology for automatic fruit classification can effectively solve the problem of the gradual shortage of manpower,and can also effectively improve the efficiency of post-processing of fruits.Due to the variety of fruits and the complex shapes,colors,textures,etc.,it makes automatic and accurate classification of fruits more difficult.How to extract the effective characteristics of a certain type of fruit and accurately classify the fruit is one of the major concerns in current fruit classification research.Therefore,this paper proposes extracting fruit characteristics based on BOF(Bag of Feature)improved feature extraction algorithm,and combines Libsvm classifier to classify fruit images.Firstly,to improve the feature based on the BOF algorithm.In the traditional BOF algorithm,the number of extracted feature dimensions is high and the amount of calculation is large,which affects the efficiency of the extraction algorithm.To improve efficiency,an improved SURF(Speed Up Robust Feature)algorithm was adopted to reduce the number of feature dimensions to 26 dimensions.And the improved SURF algorithm has strong robustness to illumination,scale,and other transformations.In terms of feature description,combined with the improved SURF algorithm,the extracted feature points are clustered using the K-means method.The feature visual dictionary is calculated by the clustering algorithm,and the frequency of the square points of feature points in the feature dictionary is calculated for each single image.In order not to lose the spatial information of the image,a spatial pyramid method is introduced to construct the image hierarchical feature information and improve the classification accuracy.Secondly,the article uses the multi-classification method based on SVM(Support Vector Machine)to design the classifier.Because there are many kinds of research objects in this paper,it does not adopt the one-to-many structure classification method in SVM,but adopts the one-to-one method.The structured Libsvm toolbox classifies the extracted features,and the Libsvm classifier is simple and efficient.It can accurately classify extracted feature vectors.Finally,many experiments on classification of fruit were conducted.There were 15 types of fruit images were collected in this paper,with 40 pieces of images in each type,600 pieces in total.30 of them were used for training and 10 were used for testing.The data set of the study was created and many experiments were conducted.The results of the experiment shows that the improved SURF-BOF and Libsvm classifier design method is superior in both real-time performance and accuracy.For the SIFT-BOF algorithm,the accuracy of the fruit classification test under this algorithm can reach 96.53%. |