Moldy Peanut Kernel Identification Using Wavelet Spectral Features Extracted from Hyperspectral Images

  • Xiaotong Qi
  • Jinbao JiangEmail author
  • Ximin Cui
  • Deshuai Yuan


Moldy peanuts may contain aflatoxin, a highly carcinogenic substance that threatens the health of humans and livestock. This study aimed to identify moldy peanuts using hyperspectral measurements and continuous wavelet transform (CWT). Peanuts were allowed to develop mold in a simulation of natural process of fungal infection; detailed hyperspectral images of healthy and moldy peanuts were captured. Based on these spectral data, CWT with separability analysis was conducted, generating a Jeffries–Matusita distance scalogram that summarized the separability of the wavelet power at different wavelengths and the decomposition scales between healthy and moldy peanuts. Using thresholding, five wavelet features (WFs) were isolated to identify moldy peanuts. In addition, seven optimal bands obtained from a successive projection algorithm were compared with the WFs. Partial least squares discrimination analysis (PLS-DA) and support vector machines (SVM) were adopted as classifiers for evaluating the WFs and optimal bands. The results show that according to the WFs, both PLS-DA and SVMs achieved higher overall classification results (at least 96.19% for the test data) than those using optimal bands selected via the successive projection algorithm (SPA). The CWT was found to be a promising method for analyzing the fungal infection of peanuts.


Continuous wavelet transform Fungal contamination Partial least squares discrimination analysis Peanuts Support vector machine 



The research was sponsored by National Natural Science Foundation of China (41871341, 41571412), and the hyperspectral imaging system was provided by Sichuan Dualix Spectral Imaging Technology Co., Ltd.

Compliance with Ethical Standards

Conflict of Interest

Xiaotong Qi declares that she has no conflict of interest. Jinbao Jiang declares that he has no conflict of interest. Ximin Cui declares that he has no conflict of interest. Deshuai Yuan declares that he has no conflict of interest.

Ethical Approval

This article does not contain any studies with human participants or animals performed by any of the authors.


  1. Amari S, Wu S (1999) Improving support vector machine classifiers by modifying kernel functions. Neural Netw 12:783–789CrossRefGoogle Scholar
  2. Araújo MCU, Saldanha TCB, Galvão RKH, Yoneyama T, Chame HC, Visani V (2001) The successive projections algorithm for variable selection in spectroscopic multicomponent analysis. Chemom Intell Lab Syst 57:65–73CrossRefGoogle Scholar
  3. Arvor D, Jonathan M, Dubreuil V, Durieux L (2011) Classification of MODIS EVI time series for crop mapping in the state of Mato Grosso, Brazil. Int J Remote Sens 32:7847–7871CrossRefGoogle Scholar
  4. Barker M, Rayens W (2003) Partial least squares for discrimination. J Chemom 17:166–173. CrossRefGoogle Scholar
  5. Berardo N, Pisacane V, Battilani P, Scandolara A, Pietri A, Marocco A (2005) Rapid detection of kernel rots and mycotoxins in maize by near-infrared reflectance spectroscopy. J Agric Food Chem 53:8128–8134. CrossRefPubMedGoogle Scholar
  6. Bingwen Q, Zhanling F, Ming Z, Zhenghong T, Chongcheng C (2014) A new approach for crop identification with wavelet variance and JM distance. Environ Monit Assess 186:7929–7940CrossRefGoogle Scholar
  7. Bruce LM, Morgan C, Larsen S (2001) Automated detection of subpixel hyperspectral targets with adaptive multichannel discrete wavelet transform. IEEE Transactions on Geoscience & Remote Sensing 39:2217–2226CrossRefGoogle Scholar
  8. Burns DA, Ciurczak EW (2007) Handbook of near-infrared analysis-3rd Edn, Revised and expandedGoogle Scholar
  9. Cancer IAFO (1993) Some naturally occurring substances: food items and constituents, heterocyclic aromatic amines and mycotoxins CarcinógenosGoogle Scholar
  10. Cheng T, Rivard B, Sánchez-Azofeifa A (2010) Spectroscopic determination of leaf water content using continuous wavelet analysis. Remote Sens Environ 115:659–670CrossRefGoogle Scholar
  11. Cheng J-H, Jin H, Liu Z (2018) Developing a NIR multispectral imaging for prediction and visualization of peanut protein content using variable selection algorithms. Infrared Phys Technol 88:92–96. CrossRefGoogle Scholar
  12. Ding X, Li P, Bai Y, Zhou H (2012) Aflatoxin B1 in post-harvest peanuts and dietary risk in China. Food Control 23:143–148. CrossRefGoogle Scholar
  13. Elmasry G, Kamruzzaman M, Sun DW, Allen P (2012) Principles and applications of hyperspectral imaging in quality evaluation of agro-food products: a review. Crit Rev Food Sci Nutr 52:999–1023 doi: CrossRefGoogle Scholar
  14. Food, & Agriculture, O (2004) Worldwide regulations for mycotoxins in food and feed in 2003. FAO Food Nutr Pap 81:1e165Google Scholar
  15. Haaland DM, Thomas EV (1988) Partial least-squares methods for spectral analyses. 1. Relation to other quantitative calibration methods and the extraction of qualitative information. Anal Chem 60:1193–1202CrossRefGoogle Scholar
  16. Huang H, Yu H, Xu H, Ying Y (2008) Near infrared spectroscopy for on/in-line monitoring of quality in foods and beverages: a review. J Food Eng 87:303–313. CrossRefGoogle Scholar
  17. Jiang J, Qiao X, He R (2016) Use of near-infrared hyperspectral images to identify moldy peanuts. J Food Eng 169:284–290CrossRefGoogle Scholar
  18. Kamdi S, Krishna R (2012) Image segmentation and region growing algorithm international. Journal of Computer Technology and Electronics Engineering (IJCTEE) 2(1)Google Scholar
  19. Kamruzzaman M, Barbin D, Elmasry G, Sun DW, Allen P (2012) Potential of hyperspectral imaging and pattern recognition for categorization and authentication of red meat. Innov Food Sci Emerg Technol 16:316–325CrossRefGoogle Scholar
  20. Kandpal LM, Lee S, Kim MS, Bae H, Cho B-K (2015) Short wave infrared (SWIR) hyperspectral imaging technique for examination of aflatoxin B1 (AFB1) on corn kernels. Food Control 51:171–176. CrossRefGoogle Scholar
  21. Kandpal LM, Lohumi S, Kim MS, Kang J-S, Cho B-K (2016) Near-infrared hyperspectral imaging system coupled with multivariate methods to predict viability and vigor in muskmelon seeds. Sensors and Actuators B: Chemical 229:534–544. CrossRefGoogle Scholar
  22. Karuppiah K, Senthilkumar T, Jayas DS, White NDG (2016) Detection of fungal infection in five different pulses using near-infrared hyperspectral imaging. J Stored Prod Res 65:13–18. CrossRefGoogle Scholar
  23. Kimuli D, Wang W, Lawrence KC, Yoon S-C, Ni X, Heitschmidt GW (2018) Utilisation of visible/near-infrared hyperspectral images to classify aflatoxin B1 contaminated maize kernels. BioSyst Eng 166:150–160. CrossRefGoogle Scholar
  24. Liu Q, Sun K, Peng J, Xing M, Pan L, Tu K (2018) Identification of bruise and fungi contamination in strawberries using hyperspectral imaging technology and multivariate analysis. Food Anal Methods 11:1518–1527. CrossRefGoogle Scholar
  25. Ma J, Sun DW, Qu JH, Liu D, Pu HB, Gao WH, Zeng XA (2016) Applications of computer vision for assessing quality of agri-food products: a review of recent research advances. Critical reviews in food science and nutrition 56:113–127. CrossRefPubMedGoogle Scholar
  26. Mcdanell R, Mclean AE, Hanley AB, Heaney RK, Fenwick GR (1988) Chemical and biological properties of indole glucosinolates (glucobrassicins): a review. Food & Chemical Toxicology An International Journal Published for the British Industrial Biological Research Association 26:59–70CrossRefGoogle Scholar
  27. Mollazade K (2017) Non-destructive identifying level of browning development in button mushroom (Agaricus bisporus) using hyperspectral imaging associated with chemometrics. Food Anal Methods 10:1–12CrossRefGoogle Scholar
  28. Niel TGV, Mcvicar TR, Datt B (2005) On the relationship between training sample size and data dimensionality: Monte Carlo analysis of broadband multi-temporal classification. Remote Sens Environ 98:468–480CrossRefGoogle Scholar
  29. Oplatowska-Stachowiak M et al (2016) Fast and sensitive aflatoxin B1 and total aflatoxins ELISAs for analysis of peanuts, maize and feed ingredients. Food Control 63:239–245. CrossRefGoogle Scholar
  30. Ozaki Y, McClure WF, Christy AA (2006) Near-infrared spectroscopy in food science and technology. WileyGoogle Scholar
  31. Qiao X, Jiang J, Qi X, Guo H, Yuan D (2017) Utilization of spectral-spatial characteristics in shortwave infrared hyperspectral images to classify and identify fungi-contaminated peanuts. Food Chem 220:393–399. CrossRefPubMedGoogle Scholar
  32. Richards JA, Jia X (2006) Remote sensing digital image analysis remote sensing digital image analysis, an introduction, by John A Richards and Xiuping Jia 2006 XXV, 439 p 197 illus 4th ed 3-540-25128-6 Berlin: springer, 2006:197Google Scholar
  33. Rumpf T, Mahlein AK, Steiner U, Oerke EC, Dehne HW, Plümer L (2010) Early detection and classification of plant diseases with support vector machines based on hyperspectral reflectance. Comput Electron Agric 74:91–99CrossRefGoogle Scholar
  34. Samarajeewa U, Sen AC, Fernando SY, Ahmed EM, Wei CI (1991) Inactivation of aflatoxin B 1 in corn meal, copra meal and peanuts by chlorine gas treatment. Food Chem Toxicol 29:41–47CrossRefGoogle Scholar
  35. Saqerm H (2009) Determination of aflatoxins in eggs, milk, meat and meat products using HPLC fluorescent and UV detectors. Food Chem 114:1141–1146CrossRefGoogle Scholar
  36. Schroeder HW, Hein H (1967) Aflatoxins: production of the toxins in vitro in relation to temperature. Appl Microbiol 15:441–445PubMedPubMedCentralGoogle Scholar
  37. Senthilkumar T, Jayas DS, White NDG, Fields PG, Gräfenhan T (2016a) Detection of fungal infection and Ochratoxin A contamination in stored barley using near-infrared hyperspectral imaging. BioSystems Eng 147:162–173 doi: CrossRefGoogle Scholar
  38. Senthilkumar T, Jayas DS, White NDG, Fields PG, Gräfenhan T (2016b) Detection of fungal infection and Ochratoxin A contamination in stored wheat using near-infrared hyperspectral imaging. J Stored Prod Res 65:30–39 doi: CrossRefGoogle Scholar
  39. Shen F, Wu Q, Liu P, Jiang X, Fang Y, Cao C (2018) Detection of Aspergillus spp contamination levels in peanuts by near infrared spectroscopy and electronic nose. Food Control:93Google Scholar
  40. Shi Y, Huang W, Zhou X (2017) Evaluation of wavelet spectral features in pathological detection and discrimination of yellow rust and powdery mildew in winter wheat with hyperspectral reflectance data. J Appl Remote Sens 11:026025CrossRefGoogle Scholar
  41. Shi Y et al. (2018) Wavelet-based rust spectral feature set (WRSFs): a novel spectral feature set based on continuous wavelet transformation for tracking progressive HostвАУPathogen interaction of yellow rust on wheat vol 10. doi: CrossRefGoogle Scholar
  42. Singh CB, Jayas DS, Paliwal J, White NDG (2009) Detection of insect-damaged wheat kernels using near-infrared hyperspectral imaging. J Stored Prod Res 45:151–158 doi: CrossRefGoogle Scholar
  43. Soares S, Gomes AA (2013) The successive projections algorithm. Trends in Analytical Chemistry 42:84–98CrossRefGoogle Scholar
  44. Sun D-W (2009) Infrared spectroscopy for food quality analysis and control. Academic PressGoogle Scholar
  45. Sun D-W (2016) Computer vision technology for food quality evaluation. Academic PressGoogle Scholar
  46. Tong S, Chang EY (2001) Support vector machine active learning for image retrieval. In: Proc, ACM Conference on Multimedia, pp 107–118Google Scholar
  47. van Egmond HP, Schothorst RC, Jonker MA (2007) Regulations relating to mycotoxins in food. Anal Bioanal Chem 389:147–157. CrossRefPubMedGoogle Scholar
  48. Wang ML, Raymer P, Chinnan M, Pittman RN (2012) Screening of the USDA peanut germplasm for oil content and fatty acid composition. Biomass Bioenergy 39:336–343CrossRefGoogle Scholar
  49. Wang W, Heitschmidt GW, Ni X, Windham WR, Hawkins S, Chu X (2014) Identification of aflatoxin B 1 on maize kernel surfaces using hyperspectral imaging. Food Control 42:78–86CrossRefGoogle Scholar
  50. Wang W, Ni X, Lawrence KC, Yoon S-C, Heitschmidt GW, Feldner P (2015) Feasibility of detecting Aflatoxin B1 in single maize kernels using hyperspectral imaging. In, vol 166:182–192. CrossRefGoogle Scholar
  51. Wardlow BD, Egbert SL, Kastens JH (2007) Analysis of time-series MODIS 250m vegetation index data for crop classification in the U.S. Central Great Plains. Remote Sens Environ 108:290–310CrossRefGoogle Scholar
  52. Wogan GN, Pong RS (1970) AFLATOXINS* annals of the New Yorke Academy of Sciences 174:623-635 doi: CrossRefGoogle Scholar
  53. Wold S, Sjöström M, Eriksson L (2001) PLS-regression: a basic tool of chemometrics. Chemom Intell Lab Syst 58:109–130. CrossRefGoogle Scholar
  54. Wu D, Sun D-W (2013) Advanced applications of hyperspectral imaging technology for food quality and safety analysis and assessment: a review — Part I: Fundamentals. Innov Food Sci Emerg Technol 19:1–14. CrossRefGoogle Scholar
  55. Wu LX, Ding XX, Li PW, Du XH, Zhou HY, Bai YZ, Zhang LX (2016) Aflatoxin contamination of peanuts at harvest in China from 2010 to 2013 and its relationship with climatic conditions. Food Control 60:117–123. CrossRefGoogle Scholar
  56. Zhang H, Paliwal J, Jayas DS, White NDG (2007) Classification of fungal infected wheat kernels using near-infrared reflectance hyperspectral imaging and support vector machine. Trans ASABE 50:1779–1785CrossRefGoogle Scholar
  57. Zhang J, Yuan L, Pu R, Loraamm RW, Yang G, Wang J (2014) Comparison between wavelet spectral features and conventional spectral features in detecting yellow rust for winter wheat. Comput Electron Agric 100:79–87CrossRefGoogle Scholar
  58. Zhang J, Wang N, Yuan L, Chen F, Wu K (2017) Discrimination of winter wheat disease and insect stresses using continuous wavelet features extracted from foliar spectral measurements. BioSyst Eng 162:20–29 doi: CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  • Xiaotong Qi
    • 1
  • Jinbao Jiang
    • 1
    Email author
  • Ximin Cui
    • 1
  • Deshuai Yuan
    • 1
  1. 1.College of Geosciences and Surveying EngineeringChina University of Mining and TechnologyBeijingChina

Personalised recommendations