Reflectance Multispectral Imaging for Soil Composition Estimation and USDA Texture Classification
Authors: G. A. S. L Ranasinghe, J. A. S. T. Jayakody, M. C. L. De Silva, G. Thilakarathne, G. M. R. I. Godaliyadda, H. M. V. R. Herath, M. P. B. Ekanayake, S. K. Navaratnarajah
Organizations: Department of Electrical and Electronic Engineering, University of Peradeniya, Peradeniya 20400, Sri Lanka · Multidisciplinary AI Research Center, University of Peradeniya, Peradeniya 20400, Sri Lanka · Department of Electrical and Information Engineering, University of Ruhuna, Hapugala, Galle 80000, Sri Lanka · Department of Civil Engineering, University of Peradeniya, Peradeniya 20400, Sri Lanka
Soil texture is a foundational attribute that governs water availability and erosion in agriculture, as well as load bearing capacity, deformation response, and shrink-swell risk in geotechnical engineering. Yet texture is still typically determined by slow and labour intensive laboratory particle size tests, while many sensing alternatives are either costly or too coarse to support routine field scale deployment. This paper proposes a robust and field deployable multispectral imaging (MSI) system and machine learning framework for predicting soil composition and the United States Department of Agriculture (USDA) texture classes. The proposed system uses a cost effective in-house MSI device operating from 365 nm to 940 nm to capture thirteen spectral bands, which effectively capture the spectral properties of soil texture. Regression models use the captured spectral properties to estimate clay, silt, and sand percentages, while a direct classifier predicts one of the twelve USDA textural classes. Indirect classification is obtained by mapping the regressed compositions to texture classes via the USDA soil texture triangle. The framework is evaluated on mixture data by mixing clay, silt, and sand in varying proportions, using the USDA classification triangle as a basis. Experimental results show that the proposed approach achieves a coefficient of determination R^2 up to 0.99 for composition prediction and over 99% accuracy for texture classification. These findings indicate that MSI combined with data-driven modeling can provide accurate, non-destructive, and field deployable soil texture characterization suitable for geotechnical screening and precision agriculture.
Figures & tables
Fig. 1: Schematic of the multispectral imaging system.
Fig. 2: Map of Sri Lanka showing the locations of soil collection sites: clay rich soil from Menikhinna, silt rich soil from Gelioya, and sand rich soil from Chavakachcheri. Coordinates are provided in WGS84.
Fig. 3: USDA soil texture triangle showing the distribution of samples used in this study. Green dots indicate the three source soils (clay, silt, and sand rich endmembers), blue dots indicate mixtures used for model development (training/testing), and red dots indicate mixtures used for external validation.
Source soil
Clay (%)
Silt (%)
Sand (%)
Clay rich soil
78.63
21.37
0.00
Sand rich soil
0.00
0.00
100.00
Silt rich soil
5.75
94.25
0.00
TABLE I: Laboratory-measured particle size composition of the source soils.
Fig. 4: Representative monochrome spectral band images of a soil sample acquired using the proposed MSI system under thirteen narrow band LED illuminations (one image per wavelength).
Fig. 5: Workflow of the proposed MSI based pipeline. After preprocessing and LDA based dimensionality reduction, three studies are evaluated: (Strategy 1) direct USDA texture class classification, (Strategy 2) regression based clay, silt, and sand prediction, and (Strategy 3) indirect USDA texture classification via texture triangle mapping, using the designated test/validation splits.
Fig. 6: Representative ROI intensity histograms at λ=735 nm, (a) before and (b) after the proposed bounded contrast normalization, computed from the dark corrected ROI. The same preprocessing is applied to all bands and samples.
Fig. 7: Spectral feature extraction from the preprocessed 100×100 pixel ROI. The ROI is partitioned into 10×10 blocks, and block wise mean intensities are computed for each of the thirteen wavelength bands to form a per sample feature matrix X∈R100×13 .
Fig. 8: Spectral signatures grouped by the twelve USDA soil texture classes using the training/testing dataset. Each curve represents the mean intensity of the 100×100 pixel ROI across the thirteen wavelength bands. Values are min-max normalized column wise (per wavelength band) for visualization.
Fig. 9: Spectral signatures grouped by composition levels (clay, silt, and sand) using the training/testing dataset. Each curve represents the mean intensity of the 100×100 pixel ROI across thirteen wavelength bands. Values are min-max normalized column wise (per wavelength band) for visualization. Abbreviations in the legend denote Clay (Cl), Silt (M), and Sand (S).
Fig. 10: Two dimensional LDA visualization (LDA1 vs. LDA2) of the training/testing dataset, learned using USDA soil texture class labels. Dashed ellipses indicate three macro clusters: A (sand dominant textures), B (clay/loam dominant textures), and C (silt dominant textures).
Fig. 11: Two dimensional LDA visualization (LDA1 vs. LDA2) of the training/testing dataset, learned using composition group labels derived from clay (Cl), silt (M), and sand (S) percentages. Dashed ellipses indicate three macro clusters: A (sand dominant mixtures), B (clay/loam dominant mixtures), and C (silt dominant mixtures).
Model
Accuracy
F1-score
Recall
Mean
Std.
Mean
Std.
Mean
Std.
KNN
0.9955
0.0007
0.9960
0.0007
0.9966
0.0005
RF
0.9942
0.0010
0.9946
0.0009
0.9947
0.0008
DT
0.9819
0.0012
0.9835
0.0014
0.9838
0.0013
CB
0.9899
0.0010
0.9904
0.0011
0.9918
0.0006
XGB
0.9951
0.0012
0.9955
0.0012
0.9956
0.0010
TABLE II: Direct soil-type classification performance on the test set
Fig. 12: Normalized confusion matrix of the KNN classifier for direct soil classification.
Model
Clay
Silt
Sand
R2
RMSE
R2
RMSE
R2
RMSE
Mean
Std
Mean
Std
Mean
Std
Mean
Std
Mean
Std
Mean
Std
RF
0.9956
0.0002
1.3525
0.0373
0.9957
0.0003
1.6936
0.0507
0.9926
0.0004
2.3963
0.0678
KNN
0.9993
0.0001
0.5300
0.0279
0.9988
0.0001
0.9159
0.0469
0.9982
0.0002
1.1747
0.0569
DT
0.9928
0.0008
1.7377
0.0980
0.9928
0.0004
2.1970
0.0617
0.9879
0.0004
3.0653
0.0560
CB
0.9900
0.0003
2.0485
0.0357
0.9924
0.0004
2.2577
0.0517
0.9869
0.0006
3.1851
0.0715
TABLE III: Regression results on held out testing data
Fig. 13: True vs predicted soil composition (%) for the testing samples using the KNN regressor: (a) clay, (b) sand, and (c) silt.
Fig. 14: True vs predicted soil composition (%) for the validation samples using the KNN regressor: (a) clay, (b) sand, and (c) silt.
Model
Accuracy
F1-Score
Recall
Mean
Std.
Mean
Std.
Mean
Std.
KNN
0.9698
0.0024
0.9682
0.0021
0.9787
0.0016
RF
0.9650
0.0015
0.9652
0.0017
0.9724
0.0017
DT
0.9560
0.0021
0.9550
0.0015
0.9659
0.0016
CB
0.9250
0.0032
0.9226
0.0029
0.9339
0.0025
XGB
0.9455
0.0015
0.9427
0.0012
0.9568
0.0017
TABLE IV: Indirect soil-type classification performance on the test set
Fig. 15: Normalized confusion matrix of the KNN model for indirect soil texture classification.
Joint Lab Artificial Intelligence and Data Science, Osnabrück University, Osnabrück, Germany. · Department of Agromechatronics, Leibniz Institute for Agricultural Engineering and Bioeconomy (ATB), Potsdam, Germany. · Research and Development Institute for the Agri-environment (IRDA), Qu´ebec City, Canada. +1
Osnabrück University, Joint Lab Artificial Intelligence and Data Science, Osnabrück, Germany · Leibniz Institute for Agricultural Engineering and Bioeconomy (ATB), Department of Agromechatronics, Potsdam, Germany · German Research Center for Artificial Intelligence (DFKI), Cooperative and Autonomous Systems (CAS), Osnabrück, Germany