Journal of Researches in Mechanics of Agricultural Machinery

Journal of Researches in Mechanics of Agricultural Machinery

Determination of potato cultivars using image processing and an artificial neural network

Document Type : Research Paper

Authors
1 MSc. Graduated, Mechanical Engineering of Biosystems Department, Faculty of Agriculture, Razi University, Kermanshah, Iran
2 Mechanical Engineering of Biosystems department, Agricultural Faculty, Razi University, Kermanshah, Iran
3 Assistant professor, Department of Biosystem Engineering, Faculty of Agriculture, Bu-Ali Sina University, Hamedan, Iran
Abstract
Introduction
Potato (Solanum tuberosum L.) is a major tuber crop with significant global nutritional importance, providing higher energy and protein yield per unit area compared to wheat, rice, and maize (Akhavan et al., 2005). Iran ranks 14th worldwide in potato production, with an annual output of approximately 5 million tons, of which about 200,000 tons are exported to neighboring countries. Approximately 180,000 hectares of Iranian farmland are dedicated to potato cultivation, predominantly under irrigated conditions. Hamadan Province leads national production, contributing 24%, followed by Ardabil, Isfahan, and other provinces.
Accurate identification of potato cultivars is critical in the food and processing industries for determining dry matter content and potential pesticide residues. Traditional methods are often destructive and time-consuming. Machine vision technology offers a non-destructive, rapid, and precise alternative by exploiting differences in shape, size, color, and texture among cultivars. Artificial neural networks (ANNs) are powerful computational tools capable of learning complex relationships between input features and desired outputs through training, making them suitable for pattern recognition and classification tasks (Hristev, 1998).
Previous studies have successfully applied image processing and ANNs for cultivar classification in crops such as rice (Golpour et al., 2014; Shantaiya & Ansari, 2012). This study aimed to develop and evaluate algorithms for extracting morphological, color, and texture features from potato tuber images and to design optimal ANN architectures for classifying ten common Iranian potato cultivars using these features.

Material and Methods
Ten widely cultivated potato cultivars (Agria, Marfona, Granola, Arinda, Santa, Milva, Jelly, Ramos, Spirit, and one additional cultivar referred to as Bamba) were collected from Hesamabad village, Bahar County, Hamadan Province, Iran. At least 30 healthy tubers per cultivar were selected after washing to remove soil.
Images were acquired using a Canon PC1742 digital camera (12.1 megapixels) at a fixed distance of 48 cm against a blue background, yielding 30 images per cultivar (4000×3000 pixels). Pre-processing involved thresholding, binary conversion, noise removal based on small area elimination, and background subtraction.
Morphological features (e.g., area, major/minor axis length, perimeter, solidity), color features (mean, range, variance, and standard deviation in RGB and HSI spaces, totaling 24 features), and texture features (120 features derived from Gray-Level Co-occurrence Matrices in four directions) were extracted using custom algorithms in MATLAB R2012a.
Feed-forward ANNs with one or two hidden layers were trained using the Levenberg-Marquardt algorithm. Data were normalized to [0,1] and randomized; 70% were used for training and 30% for testing. Performance was evaluated using mean squared error (MSE) and coefficient of determination (R²).
Results and Discussion
Image processing successfully segmented tubers, removing background and noise, enabling reliable feature extraction.
When using morphological features (16 inputs) with a single-hidden-layer ANN, the best performance was achieved with a 16-17-10 architecture (log-sigmoid hidden layer, linear output), yielding 88.09% classification accuracy, MSE of 0.1359, and R² of 0.9965 after 17 epochs. Two-hidden-layer networks performed slightly worse (86.19 %).
Color features (24 inputs) produced lower accuracy with single-hidden-layer networks (maximum 27.61%). However, a two-hidden-layer network (24-10-11-10 architecture, tan-sigmoid functions) improved accuracy to 39.04%, indicating that color alone is insufficient for robust discrimination due to high intra-cultivar variability and overlap among cultivars.
Texture features (120 total) were analyzed separately for red, green, and blue channels (40 features each) and grayscale levels. Single-hidden-layer networks yielded low accuracies (20–24.28%). Two-hidden-layer networks performed better: green channel achieved the highest accuracy of 28.57% (40-16-17-10 architecture, linear-tan-sigmoid), followed closely by blue channel (28.09%). The green channel provided the most discriminative texture information.
Overall, morphological features provided the highest classification accuracy (88.09%), followed by color and texture. This aligns with prior research showing morphological traits (shape and size) are more stable and distinctive among potato cultivars than color or texture, which can be influenced by growing conditions and post-harvest handling.
Lower accuracies with color and texture may result from similarities among certain cultivars and environmental effects on surface properties. Combining feature sets was not explored but could potentially improve performance. The non-destructive nature of the approach and high accuracy with morphological features demonstrate its practical potential for industrial sorting and quality control.
Conclusions
This study demonstrated that image processing combined with artificial neural networks can effectively classify potato cultivars non-destructively. Among the tested feature types, morphological features yielded the highest classification accuracy (88.09%) using a single-hidden-layer ANN, outperforming color and texture features. For color and texture, two-hidden-layer networks generally performed better than single-layer ones. The green channel provided the most useful texture information.
Morphological characteristics proved most reliable for discrimination, likely due to greater genetic stability. The developed system offers a rapid, accurate tool for cultivar identification in food processing and trade, with potential for further improvement through feature fusion or larger datasets.
Keywords
Subjects

Akhavan, S., Mostafazadeh fard, B., Mousavi, S. F., Ghadami Firoozabadi, A. and Bahrmi, B. 2005. The effect of amount and method of irrigation on yield, yield components and quality of Agria cultivar. Journal of Agric. Biotechnol. 5(2): 27-40. [magiran.com/p842603 -last Accessed: 2026/01/05]. (In Persian).
 
Amiri Parian, J. 2007. Grading of agricultural products based on volume or density using machine vision. Ph.D. Thesis, Tarbiat Modares University, Tehran, Iran. (In Persian).
 
Anonymous, 2026. [https://amarfact.com/statistics/ -Last Accessed: 2026/05/25]. (In Persian).
 
Dawson, C.W. and Wilby, R. 1998. An artificial neural network approach to rainfull-runoff modeling. HYDROLOG. SCI. J. 43(1): 47-66. https://doi.org/10.1080/02626669809492102
 
 
Golpour, I., Amiri Parian, J., Amiri Chayjan, R. 2012. Recognition of Iranian cultivars based on the analysis of color components of digital images. 7th National Congress of Agricultural Machinery and Mechanization Engineering, Shiraz University, Shiraz, Iran. (In Persian)
 
Golpour, I., Amiri Parian, J., Amiri Chayjan, R. 2014. Identification and Classification of Bulk Paddy, Brown, and White Rice Cultivars with Colour Features Extraction using Image Analysis and Neural Network. Czech J. Food Sci. 32(3): 280–287. https://doi.org/10.17221/238/2013-CJFS
 
Gonzalez, R.C, Woods, R.E. 2018. Digital Image Processing. 4th ed. Pearson, 1306 pp., New York, USA.
 
Homaee, M., Dirksen, C. and Feddes, R.A. 2002. Simulation of root water uptake in non-uniform transient salinity using different macroscopic reduction function, Agricultural Water Management. 57(2): 89-109. https://doi.org/10.1016/S0378-3774(02)00072-0
 
Hoseinzadeh- Talaee, P. 2010. Modeling of flow-scale curve of rock fragments using artificial neural network. M.Sc. Thesis. Bu-Ali Sina University. (In Persian)
 
Hristev, R.M., 1998. The Ann Book. GNU Public License, 392 pp. Available on (http://www.pdg.cnb.uam.es/cursos/Complutense/Complutense2004/pages/12_NeuralNetworks/Hritsev_The_ANN_Book.pdf).
 
Majumdar, S., Jayas, D.S. 1999. Classification of Bulk Samples of Cereal Grains using Machine Vision, Journal of Agricultural Engineering Research. 73(1): 35-47. https://doi.org/10.1006/jaer.1998.0388
 
Russ, J.C. and Neal, F. B. 2016. The Image Processing Handbook. (7th edition). North Carolina State University Raleigh, North Carolina, CRC Press. 1035 pp. ISBN: 978-1-4987-4028-9 (eBook).
 
Sajikumar, N., Thandavewra, B.S. 1999. A non-linear rainfull-run off model using an artificial neural network. Journal of Hydrology. 216(1): 32-55. https://doi.org/10.1016/S0022-1694(98)00273-X
 
Shabani, M., 2011. Modeling the monthly inflow to Minab Dam using artificial neural network,  M.Sc. Thesis. Bu-Ali Sina University. (In Persian)
 
Shantaiya, S. and Ansari, U. 2012. Identification of Food grains and its quality using pattern classification. International Journal of Computer and Communication Technology. 3(1): 14-19.  https://doi.org/10.47893/IJCCT.2012.1107.
 
Shouche, S.P., Rastogi, R., Bhagwat, S.G., Sainis, J.K., 2001. Shape analysis of grains of Indian wheat varieties. Computers and Electronics in Agriculture. 33(1): 55-76. https://doi.org/10.1016/S0168-1699(01)00174-0
 
Solomon, C. and Breckon, T., 2011. Fundamentals of Digital Image Processing. WileyBlackwell, 328 pp., West Sussex, UK.
 
Unal, B., Mamak, M., Seckin, G., Cobaner, M. 2010. Comparision of an ANN approach with 1-D and 2-D methods for estimating discharge capacity of straight compound channels. Advances in Engineering Software. 41(2): 120-129. https://doi.org/10.1016/j.advengsoft.2009.10.002