Identification of fungi-contaminated peanuts using hyperspectral imaging technology and joint sparse representation model

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


Peanuts with fungal contamination may contain aflatoxin, a highly carcinogenic substance. We propose the use of hyperspectral imaging to quickly and noninvasively identify fungi-contaminated peanuts. The spectral data and spatial information of hyperspectral images were exploited to improve identification accuracy. In addition, successive projection was adopted to select the bands sensitive to fungal contamination. Furthermore, the joint sparse representation based classification (JSRC), which considers neighboring pixels as belonging to the same class, was adopted, and the support vector machine (SVM) classifier was used for comparison. Experimental results show that JSRC outperforms SVM regarding robustness against random noise and considering pixels at the edge of the peanut kernel. The classification accuracy of JSRC reached 99.2% and 98.8% at pixel scale, at least 98.4% and 96.8% at kernel scale for two peanut varieties, retrieving more accurate and consistent results than SVM. Moreover, fungi-contaminated peanuts were correctly marked in both learning and test images.


Fungal contamination Peanut Hyperspectral image Joint sparse representation Classification 



This work was supported by the National Natural Science Foundation of China (41571412, 41871341).

Author contributions

Xiaotong Qi carried out the experiment and analyzed the data, and wrote the manuscript. Jinbao Jiang and Ximin Cui designed the experiment and guided the data analysis. Deshuai Yuan involved the process of the experiment and data collection. All authors reviewed and approved the final manuscript.

Compliance with ethical standards

Conflict of interest

The authors have no conflicts of interest to declare.


  1. Araujo MCU, Saldanha TCB, Galvao RKH, Yoneyama T, Chame HC, Visani V (2001) The successive projections algorithm for variable selection in spectroscopic multicomponent analysis. Chemometr Intell Lab Syst 57:65–73. CrossRefGoogle Scholar
  2. Berardo N, Pisacane V, Battilani P, Scandolara A, Amedeo 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–8134CrossRefGoogle Scholar
  3. Burns DA, Ciurczak EW (2007) Handbook of Near-Infrared Analysis, 3rd edn, Revised and expandedGoogle Scholar
  4. Cancer IAFO (1993) Some naturally occurring substances: food items and constituents, heterocyclic aromatic amines and mycotoxins CarcinógenosGoogle Scholar
  5. Chang CC, Lin CJ (2011) LIBSVM: a library for support vector machines. ACM Trans Intell Syst Technol 2(27):1–27CrossRefGoogle Scholar
  6. Chen Y, Nasrabadi NM, Tran TD (2010) Classification for hyperspectral imagery based on sparse representation. In: The workshop on hyperspectral image and signal processing: evolution in remote sensing, pp 1–4Google Scholar
  7. Chen Y, Nasrabadi NM, Tran TD (2011) Hyperspectral image classification using dictionary-based sparse representation. IEEE Trans Geosci Remote Sens 49:3973–3985. CrossRefGoogle Scholar
  8. 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
  9. 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. CrossRefGoogle Scholar
  10. Jia S, Xie Y, Tang G, Zhu J (2014) Spatial-spectral-combined sparse representation-based classification for hyperspectral imagery. Soft Comput 20:4659–4668. CrossRefGoogle Scholar
  11. Jiang J, Qiao X, He R (2016) Use of Near-Infrared hyperspectral images to identify moldy peanuts. J Food Eng 169:284–290CrossRefGoogle Scholar
  12. 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
  13. 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
  14. 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
  15. Mcdanell R, Mclean AE, Hanley AB, Heaney RK, Fenwick GR (1988) Chemical and biological properties of indole glucosinolates (glucobrassicins): a review. Food Chem Toxicol 26:59–70CrossRefGoogle Scholar
  16. 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
  17. 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. CrossRefGoogle Scholar
  18. Rahman A, Faqeerzada MA, Cho BK (2018) Hyperspectral imaging for predicting the allicin and soluble solid content of garlic with variable selection algorithms and chemometric models. J Sci Food Agric 98:4715–4725. CrossRefGoogle Scholar
  19. 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
  20. 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
  21. Schroeder HW, Hein H (1967) Aflatoxins: production of the toxins in vitro in relation to temperature. Appl Microbiol 15:441–445Google Scholar
  22. 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. Biosyst Eng 147:162–173. CrossRefGoogle Scholar
  23. 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. CrossRefGoogle Scholar
  24. Shenk JS, Workman JJJ, Westerhaus MO (2001) Handbook of Near-Infrared Analysis. CRC Press, New YorkGoogle Scholar
  25. Shi J et al (2017) A rapid and nondestructive method to determine the distribution map of protein, carbohydrate and sialic acid on Edible bird’s nest by hyper-spectral imaging and chemometrics. Food Chem 229:235–241. CrossRefGoogle Scholar
  26. 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–158CrossRefGoogle Scholar
  27. Smith KL, Steven MD, Colls JJ (2004) Use of hyperspectral derivative ratios in the red-edge region to identify plant stress responses to gas leaks. Remote Sens Environ 92:207–217CrossRefGoogle Scholar
  28. Tripathi S, Mishra HN (2009) A rapid FT-NIR method for estimation of aflatoxin B1 in red chili powder. Food Control 20:840–846CrossRefGoogle Scholar
  29. USDA (2018) Table 13 Peanut area, yield, and production. USDA (United States Department of Agriculture).
  30. 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
  31. 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. J Food Eng 166:182–192. CrossRefGoogle Scholar
  32. Wogan GN, Pong RS (1970) AFLATOXINS*. Ann N Y Acad Sci 174:623–635. CrossRefGoogle Scholar
  33. Workman J (2007) Practical guide to interpretive near-infrared spectroscopy. CRC Press Inc, New YorkCrossRefGoogle Scholar
  34. Wright J, Yang AY, Ganesh A, Sastry SS, Ma Y (2009) Robust face recognition via sparse representation. IEEE Trans Pattern Anal Mach Intell 31:210–227. CrossRefGoogle Scholar
  35. Wu L, He J, Liu G, Wang S, He X (2016) Detection of common defects on jujube using Vis-NIR and NIR hyperspectral imaging. Postharvest Biol Technol 112:134–142. CrossRefGoogle Scholar
  36. 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

Copyright information

© Association of Food Scientists & Technologists (India) 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