Main Article Content


Hardness is one of the important attributes in determining the quality of dried fruits. Hardness assessment is normally carried out by manual inspection. This method is time consuming, laborious, expensive and subjective. The objective of this study was to develop a computer vision system with a monochrome camera to classify dates based on hardness. Date samples were obtained from three different growing regions in Oman and graded into soft, semi-hard, and hard classes based on hardness. A total of 1800 date samples were imaged individually using a monochrome camera (600 dates / class). Histogram and texture features were extracted from the acquired monochrome images and used in the classification models. The overall classification accuracies in three class model (soft, semi-hard, and hard) were 66% and 71% for linear discriminant analysis (LDA) and artificial neural network (ANN), respectively. It was improved to 84% and 77% in LDA and ANN, respectively while using two class model (soft and hard (semi-hard and hard together)). The histogram features were more contributing in the date classification based on hardness than image texture features. Computer vision technique has great potential to develop online quality monitoring systems for dates and other dried fruits.


Dates hardness histogram features texture features gray scale images

Article Details

How to Cite
Manickavasagan, A., Al-Shekaili, N. H., Al-Mezeini, N. K., Rahman, M. S., & Guizani, N. (2018). Computer vision technique to classify dates based on hardness. Journal of Agricultural and Marine Sciences [JAMS], 22(1), 36–41.


  1. Al-Janobi, A. 1998. Application of co-occurrence matrix method in grading date fruits. Paper No. 98 – 3024. ASAE meeting presentation, King Saud University.
  2. Al-Janobi, A. 2000. Date inspection by color machine vision. Journal of King Saud University of Agricultural Science 12: 69 – 79.
  3. Al-Marshudi, A.S. 2002. Oman traditional date palms: Production and improvement of date palms in Oman. Tropicultura 20: 203 – 209.
  4. Al-Ohali, Y. 2011. Computer vision based date fruit grading system: Design and implementation. Journal of King Saud University, Computer and Information Sciences 23: 29 - 36.
  5. Basavaraj, S.A. and Vishwanath, C. B. 2009. Texture based identification and classification of bulk sugary food objects. ICGST-GVIP J 9: 9-14.
  6. Brosnan, T. and Sun, D. 2004. Improving quality inspection of food products by computer vision-a review. Journal of Food Engineering 61: 3-16.
  7. Chandraratne, M.R., Samarasinghe, S., Kulasiri, D., Frampton, C., Bekhit, A.E.D. and Bickerstaffe, R. 2003. Prediction of lamb tenderness using texture features. Research report, Lincoln University, ISSN 1174 - 6696.
  8. Chesson, J.H., Burkner, P.F. and Perkins, R.M. 1979. An experimental vacuum separator for dates. Transactions of ASAE, 22: 16 - 20.
  9. Du, C. and Sun, D. 2006. Learning techniques used in computer vision for food quality evaluation: a review. Journal of Food Engineering 72: 93 - 55.
  10. Fadel, M. 2007. Date fruits classification using probabilities neural networks. Agricultural Engineering International: The CIGR Journal (CIGR Commission Internationale du Genie Rural J). Manuscript ID 07 003. IX: 1-10.
  11. FAO. 2010. Access done on 14th January 2013.
  12. Gonzalez, R.C., Wood, R.E. and Eddins, S.L. 2011. Digital image processing using MATLAB. New Delhi: Tata McGraw Hill Education Private Limited.
  13. Huxsoll, C.C. and Reznik, D. 1969. Sorting and processing mechanically harvested dates. Date Grower’s Institute Report 46: 8 - 10.
  14. Kader, A. and Hussein, M. 2009. Harvest and postharvest handling of dates. Project on the development of sustainable dates palm production system in the GCC countries of Arabian Peninsula. International Center for Agricultural Research in the Dry Areas.
  15. Lee, D., Archibald, J. , Chang, Y. and Gerco, R. 2008a. Robust color space conversion and color distribution analysis technique for date maturity evaluation. Journal of Food Engineering 88: 364 - 372.
  16. Lee, D., Schoenberger, R., Archibald, J. and McCollum, S. 2008b. Development of a machine system for automatic date grading using digital reflective near-infrared imaging. Journal of Food Engineering: 388 - 398.
  17. Li, J., Tan,J., Martz, F.A. and Heymann, H. 1999. Image texture feature as indicators of beef tenderness. Meat Science 53, 17 - 22.
  18. Li, J., J. Tan and P. Shatadal. 2001. Classification of tough and tender beef by image texture analysis. Meat Science 57: 341 - 346.
  19. Manickavasagan, A., Sathya, G. and Jayas,D.S. 2008a. Comparison of illumination to identify wheat classes using monochrome images. Computer and Electronics in Agriculture 63: 237-244.
  20. Manickavasagan, A., Sathya, G., Jayas, D.S. and White, N.D.G. 2008b. Wheat class identification using monochrome images. Journal of Cereal Science 47: 518-527.
  21. Narendra, V.G. and Hareesh, K.S. 2010. Quality inspection and grading of agricultural and food products by computer vision – a review. International Journal of Computer Application 2: 43-65.
  22. Patel, K.K., Kar, A., Jha, S.N. and Khan, M.A. 2012. Machine vision system: a tool for quality inspection of food and agricultural products. Journal of Food Science and Technology 49: 123-141.
  23. Pour-Damanab, A.S., Jafary, A. and Rafiee, S. 2012. Kinetics of the crust thickness development of bread during baking. Journal of Food Science and Technology, doi: 10.1007/s13197-012-0872-z.
  24. Rahman, M.S. and Al-Farsi, S. 2005. Instrumental texture profile analysis (TPA) of date flesh as function of moisture content. Journal of Food Engineering 66: 505 - 511.
  25. Schmilovitch, Z., Hoffman, A., Egozi, H., Ben-Zvi, R., Bernstin ,Z. and Alchanatis,V. 1999. Maturity determination of fresh dates by near infrared spectrometry. Journal of the Science of Food and Agriculture 79: 86 - 90.
  26. Zaabanot, A. 2011. Improve date syrup production in Oman – Case study. Published in Oman Daily, Saturday 8th October, Edition No11085: 22.
  27. Zayas, I.Y., Martin, C.R., Steele, J.L. and Katsevich, A. 1996. Wheat classification using image analysis and crush-force parameters. Transactions of the ASAE, 39: 2199 - 2204.