ABSTRACT
Agriculture consumes the largest amount of water resources in the world; for this reason, developing technologies aimed at efficiently using these resources for food production is necessary. In the present work, red-green-blue (RGB) and infrared (IR) images of plots with corn (Zea mays L.) were used to estimate the changes in soil moisture. These images were obtained by cameras installed in an unmanned aerial vehicle (drone), which flew over the plots on different dates. The results showed that both RGB and IR images of corn plants can be used to estimate soil moisture with minimum and acceptable levels of root mean square error (with RMSEs of 1.02 and 1.58 for RGB and IR images, respectively); however, the optical response of plants can be altered by different factors in addition to changes in soil moisture; thus, the training of mathematical models to estimate this variable should preferably be performed with validation data at the plot level.
Unmanned aerial vehicle; infrared images; soil moisture; corn cultivation
INTRODUCTION
Agriculture is a human activity that demands a large amount of water resources; currently, approximately 70% of the fresh water in the world is used to irrigate 25% of cultivated land. However, approximately 62% of the world's irrigated land is under conditions of high or very high water stress (FAO, 2020). Additionally, increasing population and phenomena related to climate change generate greater demand and consequently problems with water availability for agricultural systems (Ungureanu et al., 2020). Currently, methods for calculating irrigation schedules exist; however, highly trained personnel are required to operate and interpret the data from different sensors used for that purpose (Gutiérrez et al., 2018).
The development and implementation of technologies to adequately manage water in agricultural systems can contribute to the sustainability of agricultural systems. Image analysis is a nondestructive and low-cost tool for generating information about the physiological state of crops that can be used in decision-making (Gupta & Ibaraki, 2014), and advances in processing and implementation of machine learning techniques have facilitated its increasingly widespread use for different crops (Zhou et al., 2021).
Some studies have shown the usefulness of this technique for generating maps of the water status of various crops, such as olive trees (García-Tejero et al., 2018) (Gerhards et al., 2016). In addition, for staple crops (Elsayed et al., 2017), thermal images were used to compare different indices of water stress on the basis of differences in the temperature of the foliage. Currently, unmanned aerial vehicles (commonly called drones) often carry red-green-blue (RGB) cameras, which are less expensive than infrared (IR) cameras and generally have a higher resolution (Mogili & Deepak, 2018). Both IR and RGB images have been successfully used to estimate the water content in leaves; however, there are few reports of using these images to estimate the moisture content in the soil when it is covered with plant residues, as is common in conservation agriculture systems in which little or no work is being performed at the time. These moisture content values are used to make decisions about the timing and duration of irrigation.
Considering the above, the objective of this work was to compare the accuracy of machine learning techniques in estimating the percentage of water in the soil via IR or RGB images as predictor variables for corn plants grown in a conservation agriculture system, which has been very rarely addressed.
MATERIAL AND METHODS
Description of the experimental site and establishment of the corn crop
Plots cultivated with corn crops were established in the municipality of Francisco I. Madero, Hidalgo, Mexico. The plots were located at coordinates 14Q 490634.38 m E
and 2236931.73 m N. Six plots 24 m long by 6 m wide were established. In the plots, a commercial maize hybrid was sown at a distance of 0.75 m between rows with a density of 95,000 plants per hectare. Sowing was performed with a mechanical seeder (John Deer, model 1015 Integral) at a depth of 10 cm. The same agronomic management practices (fertilization, cultivation, pest control, and disease control) were applied to all the plots. The soil was 80% covered with stubble from the previous cycle to follow the principles of conservation agriculture.
The emergence of the plants occurred approximately 8 days after sowing (DAS). In the region where the experiment was carried out (Mezquital Valley in the state of Hidalgo), wastewater has been used for irrigation of corn for approximately 100 years; for this reason, the soils present relatively elevated concentrations of nutrients and organic matter (Table 1).
Image acquisition
RGB images were acquired via a Zenmuse X3® camera with 12 megapixels, 20 mm (35 mm equivalent format) f/2.8, and a resolution of 4000 X 3000 pixels placed on board a DJI-Inspire 1® drone. The images were taken at an angle of 90° in relation to the direction of flight of the drone at a height of 40 ± 0.2 meters. Simultaneously, using the same angles and flight heights, images of the plot were obtained via a FLIR® IR camera with a 9 mm lens and a resolution of 640 X 512 pixels in the spectral band of 750 to 1,350 nm, mounted on the same DJI-Inspire 1® drone. Both types of images were focused on capturing the areas surrounding each ground sampling point. Photos were taken of each plot at 14, 26, and 36 DAS, which correspond to the vegetative growth period of corn.
The RGB and IR images were processed independently to build the respective models.
Soil moisture
Soil samples were collected at depths ranging from 0 to 25 cm. Each sample was placed in a 1 L container and weighed with a digital scale. Later, the samples were placed at 75 °C for 48 h and weighed again. The percentage of water in the soil was calculated via [eq. (1)]:
Where:
SM = soil moisture content (%);
Pi = Initial weight (g);
Pf = final weight (g).
Each of the plots was divided into four equal parts, from which three soil samples were taken to determine the moisture (Figure 1).
RGB image captured of one of the experimental corn plots with the DJI Inspire 1 drone. The points in blue represent the sites where the soil samples were taken to determine the moisture content via Eq. 1.
Each of the sampling points was georeferenced, and during the experiment, two gravity irrigations were carried out: the first was eight days before sowing, and the second was 27 DAS, one day after data collection.
Image processing
Both types of cameras captured a similar proportion of the ground area; however, the IR images contained fewer pixels than the RGB images. Despite this, both types of images were segmented with the same procedure in the program R (R Core Team, 2021) and the Ebimage library (Pau et al., 2010).
The RGB and IR images (750–1,350 nm) were segmented (Figure 2) to remove all the pixels not corresponding to plants by means of an algorithm implemented in R. In the case of the thermal images, the corresponding pixels and the minimum and maximum values of each image were obtained from the plants and were normalized from 0 to 1 in a manner analogous to the methodology proposed by Elsayed et al. (2017).
IR and RGB images of the corn crop were segmented to differentiate the crop from the soil. A) unsegmented IR image of corn, B) segmented IR image, C) unsegmented RGB image of corn, D) segmented RGB image.
Subsequently, the mean values of each of the channels, R, G, B and IR, for each of the sampling dates were calculated.
Data analysis.
The soil moisture was the variable to be predicted, whereas the average pixel intensity values corresponding to each of the channels (R, G, B and IR) were the predictor variables. For both types of images (RGB and IR), regression models were built by implementing a machine learning technique called support vector machine (SVM) to estimate the moisture in the soil through the images via R software and the e1071 library (Meyer et al., 2021). The metric used to evaluate the model was the root mean square error (RMSE). The SVM was trained using 60% of the data, and once the model was obtained, 40% of the remaining data were used to evaluate the prediction precision for soil moisture in the soil covered with stubble.
Implementation of SVM models
The SVM model yields a set of pixels that represent the foliage of the plants, from which the moisture content in the soil surrounding each plant can be indirectly inferred. To estimate the soil moisture over the entire surface present in an image, a spatial interpolation method is needed. Importantly, the distances between the groups of representative pixels of the plant foliage are not necessarily equal.
The kriging method is a local interpolation method based on the concept of autocorrelation, in which nearby points are assumed to contain similar values, and as the distance between points increases, they become less similar (Goovaerts, 1997) The similarity is also measured on the basis of the semivariance. This interpolation technique has been applied to create maps in which the properties of the soil or some other variable on land are quantitatively correlated (Patriche et al., 2023).
In this study, we use the kriging method to extrapolate from the point values of soil moisture content obtained by the automatic learning model in the areas (pixels) detected as foliage in both RGB and NIR images. This method is applied through the Krig function of the fields package (Nychka et al., 2023) in R, allowing inference of the moisture content values over the entire soil zone from areas with known (calculated) moisture content values by interpolation and estimation of values of surrounding areas (pixels) that are not regularly spaced.
RESULTS AND DISCUSSION
Moisture content in the soil
The moisture content in the soil was variable throughout the period in which the samples were taken. In the first sample, the mean SM calculated via Equation (1) was 33.7%, whereas at 26 DAS, the SM was 12.3%. This depletion of water was considered normal because of the phenomena of evaporation, infiltration and consumption by the corn plants (Figure 3).
Moisture content in soil growing corn. The line inside the box represents the median, whereas the center point represents the arithmetic mean.
The increase in the moisture content in the soil observed between days 26 and 36 was due to precipitation that occurred at 30 DAS.
Estimation of soil moisture via infrared (IR) images.
The data estimated by the mathematical model based on the SVM fit well with the data observed in the field, both for the training data, with an RMSE of 1.98%, and the validation data, with an RMSE of 1.58%. This shows that the moisture content in the soil can be estimated by means of IR images of plants (Figure 4).
Estimation of soil moisture from IR images with the SVM model. A) Training data. B) Validation data.
Water deficiencies in soil, even for short periods of time, induce stomatal closure, which results in a decrease in cooling induced by water evaporation and, consequently, an increase in the temperature of the foliage (Buckley, 2019), which can be detected by the IR sensors of cameras onboard unmanned aerial vehicles (Zhou et al., 2021). Previous studies that have used IR images to estimate the water status of staple crops, for example, Elsayed et al. (2017), have estimated the relative water content in wheat leaves from indices based on the temperature of the foliage, with a coefficient of determination R2 higher than 0.8; however, this study was carried out with images acquired at the ground level, limiting its application to small areas.
Hou et al. (2021) reported a relationship (R2 = 0.8) between transpiration measured in the field and methods based on models that use thermal images from a camera placed on board an unmanned aerial vehicle. Other authors (Das et al., 2021) have used machine learning techniques to estimate the stomatal conductance in wheat leaves from thermal images with coefficients of determination R2 close to 0.8, and using these same techniques, they obtained an
adequate estimate of the yield. In these aforementioned studies, the images were used to estimate, with precision and reliability, the amount of water present in the plants, whereas in the present work, the values obtained from the images were used to estimate the amount of moisture in the soil, which causes a physiological response in plants, and this can be inferred from IR aerial images according to the results of the present study.
Estimation of soil moisture via RGB images
Compared with IR cameras placed on unmanned aerial vehicles, which are more expensive than RGB cameras, RGB cameras offer higher spatial resolution and allow higher-quality images to be generated. In the present work, the percentage of moisture in the soil could be estimated from RGB images of the plots with a precision similar to that generated by the models based on IR images. The predictor variables used by the SVM models, which generated a lower RSME error coefficient in the validation data, were the G and B channels (Table 2).
Evaluation of the performance of the SVM model based on the RSME coefficient when estimating soil moisture through different combinations of the R, G and B channels with the training and validation data used to develop the model.
Studies such as those carried out by Zhang et al. (2022) reported similar results; they evaluated vegetation indices on the basis of RGB images with the index of water stress in corn cultivation as a predictor variable, obtaining coefficients of determination R2 between 0.80 and 0.83, with variable resolutions. In this sense, there are studies in which machine learning techniques have been tested for the early detection of water stress in corn. Zhuang et al. (2017) used decision trees to classify corn plants that were growing at three different percentages of soil moisture, with a range of 80 to 90% accuracy. With the model developed in the present work, the moisture values for the training and validation data (Figure 5) could be estimated with acceptable precision.
Percentage of moisture in the soil estimated by the SVM model in relation to the data obtained in the field via the gravimetric method. A) Training data; B) validation data.
RGB images have been used successfully as predictor variables for not only the water status of a crop but also other variables of importance in agriculture. Plants typically respond to the absence of essential nutrients, and in recent years, image analysis has become a noninvasive and low-cost tool for detecting such deficiencies (Li et al., 2020). Studies (Lu et al., 2021) have also reported a relationship between the nitrogen concentration in corn leaves and various vegetation indices.
In the present work, the moisture content in the soil caused a response in the physiology of the plants that altered the pattern of light reflection in the corn leaves, which made it possible to estimate the variable of interest (soil moisture) from aerial images, although there are studies in which the color of plants is affected by nitrogen fertilization (Pagola et al., 2009). This finding suggests that both types of images can be used as indirect indicators of the water status of plants, as well as the moisture content in the soil. However, RGB images can be affected by conditions present at the time at which aerial images are taken, such as the time of day, the flight height and even the configuration of the RGB camera itself, which can alter the parameters of the images and decrease the precision and reliability of the data produced by the models developed.
In agricultural practice, hydric and nutritional deficiencies commonly occur simultaneously, which can generate confusion in trained models, as they cannot discern between one factor and another based on the optical response of the plants. One of the main advantages of the use of digital images in the estimation of agronomic variables is the ability to generate spatial maps that show the distribution of these variables in the plots, which enables users to make agronomic management decisions consistent with the circumstances; however, the training and validation of these models should preferably be accompanied by in situ data to rule out other variables negatively affecting the values of the metrics used in the evaluation of the models.
Estimation of soil moisture through the implementation of models based on SVM applied to RGB (upper) and IR (lower) images.
CONCLUSIONS
The results show that a regression model can be trained with the SVM technique to estimate the moisture in soil covered by stubble from images obtained by aerial cameras onboard an unmanned aerial vehicle by correlating this variable with the colorimetric properties of the corn foliage. RGB and IR images showed very similar precisions in comparisons of the values estimated by the model and those observed in the field. In the present study, the G and B channels were sufficient to obtain a precision similar to that obtained with IR images.
REFERENCES
-
Buckley TN (2019) How do stomata respond to water status? New Phytologist 224(1): 21-36. https://doi.org/10.1111/nph.15899
» https://doi.org/10.1111/nph.15899 -
Das S, Christopher J, Apan A, Choudhury MR, Chapman S, Menzies NW, Dang YP (2021) Evaluation of water status of wheat genotypes to aid prediction of yield on sodic soils using UAV-thermal imaging and machine learning. Agricultural and Forest Meteorology 307: 108477. https://doi.org/10.1016/j.agrformet.2021.108477
» https://doi.org/10.1016/j.agrformet.2021.108477 -
Elsayed S, Elhoweity M, Ibrahim HH, Dewir YH, Migdadi HM, Schmidhalter U (2017) Thermal imaging and passive reflectance sensing to estimate the water status and grain yield of wheat under different irrigation regimes. Agricultural Water Management 189: 98-110. https://doi.org/10.1016/j.agwat.2017.05.001
» https://doi.org/10.1016/j.agwat.2017.05.001 -
FAO (2020) The State of Food and Agriculture 2020. Overcoming water challenges in agriculture. In The State of Food and Agriculture 2020. https://doi.org/10.4060/cb1447en
» https://doi.org/10.4060/cb1447en -
García-Tejero IF , Ortega-Arévalo CJ , Iglesias-Contreras M , Moreno JM , Souza L , Tavira SC , Durán-Zuazo VH (2018) Assessing the crop-water status in almond (Prunus dulcis mill.) trees via thermal imaging camera connected to smartphone. Sensors (Switzerland) 18(4): 1050. https://doi.org/10.3390/s18041050
» https://doi.org/10.3390/s18041050 -
Gerhards M, Rock G, Schlerf M, Udelhoven T (2016) Water stress detection in potato plants using leaf temperature, emissivity, and reflectance. International Journal of Applied Earth Observation and Geoinformation 53: 27-39. https://doi.org/10.1016/j.jag.2016.08.004
» https://doi.org/10.1016/j.jag.2016.08.004 -
Goovaerts P (1997) Geostatistics for natural reources evaluation. Ann Arbor, LLC, v42. X. https://doi.org/10.2307/1270969
» https://doi.org/10.2307/1270969 -
Gupta SD, Ibaraki Y (2014) Plant image analysis: fundamentals and applications. Photogrammetric Engineering & Remote Sensing 82(7): 471-472. https://doi.org/10.14358/pers.82.7.471
» https://doi.org/10.14358/pers.82.7.471 -
Gutiérrez S, Diago MP, Fernández-Novales J, Tardaguila J (2018) Vineyard water status assessment using on-the-go thermal imaging and machine learning. PLoS ONE 13(2): e0192037. https://doi.org/10.1371/journal.pone.0192037
» https://doi.org/10.1371/journal.pone.0192037 -
Hou M, Tian F, Ortega-Farias S, Riveros-Burgos C, Zhang T, Lin A (2021) Estimation of crop transpiration and its scale effect based on ground and UAV thermal infrared remote sensing images. European Journal of Agronomy 131(126389): 15. https://doi.org/10.1016/j.eja.2021.126389
» https://doi.org/10.1016/j.eja.2021.126389 -
Li D, Li C, Yao Y, Li M, Liu L (2020) Modern imaging techniques in plant nutrition analysis: a review. Computers and Electronics in Agriculture 174: 105459. https://doi.org/10.1016/j.compag.2020.105459
» https://doi.org/10.1016/j.compag.2020.105459 -
Lu J, Cheng D, Geng C, Zhang Z, Xiang Y, Hu T (2021) Combining plant height, canopy coverage and vegetation index from UAV-based RGB images to estimate leaf nitrogen concentration of summer maize. Biosystems Engineering 202: 42-54. https://doi.org/10.1016/j.biosystemseng.2020.11.010
» https://doi.org/10.1016/j.biosystemseng.2020.11.010 -
Meyer D, Dimitriadou E, Hornik K, Weingessel A, Leisch F (2021) e1071: Misc Functions of the Department of Statistics, Probability Theory Group (Formerly: E1071), TU Wien. In R package version (p1-6). Available: https://cran.r-project.org/package=e1071
» https://cran.r-project.org/package=e1071 -
Mogili UR, Deepak BBVL (2018) Review on application of drone systems in precision agriculture. Procedia Computer Science 133: 502-509. https://doi.org/10.1016/j.procs.2018.07.063
» https://doi.org/10.1016/j.procs.2018.07.063 -
Nychka D, Furrer R, Paige J, Sain S, Gerber F, Iverson M (2023) Fields: tools for spatial data. Available: https://github.com/dnychka/fieldsRPackage
» https://github.com/dnychka/fieldsRPackage -
Pagola M, Ortiz R, Irigoyen I, Bustince H, Barrenechea E, Aparicio-Tejo P, Lamsfus C, Lasa B (2009) New method to assess barley nitrogen nutrition status based on image colour analysis. Comparison with SPAD-502. Computers and Electronics in Agriculture 65(2): 213-218. https://doi.org/10.1016/j.compag.2008.10.003
» https://doi.org/10.1016/j.compag.2008.10.003 -
Patriche CV , Rosca B , Pîrnau RG , Vasiliniuc I (2023) Spatial modelling of topsoil properties in Romania using geostatistical methods and machine learning. PLoS One 18(8):e0289286. https://doi.org/10.1371/journal.pone.0289286
» https://doi.org/10.1371/journal.pone.0289286 -
Pau G, Fuchs F, Sklyar O, Boutros M, Huber W (2010) EBImage-an R package for image processing with applications to cellular phenotypes. Bioinformatics 26(7): 979-981. https://doi.org/10.1093/bioinformatics/btq046
» https://doi.org/10.1093/bioinformatics/btq046 - R Core Team (2021) R: A language and environment for statistical computing. (4.1) R Foundation for Statistical Computing. ISBN 3-900051-07-0
-
Ungureanu N , Vladu? V , Voicu G (2020) Water scarcity and wastewater reuse in crop irrigation. Sustainability 12(21): 1-19 . https://doi.org/10.3390/su12219055
» https://doi.org/10.3390/su12219055 -
Zhang L, Zhang H, Han W, Niu Y, Chávez JL, Ma W (2022) Effects of image spatial resolution and statistical scale on water stress estimation performance of MGDEXG: A new crop water stress indicator derived from RGB images. Agricultural Water Management 264: 107506. https://doi.org/10.1016/j.agwat.2022.107506
» https://doi.org/10.1016/j.agwat.2022.107506 -
Zhou Z, Majeed Y, Diverres Naranjo G, Gambacorta EMT (2021) Assessment for crop water stress with infrared thermal imagery in precision agriculture: A review and future prospects for deep learning applications. Computers and Electronics in Agriculture 182: 106019. https://doi.org/10.1016/j.compag.2021.106019
» https://doi.org/10.1016/j.compag.2021.106019 -
Zhuang S, Wang P, Jiang B, Li M, Gong Z (2017) Early detection of water stress in maize based on digital images. Computers and Electronics in Agriculture 140: 461-468. https://doi.org/10.1016/j.compag.2017.06.022
» https://doi.org/10.1016/j.compag.2017.06.022
Edited by
-
Area Editor:
Job Teixeira de Oliveira












