Prediction of macronutrients in plant leaves using chemometric analysis and wavelength selection



Fast and real-time prediction of leaf nutrient concentrations can facilitate decision-making for fertilisation regimes on farms and address issues raised with over-fertilisation. Cacao (Theobroma cacao L.) is an important cash crop and requires nutrient supply to maintain yield. This project aimed to use chemometric analysis and wavelength selection to improve the accuracy of foliar nutrient prediction.

Materials and methods

We used a visible-near infrared (400–1000 nm) hyperspectral imaging (HSI) system to predict foliar calcium (Ca), potassium (K), phosphorus (P) and nitrogen (N) of cacao trees. Images were captured from 95 leaf samples. Partial least square regression (PLSR) models were developed to predict leaf nutrient concentrations and wavelength selection was undertaken.

Results and discussion

Using all wavelengths, Ca (R2CV = 0.76, RMSECV = 0.28), K (R2CV = 0.35, RMSECV = 0.46), P (R2CV = 0.75, RMSECV = 0.019) and N (R2CV = 0.73, RMSECV = 0.17) were predicted. Wavelength selection increased the prediction accuracy of Ca (R2CV = 0.79, RMSECV = 0.27) and N (R2CV = 0.74, RMSECV = 0.16), while did not affect prediction accuracy of foliar K (R2CV = 0.35, RMSECV = 0.46) and P (R2CV = 0.75, RMSECV = 0.019).


Visible-near infrared HSI has a good potential to predict Ca, P and N concentrations in cacao leaf samples, but K concentrations could not be predicted reliably. Wavelength selection increased the prediction accuracy of foliar Ca and N leading to a reduced number of wavelengths involved in developed models.

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

Access options

Buy single article

Instant unlimited access to the full article PDF.

US$ 39.95

Price includes VAT for USA

Subscribe to journal

Immediate online access to all issues from 2019. Subscription will auto renew annually.

US$ 199

This is the net price. Taxes to be calculated in checkout.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5


  1. Abdi H (2010) Partial least squares regression and projection on latent structure regression (PLS regression). Wiley Interdiscip Rev Comput Stat 2:97–106

  2. Afandi SD, Herdiyeni Y, Prasetyo LB, Hasbi W, Arai K, Okumura H (2016) Nitrogen content estimation of rice crop based on near infrared (NIR) reflectance using artificial neural network (ANN). Procedia Environ Sci 33:63–69

  3. Aikpokpodion PE (2010) Nutrients dynamics in cocoa soils, leaf and beans in Ondo State, Nigeria. J Agric Sci 1:1–9

  4. Andersen CM, Bro R (2010) Variable selection in regression—a tutorial. J Chemom 24:728–737

  5. Axelsson C, Skidmore AK, Schlerf M, Fauzi A, Verhoef W (2013) Hyperspectral analysis of mangrove foliar chemistry using PLSR and support vector regression. Int J Remote Sens 34:1724–1743

  6. Bai SH, Xu CY, Xu Z, Blumfield TJ, Zhao H, Wallace H, Reverchon F, Zwieten V (2015) Soil and foliar nutrient and nitrogen isotope composition (δ15N) at 5 years after poultry litter and green waste biochar amendment in a macadamia orchard. Environ Sci Pollut Res 22:3803–3809

  7. Bai SH, Trueman SJ, Nevenimo T, Hannet G, Bapiwai P, Poienou M, Wallace HM (2017) Effects of shade-tree species and spacing on soil and leaf nutrient concentrations in cocoa plantations at 8 years after establishment. Agric Ecosyst Environ 246:134–143

  8. Bai SH, Tahmasbian I, Zhou J, Nevenimo T, Hannet G, Walton D, Randall B, Gama T, Wallace HM (2018) A non-destructive determination of peroxide values, total nitrogen and mineral nutrients in an edible tree nut using hyperspectral imaging. Comput Electron Agric 151:492–500

  9. Bellon-Maurel V, Fernandez-Ahumada E, Palagos B, Roger JM, McBratney A (2010) Critical review of chemometric indicators commonly used for assessing the quality of the prediction of soil attributes by NIR spectroscopy. TrAC Trends Analyt Chem 29:1073–1081

  10. Blackmer TM, Schepers JS, Varvel GE (1994) Light reflectance compared with other nitrogen stress measurements in corn leaves. Agron J 86:934–938

  11. Cen H, He Y (2007) Theory and application of near infrared reflectance spectroscopy in determination of food quality. Trends Food Sci Tech 18:72–83

  12. Cheng JH, Sun DW (2017) Partial least squares regression (PLSR) applied to NIR and HSI spectral data modeling to predict chemical properties of fish muscle. Food Eng Rev 9:36–49

  13. Clevers JG, De Jong SM, Epema GF, Van Der Meer FD, Bakker WH, Skidmore AK, Scholte KH (2002) Derivation of the red edge index using the MERIS standard band setting. Int J Remote Sens 23:3169–3184

  14. Corti M, Gallina PM, Cavalli D, Cabassi G (2017) Hyperspectral imaging of spinach canopy under combined water and nitrogen stress to estimate biomass, water, and nitrogen content. Biosyst Eng 158:38–50

  15. de Carvalho Rocha WF, Sabin GP, Março PH, Poppi RJ (2011) Quantitative analysis of piroxicam polymorphs pharmaceutical mixtures by hyperspectral imaging and chemometrics. Chemometr Intell Lab 106:198–204

  16. Dibi WG, Bosson J, Zobi IC, Tié BT, Zoueu JT (2017) Use of fluorescence and reflectance spectra for predicting okra (Abelmoschus esculentus) yield and macronutrient contents of leaves. Open J Appl Sci 7:537–558

  17. Egilla JN, Davies FT, Boutton TW (2005) Drought stress influences leaf water content, photosynthesis, and water-use efficiency of Hibiscus rosa-sinensis at three potassium concentrations. Photosynthetica 43:135–140

  18. ElMasry G, Iqbal A, Sun DW, Allen P, Ward P (2011) Quality classification of cooked, sliced turkey hams using NIR hyperspectral imaging system. J Food Eng 103:333–344

  19. ElMasry G, Sun DW, Allen P (2012) Near-infrared hyperspectral imaging for predicting colour, pH and tenderness of fresh beef. J Food Eng 110:127–140

  20. Farrar MB, Wallace HM, Xu CY, Nguyen TTN, Tavakkoli E, Joseph S, Bai SH (2019) Short-term effects of organo-mineral enriched biochar fertiliser on ginger yield and nutrient cycling. J Soils Sediments 19:668–682

  21. Fearn T (2000) On orthogonal signal correction. Chemometr Intell Lab Syst 50:47–52

  22. Feng W, Yao X, Zhu Y, Tian YC, Cao WX (2008) Monitoring leaf nitrogen status with hyperspectral reflectance in wheat. Eur J Agron 28:394–404

  23. Fernandez S, Vidal D, Simon E, Soli3-Sugranes L (1994) Radiometric characteristics of Triticum aestivum cv, Astral under water and nitrogen stress. Int J Remote Sens 15:1867–1884

  24. Galvez-Sola L, García-Sánchez F, Pérez-Pérez JG, Gimeno V, Navarro JM, Moral R, Martínez-Nicolás JJ, Nieves M (2015) Rapid estimation of nutritional elements on citrus leaves by near infrared reflectance spectroscopy. Front Plant Sci 6:571

  25. Gama T, Wallace HM, Trueman SJ, Tahmasbian I, Bai SH (2018) Hyperspectral imaging for non-destructive prediction of total nitrogen concentration in almond kernels. Acta Hortic 5:259–264

  26. González ME, Cea M, Medina J, González A, Diez MC, Cartes P, Monreal C, Navia R (2015) Evaluation of biodegradable polymers as encapsulating agents for the development of a urea controlled-release fertilizer using biochar as support material. Sci Total Environ 505:446–453

  27. Gowen AA, O’Donnell C, Cullen PJ, Downey G, Frias JM (2007) Hyperspectral imaging–an emerging process analytical tool for food quality and safety control. Trends Food Sci Tech 18:590–598

  28. Hively WD, McCarty, GW, Reeves JB, Lang MW, Oesterling RA, Delwiche SR (2011) Use of airborne hyperspectral imagery to map soil properties in tilled agricultural fields. Appl Environ Soil Sci 2011:3581193.

  29. Horler DN, Dockray M, Barber J (1983) The red edge of plant leaf reflectance. Int J Remote Sens 4:273–288

  30. Hosseini-Bai S, Trueman SJ, Nevenimo T, Hannet G, Randall B, Wallace HM (2019) The effects of tree spacing regime and tree species composition on mineral nutrient composition of cocoa beans and canarium nuts in 8-year-old cocoa plantations. Environ Sci Pollut Res 26:22021–22029

  31. Indahl U, Næs T (2004) A variable selection strategy for supervised classification with continuous spectroscopic data. J Chemom 18:53–61

  32. Iqbal A, Sun DW, Allen P (2013) Prediction of moisture, color and pH in cooked, pre-sliced turkey hams by NIR hyperspectral imaging system. J Food Eng 117:42–51

  33. Isaac ME, Kimaro AA (2011) Diagnosis of nutrient imbalances with vector analysis in agroforestry systems. J Environ Qual 40:860–866

  34. Jiang Q, Chen Y, Guo L, Fei T, Qi K (2016) Estimating soil organic carbon of cropland soil at different levels of soil moisture using VIS-NIR spectroscopy. Remote Sens 8:755

  35. Kamruzzaman M, ElMasry G, Sun DW, Allen P (2012) Prediction of some quality attributes of lamb meat using near-infrared hyperspectral imaging and multivariate analysis. Anal Chim Acta 714:57–67

  36. Kamruzzaman M, Makino Y, Oshita S (2016a) Rapid and non-destructive detection of chicken adulteration in minced beef using visible near-infrared hyperspectral imaging and machine learning. J Food Eng 170:8–15

  37. Kamruzzaman M, Makino Y, Oshita S (2016b) Parsimonious model development for real-time monitoring of moisture in red meat using hyperspectral imaging. Food Chem 196:1084–1091

  38. Keskin M, Dodd RB, Han YJ, Khalilian A (2004) Assessing nitrogen content of golf course turfgrass clippings using spectral reflectance. Appl Eng Agric 851:860

  39. Kohavi R (1995) A study of cross-validation and bootstrap for accuracy estimation and model selection. In Ijcai 14:1137–1145

  40. Kokaly RF, Skidmore AK (2015) Plant phenolics and absorption features in vegetation reflectance spectra near 1.66 μm. Int J Appl Earth Obs 43:55–83

  41. Kourgialas NN, Karatzas GP, Koubouris GC (2017) A GIS policy approach for assessing the effect of fertilizers on the quality of drinking and irrigation water and wellhead protection zones (Crete, Greece). J Environ Manag 189:150–159

  42. Kumar A, Maurya BR, Raghuwanshi R (2014) Isolation and characterization of PGPR and their effect on growth, yield and nutrient content in wheat (Triticum aestivum L.). Biocatal Agric Biotechnol 3:121–128

  43. Lebaudy A, Véry AA, Sentenac H (2007) K+ channel activity in plants: genes, regulations and functions. FEBS Lett 581:2357–2366

  44. Li F, Mistele B, Hu Y, Chen X, Schmidhalter U (2014) Reflectance estimation of canopy nitrogen content in winter wheat using optimised hyperspectral spectral indices and partial least squares regression. Eur J Agron 52:198–209

  45. Li S, Shi Z, Chen S, Ji W, Zhou L, Yu W, Webster R (2015) In situ measurements of organic carbon in soil profiles using vis-NIR spectroscopy on the Qinghai–Tibet plateau. Environ Sci Technol 49:4980–4987

  46. Liu Y, Lyu Q, He S, Yi S, Liu X, Xie R, Zheng Y, Deng L (2015) Prediction of nitrogen and phosphorus contents in citrus leaves based on hyperspectral imaging. Int J Agric Biol Eng 8:80–88

  47. Maathuis FJ, Sanders D (1996) Mechanisms of potassium absorption by higher plant roots. Physiol Plant 96:158–168

  48. Malmir M, Tahmasbian I, Xu Z, Farrar MB, Bai SH (2019) Prediction of soil macro-and micro-elements in sieved and ground air-dried soils using laboratory-based hyperspectral imaging technique. Geoderma 340:70–80

  49. Manley M (2014) Near-infrared spectroscopy and hyperspectral imaging: non-destructive analysis of biological materials. Chem Soc Rev 43:8200–8214

  50. Morellos A, Pantazi XE, Moshou D, Alexandridis T, Whetton R, Tziotzios G, Wiebensohn J, Bill R, Mouazen AM (2016) Machine learning based prediction of soil total nitrogen, organic carbon and moisture content by using VIS-NIR spectroscopy. Biosyst Eng 152:104–116

  51. Munera S, Amigo JM, Blasco J, Cubero S, Talens P, Aleixos N (2017) Ripeness monitoring of two cultivars of nectarine using VIS-NIR hyperspectral reflectance imaging. J Food Eng 214:29–39

  52. Mutanga O (2004) Hyperspectral remote sensing of tropical grass quality and quantity. ITC, PhD Thesis, Wageningen University, pp.195

  53. Neto AJ, Toledo JV, Zolnier S, Lopes DD, Pires CV, da Silva TG (2017) Prediction of mineral contents in sugarcane cultivated under saline conditions based on stalk scanning by Vis/NIR spectral reflectance. Biosyst Eng 156:17–26

  54. Nguyen TT, Wallace HM, Xu CY, Xu Z, Farrar MB, Joseph S, Van Zwieten L, Bai SH (2017) Short-term effects of organo-mineral biochar and organic fertilisers on nitrogen cycling, plant photosynthesis, and nitrogen use efficiency. J Soils Sediments 17:2763–2774

  55. Osborne SD, Künnemeyer R, Jordan RB (1997) Method of wavelength selection for partial least squares. Analyst 122:1531–1537

  56. Pandey P, Ge Y, Stoerger V, Schnable JC (2017) High throughput in vivo analysis of plant leaf chemical properties using hyperspectral imaging. Front Plant Sci 8:1348

  57. Pereira EI, Da Cruz CC, Solomon A, Le A, Cavigelli MA, Ribeiro C (2015) Novel slow-release nanocomposite nitrogen fertilizers: the impact of polymers on nanocomposite properties and function. Ind Eng Chem Res 54:3717–3725

  58. Qi H, Paz-Kagan T, Karnieli A, Jin X, Li S (2018) Evaluating calibration methods for predicting soil available nutrients using hyperspectral VNIR data. Soil Till Res 175:267–275

  59. Qu JH, Sun DW, Cheng JH, Pu H (2017) Mapping moisture contents in grass carp (Ctenopharyngodon idella) slices under different freeze drying periods by Vis-NIR hyperspectral imaging. LWT-Food Sci Technol 75:529–536

  60. Rady A, Guyer D, Lu R (2015) Evaluation of sugar content of potatoes using hyperspectral imaging. Food Bioprocess Technol 8:995–1010

  61. Ravikanth L, Jayas DS, White ND, Fields PG, Sun DW (2017) Extraction of spectral information from hyperspectral data and application of hyperspectral imaging for food and agricultural products. Food Bioprocess Technol 10:1–33

  62. Rinnan Å, Van Den Berg F, Engelsen SB (2009) Review of the most common pre-processing techniques for near-infrared spectra. Trends Anal Chem 28:1201–1222

  63. Singh K, Majeed I, Panigrahi N, Vasava HB, Fidelis C, Karunaratne S, Bapiwai P, Yinil D, Sanderson T, Snoeck D, Das BS, Minasny B, Fielda DJ (2019) Near infrared diffuse reflectance spectroscopy for rapid and comprehensive soil condition assessment in smallholder cacao farming systems of Papua New Guinea, Catena 183:104185

  64. Tahmasbian I, Xu Z, Abdullah K, Zhou J, Esmaeilani R, Nguyen TT, Bai SH (2017) The potential of hyperspectral images and partial least square regression for predicting total carbon, total nitrogen and their isotope composition in forest litterfall samples. J Soils Sediments 17:2091–2103

  65. Tahmasbian I, Bai SH, Wang Y, Boyd S, Zhou J, Esmaeilani R, Xu Z (2018a) Using laboratory-based hyperspectral imaging method to determine carbon functional group distributions in decomposing forest litterfall. Catena 167:18–27

  66. Tahmasbian I, Xu Z, Boyd S, Zhou J, Esmaeilani R, Che R, Bai SH (2018b) Laboratory-based hyperspectral image analysis for predicting soil carbon, nitrogen and their isotopic compositions. Geoderma 330:254–263

  67. Trygg J, Wold S (2002) Orthogonal projections to latent structures (O-PLS). J Chemom 16:119–128

  68. Van Dierendonck FJ (1959) The manuring of coffee, cocoa, tea and tobacco. The manuring of coffee, cocoa, tea and tobacco. Centre d’Etude de l’Azote, Geneva 204 pp

  69. van Vliet JA, Giller KE (2017) Mineral nutrition of cocoa: a review. Adv Agron 141:185–270

  70. Vanhove W, Vanhoudt N, Van Damme P (2016) Effect of shade tree planting and soil management on rehabilitation success of a 22-year-old degraded cocoa (Theobroma cacao L.) plantation. Agric Ecosyst Environ 219:14–25

  71. Vigulu V, Blumfield TJ, Reverchon F, Bai SH, Xu Z (2019) Nitrogen and carbon cycling associated with litterfall production in monoculture teak and mixed species teak and flueggea stands. J Soils Sediments 19:1672–1684

  72. Wei Y, Zhu X, Li C, Cheng L, Wang L, Zhao G, Jiang Y (2017) Monitoring soil nitrate nitrogen based on hyperspectral data in the apple orchards. Agric Sci 8:21–32

  73. Wold S, Ruhe A, Wold H, Dunn WJ III (1984) The collinearity problem in linear regression. The partial least squares (PLS) approach to generalized inverses. SIAM J Sci Stat Comp 5:735–743

  74. Wold S, Sjöström M, Eriksson L (2001) PLS-regression: a basic tool of chemometrics. Chemometr Intell Lab Syst 58:109–130

  75. Xu S, Zhao Y, Wang M, Shi X (2018) Comparison of multivariate methods for estimating selected soil properties from intact soil cores of paddy fields by VIS–NIR spectroscopy. Geoderma 310:29–43

  76. Xue L, Cao W, Luo W, Zhang X (2004) Correlation between leaf nitrogen status and canopy spectral characteristics in wheat. Acta Phytoecol Sin 28:172–177

  77. Yao X, Zhu Y, Tian Y, Feng W, Cao W (2010) Exploring hyperspectral bands and estimation indices for leaf nitrogen accumulation in wheat. Int J Appl Earth Obs Geoinf 12:89–100

  78. Yu KQ, Zhao YR, Li XL, Shao YN, Liu F, He Y (2014) Hyperspectral imaging for mapping of total nitrogen spatial distribution in pepper plant. PLoS One 9:e116205

  79. Zaia FC, Gama-Rodrigues AC, Gama-Rodrigues EF, Moço MK, Fontes AG, Machado RC, Baligar VC (2012) Carbon, nitrogen, organic phosphorus, microbial biomass and N mineralization in soils under cacao agroforestry systems in Bahia, Brazil. Agrofor Syst 86:197–212

  80. Zhang X, Liu F, He Y, Gong X (2013) Detecting macronutrients content and distribution in oilseed rape leaves based on hyperspectral imaging. Biosyst Eng 115:56–65

  81. Zhang C, Liu F, Kong W, He Y (2015) Application of visible and near-infrared hyperspectral imaging to determine soluble protein content in oilseed rape leaves. Sensors 15:16576–11688

  82. Zhang M, Bai SH, Tang L, Zhang Y, Teng Y, Xu Z (2017) Linking potential nitrification rates, nitrogen cycling genes and soil properties after remediating the agricultural soil contaminated with heavy metal and fungicide. Chemosphere 184:892–899

  83. Zhao M, Esquerre C, Downey G, O’Donnell CP (2017) Process analytical technologies for fat and moisture determination in ground beef-a comparison of guided microwave spectroscopy and near infrared hyperspectral imaging. Food Control 73:1082–1094

  84. Zhu Y, Li Y, Feng W, Tian Y, Yao X, Cao W (2006) Monitoring leaf nitrogen in wheat using canopy reflectance spectra. Can J Plant Sci 86:1037–1046

Download references


The authors acknowledge Professor Helen Wallace for giving access to Hyperspectral Imaging cameras at the University of the Sunshine Coast and the National Agricultural Research Institute (NARI) in Keravat for assisting to collect leaf samples. MM thanks Environmental Future Research Institute of Griffith University for hosting him as a visiting scholar to undertake this study.

Funding information

The study was financially supported by the Australian Centre for International Agricultural Research (project FST/2014/099).

Author information

Correspondence to Shahla Hosseini Bai.

Additional information

Publisher’s note

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

Responsible editor: Xiuping Jia

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Malmir, M., Tahmasbian, I., Xu, Z. et al. Prediction of macronutrients in plant leaves using chemometric analysis and wavelength selection. J Soils Sediments 20, 249–259 (2020).

Download citation


  • Cacao trees
  • Calcium
  • Chemometric analysis
  • Nitrogen
  • NPK
  • Phosphorus
  • Potassium