Next Article in Journal
Validation of Relation between SPAD and Rice Grain Protein Content in Farmer Fields in the Coastal Area of Sendai, Japan
Previous Article in Journal
UAV-Based Wireless Data Collection from Underground Sensor Nodes for Precision Agriculture
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Munsell Soil Colour Classification Using Smartphones through a Neuro-Based Multiclass Solution

1
Department of Computer Science and Artificial Intelligence, University of Granada, 18014 Granada, Spain
2
Department of Software Engineering, University of Granada, 18014 Granada, Spain
*
Author to whom correspondence should be addressed.
AgriEngineering 2023, 5(1), 355-368; https://doi.org/10.3390/agriengineering5010023
Submission received: 14 December 2022 / Revised: 7 February 2023 / Accepted: 7 February 2023 / Published: 10 February 2023

Abstract

:
Colour is a property widely used in many fields to extract information in several ways. In soil science, colour provides information regarding the chemical and physical characteristics of soil, such as genesis, composition, and fertility, amongst others. Thus, accurate estimation of soil colour is essential for many disciplines. To achieve this, experts traditionally rely on comparing Munsell colour charts with soil samples, which is a laborious process. In this study, we proposed using artificial neural networks to catalogue soil colour with a two-step classification. Firstly, the hue variable is estimated, and then the remaining two coordinates, value and chroma. Our experiments were conducted using three different, common cameras (one digital camera and two mobile phones). The results of our tests showed a 20% improvement in classification accuracy using the lowest-quality camera and an average accuracy of over 90%.

1. Introduction

Pedology is a branch of earth sciences that explores soils in their natural environment. It involves the study of soil’s chemical and physical features, formation, distribution, morphology, and classification of bodies within the natural habitat. One of the properties that provide this kind of information is colour [1,2]. However, accurately estimating the soil colour is not a trivial task. It may provide valuable information to the expert who is capable of interpreting it. Based on the colour, an expert can obtain data concerning the genesis, composition, or even the age of soil and rock surfaces. To do so, the Munsell colour chart (MCC) is commonly used [3,4]. The MCC is the classical way of estimating colour information. The technique involves visually comparing soil samples and colour chips belonging to the MCC [5]. The Munsell charts consist of a list of standard cardboards arranged by three coordinates: shade or hue (H), lightness or value (V), and intensity or chroma (C). Thus, the charts are arranged based on the H, and this has five central values: red (R), yellow (Y), green (G), blue (B) and purple (P). At the same time, we can find in-between combinations: yellow-red (YR), green-red (GR), and so on.
The MCC has been used in a variety of scenarios. As a result, various methodologies can be found in the literature. The main issue to be addressed is the uncertainty caused by the subjectivity of the observer. Marqués et al. [5] used k-nearest neighbour to analyse colour consistency and quantify soil colour measurements. They conducted their experiments in a controlled laboratory setting, resulting in a more precise and objective quantitative soil colour identification. In [6], a method of extracting colour information from digital images of cultural heritage was presented. The authors adopted multiple colour spaces (RGB, HSV, and Munsell) to solve their problem. Mancini et al. [7] utilised sensors and random forest to obtain the Munsell coordinates for soil classification. They achieved an accuracy and Kappa index of 0.93 in their prediction. Additionally, the authors of the latter research took into consideration that physical MCC can be affected by time and dirt. The colours in the charts can fade or change, and dirt and other contaminants may also obscure details and potentially cause damage to the surface. As a result, they studied dirty and old Munsell charts and they found that the prediction accuracy could be reduced due to the noise in the samples. In [8], the authors used spectroscopy and compared the results with observed MCC estimates in order to ensure robustness in the process of observation and data collection. They detected a certain correlation between the spectrophotometer and the observed measures. They developed a three-factor regression to effectively predict soil organic carbon based on the colours. Massawe et al. [9] combined digital soil mapping and machine learning to develop a predictive soil map. They also conducted their analysis in a laboratory, examining several soil characteristics such as pH, electrical conductivity, texture, nitrogen, and organic carbon. The classification was performed using a decision tree model.
Many other studies can be found using different machine learning techniques, such as decision tree [9,10,11,12], random forest [7,13,14,15], k-nearest neighbour [5,16,17], fuzzy system (FS) [18,19], artificial neural network (ANN) [20,21,22], and even deep learning [23], among others. The latter includes a comprehensive review of the recent advances in computer vision for soil classification. As can be seen there and in the rest of the mentioned studies, nearly all the studies were performed in a controlled scenario and using some sophisticated devices. Additionally, another feature in addition to the colour has been examined, namely texture. By exploring these methods, we can point out two drawbacks. The first disadvantage is the equipment required to obtain the data. The second one is the scenario, as it is tedious to collect the data and not be able to extract many conclusions until the samples are examined in a laboratory. Some solutions using mobile phones have been proposed to address this problem. For example, Gómez-Robledo et al. [24] utilised a mobile phone camera to measure soil colour, and their result showed that their models had accuracy similar to that of a set of observers. They transformed the RGB values into the XYZ space and again into HVC. Another example can be found in [25], where the authors classified soil based on smartphone images with colour sensors. The main issue with these method is that the direct conversion of RGB values does not take into account the sensitivity of the camera; therefore, the variability in the estimates can be high for the same sample. Additionally, the incorporation of external gadgets increases the cost of the solution.
Thus, as opposed to previously published methods, we attempted to solve the problem by developing a methodology using an inexpensive device that is accessible to everyone, i.e., a common camera. As in other studies, we obtained samples by using images taken by a camera. However, while other researchers used only one device, in order to validate our solution, we used of three different-quality cameras. Furthermore, we implemented an artificial neural network to classify the soil samples. The main issue we found with previous methods is that lower-quality images were not able to provide suitable precision, while other high-quality cameras could. We propose a two-step classification method: first, obtain the H coordinate of the MCC; second, take advantage of the H estimate to predict the remaining two variables, V and C.

2. Methodology

2.1. Dataset and Precedent Studies

The current study continues a research line initiated several years ago; while prior researchers have examined this problem using alternative methodologies, we evaluated the efficacy of our novel approach in comparison with a previously established one [20]. This was motivated by the methodology employed for data collection, including the procedures for extraction and methods used to eventually obtain each numerical sample. The main flowchart of the data acquisition is shown in Figure 1.
For this study, all images were manually captured with three devices: two mobile phones (Nokia C301 and Samsung Galaxy S2) and one digital camera (Canon EOS 1100D). To ensure accurate colour representation, a reference white was included in each image to calibrate the camera’s white balance based on the ambient lighting conditions. After that, an image-segmentation algorithm was used to obtain the RGB values. Specifically, the algorithm processed an image and generated a set of representative pixels from each chip. The RGB coordinates of these pixels were then retained for use in training a classification model.
In the previously discussed study [20], after obtaining RGB samples, three separate ANNs were simultaneously trained, one for each HVC coordinate. Then, a fuzzy system was utilised to process the output from the three ANNs, resulting in a set of possible Munsell chips. Because we were training three separate models to independently estimate each HVC value, a potential issue arose when the models generated nonvalid combinations of HVC values. Thus, the key aspect of the method proposed in this study is using additional information to reduce the search space and improve the models’ performance.

2.2. Artificial Neural Networks

As we previously stated, in this study, we implemented several ANNs for the soil classification problem. ANN is a type of machine learning model inspired by the structure and function of biological neural networks. An ANN consists of layers of interconnected neurons (or nodes), which can process and diffuse information. These networks are trained using large sets of labelled data and can be used for a variety of tasks such as image recognition, natural language processing, and decision making. ANNs are particularly useful for tasks where the relationship between inputs and outputs is complex and not easily defined by a simple rule or equation [26].
In the literature, we can find many kinds of ANNs. In feedforward neural network, the most basic type of ANN, the information flows in only one direction, from input layers to output layers, without any loops. This is also called multilayer perceptron (MLP) and is used for various supervised learning tasks such as regression and classification. Recurrent neural networks have the ability to maintain an internal state, allowing them to process sequential data such as time series, speech, or text. Convolutional neural networks (CNNs) are designed to process and analyse grid-like data such as images, video frames, and audio spectrograms [27].
Although CNNs are commonly used for image-related tasks, we chose to implement MLP for this study. Our data representation motivated this decision because we were not directly working with images but rather with an image segmentation algorithm that ultimately generates a set of numerical RGB values. This dataset is better suited for MLP models.

2.3. Method

The proposed methodology is divided into three main stages. The first step involves analysing the quality of the data by using correlation analysis. It is important to keep in mind that the RGB values of an image captured by different devices may vary depending on the device’s settings and other factors. Moreover, some devices can have different colour profiles, which can affect the RGB values. As a consequence, a correlation analysis is first performed because the quality of the images is directly proportional to the correlation among RGB points. The second step is adjusting and transforming the data from the images and preparing the data for modelling. The third and final phase is to model each of the Munsell colour coordinates.
The current study builds on previous studies [20,21], where a hybrid neuro-fuzzy approach was proposed to solve the problem at hand. For this solution, ANNs were used to predict each of the HVC values. Independent ANNs were trained to learn each coordinate, and then an FS estimated the degree of membership for all the available chips. Although that solution provided appealing results, it had two drawbacks. First, we had to design an FS with more than two hundred rules, one per chip. Second, that approach worked properly for high-quality devices but did not achieve the expected accuracy for poorer-quality ones. Note that in addition to aiming to solve the problem, we also sought to address issues stemming from the use of cheaper cameras.
An overview of the methodology is illustrated in Figure 2. We started with a set of pictures taken by three different devices: a Canon EOS 1100D, which had the best quality pictures, and two mobile phones with similar features (Nokia C301 and Samsung Galaxy S2). All the samples were taken on a grey background along with white colour as a reference in order to address the lighting conditions. These images provided the raw data: a set of RGB coordinates.
To confirm that all the samples represented the same information, we analysed these RGB values and tested the quality of the information they gathered. They were supposed to exhibit the same, or very similar, information, but we found that there was high variability in terms of colour depending on the device. In order to solve this problem, we transformed the data according to a reference gamut. Because the Canon camera provided the best-quality images, we selected that one as a reference, so that all the samples were able to have improved RGB quality. This transformation was performed as illustrated in Figure 3. The input of the ANN was the RGB values to convert for each device (Nokia and Samsung), and the ANN predicted the new R G B coordinates according to the Canon camera.
Then, we trained an ANN to compute the hue; after that, we trained another ANN to estimate the value and chroma. This decision was made in this order, as the Munsell colour charts are distributed in this way: first the H, and then V and C together. In this way, we anticipated that the accuracy of the models would increase as the range of possible solutions reduced.
We also tested training the ANN, transforming colour space from RGB to hue, saturation, and value (HSV) as this colour space seemed to be more similar to the HCV than to RGB. Nonetheless, as the experiment described in the next section confirms, we did not use the HSV-based models, using the RGB ones instead.

3. Experiments

In this study, we conducted a series of experiments to evaluate the performance of our proposed method. The aim of these experiments was to demonstrate the effectiveness of the new method in comparison with that of existing approaches. The experiments were designed to test the proposed method under different scenarios and conditions. The results of these experiments provide insight into the strengths and limitations of the new approach and offer guidance for its practical application.
Figure 4 provides a schematic representation of the experimental design. First, a preliminary analysis of the data quality was conducted on the RGB samples obtained from the images. This was necessary due to the potential variations in image quality and, therefore, in the information captured, which may have resulted from using different devices.
Following the confirmation of the variations among our samples, our next objective was to enhance the data quality by using a reference gamut. To achieve this, we applied two ANNs: one for mapping the Nokia samples to Canon samples, and the other for mapping the Samsung samples to the Canon gamut. This produced a significant improvement in data quality; the dataset was updated with the new values.
In addition to the reference gamut approach, we aimed to further improve the data representation by converting the RGB coordinates to a different colour space, the HSV colour space, which is similar to the MCC representation. Once again, if an improvement was found, the database was updated with the best data representation.
Finally, the highest-quality data were used to train our ANNs. First, we trained the model to fit the hue; then, using the estimation from the previous step, we trained another ANN to fit the remaining two coordinates. To complete the validation of the implemented models, a comparison with previous results was made.

4. Results

This section presents a summary of the most notable findings of our study. As we mentioned in the previous section, the first step was to analyse the quality of the data. Table 1 shows the correlation of each channel RGB for each device. At first glance, the results showed that there was a strong correlation between some of the RGB channels. The correlation was higher for Canon and Samsung but not for Nokia, which attained lower correlation statistics. All these correlations can be visually displayed in Figure 5.
In order to improve the quality of the data, we designed the reference gamut experiment. We experimented with some ANN parameters in order to find the optimal model. Because there were many experiments, we do not describe all of them. As an example, the experiment with the number of neurons is shown in Table 2. In this training, we tested different values for the number of neurons, and we finally selected the best one. For each neuron value, we performed 10 experiments, and we chose the average (see columns from 3 to 6). In order to obtain a clear picture of our results, column 6 was included: it represents the denormalised error. By checking this column, we could examine the variability in the estimates in terms of colour. The last two columns illustrate the best test and validation metrics during the training process, respectively.
The progression of these experiments is illustrated in Figure 6. Note that this figure does not display the error for the one-neuron case as it was too high. From these two graphs, we can see that between 20 and 25 neurons, the ANNs managed to obtain the best fit; after that, the variability was not significant. In any case, we selected the best ones and stored them for the next step.
Once we acquired the optimal ANN to change the gamut, we computed the new RGB values. The results are illustrated in Table 3. The results evidenced an improvement in the quality of the data. However, the correlation with the Nokia device did not increase. Overall, the correlations considerably strengthened.
The transformed RGB values were used to train our ANN with seven outputs, which were O H k , where k [ 1 ,   7 ] represents the H to be predicted. Before presenting the test battery for this stage, we fixed the parameters of the networks to examine whether a colour space change would influence the performance of our networks. These results are gathered in Table 4.
The series of experiments with all the configurations tested are provided in Table 5. Each cell represents the mean of 10 executions. To easily refer to each cell of the table, we used this notation, Ck d , where k is the number of the chart, and d is the device.
Figure 7 depicts an illustrative example to better interpret the information in Table 5. Note that some of the first points (one and five neurons) were omitted in this figure to clearly visualise the evolution of the experiments. In the table we can discern the best configurations for each of the charts. Notice that the first row was skipped, highlighting that the ANNs were not generalising properly.
Having selected the best model to predict the hue, the last stage in our study was to predict the remaining two variables, value and chroma. By following the same process as in the rest of the experiments, we obtained the results provided in Table 6.
Finally, in order to validate our method, we compared the results attained in this method with those of previously published methods. To do so, we constructed Table 7, which contains the best accuracy accomplished for each chart [19]. The general improvement provided by our method is clearly seen in this table.

5. Discussion

The results of the correlation analysis presented in Table 1 provide some intriguing insights. We observed a strong correlation between the RGB channels in our data when focusing on the small 3 × 3 matrices of each device. For instance, the R channel of the Canon device had a strong correlation with the G and B channels, although the correlation with the B channel was slightly weaker. Additionally, we detected a strong correlation between the Canon and Samsung devices. This may have been attributed to a minimal loss of quality in the images captured by these devices. This correlation could be separately observed in each of their RGB variables, i.e., the correlation between R C and R S was very strong, as well as between G S and G C , and so on. Nonetheless, this pattern was not observed in the Nokia mobile phone, which had considerably lower correlation statistics, with the highest correlation being 0.6.
The reference gamut test in Table 2 provides some conclusions. Firstly, our models were correctly trained without overfitting, as the training and validation/test errors followed a similar trend. Secondly, we observed a steady tendency as the number of neurons increased, with a slight fall in the first values and a gradual rise or stagnation as they increased. Thirdly, if we take a look at the last two columns, there is a certain stability because there is no marked drop between the average errors. Additionally, in most cases, the best models presented similar or lower test and validation errors than the average training, suggesting that the ANNs achieved promising results.
Table 3 analyses the new RGB coordinates provided by the reference gamut. Most of the cells are in bold, as the correlation among devices increased, meaning that the quality of the data improved. The RGB C maintained the same values as there was no change in the gamut for the Canon camera. What is striking in this table is cell ( G N ,   R N ) , as it is the only case where the correlation weakened. Interestingly, the RGB N compared with itself did not intensify the correlation as it did with the rest of the devices. However, overall, the correlations considerably strengthened.
We can see in Table 4 how most of the charts for any device presented better results in the RGB colour space, and the difference in most cases was substantial. Surprisingly, only two charts adapted better and only with a minor difference: C7 for the Canon camera and C6 for the Nokia mobile phone. Furthermore, a closer inspection of this table shows how the Samsung device achieved the worst accuracy when using the HSV space. This finding was unexpected, as this method was applied to enhance the performance of lower-quality images, but we obtained the opposite effect. In light of these results, we ruled out this approach and continued to find the optimal configuration to obtain a hue variable with the RGB inputs.
Table 5 presents several noteworthy observations. Firstly, if we examine the first row for each device (the experiments with one neuron), we can see that several charts had an accuracy of zero, indicating that the ANN was unable to correctly classify those charts. These included C 3 C ,   C 4 C ,   C 6 C ,   C 3 N ,   C 3 S ,   and   C 4 S . It is interesting how in none of the 10 experiments were these charts successfully classified. Additionally, if we closely observe the table, C 3 N ,   C 4 N ,   C 5 N , and C 5 S present values very close to zero. This is because, in these cases, some of the executions took these charts into account. Therefore, there were two charts, C 3   and   C 4 , that repeated the pattern in the three devices, and another one, C 5 , was found in the two mobile phones. This finding could be trivial, provided we had an unbalanced dataset; however, this is not what occurred here. These outcomes can be seen in Figure 6, which shows a relatively high variability as there is not a clear peak in nearly none of the cases. Chart 7 presents one of the steadiest tendencies. It obtained a good accuracy with a few neurons (five), and the performance wavered around 0.98618 for all of the tests. This also occurred with 30 neurons. C6 and C5 displayed similar behaviour. By observing C1, we can see how its performance improved as the number of neurons grew. For the rest of the devices, we observed a more oscillating behaviour, fluctuating around the accuracy obtained with 10–20 neurons, but none of them showing an increasing or decreasing trend. To solve our problem, we selected those configurations that provided better accuracy on average, i.e., with the seven charts. This is the main reason we could not accept the models with one neuron, despite achieving the highest accuracy in some charts, on average, they classified with an accuracy of ~55%.
After modelling the hue variable, if we check Table 6, we can confirm that the extra information provided by H significantly improved the estimations of the remaining two features, V and C. At first glance, what stands out in that table is the low variability in the results: they are all very close to one another, as opposed to the hue modelling. Hence, we can confirm the validity of our method with these robust outcomes. As expected, the best model was obtained using the images from the Canon camera for both V and C. Nokia was able to obtain the second-best accuracy for V and the last in terms of C. We found that C N and C S achieved an accuracy well below 0.9 due to being lower-quality devices and having the most unbalanced features.
From the final comparison presented in Table 7, we found that the proposed method outperformed previous methods on average by 4.4% with Canon, 19.6% with Nokia, and 18.7% with Samsung. Interestingly, not all charts received the best score; the proposed method did not outperform the others on some charts, such as C 3 for all the devices and C 4 S . This could be an area for future research, where a combination of solutions is sued. Overall, the results validate the proposed method, specifically highlighting the improved performance on the Nokia device, which was previously known to have the worst accuracy due to the quality of its images.
Finally, while our primary goal was to provide a comprehensive methodology for building models from scratch using widely available and affordable devices, this approach also has a notable limitation: it cannot be directly compared with other solutions due to the differences in the data- and image-processing techniques used. As such, exploring new approaches that involve using publicly available datasets and adapting them to our methodology is an avenue for future research.

6. Conclusions

The purpose of this study was to develop a model for soil classification based on colour analysis and the Munsell colour chart. The current method used by most soil scientists, which relies on personal criteria and visual examination using Munsell charts, was found to be subjective and dependent on the observer. A two-stage implementation of artificial neural networks was proposed to solve this problem. The dataset was built using photos taken from three different devices, Canon, Nokia, and Samsung, each with different camera quality. The first stage of the model focused on finding the hue variable using the RGB values of the photo, and the second stage used the estimated hue values and the RGB data to compute the remaining two coordinates, value and chroma. Experiments were conducted to improve the categorisation of soil, and the best camera was used as a reference gamut. The model was able to outperform previous method with an improvement of nearly 20% in accuracy for the poorer-quality device and an average above 90% in all cases.
Thus, this study provides a solution to the subjective and observer-dependent nature of current soil classification methods. The proposed two-stage implementation of artificial neural networks proved to be an effective approach to improve soil categorisation, with an average accuracy above 90% in all cases.
This study also highlighted the potential for future research in exploring different colour spaces and implementing a fuzzy system to calculate RGB values to address uncertainty and variability caused by certain devices. Additionally, incorporating public datasets and adopting our methodology with other authors’ solutions is an interesting research line to follow.

Author Contributions

All authors have contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Not applicable.

Acknowledgments

We acknowledge financial support from the Ministerio de Ciencia e Innovación (Spain) (Research Project PID2020-112495RB-C21) and the I+D+i FEDER 2020 project B-TIC-42-UGR20.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

ANNArtificial Neural Network
BBlue
BCBlue–Canon
BGBlue-Green
BNBlue–Nokia
BSBlue–Samsung
CChroma
FSFuzzy System
GGreen
GCGreen–Canon
GNGreen–Nokia
GSGreen–Samsung
GYGreen-Yellow
HHue
HVCHue, Value, and Chroma
MCCMunsell Colour Chart
PPurple
PBPurple-Blue
RRed
RCRed–Canon
RGBRed, Green, and Blue
RNRed–Nokia
RPRed-Purple
RSRed–Samsung
VValue
YYellow
YRYellow-Red

References

  1. Poppiel, R.; Lacerda, M.P.; Demattê, J.; Oliveira, M.P., Jr.; Gallo, B.C.; Safanelli, J.L. Pedology and soil class mapping from proximal and remote sensed data. Geoderma 2019, 348, 189–206. [Google Scholar] [CrossRef]
  2. Swetha, R.K.; Dasgupta, S.; Chakraborty, S.; Li, B.; Weindorf, D.C.; Mancini, M.; Silva, S.H.G.; Ribeiro, B.T.; Curi, N.; Ray, D.P. Using Nix color sensor and Munsell soil color variables to classify contrasting soil types and predict soil organic carbon in Eastern India. Comput. Electron. Agric. 2022, 199. [Google Scholar] [CrossRef]
  3. Goh, S.-T.; Tan, K.-L. MOSAIC: A fast multi-feature image retrieval system. Data Knowl. Eng. 2000, 33, 219–239. [Google Scholar] [CrossRef]
  4. Nascimento, M.A.; Tousidou, E.; Chitkara, V.; Manolopoulos, Y. Image indexing and retrieval using signature trees. Data Knowl. Eng. 2002, 43, 57–77. [Google Scholar] [CrossRef]
  5. Marqués-Mateu, Á.; Moreno-Ramón, H.; Balasch, S.; Ibáñez-Asensio, S. Quantifying the uncertainty of soil colour measurements with Munsell charts using a modified attribute agreement analysis. Catena 2018, 171, 44–53. [Google Scholar] [CrossRef]
  6. Yoo, W.S.; Kim, J.G.; Kang, K.; Yoo, Y. Extraction of Colour Information from Digital Images towards Cultural Heritage Characterisation Applications. SPAFA J. 2021, 5. [Google Scholar] [CrossRef]
  7. Mancini, M.; Weindorf, D.C.; Monteiro, M.E.C.; de Faria, A.J.G.; dos Santos Teixeira, A.F.; de Lima, W.; de Lima, F.R.D.; Dijair, T.S.B.; Marques, F.D.A.; Ribeiro, D.; et al. From sensor data to Munsell color system: Machine learning algorithm applied to tropical soil color classification via Nix™ Pro sensor. Geoderma 2020, 375, 114471. [Google Scholar] [CrossRef]
  8. Jorge, N.F.; Clark, J.; Cárdenas, M.L.; Geoghegan, H.; Shannon, V. Measuring Soil Colour to Estimate Soil Organic Carbon Using a Large-Scale Citizen Science-Based Approach. Sustainability 2021, 13, 11029. [Google Scholar] [CrossRef]
  9. Massawe, B.H.J.; Subburayalu, S.K.; Kaaya, A.K.; Winowiecki, L.; Slater, B.K. Mapping numerically classified soil taxa in Kilombero Valley, Tanzania using machine learning. Geoderma 2018, 311, 143–148. [Google Scholar] [CrossRef]
  10. Zhang, X.; Liu, H.; Zhang, X.; Yu, S.; Dou, X.; Xie, Y.; Wang, N. Allocate soil individuals to soil classes with topsoil spectral characteristics and decision trees. Geoderma 2018, 320, 12–22. [Google Scholar] [CrossRef]
  11. Hof, S. Mapping Soil Variability with a Decision Tree Modelling Approach in the Northern Highlands of Ethiopia. 2014. Available online: https://edepot.wur.nl/306923 (accessed on 1 January 2021).
  12. Gozukara, G.; Zhang, Y.; Hartemink, A.E. Using vis-NIR and pXRF data to distinguish soil parent materials—An example using 136 pedons from Wisconsin, USA. Geoderma 2021, 396, 115091. [Google Scholar] [CrossRef]
  13. Zhang, S.; Liu, G.; Chen, S.; Rasmussen, C.; Liu, B. Assessing soil thickness in a black soil watershed in northeast China using random forest and field observations. Int. Soil Water Conserv. Res. 2020, 9, 49–57. [Google Scholar] [CrossRef]
  14. Liu, F.; Rossiter, D.G.; Zhang, G.-L.; Li, D.-C. A soil colour map of China. Geoderma 2020, 379, 114556. [Google Scholar] [CrossRef]
  15. Zhang, Y.; Hartemink, A.E. Digital mapping of a soil profile. Eur. J. Soil Sci. 2019, 70, 27–41. [Google Scholar] [CrossRef]
  16. Syauqy, D.; Fitriyah, H.; Anwar, K. Classification of Physical Soil Condition for Plants using Nearest Neighbor Algorithm with Dimensionality Reduction of Color and Moisture Information. J. Inf. Technol. Comput. Sci. 2018, 3, 175–183. [Google Scholar] [CrossRef]
  17. Priandana, K. Penelitian Untuk Aplikasi Mobile Munsell Soil Color Chart Berbasis Android Menggunakan Histogram Ruang Citra Hvc Dengan Klasifikasi K-Nn. 2014. Available online: https://repository.ipb.ac.id/handle/123456789/72464 (accessed on 1 January 2021).
  18. Zhu, A.-X.; Qi, F.; Moore, A.; Burt, J.E. Prediction of soil properties using fuzzy membership values. Geoderma 2010, 158, 199–206. [Google Scholar] [CrossRef]
  19. Meyer, G.E.; Neto, J.C.; Jones, D.D.; Hindman, T.W. Intensified fuzzy clusters for classifying plant, soil, and residue regions of interest from color images. Comput. Electron. Agric. 2004, 42, 161–180. [Google Scholar] [CrossRef]
  20. Pegalajar, M.C.; Ruiz, L.G.B.; Sánchez-Marañón, M.; Mansilla, L. A Munsell colour-based approach for soil classification using Fuzzy Logic and Artificial Neural Networks. Fuzzy Sets Syst. 2019, 401, 38–54. [Google Scholar] [CrossRef]
  21. Pegalajar, M.C.; Sánchez-Marañón, M.; Ruíz, L.G.B.; Mansilla, L.; Delgado, M. Artificial Neural Networks and Fuzzy Logic for Specifying the Color of an Image Using Munsell Soil-Color Charts; Springer International Publishing: Cham, Switzerland, 2018; pp. 699–709. [Google Scholar] [CrossRef]
  22. Ataieyan, P.; Moghaddam, P.A.; Sepehr, E. Estimation of soil organic carbon using artificial neural network and multiple linear regression models based on color image processing. J. Agric. Mach. 2018, 8, 137–148. [Google Scholar] [CrossRef]
  23. Srivastava, P.; Shukla, A.; Bansal, A. A comprehensive review on soil classification using deep learning and computer vision techniques. Multimed. Tools Appl. 2021, 80, 14887–14914. [Google Scholar] [CrossRef]
  24. Gómez-Robledo, L.; López-Ruiz, N.; Melgosa, M.; Palma, A.J.; Capitán-Vallvey, L.F.; Sánchez-Marañón, M. Using the mobile phone as Munsell soil-colour sensor: An experiment under controlled illumination conditions. Comput. Electron. Agric. 2013, 99, 200–208. [Google Scholar] [CrossRef]
  25. Han, P.; Dong, D.; Zhao, X.; Jiao, L.; Lang, Y. A smartphone-based soil color sensor: For soil type classification. Comput. Electron. Agric. 2016, 123, 232–241. [Google Scholar] [CrossRef]
  26. Mehonic, A.; Sebastian, A.; Rajendran, B.; Simeone, O.; Vasilaki, E.; Kenyon, A.J. Memristors—From in-memory computing, deep learning acceleration, and spiking neural networks to the future of neuromorphic and bio-inspired computing. Adv. Intell. Syst. 2020, 2, 2000085. [Google Scholar] [CrossRef]
  27. Desai, M.; Shah, M. An anatomization on breast cancer detection and diagnosis employing multi-layer perceptron neural network (MLP) and Convolutional neural network (CNN). Clin. eHealth 2020, 4, 1–11. [Google Scholar] [CrossRef]
Figure 1. Flowchart of data acquisition in previous studies.
Figure 1. Flowchart of data acquisition in previous studies.
Agriengineering 05 00023 g001
Figure 2. General flow of the proposed methodology.
Figure 2. General flow of the proposed methodology.
Agriengineering 05 00023 g002
Figure 3. ANN to compute the new RGB coordinates according to the reference gamut.
Figure 3. ANN to compute the new RGB coordinates according to the reference gamut.
Agriengineering 05 00023 g003
Figure 4. Overview of the designed experiments.
Figure 4. Overview of the designed experiments.
Agriengineering 05 00023 g004
Figure 5. Representation of the correlation coefficients of the RGB values obtained by each device.
Figure 5. Representation of the correlation coefficients of the RGB values obtained by each device.
Agriengineering 05 00023 g005
Figure 6. Evolution of the error according to the number of neurons for the (a) Nokia-to-Canon and (b) Samsung-to-Canon ANN to change the gamut.
Figure 6. Evolution of the error according to the number of neurons for the (a) Nokia-to-Canon and (b) Samsung-to-Canon ANN to change the gamut.
Agriengineering 05 00023 g006
Figure 7. Illustrative example of the evaluation of neurons for the Canon device. The colours represent the mean accuracy of the ANN from green (the best learned chart) to red (the worst).
Figure 7. Illustrative example of the evaluation of neurons for the Canon device. The colours represent the mean accuracy of the ANN from green (the best learned chart) to red (the worst).
Agriengineering 05 00023 g007
Table 1. Correlation matrix of the RGB values for each device. RC, GC, and BC stand for the RGB values for Canon, respectively; RN, GN, and BN are the Nokia’s RGB values, respectively; RS, GS and BS correspond to the RGB values for Samsung, respectively.
Table 1. Correlation matrix of the RGB values for each device. RC, GC, and BC stand for the RGB values for Canon, respectively; RN, GN, and BN are the Nokia’s RGB values, respectively; RS, GS and BS correspond to the RGB values for Samsung, respectively.
RCGCBCRNGNBNRSGSBS
RC1.00000.94490.81120.48380.50590.36940.97370.94220.6986
GC0.94491.00000.91630.44290.53820.45320.88200.98810.8143
BC0.81120.91631.00000.37040.48660.56000.73240.90100.9559
RN0.48380.44290.37041.00000.95550.79520.48640.47660.3687
GN0.50590.53820.48660.95551.00000.87800.47740.56550.4836
BN0.36940.45320.56000.79520.87801.00000.32800.48350.6149
RS0.97370.88200.73240.48640.47740.32801.00000.90050.6489
GS0.94220.98810.90100.47660.56550.48350.90051.00000.8295
BS0.69860.81430.95590.36870.48360.61490.64890.82951.0000
Table 2. Experiments for the reference gamut modelling.
Table 2. Experiments for the reference gamut modelling.
DeviceNeuronsTrainTestValidationDenorm.
Validation
Min.
Test
Min.
Validation
Nokia10.026690.026800.026201703.19600.024380.02312
50.001670.001750.00167108.435330.001270.00111
100.000860.000920.0009964.188000.000650.00072
150.000750.000790.0007749.874530.000610.00059
200.000680.000740.0007951.644530.000590.00060
250.000690.000860.0007548.960670.000650.00060
300.000600.000760.0007549.041470.000500.00049
350.000590.000760.0008152.916270.000560.00054
400.000620.000780.0007146.106270.000590.00058
450.000530.000750.0008353.893200.000580.00055
500.000560.000770.0008253.502130.000590.00062
Samsung10.004410.004360.00444289.003070.003810.00395
50.001030.001130.0010064.830670.000890.00071
100.000850.000910.0008655.689600.000680.00061
150.000790.000800.0008756.357200.000690.00065
200.000640.000740.0007951.577600.000440.00057
250.000600.000700.0007347.498130.000540.00055
300.000550.000810.0008253.251470.000510.00055
350.000540.000800.0007347.495600.000610.00054
400.000540.000750.0007247.138800.000600.00045
450.000530.000780.0008051.730930.000620.00045
500.000520.000760.0007548.977070.000550.00053
Table 3. Correlation matrix of the new RGB values after the change of gamut. The correlations that increased from those in Table 1 are indicated in bold.
Table 3. Correlation matrix of the new RGB values after the change of gamut. The correlations that increased from those in Table 1 are indicated in bold.
RCGCBCRNGNBNRSGSBS
RC1.00000.94490.81120.99500.94260.81290.99490.94500.8127
GC0.94491.00000.91630.94410.99610.91510.94410.99500.9153
BC0.81120.91631.00000.81020.91150.99200.80760.90900.9893
RN0.99500.94410.81021.00000.94740.81740.99310.94640.8143
GN0.94260.99610.91150.94741.00000.91840.94400.99530.9153
BN0.81290.91510.99200.81740.91841.00000.81210.91310.9902
RS0.99490.94410.80760.99310.94400.81211.00000.94990.8172
GS0.94500.99500.90900.94640.99530.91310.94991.00000.9191
BS0.81270.91530.98930.81430.91530.99020.81720.91911.0000
RC, GC, and BC stand for the RGB values for Canon, respectively; RN, GN, and BN are the Nokia’s RGB values, respectively; RS, GS, and BS correspond to the RGB values for Samsung, respectively.
Table 4. Comparison between the RGB and HSV approaches to obtain hue.
Table 4. Comparison between the RGB and HSV approaches to obtain hue.
DeviceSpaceC1C2C3C4C5C6C7
CanonRGB0.95170.90780.92080.93300.94120.93930.9578
HSV0.92040.84730.85950.89620.93800.93700.9666
NokiaRGB0.90440.84540.86560.85400.86410.88110.9452
HSV0.79770.71530.77400.76350.78570.88130.9366
SamsungRGB0.90920.84500.86280.85760.85880.87900.9227
HSV0.90480.77370.72100.63070.59220.66090.6071
Bold text indicates the best accuracy between the RGB and HSV of each device. C1… C7 are each of the seven charts evaluated.
Table 5. Battery of experiments to compute the hue value.
Table 5. Battery of experiments to compute the hue value.
DeviceNC1C2C3C4C5C6C7
Canon10.991840.98456000.9960301
50.914290.922780.909090.673470.948410.967740.97235
100.873470.888030.917750.893880.904760.963130.98618
150.934690.918920.857140.914290.960320.963130.97696
200.930610.895750.883120.926530.936510.981570.97696
250.946940.903470.935060.930610.968250.958530.97235
300.959180.907340.89610.922450.960320.972350.98618
350.95510.922780.922080.914290.960320.967740.95853
400.963270.899610.891770.906120.960320.94470.98157
450.946940.918920.909090.946940.968250.972350.98157
500.971430.915060.909090.91020.960320.976960.97235
Nokia10.979590.9768300.040810.301590.981570.90783
50.938780.791510.281390.791840.670630.695850.98157
100.857140.868730.787880.80.757940.824880.91705
150.902040.845560.809520.632650.73810.898620.89401
200.902040.880310.692640.783670.789680.870970.94931
250.922450.845560.735930.730610.76190.898620.91705
300.84490.837840.83550.779590.726190.824880.95392
350.861220.876450.818180.771430.801590.83410.94009
400.902040.868730.70130.828570.793650.875580.94009
450.869390.84170.852810.763270.746030.880180.9447
500.902040.888030.826840.640820.757940.801840.96774
Samsung10.918370.94595000.17460.949310.85714
50.897960.853280.021640.722450.658730.718890.93548
100.840820.795370.545450.636730.722220.774190.85714
150.865310.826250.593070.718370.630950.751150.93088
200.824490.888030.614720.702040.76190.843320.86175
250.853060.915060.588740.751020.726190.72350.93088
300.824490.876450.588740.697960.76190.806450.90323
350.893880.853280.619050.661220.714290.774190.89862
400.881630.922780.580090.685710.694440.861750.90783
450.873470.903470.683980.706120.746030.829490.88479
500.869390.884170.588740.624490.773810.755760.9447
In bold, the best configuration for each chart. C1… C7 are each of the seven charts evaluated.
Table 6. Results of the estimation of the value and chroma.
Table 6. Results of the estimation of the value and chroma.
Canon Nokia Samsung
NeuronsValueChromaValueChromaValueChroma
10.97870.97560.93960.79420.93130.8135
50.97950.97430.94040.79560.93360.8132
100.98010.97440.93940.79470.93450.8112
150.97820.97490.93980.79750.93180.8163
200.97970.97400.93940.79690.93040.8105
250.97910.97410.93750.79420.93210.8163
300.97860.97560.93700.78640.93150.8105
350.97940.97690.93920.79430.93220.8115
400.97960.97350.93840.79620.93400.8163
450.97840.97390.93910.79620.93610.8165
500.97910.97470.93550.79370.93100.8082
Table 7. Performance comparison between our new method and the best results obtained by previous methods [19].
Table 7. Performance comparison between our new method and the best results obtained by previous methods [19].
DeviceMethodC1C2C3C4C5C6C7
CanonNew0.99180.98460.95670.96740.99600.98621.0000
Previous0.88570.91670.96770.94590.93550.96970.9714
NokiaNew0.97960.97680.85280.82860.83730.98160.9816
Previous0.72860.63890.88710.81080.80650.90910.6000
SamsungNew0.93060.94600.71430.77140.80950.94930.9493
Previous0.81430.69440.74190.79730.59680.72730.7429
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Pegalajar, M.C.; Ruiz, L.G.B.; Criado-Ramón, D. Munsell Soil Colour Classification Using Smartphones through a Neuro-Based Multiclass Solution. AgriEngineering 2023, 5, 355-368. https://doi.org/10.3390/agriengineering5010023

AMA Style

Pegalajar MC, Ruiz LGB, Criado-Ramón D. Munsell Soil Colour Classification Using Smartphones through a Neuro-Based Multiclass Solution. AgriEngineering. 2023; 5(1):355-368. https://doi.org/10.3390/agriengineering5010023

Chicago/Turabian Style

Pegalajar, M. C., L. G. B. Ruiz, and D. Criado-Ramón. 2023. "Munsell Soil Colour Classification Using Smartphones through a Neuro-Based Multiclass Solution" AgriEngineering 5, no. 1: 355-368. https://doi.org/10.3390/agriengineering5010023

Article Metrics

Back to TopTop