Skip to main content
Log in

Non-targeted approach to detect pistachio authenticity based on digital image processing and hybrid machine learning model

  • Original Paper
  • Published:
Journal of Food Measurement and Characterization Aims and scope Submit manuscript

Abstract

In this study, we propose a new method for detecting green pea adulteration in pistachio based on digital image and machine learning (ML). An algorithm was built using digital image processing techniques to detect region of interest (ROI) on adulterated pistachio images and a hybrid ML to classify the level of adulteration as class 1 (%0), class 2 (%10), class 3 (%20), class 4 (%30), class 5 (%40), and class 6 (%50) in a fully automated way. A dataset with size of 1254 × 15 were created. Training set and test set with the rate of 80% and 20% based on fivefold cross validation were created. Decision tree, random forest (RF), k-nearest neighboring, support vector machines, naïve bayes and artificial neural network (ANN) are performed and compared to classify the level of adulteration in two steps as direct and binary classification. ANN has achieved the highest results as 93.65% of accuracy and 0.87 of Matthews correlation coefficient (MCC) based on direct classification to separate class1, class 2, class 5, and class 6 from class 3 and class 4. RF has achieved the highest results as 89.56% of accuracy and 0.79 of MCC based on binary classification to separate class3 from class 4. As a result of this, a hybrid ML model including ANN and RF in the form of a tree structure to classify the level of pistachio adulterated images was built in this study.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Data availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

References

  1. H. Eksi-Kocak, O. Mentes-Yilmaz, I.H. Boyaci, Eur. Food Res. Technol. 242, 271 (2016)

    Article  CAS  Google Scholar 

  2. S. Kafkas, Plant Syst. Evol. 262, 113 (2006)

    Article  Google Scholar 

  3. E. Küçüköner, B. Yurt, Eur. Food Res. Technol. 217, 308 (2003)

    Article  Google Scholar 

  4. G. Mandalari, D. Barreca, T. Gervasi, M.A. Roussell, B. Klein, M.J. Feeney, A. Carughi, Plants 11, 18 (2021)

    Article  PubMed  PubMed Central  Google Scholar 

  5. A. Menevseoglu, D.P. Aykas, E. Adal, J. Food Meas. Charact. 15, 1075 (2021)

    Article  Google Scholar 

  6. İ Hayoglu, Ö.F. Gamlı, I. Hayoglu, J. Food Sci. Eng. 2, 15 (2012)

    Google Scholar 

  7. S. Özbay, U.T. Şireli, Food Addit. Contam. (2021). https://doi.org/10.1080/19393210.2021.188550214

    Article  Google Scholar 

  8. A. Shakerardekani, M. Shahedi, J. Agric. Sci. Technol. 17, 1495 (2015)

    Google Scholar 

  9. F. Cavus, M.F. Us, N.A. Guzelsoy, Gıda ve Yem Bilim. Teknol. Derg. 34 (2018)

  10. B. Sezer, H. Apaydin, G. Bilge, I.H. Boyaci, J. Sci. Food Agric. 99, 2236 (2019)

    Article  CAS  PubMed  Google Scholar 

  11. H. Kendall, B. Clark, C. Rhymer, S. Kuznesof, J. Hajslova, M. Tomaniova, P. Brereton, L. Frewer, Trends Food Sci. Technol. 94, 79 (2019)

    Article  CAS  Google Scholar 

  12. F.D. Ramos, T.C. Squeff, Sustainable Consumption (Springer, Cham, 2020), p.229

    Book  Google Scholar 

  13. H.S. Green, X. Li, M. De Pra, K.S. Lovejoy, F. Steiner, I.N. Acworth, S.C. Wang, Food Control 107, 106773 (2020)

    Article  CAS  Google Scholar 

  14. D. Cautela, B. Laratta, F. Santelli, A. Trifirò, L. Servillo, D. Castaldo, J. Agric. Food Chem. 56, 5407 (2008)

    Article  CAS  PubMed  Google Scholar 

  15. R.R. Kotha, F.S. Tareq, C. Byrdwell, D.L. Luthria, ACS Food Sci. Technol. 1, 2174 (2021)

    Article  CAS  Google Scholar 

  16. L. Tian, Y. Zeng, X. Zheng, Y. Chiu, T. Liu, Food Anal. Methods 12, 2282 (2019)

    Article  Google Scholar 

  17. A.I. Ruiz-Matute, A.C. Soria, I. Martínez-Castro, M.L. Sanz, J. Agric. Food Chem. 55, 7264 (2007)

    Article  CAS  PubMed  Google Scholar 

  18. U. Kropf, T. Golob, M. Nečemer, P. Kump, M. Korošec, J. Bertoncelj, N. Ogrinc, J. Agric. Food Chem. 58, 12794 (2010)

    Article  CAS  PubMed  Google Scholar 

  19. Y. Zhao, B. Zhang, G. Chen, A. Chen, S. Yang, Z. Ye, Food Chem. 145, 300 (2014)

    Article  CAS  PubMed  Google Scholar 

  20. M. Xiao, Y. Chen, H. Chu, R. Yin, LWT 131, 109679 (2020)

    Article  CAS  Google Scholar 

  21. A. Subramanian, V.B. Alvarez, W.J. Harper, L.E. Rodriguez-Saona, Int. Dairy J. 21, 434 (2011)

    Article  CAS  Google Scholar 

  22. B. Horn, S. Esslinger, M. Pfister, C. Fauhl-Hassek, J. Riedl, Food Chem. 257, 112 (2018)

    Article  CAS  PubMed  Google Scholar 

  23. M. Ferreiro-González, E. Espada-Bellido, L. Guillén-Cueto, M. Palma, C.G. Barroso, G.F. Barbero, Talanta 188, 288 (2018)

    Article  PubMed  Google Scholar 

  24. K. Kucharska-Ambrożej, J. Karpinska, Microchem. J. 153, 104278 (2020)

    Article  Google Scholar 

  25. H. Jiang, F. Cheng, M. Shi, Foods 9, 154 (2020)

    Article  PubMed  PubMed Central  Google Scholar 

  26. K.L. Yam, S.E. Papadakis, J. Food Eng. 61, 137 (2004)

    Article  Google Scholar 

  27. A.F.S. Silva, F.R.P. Rocha, Food Control 115, 107299 (2020)

    Article  CAS  Google Scholar 

  28. S.E. Umbaugh, Digit. Image Process. Anal. Appl. with MATLAB CVIPtools Third Ed. 1 (2017)

  29. I. El Naqa, M.J. Murphy, Machine Learning in Radiation Oncology (Springer, Cham, 2015), p.3

    Book  Google Scholar 

  30. F.B. de Santana, W. Borges Neto, R.J. Poppi, Food Chem. 293, 323 (2019)

    Article  PubMed  Google Scholar 

  31. L. Zhang, X. Huang, P. Li, W. Na, J. Jiang, J. Mao, X. Ding, Q. Zhang, Chemom. Intell. Lab. Syst. 161, 147 (2017)

    Article  CAS  Google Scholar 

  32. N. Sowmya, V. Ponnusamy, IEEE Access 9, 53979 (2021)

    Article  Google Scholar 

  33. G. Bonifazi, G. Capobianco, R. Gasbarrone, S. Serranti, Food Control 130, 108202 (2021)

    Article  CAS  Google Scholar 

  34. K. Everstine, Economically motivated adulteration: implications for food protection and alternate approaches to detection. University of Minnesota (2013)

  35. N. Otsu, IEEE Trans. Syst. Man. Cybern. SMC-9, 62 (1979)

    Article  Google Scholar 

  36. S. Pertuz, D. Puig, M.A. Garcia, Pattern Recognit. 46, 1415 (2013)

    Article  Google Scholar 

  37. R.M. Haralick, I. Dinstein, K. Shanmugam, IEEE Trans. Syst. Man Cybern. SMC-3, 610 (1973)

    Article  Google Scholar 

  38. L. Firestone, K. Cook, K. Culp, N. Talsania, K. Preston, Cytometry 12, 195 (1991)

    Article  CAS  PubMed  Google Scholar 

  39. J.-M. Geusebroek, F. Cornelissen, A.W.M. Smeulders, H. Geerts, Cytom. J. Int. Soc. Anal. Cytol. 39, 1 (2000)

    CAS  Google Scholar 

  40. W. Huang, Z. Jing, Pattern Recognit. Lett. 28, 493 (2007)

    Article  CAS  Google Scholar 

  41. A.S. Malik, T.S. Choi, Pattern Recognit. 41, 2200 (2008)

    Article  Google Scholar 

  42. A. Santos, C. Ortiz De Solórzano, J.J. Vaquero, J.M. Peña, N. Malpica, F. Del Pozo, J. Microsc. 188, 264 (1997)

    Article  CAS  PubMed  Google Scholar 

  43. Y. Sun, S. Duthaler, B.J. Nelson, Microsc. Res. Techn. 65, 139 (2004)

    Article  Google Scholar 

  44. J.L. Pech-Pacheco, G. Cristöbal, J. Chamorro-Martínez, J. Fernândez-Valdivia, Proc. Int. Conf. Pattern Recognit. 15, 314 (2000)

    Article  Google Scholar 

  45. G. Yang, B.J. Nelson, IEEE Int. Conf. Intell. Robot. Syst. 3, 2143 (2003)

    Google Scholar 

  46. S.G.K. Patro, K.K. Sahu, Int. Adv. Res. J. Sci. Eng. Technol. 2, 20 (2015)

    Article  Google Scholar 

  47. M.K. Turan, E. Sehirli, Comput. Methods Programs Biomed. 147, 19 (2017)

    Article  PubMed  Google Scholar 

  48. Ö. Akar, O. Güngör, J. Geod. Geoinf. 1, 139 (2012)

    Article  Google Scholar 

  49. E. Güvenc, G.C. Cetin, H. Kocak, Adv. Artif. Intell. Res. 1, 19 (2021)

    Google Scholar 

  50. R. Ozdemir, M. Turanli, J. Life Econ. 8, 59 (2021)

    Article  Google Scholar 

  51. O.I. Abiodun, A. Jantan, A.E. Omolara, K.V. Dada, N.A.E. Mohamed, H. Arshad, Heliyon 4, e00938 (2018)

    Article  PubMed  PubMed Central  Google Scholar 

  52. S.V. Stehman, Remote Sens. Environ. 62, 77 (1997)

    Article  Google Scholar 

  53. T. Fawcett, Pattern Recognit. Lett. 27, 861 (2006)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cemhan Doğan.

Ethics declarations

Conflict of interest

All authors declared they have no conflict of interest.

Ethical approval

Ethics approval was not required for this research.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Doğan, C., Şehirli, E., Doğan, N. et al. Non-targeted approach to detect pistachio authenticity based on digital image processing and hybrid machine learning model. Food Measure 17, 1693–1702 (2023). https://doi.org/10.1007/s11694-022-01671-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11694-022-01671-0

Keywords

Navigation