Optimizing nitrogen estimates in common bean canopies throughout key growth stages via fusion of spectral and textural data from unmanned aerial vehicle (UAV) multispectral imagery

Published: 15 November 2023| Version 1 | DOI: 10.17632/fyct5d7sz7.1
Diogo Castilho Silva,
, Maria da Conceição Santana Carvalho,


This study investigates the potential of utilizing multispectral imagery acquired from unmanned aerial vehicles (UAVs) to enhance the accuracy of leaf nitrogen content (LNC) estimation, a crucial parameter for assessing crop nitrogen status and guiding nitrogen management practices. We integrated selected vegetation indices (VIs) and texture data (gray level co-occurrence matrix - GLCM) derived from UAV-based multispectral images to estimate LNC in common bean (Phaseolus vulgaris L.). Therefore, the objectives of this study were (i) to determine the optimal VIs and texture metrics from UAV multispectral imagery for estimating LNC, and (ii) to explore the capability of integrating spectral and textural information in the improvement of N status monitoring.


Steps to reproduce

Read the summary of the dataset first (xlsx file) Step 1: Setup Your Environment: open JupyterLab within your Anaconda environment. Step 2: Import Necessary Libraries: Import the required Python libraries. Step 3: Data Preparation: Load SHP files, which contain plot boundaries, phenological stage, N_source (urea, can, control), N_rate (0 – 200 kg N ha-1), Leaf N Content (LNC). Step 4: Extract Single Bands: Load the TIF files corresponding to your plots using rasterio. Extract the single bands from these files (e.g., Red, Red-edge, Green, NIR) as individual arrays. Step 5: Calculate Vegetation Indices: Use the single bands to calculate vegetation indices. Step 6: Calculate GLCM Features: Compute GLCM (Gray Level Co-occurrence Matrix) features using the extracted TIF files for each plot. You can use libraries like skimage for GLCM calculations. Step 7: Calculate NDTI (Normalized Difference Texture Index): Calculate NDTI using the GLCM features you computed in the previous step. Step 8: Organize Data: Organize the extracted data, vegetation indices, GLCM features, and NDTI into a structured dataset. Step 9: Feature Selection: Choose the top 10 vegetation indices and GLCM features based on their importance for assessing leaf nitrogen content. Step 10: Model Selection: Choose either Random Forest (RF) or Support Vector Machine (SVM) for modeling. Step 11: Model Evaluation: Evaluate the model's performance. Common evaluation metrics include root mean squared error (RMSE) and R-squared. Step 12: Interpretation: Interpret the model results and assess the accuracy of leaf nitrogen content predictions. Step 13: Reporting and Visualization: Prepare a report or visualization that highlights the results and insights from your analysis. Ensure that you have the necessary data, including the SHP files, TIF files before proceeding with these steps. Additionally, adapt the code and steps to your specific data and project requirements.


Universidade Federal de Goias


Agronomy, Unmanned Aerial Vehicle (Space Vehicle), Nitrogen, Precision Agriculture, Texture Analysis, Drone (Aircraft)


Coordenação de Aperfeiçoamento de Pessoal de Nível Superior

Finance Code 001

Fundação de Amparo à Pesquisa do Estado de Goiás




Financiadora de Estudos e Projetos

01.22.0080.00, Ref. 1219/21

Conselho Nacional de Desenvolvimento Científico e Tecnológico

315699/2020-5 and 307807/2022-3