Printer Friendly

Use of digital images to estimate soil moisture/Uso de imagens digitais para estimar a umidade do solo.


Soil moisture is the measurement of the amount of water in liquid or gaseous state, present in the soil porous space at a given time. This characteristic is related to important hydrological processes such as infiltration rate, surface runoff and evapotranspiration (Su et al., 2014). In the agricultural field, this parameter directly influences the yield of a crop (Kaleita et al., 2005). Still in times of water rationing, the adequate irrigation management depends on the good knowledge about soil moisture (Hanson et al., 2000).

Dobriyal et al. (2012) present various approaches to determine soil moisture. For local scales, the thermogravimetric method is the most used procedure; this methodology, although precise and safe, is little practical, because it requires the collection of a large number of samples and a long drying time to achieve the results.

Moisture is also a factor that influences the spectral response of the soil (Dalmolin et al., 2005). For different water contents, the electromagnetic energy reflected by the soil surface is viewed as different tones of a color space. Thus, models for moisture prediction based on the spectral response of the soil can be obtained, for example, through spectrophotometry and orbital remote sensing (Kaleita et al., 2005; Ben-Dor et al., 2009; Bertoldi et al., 2014) or by the use of images from portable digital cameras (Kuchenbuch & Ingram, 2002; Persson, 2005a; Zhu et al., 2010; 2011; Cumbrera et al., 2012). This latter approach can generate instantaneous results and use devices that are generally easy to purchase, such as common digital cameras.

This study aimed to determine equations to estimate soil moisture using variables of color spaces obtained from images of a portable digital camera.


Six soils available in the database of the Federal University of Vicosa (UFV) were used in this study. Their physical characteristics, textural class, contents of organic matter and color, according to the visual interpretation of the Munsell chart, are presented in Table 1.

Portions of soil were sieved (2 mm mesh) to remove gravel and roots, and dried in an oven (65[degrees]C) until reaching constant weight. Then, samples were prepared with gradual addition of distilled water (approximately 5%) varying from the constant weight (dry soil) until a value close to saturation. Three samples were prepared for each soil moisture. All samples were photographed, weighed and then dried in an oven at 105-110[degrees]C for 24 h for the determination of gravimetric moisture (U(%)). U (%) was determined according to the methodology of EMBRAPA (2011) using Eq. 1.

U (%) = [Wd - Ww]/[Ww - Wc] (1)


U (%)--gravimetric moisture, %;

Wd--weight of dry sample, g:

Ww--weight of wet sample, g; and,

Wc--weight of the container used, g.

Attention was paid to homogenizing the portion of soil with the distilled water, i.e., guaranteeing that the entire soil sample had the same moisture content. When necessary, a crucible with a mortar was used to break up the aggregates. The surfaces of the samples were leveled to minimize the effects of shading by microrelief or by the edge of the container.

The images were captured with a NIKON Coolpix L810 digital photographic camera with lens of 4-104 mm. In order not to have pixels with saturated values (digital numeric value of 255) in the soil portion of the captured image, pre-tests were conducted with different adjustments of diaphragm opening, exposure time and ISO (International Standards Organization) sensitivity of the camera. Under the conditions the images were captured for this experiment, the following camera parameters were defined in these pre-tests: diaphragm opening equal to f/3.1; exposure time of 1/30s and ISO sensitivity of 200. The camera was positioned on the nadir at approximately 23 cm from the surface of the samples. The geometric resolution of 1600 x 1200 pixels was used.

In order to achieve the local control of the illumination, it was necessary to correct the white balance of the digital camera. The white balance refers to the adjustments performed by the photographer (manual mode) or by the photographic camera (automatic mode) to obtain images with colors close to those the objects have under specific illumination. The adequate white balance helps to avoid distortions in the colors and, in order to apply it correctly, one must consider the color of the light source.

In this experiment, the white balance was adjusted using the pre-setting option available in the camera. A grey chart was used as the base for the correction of the illumination. The illumination of the laboratory was performed with fluorescent lamps. The grey chart was also useful to evaluate the illumination homogeneity, since, when the illumination is homogeneous, all pixels of a photograph of the chart have the same value.

The image processing steps were performed in the software Matlab (version 6.5 R13). After photographing the soil samples, the central region of the images was cropped. This action was necessary to disregard the white background and the region influenced by the edges of the containers with the samples. Therefore, a central square area of approximately 150 x 150 pixels was used, according to the recommendation of Persson (2005a).

The values of each one of the bands of the RGB color space were extracted for the calculation of the median. The use of the median is suggested by Persson (2005a) as a way to overcome the deviations caused by the shading of the microrelief formed on the surfaces of the soil samples. The images were converted from RGB to the HSV color space to obtain the median values of hue, saturation and value, and also converted to panchromatic images, obtaining the median value of the digital number.

In the HSV space, the colors are represented by the parameters: hue (tones), saturation (purity) and value (brightness), all varying between zero and one. The transformation from RGB to HSV followed the procedures presented by Hanbury (2002).

The DN values of the monochromatic images were obtained by Eq. 2, assuming the values of conversion of the National Television System Committee (NTSC), according to Solomon & Breckon (2013).

DN = 0.2989 x R + 0.5870 x G + 0.1140 x B (2)

The quality of the models was evaluated using validation samples, which were processed in a similar way as those used in the construction of the models. The estimates obtained with the models were confronted with the reference values (obtained by the thermogravimetric method) for the calculation of the root mean squared error (RMSE).


In order to test the calibration of the white balance, the white side of the grey chart was previously photographed. The RGB values of this photograph showed digital numbers (DNs) between 248 and 255, which indicated an efficient correction and homogeneity of illumination.

There was negative correlation between the values of the red, green, blue bands and soil moisture (Table 2), indicating that the soils became darker always when soil moisture increased. As a general spectral characteristic, the soils reflected more the red wavelengths, followed by green and blue (Figure 1). For this same reason, Kuchenbuch & Ingram (2002) used only red band values to predict soil moisture in an experiment with maize growth in transparent pots.

The darkening of the soil can be explained, in optical terms, by the variation in the refraction index of the dry soil and wet soil. When water is added, the contrast between soil particles and the surrounding medium decreases, because the refraction index on the water/particle interface is lower than the refraction index in these areas in dry soils (Twomey et al., 1986).

In the HSV color space, the response to moisture variation was different for each soil. Therefore, there is no response pattern of the soils in this color space to the variation of moisture. The behavior of soils 1 and 6 was different from that of the others. While the values of Hue and Value decreased, the Saturation increased (Figure 2) and, therefore, it showed positive correlation with soil moisture (Table 2). Saturation is the measurement of color purity; hence, the higher the value, the purer and less grey the image. The soils 1 and 6 have similar proportions of silt, sand and clay, besides a similar color (Table 1). The soil with highest organic matter content (Soil 2) showed the lowest variation in the HSV parameters. For all soils, the parameter Value decreased on average by 0.2 units between the dry samples and the saturated samples.

For the panchromatic image, the correlations varied from -0.64 (soil 3) to -0.92 (soils 1 and 6, respectively). It is possible to note that the variation in DNs due to the increase in soil moisture differs between the types of soils (Figure 3). These differences are attributed to characteristics such as texture, mineralogical composition and organic matter content, because these variables influence soil reflectance (Dalmolin et al., 2005). Zhu et al. (2010), for example, studied soils with similar mineralogy and organic matter contents, varying only the texture. These authors concluded that there is a negative exponential variation between the water content and the DNs of a panchromatic image and that the roughness of the samples, influenced by the texture, significantly interferes with the spectral response of this image.

Soil 2 differs from the others regarding the increased content of organic matter (Table 1). Despite its higher content, this soil has a reddish color (5 YR 4/4 dry and 5 YR 3/3 wet). This soil possibly contains high content of hematite, a mineral that tends to mask the effects of organic matter on soil color (Resende, 1976). Due to its high opacity, hematites tend to stabilize the reflectance of the soils even with variation of moisture (Stoner et al., 1991).

At moisture values close to the saturation of the samples, i.e., when the entire porous space was filled by water, the DNs tended to increase. This behavior can be explained by the formation of a layer of water on the surface of the samples, which increases the reflectance. A similar behavior was observed by Kuchenbuch & Ingram (2002), Persson (2005a) and Zhu et al. (2011). In practical terms, it is possible to conclude that the relationship between the spectral response and soil moisture is well explained by the images of common digital cameras for moisture values below saturation.

In order to reduce the effect of the reflection by the layer of water, the interval of moisture values used for the analyses varied among the studied soils (Figures 1, 2 and 3). Since sand particles are larger than clay particles, the capacity of water adsorption in sandy soils (smaller specific surface) is lower in comparison to clayey soils and, therefore, they saturate with a smaller amount of water. Hence, sandier soils showed lower range of evaluation compared with more clayey soils. The specific surface also explains why the color of sandy soils is more easily altered by the presence of organic matter.

The highest deviations in relation to the mean in the values of the parameters (RGB, HSV and panchromatic image) were observed in the samples totally dried or close to saturation. In these two ranges, it was difficult to level the surface of the samples.

Linear models with 1, 2 and 3 independent variables were tested for each color space (RGB and HSV). A linear model using only the DNs of the panchromatic image was also evaluated. In the comparison between models, the RMSE value was evaluated. The addition of a third factor did not improve much the fit and, therefore, these models were not selected.

The equations with the best fits are presented in Table 3. Among the tested models, the variables Saturation (S) and Value (V) of the HSV color space stood out for the soils 1, 3 and 5. Thus, the model proposed by Persson (2005a) represents a good form to estimate the moisture of these soils. A satisfactory fit was obtained with the use of this model, although it was inferior to those found by this author. Since the red band has higher DNs and according to the relationships of conversion from RGB to HSV (Hanbury, 2002), the parameter Value, for all soils, was obtained by making R/255. Hence, the correlation of the red band (Table 2) was incorporated into this model. Additionally, this model has the contribution of the Saturation band, which varied as a function of soil characteristics (Figure 2).

For the soils 2 and 6, the best model was the one in which only the parameter Value was used as independent variable. In these cases, the same results are found when using only the Red band, as proposed by Kuchenbuch & Ingram (2002). The DNs of the panchromatic image were also useful to determine the moisture of soil 6. For soil 4, a model that considers the Blue and Green bands of the RGB color space demonstrated superior performance; however, in this case, there was also significance when the S and V bands were considered as independent variables.

The results demonstrate that, in order to estimate the moisture of soils analyzed as a function of the variation in the spectral response, the characteristics of the soil must be previously analyzed so that the most satisfactory model is selected. There is still the need for complementary studies with different soil classes to understand the relationship between soil moisture and the spectral response of the soil.

Moisture determination through digital images is a nondestructive method that must be improved for the in loco determination without the need for collecting samples. One disadvantage of the method is that it determines only the moisture on the surface of the samples.

The present study shows that it is possible to estimate soil moisture based on the spectral response of samples, provided that some precautions are taken, such as the correction of illumination and white balance. It should be pointed out that the electromagnetic energy reflected by the soil surface is a property of the sensor of the camera and, therefore, without the proper corrections, the results will vary from camera to camera (Persson, 2005b).

In future studies, evaluations should be performed using reflectance values, photographic cameras with bands on the infrared spectrum and hyperspectral cameras.


1. Images from common digital cameras, with adequate processing, can be used to estimate moisture of different soil classes.

2. For each type of soil, different linear models must be tested, with bands of the color spaces RGB, HSV and digital numbers of a panchromatic image as independent variables, in order to find the most adequate.

3. The methodology of the present study allowed an efficient correction of the white balance of the digital camera, a fundamental step for the standardization of the photographs.


Ref. 005-2016--Received 17 Jan, 2016 * Accepted 3 Oct, 2016 * Published 31 Oct, 2016


The authors would like to thank the following Brazilian Governamental Funding Agencies: The Coordination for the Improvement of Higher Education Personnel (CAPES) and The National Council for Scientific and Tecnological Development (CNPq).


Ben-Dor, E.; Chabrillat, S.; Dematte, J. A. M.; Taylor, G. R.; Hill, J.; Whiting, M. L.; Sommer, S. Using imaging spectroscopy to study soil properties. Remote Sensing of Environment, v.113, p. S38-S55, 2009.

Bertoldi, G.; Della Chiesa, S.; Notarnicola, C.; Pasolli, L.; Niedrist, G.; Tappeiner, U. Estimation of soil moisture patterns in mountain grasslands by means of SAR RADARSAT2 images and hydrological modeling. Journal of Hydrology, v.516, p.245-257, 2014.

Cumbrera, R.; Tarquis, A. M.; Gasco, G.; Millan, H. Fractal scaling of apparent soil moisture estimated from vertical planes of Vertisol pit images. Journal of Hydrology, v.452, p.205-212, 2012.

Dalmolin, R. S. D.; Goncalves, C. N.; Klamt, E.; Dick, D. P. Relacao entre os constituintes do solo e seu comportamento espectral. Ciencia Rural, v.35, p.481-489, 2005.

Dobriyal, P.; Qureshi, A.; Badola, R.; Hussain, S. A. A review of the methods available for estimating soil moisture and its implications for water resource management. Journal of Hydrology, v.458, p.110-117, 2012.

EMBRAPA--Empresa Brasileira de Pesquisa Agropecuaria. Manual de metodos de analises de solo. Rio de Janeiro: EMBRAPA, 2011. 230p.

Hanbury, A. The taming of the hue, saturation and brightness colour space. In: Of Computer, 7, 2002; Bad Aussee. Proceedings ... Vienna: Vienna University of Technology, 2002. p.234-243.

Hanson, B.; Orloff, S.; Peters, D. Monitoring soil moisture helps refine irrigation management. California Agriculture, v.54, p.38-42, 2000.

Kaleita, A. L.; Tian, L. F.; Hirschi, M. C. Relationship between soil moisture content and soil surface reflectance. Transactions of the ASAE, v.48, p.1979-1986, 2005.

Kuchenbuch, R. O.; Ingram, K. T. Image analysis for non destructive and non invasive quantification of root growth and soil water content in rhizotrons. Journal of Plant Nutrition and Soil Science, v.165, p.573-581, 2002. (200210)165:5%3C573::AID-JPLN573%3E3.0.CO; 2-W

Persson, M. Accurate dye tracer concentration estimations using image analysis. Soil Science Society of America Journal, v.69, p.967-975, 2005a.

Persson, M. Estimating surface soil moisture from soil color using image analysis. Vadose Zone Journal, v.4, p.1119-1122, 2005b.

Resende, M. Mineralogy, chemistry, morphology and geomorphology of some soils of the Central Plateau of Brazil. West Lafayette: Purdue University, 1976. 327p. Tese Doutorado

Solomon, C.; Breckon, T. Fundamentos do processamento de imagens digitais: Uma abordagem pratica com exemplos em Matlab. 1.ed. Rio de Janeiro: LTC, 2013. 289p.

Stoner, E.; Derksen, I.; Macedo, J. Discriminacao espectral de Latossolos do Planalto Central brasileiro. Pesquisa Agropecuaria Brasileira, v.26, p.1599-1606, 1991.

Su, S. L.; Singh, D. N.; Baghin, I. M. S. A critical review of soil moisture measurement. Measurement, v.54, p.92-105, 2014.

Twomey, S. A.; Bohren, C. F.; Mergenthaler, J. L. Reflectance and albedo differences between wet and dry surfaces. Applied Optics, v.25, p.431-437, 1986.

Zhu, Y.; Wang, Y.; Shao, M. Using soil surface gray level to determine surface soil water content. Science China Earth Sciences, v.53, p.1527-1532, 2010.

Zhu, Y.; Wang, Y.; Shao, M.; Horton, R. Estimating soil water content from surface digital image gray level measurements under visible spectrum. Canadian Journal of Soil Science, v.91, p.69-76, 2011.

Joao F. C. dos Santos (1), Heider R. F. Silva (2), Francisco A. C. Pinto (3) & Igor R. de Assis (4)

(1) Universidade Federal de Vicosa/Centro de Ciencias Agrarias/Departamento de Engenharia Florestal. Vicosa, MG. E-mail: (Corresponding author)

(2) Universidade Federal de Vicosa/Centro de Ciencias Agrarias/Departamento de Fitotecnia. Vicosa, MG. E-mail:

(3) Universidade Federal de Vicosa/Centro de Ciencias Agrarias/Departamento de Engenharia Agricola e Ambiental. Vicosa, MG. E-mail:

(4) Universidade Federal de Vicosa/Centro de Ciencias Agrarias/Departamento de Solos. Vicosa, MG. E-mail:

Caption: Figure 1. Variation in the digital numbers (DN) of the red, green and blue bands of the RGB color space as a function of the moisture content (U(%)): soil 1 (A), soil 2 (B), soil 3 (C), soil 4 (D), soil 5 (E), soil 6 (F)

Caption: Figure 2. Variation in the digital numbers (DN) of the Hue, Saturation and Value bands of the HSV color space as a function of the moisture content (U(%)): soil 1 (A), soil 2 (B), soil 3 (C), soil 4 (D), soil 5 (E), soil 6 (F)

Caption: Figure 3. Behavior of the digital number (DN) of the panchromatic image as a function of the variation in gravimetric moisture content (U(%)): soil 1 (A), soil 2 (B), soil 3 (C), soil 4 (D), soil 5 (E), soil 6 (F)
Table 1. Physical characteristics, organic matter content and color
of the samples of the soils

                 Physical analysis   Textural--class

Soil   Coarse   Fine   Silt   Clay
        sand    sand

           dag [kg.sup.-1]

1      21       14     3      62     Very Clayey
2      8        3      8      81     Very Clayey
3      22       57     2      19     Sandy loam
4      54       20     4      22     Sandy loam
5      27       53     4      16     Sandy clay loam
6      20       15     10     55     Clay

       Organic matter    Dry color     Wet color
       dag [kg.sup.-1]

            1.77          5 YR 6/6     2.5 R 4/6
2           6.08          5 YR 4/4     5Y R 3/3
3           1.01         7.5YR 6/5      5YR 5/4
4           1.52          10YR 5/2     7.5YR 4/2
5           0.25         7.5 YR 7/6    7.5YR 5/6
6           1.52          5YR 5/6      2.5YR 4/4

Table 2. Correlations between color parameters and soil moisture

Soil                           Parameters

         R       G       B       H       S       V      DN

1      -0.87   -0.93   -0.94   -0.83   0.92    -0.87   -0.93
2      -0.88   -0.87   -0.74   -0.83   -0.49   -0.88   -0.87
3      -0.76   -0.63   -0.05   -0.87   -0.46   -0.76   -0.64
4      -0.88   -0.83   -0.70   -0.79   -0.10   -0.88   -0.84
5      -0.84   -0.73   -0.40   -0.89   0.25    -0.84   -0.71
6      -0.90   -0.92   -0.85   -0.77   0.66    -0.90   -0.92

R--Red; G--Green; B--Blue; H--Hue; S--Saturation; V--Value;
DN--Digital number of the panchromatic image

Table 3. Equations to estimate soil moisture (Y) as a function
of color variables through digital images and the respective
determination coefficients ([R.sup.2])

Soil   Equation                                      [R.sup.2]   RMSE

1      Y = -3.8771 + 93.6735 *** S - 53.4621 ** V     0.9036     2.05
2      Y = 99.47825 - 134.10109 *** V                 0.7762     3.29
3      Y = 117.3356 - 60.9496 *** S--97.8488 *** V    0.7299     2.76
4      Y = 41.4298 - 16.2877 * S-46.30619 *** V       0.8048     1.11
4      Y = 29.28520 - 0.4304 *** G--0.32117 *** B     0.8109     1.25
5      Y = 167.7383 -33.64873 ***                     0.8403     1.52
         S--165.39511 *** V
6      Y = 91.13181 - 105.29552 *** V                 0.8260     3.14
6      Y= 68.96081 - 0.40924 *** DN                   0.8515     2.89

R--Red; G--Green; B--Blue; H--Hue; S--Saturation; V--Value;
DN--Digital number of the panchromatic image; RMSE--Root mean
squared error
COPYRIGHT 2016 ATECEL--Associacao Tecnico Cientifica Ernesto Luiz de Oliveira Junior
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2016 Gale, Cengage Learning. All rights reserved.

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:texto en ingles
Author:dos Santos, Joao F.C.; Silva, Heider R.F.; Pinto, Francisco A.C.; de Assis, Igor R.
Publication:Revista Brasileira de Engenharia Agricola e Ambiental
Date:Dec 1, 2016
Previous Article:Irrigation and organic fertilization on the production of essential oil and flavonoid in chamomile/Irrigacao e adubacao organica na producao de oleo...
Next Article:Tillage systems and cover crops on soil physical properties after soybean cultivation/Sistemas de preparo e plantas de cobertura nos atributos...

Terms of use | Privacy policy | Copyright © 2019 Farlex, Inc. | Feedback | For webmasters