On the Acquisition of High-Quality Digital Images and Extraction of Effective Color Information for Soil Water Content Testing

Liu Guan-shi, Shengkui Tian, Yankun Mo, Ruyi Chen, Qingsong ZhaoSensors 2022 · DOI

TL;DR

This paper presents a robust method for acquiring high-quality soil images and extracting relevant color information to accurately predict soil water content (SWC). By optimizing photographic parameters and developing a novel Gaussian fitting approach for feature extraction, they achieved a highly accurate SWC prediction model with R² of 0.999 and RMSE of 0.236, paving the way for non-destructive soil moisture monitoring.

What Problem Does This Paper Address?

Accurate and real-time monitoring of soil water content (SWC) is crucial for various applications, from agriculture to geotechnical engineering. While traditional methods like oven-drying or TDR exist, they are often time-consuming, destructive, or require complex equipment. Digital imaging offers a promising alternative due to its non-destructive nature, low cost, and high efficiency. However, a significant challenge lies in consistently capturing high-quality images and extracting reliable color information that accurately reflects SWC, especially considering factors like lighting, camera angles, and soil heterogeneity. Previous studies have shown a correlation between soil color and moisture, but a standardized, robust methodology for image acquisition and feature extraction was lacking.

Methods

The researchers tackled this challenge by:

  • Designing a specialized photographic platform: This platform integrated a controlled experimental structure to ensure consistent image capture. They systematically explored and optimized key parameters:
  • Light Source: Evaluated different artificial light sources (D65, fluorescent, LED) and determined that a D65 light source with a specific intensity (1900-2500 lx) provided the best reproducibility and stability.
  • Shooting Angle: Found that a 90° shooting angle was optimal for minimizing unnecessary information like shadows and holes, leading to more authentic soil color representation.
  • Ambient Temperature: Determined that temperature variations within 5°C had minimal impact on characteristic parameters, but larger variations could introduce noise.
  • Developing a novel feature extraction method: They proposed a Gaussian fitting approach for gray histograms of RGB image channels. This method, applied to the entire soil image area (approximately 3,000,000 pixels), effectively extracts characteristic parameters while mitigating the influence of uneven lighting and surface micro-topography.
  • Exploring multiple color spaces: They extracted 21 characteristic parameters from five color spaces (RGB, HLS, CIEXYZ, CIELAB, and CIELUV) to identify the most informative ones for SWC prediction.
  • Building predictive models: They employed three regression techniques – Least Squares Regression (LSR), Stepwise Regression (STR), and Partial Least Squares Regression (PLSR) – to establish relationships between the extracted color parameters and SWC.

Datasets

The study utilized soil samples for calibration and experimentation. Two types of soil were used: montmorillonite (Soil 1a and 1b) and expansive soil (Soil 2). For Soil 2, samples were prepared with varying water contents ranging from 0% to 36% in 1% increments, resulting in a total of 124 parallel samples. These samples served as the basis for image acquisition and model development.

Key Insights and Ideas

  • The devil is in the details (of lighting and angles): Achieving reproducible and stable soil color data is highly sensitive to lighting conditions and camera angles. The D65 light source and a 90° shooting angle emerged as critical for minimizing variability and capturing true soil color.
  • Gaussian fitting is a powerful tool for robust feature extraction: Moving beyond simple mean or median values, fitting RGB channel histograms with Gaussian distributions provided characteristic parameters that were more representative and resilient to external disturbances.
  • Not all color spaces are created equal for SWC: While many color spaces were explored, the RGB and CIEXYZ spaces, particularly their lightness components, showed the strongest correlation with SWC. This suggests that the fundamental color information captured by these spaces is most indicative of moisture levels.
  • Piecewise modeling is key for complex relationships: The relationship between soil color and water content isn't linear across all moisture ranges. The study's success with piecewise models, particularly PLSR, highlights the importance of accounting for different moisture regimes (e.g., falling vs. rising sections).

Key Results

  • Optimal photographic conditions: The study identified optimal parameters for image acquisition: a D65 light source with 45° illumination, a 90° shooting angle, surface illumination of 1900-2500 lx, and an ambient temperature difference of 5°C.
  • Image scale matters: The optimal sampling area for feature extraction was found to be the entire soil image (approximately 3,000,000 pixels), which effectively minimized the influence of surface heterogeneity.
  • Strongest correlations: The lightness parameters in RGB and CIEXYZ color spaces exhibited the strongest correlation with SWC.
  • High-accuracy prediction model: The PLSR model, utilizing soil specimen image IDs, achieved excellent predictive accuracy with an R² of 0.999 and an RMSE of 0.236, demonstrating the potential of this approach for non-destructive SWC estimation.

Limitations and Future Work

The authors acknowledge several limitations:

  • Controlled environment dependency: The current method relies on controlled lighting conditions, which can be a barrier to widespread field application.
  • Soil heterogeneity: The study primarily focused on expansive soil. Further research is needed to validate the method for different soil types and particle sizes, especially those with complex impurities.
  • Visible spectrum limitations: The use of digital cameras limits data acquisition to the visible spectrum. Incorporating near-infrared spectral data could further improve prediction accuracy.

Future work suggested includes:

  • Expanding the database: Building a more comprehensive dataset for different soil types.
  • Machine learning integration: Exploring advanced machine learning algorithms to further enhance prediction accuracy.
  • Field application development: Investigating ways to adapt the method for practical field use.
  • Laboratory evaporation experiments: Using the developed model to study dynamic variations in surface water content and its relationship with crack development.

Summary updated

Abstract

Soil water content (SWC) is a critical indicator for engineering construction, crop production, and the hydrologic cycle. The rapid and accurate assessment of SWC is of great importance. At present, digital images are becoming increasingly popular in environmental monitoring and soil property analysis owing to the advantages of non-destructiveness, cheapness, and high-efficiency. However, the capture of high-quality digital image and effective color information acquisition is challenging. For this reason, a photographic platform with an integrated experimental structure configuration was designed to yield high-quality soil images. The detrimental parameters of the platform including type and intensity of the light source and the camera shooting angle were determined after systematic exploration. A new method based on Gaussian fitting gray histogram for extracting RGB image feature parameters was proposed and validated. The correlation between 21 characteristic parameters of five color spaces (RGB, HLS, CIEXYZ, CIELAB, and CIELUV) and SWC was investigated. The model for the relationship between characteristic parameters and SWC was constructed by using least squares regression (LSR), stepwise regression (STR), and partial least squares regression (PLSR). Findings showed that the camera platform equipped with 45° illumination D65 light source, 90° shooting angle, 1900~2500 lx surface illumination, and operating at ambient temperature difference of 5 °C could produce highly reproducible and stable soil color information. The effects of image scale had a great influence on color feature extraction. The entire area of soil image, i.e., 3,000,000 pixels, was chosen in conjunction with a new method for obtaining color features, which is beneficial to eliminate the interference of uneven lightness and micro-topography of soil samples. For the five color spaces and related 21 characteristic parameters, RGB and CIEXYZ spaces and characteristic parameter of lightness both exhibited the strongest correlation with SWC. The PLSR model based on soil specimen images ID had an excellent predictive accuracy and the best stability (R<sup>2</sup> = 0.999, RMSE = 0.236). This study showed the potential of the application of color information of digital images to predict SWC in agriculture and geotechnical engineering.
BibTeX
@inproceedings{guanshi2022acquisition,
  author = {Liu Guan-shi and Shengkui Tian and Yankun Mo and Ruyi Chen and Qingsong Zhao},
  title = {{On the Acquisition of High-Quality Digital Images and Extraction of Effective Color Information for Soil Water Content Testing}},
  booktitle = {Sensors},
  year = {2022},
  doi = {10.3390/s22093130},
}
Figure