Separation of touching almonds and their quality classification by combining image processing and artificial neural networks techniques

Document Type : Research Paper


1 Phd Student, Department of Agricultural Machinery Engineering, University of Tehran

2 Professor, Department of Agricultural Machinery Engineering, University of Tehran

3 Assistant Professor, Department of Biosystems Engineering, University of Kurdistan


The quality evaluation of agricultural products is one of the key factors in promoting their quality. In this study, a method based on combined image processing technique and artificial neural network was presented. Separation of touching almonds under different positions is a very important step in design of grading devices. In this study, an image processing algorithm based on extracting critical points in the image of almonds and drawing segmentation lines between them is presented. In the next step, the feature vector which includes 6 shape features, 36 color features and 36 texture features was composed. PCA method was used to reduce the dimension of the feature vector. The quality classification of almond in different classes was carried out by artificial neural networks (ANNs). Among different ANN structures, the 18-7-7-4 topology was the most optimum classifier (total accuracy was obtained 96.92%).


Main Subjects

Abdullah, M. Z., Mohamad-Saleh, J. Fathinul-Syahir, A. S. & Mohd-Azemi, B. M. N. (2006). Discrimination and classification of fresh-cut starfruits (Averrhoa carambola L.) using automated machine vision system. Journal of Food Engineering, 76(4), 506–523.
Asada, H. & Brady, M. (1986). The curvature primal sketch. IEEE Transactions on Pattern Analysis and Machine Intelligence, 8(1), 2-14.
Castelo-Quispe, S., Banda-Tapia, J. D. Lopez-Paredes, M. N. Barrios-Aranibar, D. & Patino-Escarcina, R. (2013). Optimization of Brazil-Nuts Classification Process through Automation using Colour Spaces in Computer Vision. International Journal of Computer Information Systems and Industrial Management Applications. 5, 623-630.
Donis-Gonzalez, R., Guyer, D. E. Leiva-Valenzuela, G. A. & Burns, J. (2013). Assessment of chestnut (Castanea spp.) slice quality using color images. Journal of Food Engineering, 115, 407-414.
Food and Agriculture Organization. FAO statistical databases, 2011. Available at:
 Haralick, R. M., Shanmugam, K. & Dinstein, I. (1973). Textural features for image classification. IEEE Transactions on Systems, Man, and Cybernetics, 6, 610–621.
ISIRI, Specification and methods of test for unshelled almonds. Institute of Standards and Industrial Research of Iran. Document number 88. 1995. Available from:
Leemans, V. & Destain, M. F. (2004). A real-time grading method of apples based on features extracted from defects. Journal of Food Engineering, 61, 83-89.
Mebatsion, H. K. & Paliwal, J. (2011). A Fourier analysis based algorithm to separate touching kernels in digital images. Biosystems Engineering, 108, 66–74.
Mery, D., Pedreschi, F. & Soto, A. (2013). Automated design of a computer vision system for visual food quality evaluation. Food and Bioprocess Technology, 6, 2093-2108.
Mollazade, K., Omid, M. & Arefi, A. (2012). Comparing data mining classifiers for grading raisins based on visual features. Computers and Electronics in Agriculture, 84, 124-131.
Omid, M., Mahmoudi, A. & Omid, M. H. (2009). An intelligent system for sorting pistachio nut varieties. Expert Systems With Applications, 36, 11528–11535.
Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9, 62-66.
Pearson, T. & Toyofuku, N. (1999). Automated sorting of pistachio nuts with closed shells. Transactions of the ASAE, 16(1), 91-94.
Pearson, T. (1996). Machine vision system for automated detection of stained pistachio nuts. Lebensmittel-Wissenschaft and Technolgie, 29, 203–209.
Qian, X. M., Zhu, H. Feng, C. L. Zhu, P. Li, H. Xin, W. & Cheng, G. (2004). An overlapping bubbles partition method in aerated water flows. In: Proceedings of the Third Conference on Machine Learning and Cybernetics, Vol. 6, Shanghai, China, August, pp. 3746–3750.
Riquelme, M. T.,  Barreiro, P. Ruiz-Altisent, M. & Valero, C. (2008). Olive classification according to external damage using image analysi. Journal of Food Engineering, 87, 371-379.
Shatadal, P., Jayas, D. S. & Bulley, N. R. (1995). Digital image analysis for software separation and classification of touching grains. Transactions of the ASAE, 38(2), 635–643.
Sohn, K., Alexander, W. E. Kim, J. H. & Snyder, W. E. (1994). A constrained regularization approach to robust corner detection. IEEE Transactions on Systems, Man, and Cybernetics, 24(5), 820–828.
Zhang, G., Jayas, D. & White, D. G. (2005). Separation of touching grain kernels in an Image by ellipse fitting algorithm. Biosystems Engineering, 92(2), 135–142.