Next Article in Journal
Analyzing the Impact of Storm ‘Daniel’ and Subsequent Flooding on Thessaly’s Soil Chemistry through Causal Inference
Previous Article in Journal
Decomposition and Driving Factors of Total Factor Productivity of Food Crops in the Yellow River Basin, China
Previous Article in Special Issue
Combinations of Feature Selection and Machine Learning Models for Object-Oriented “Staple-Crop-Shifting” Monitoring Based on Gaofen-6 Imagery
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Crop Classification Combining Object-Oriented Method and Random Forest Model Using Unmanned Aerial Vehicle (UAV) Multispectral Image

1
College of Geography and Planning, Chengdu University of Technology, Chengdu 610059, China
2
School of Finance, Fujian Business University, Fuzhou 350016, China
3
Forestry College, Fujian Agriculture and Forestry University, Fuzhou 350028, China
*
Author to whom correspondence should be addressed.
Agriculture 2024, 14(4), 548; https://doi.org/10.3390/agriculture14040548
Submission received: 11 January 2024 / Revised: 16 March 2024 / Accepted: 25 March 2024 / Published: 29 March 2024
(This article belongs to the Special Issue Multi- and Hyper-Spectral Imaging Technologies for Crop Monitoring)

Abstract

:
The accurate and timely identification of crops holds paramount significance for effective crop management and yield estimation. Unmanned aerial vehicle (UAV), with their superior spatial and temporal resolution compared to satellite-based remote sensing, offer a novel solution for precise crop identification. In this study, we evaluated a methodology that integrates object-oriented method and random forest (RF) algorithm for crop identification using multispectral UAV images. The process involved a multiscale segmentation algorithm, utilizing the optimal segmentation scale determined by Estimation of Scale Parameter 2 (ESP2). Eight classification schemes (S1–S8) were then developed by incorporating index (INDE), textural (GLCM), and geometric (GEOM) features based on the spectrum (SPEC) features of segmented objects. The best-trained RF model was established through three steps: feature selection, parameter tuning, and model training. Subsequently, we determined the feature importance for different classification schemes and generated a prediction map of vegetation for the entire study area based on the best-trained RF model. Our results revealed that S5 (SPEC + GLCM + INDE) outperformed others, achieving an impressive overall accuracy (OA) and kappa coefficient of 92.76% and 0.92, respectively, whereas S4 (SPEC + GEOM) exhibited the lowest performance. Notably, geometric features negatively impacted classification accuracy, while the other three feature types positively contributed. The accuracy of ginger, luffa, and sweet potato was consistently lower across most schemes, likely due to their unique colors and shapes, posing challenges for effective discrimination based solely on spectrum, index, and texture features. Furthermore, our findings highlighted that the most crucial feature was the INDE feature, followed by SPEC and GLCM, with GEOM being the least significant. For the optimal scheme (S5), the top 20 most important features comprised 10 SPEC, 7 INDE, and 3 GLCM features. In summary, our proposed method, combining object-oriented and RF algorithms based on multispectral UAV images, demonstrated high classification accuracy for crops. This research provides valuable insights for the accurate identification of various crops, serving as a reference for future advancements in agricultural technology and crop management strategies.

1. Introduction

Crops, as essential economic crops, play a vital role in meeting human nutritional needs and sustaining the agricultural economic system [1]. To efficiently organize and utilize crop resources, precise identification of crop types and in-depth analysis of their spatial distribution characteristics become particularly significant. Accurate identification of crops provides data support for precise water and fertilizer management, accurate yield predictions, and optimized planting layouts, enhancing agricultural production efficiency, and fosters sustainable agricultural development [2].
Traditional crop species identification mainly relies on manual ground surveys [3]. However, this method has drawbacks such as high cost, long time consumption, and difficulty in obtaining large-scale data [4]. In recent years, the rapid development of remote sensing technology has provided a new avenue for the accurate and rapid identification of crop species [5]. Nevertheless, traditional satellite remote sensing faces challenges, including low spatial and temporal resolutions, vulnerability to cloud cover, mixed pixel issues, and limited spectral discrimination, all of which can compromise the accuracy of crop extraction [6,7]. Recently, the swift advancement of unmanned aerial vehicle (UAV) technology has presented new opportunities for crop identification and monitoring. UAV remote sensing offers advantages of low cost, high spatial resolution, and reduced susceptibility to adverse weather conditions [8,9]. However, current research on crop information extraction from UAV remote sensing tends to focus on visible light image classification. While visible light UAV remote sensing incurs lower costs, its limited spectral information significantly restricts accurate crop classification [10,11], particularly for individual crop plants. In contrast, multispectral and hyperspectral imaging can provide more comprehensive information. Although hyperspectral imaging offers abundant spectral information, its excessive cost limits widespread application [12]. Multispectral imaging, on the other hand, provides a balance between information richness and cost-effectiveness, making it imperative to explore crop identification research based on UAV multispectral imagery.
According to classification units in remote sensing imagery, classification methods can be categorized into two types: pixel-based and object-based [13]. Traditional pixel-based classification methods encounter challenges related to spectral heterogeneity and similarity in high-resolution remote sensing images, often resulting in the occurrence of salt-and-pepper noise and suboptimal accuracy [14]. On the other hand, object-based image analysis (OBIA) techniques segment images into objects with relatively homogeneous attributes. These objects replace pixels as the fundamental units for classification, allowing for the comprehensive utilization of each object’s spectral, textural, and geometric characteristics, as well as contextual features [14]. This approach effectively enhances classification accuracy and result reliability [15,16]. However, with the increasing number of features, data redundancy and noncollinearity pose significant challenges to traditional classification algorithms, such as nearest neighbor algorithm. In recent years, machine learning algorithms have made significant strides. Among various algorithms, the random forest (RF) algorithm stands out by constructing multiple decision trees through bootstrap sampling and random node splitting [8,17]. The final class membership is determined through a voting mechanism, providing advantages such as fast computation, high classification accuracy, and robustness against noisy data [18].
Due to the unique advantages inherent in the object-oriented method, many scholars have tried to combine this method with various machine learning methods for remote sensing image classification in recent years. Pádua et al. [15] accurately identified grape crops using OBIA approach based on UAV imagery and three machine learning algorithms (ANN, RF, SVM), and the results showed that the ANN algorithm was able to achieve higher performance. Liu et al. [19] found that accurate classification of crops was realized by combining hyperspectral remote sensing data with OBIA, and the results showed that the texture and geometric features of object-oriented methods can significantly improve the accuracy of crop classification. In the work of Su et al. [20], using feature importance scores as a weighting factor, a weighted Euclidean distance criterion was designed for sample creation; finally, crop classification was implemented based on the OBIA approach, and the results showed that the overall accuracy of the new method was 90.52%. Although OBIA combined with machine learning methods has been studied to achieve UAV image classification, there is little research on how to efficiently use multispectral image information and analyze the features most conducive to the extraction of various crop species.
Therefore, this study proposes an approach for crop classification by combining the object-based method and RF model based on UAV multispectral images. The objectives of this work are to assess the feasibility and effectiveness of this approach, considering spectral characteristics, spatial patterns, and contextual information. This research will contribute to the advancement of precision agriculture, providing an efficient and accurate means for mapping crop distribution.

2. Materials and Methods

2.1. Study Area

The study site is situated in Minqing county (25°55′~26°33′ N, 118°30′~119°01′ E), located in the eastern part of Fujian province, China (Figure 1), covering an area of 1466 km2. This region features a subtropical monsoon climate with an annual mean temperature around 19.7 °C and annual precipitation ranging from 1400 to 1900 mm. Abundant water and heat resources characterize the local environment, creating favorable climate conditions for crop growth. The area is well suited for agriculture, hosting various types of crops such as corn, luffa, sesame, soybean, water spinach, ginger, pak choi, scallion, sweet potato, and more. This diversity makes it an ideal location for studying crop identification.

2.2. UAV Image Acquisition and Preprocessing

The multispectral images of the study area were acquired on 26 July 2021, using UAV of DJI Phantom 4 Multispectral version (DJI Technology Co., Ltd., Shenzhen, China). The UAV was equipped with five single-band camera lenses (blue: 450 ± 16 nm, green: 560 ± 16 nm, red: 650 ± 16 nm, red edge: 730 ± 16 nm and near-infrared: 840 ± 26 nm). The position system of the UAV is based on the Global Navigation Satellite System-Real Time Kinematic (GNSS-RTK) method (DGPS) and the positioning accuracy is 0.1~0.3 m. Route planning of aerial photography mission was performed by the app of DJI GS Pro (DJI Technology Co., Ltd., Shenzhen, China). The flight altitude was set at 12 m, the course overlap was set to 70%, and the side overlap was set to 65%. A total of 5424 images with size of 1600 pixels × 1300 pixels in the study area were obtained. The software of DJI Terra (DJI Technology Co., Ltd., Shenzhen, China) was used for image mosaicking and the orthophoto image with a spatial resolution of about 0.008 m was produced. The clipped true color (RGB) image of the study area is shown in Figure 1.

2.3. Methodology

The framework of crop classification based on UAV imagery and RF algorithm is depicted in Figure 2. The whole process is primarily divided into three key steps: (1) data acquisition and data preprocessing; (2) eight schemes construction and image classification; (3) accuracy assessment and crop mapping. Data preprocessing involves images acquisition and orthographic image generation. Image classification was performed based on eight schemes which were designed according to eight different feature subsets. Feature subsets were constructed based on four types of features, including spectral features (SPEC), index features (INDE), textural features (GLCM), and geometric (GEOM) calculated from segmented objects. Based on spectral features, three other types of features were added to form eight feature subsets and then to form eight classification schemes, namely, S1 (SPEC), S2 (SPEC + GLCM), S3 (SPEC + INDE), S4 (SPEC + GEOM), S5 (SPEC + GLCM + INDE), S6 (SPEC + GLCM + GEOM), S7 (SPEC + INDE + GEOM), and S8 (All). Object-based classification was performed using an RF model based on the above eight schemes and training samples. Due to the different number of samples in different categories, the stratified sampling method was used to construct the sample datasets, which were used for model training and accuracy assessment, respectively. Finally, the crop map of for the whole study area was predicted by the optimal RF model.

2.3.1. Image Segmentation

Image segmentation is a crucial step in object-oriented classification, as it defines the smallest classification unit. This process involves merging smaller objects into larger ones from the bottom to the top using the multiresolution segmentation (MRS) algorithm, forming unit objects with uniform spectrum, texture, and geometric properties [21]. The segmentation scale, a key parameter in image segmentation, significantly influences classification accuracy. In this study, the ESP2 plug-in is employed to determine the optimal segmentation scale [22]. The local variation (LV) of image object homogeneity, induced by different segmentation scales, is calculated as the average standard deviation of the segmentation object layer. The rates of change of LV are then utilized to identify alternative scales for optimal segmentation, and the final optimal segmentation scale is selected through visual discrimination. Additional parameters are configured as follows: each band’s weight is set to 1, the shape factor is set to 0.1, and the compactness is set to 0.5. Image segmentation is conducted using eCognition Developer 9.0 (Trimble Germany GmbH, Munich, Germany) based on the determined optimal segmentation scale.

2.3.2. Feature Extraction for Each Object

There are eighty features for each segmented object in this study, including four types of features as follows:
(1) SPEC features include blue band (B), green band (G), red band (R), rededge band (RE), near-infrared band (NIR), the mean of each band, the standard deviation of each band, and the maximum of difference and total brightness (12 in total).
(2) INDE features include normalized difference vegetation index (NDVI), normalized difference vegetation index of rededge (NDRE), green normalized difference vegetation index (GNDVI), NIR-red ratio vegetation index (NIRRR), NIR-green ratio vegetation index (NIRGR), difference vegetation index (DVI), difference vegetation index of green (DVIGRE), modified shade water index (MSWI), optimized soil adjusted vegetation index (OSAVI), infrared percentage vegetation index (IPVI), enhanced vegetation index (EVI), and brightness index (BI). There are 12 index features in total and the formula of each index is listed in Table 1.
(3) GLCM features are calculated from gray-level co-occurrence matrix (GLCM) and the total number of texture features are forty [4], including the mean, standard deviation, entropy, homogeneity, contrast, dissimilarity, angular second moment, and correlation of each band (B, G, R, RE, and NIR) in five directions (0°, 45°, 90°, 135°, and All).
(4) GEOM features refer to the shape and range features of an object, and the total number is sixteen, including area, length/width, length, width, border length, shape index, main direction, asymmetry, roundness, boundary index, number of pixels, compactness, ellipse fitting, rectangle fitting, maximum ellipse radius, and minimum ellipse radius.

2.3.3. Schemes Construction Based on Various Feature Subsets

The selection of feature subsets has an important impact on the object-oriented classification results. In order to understand the effect of different features on the classification result, eight feature subsets were set up in this study, forming eight different corresponding classification schemes (Table 2). Scheme 1 only includes spectral features (SPEC), scheme 2 adds texture features (SPEC + GLCM) on the basis of spectral features, scheme 3 adds exponential features (SPEC + INDE) to scheme 1, scheme 4 includes spectral features and geometric features (SPEC + GEOM), scheme 5 adds exponential features (SPEC + GLCM + INDE) to scheme 2, scheme 6 adds geometric features (SPEC + GLCM + GEOM) to scheme 2, and scheme 7 adds geometric features (SPEC + INDE + GEOM) to scheme 3. Scheme 8 includes all feature types (SPEC + GLCM + INDE + GEOM).

2.3.4. Random Forest Algorithm

The random forest is composed of various decision trees which are generated based on sample training. Each decision tree grows independently without pruning. The characteristic variable parameters are randomly selected at the nodes for bifurcation. A single decision tree forms a decision tree cluster, and the final prediction result is generated by the voting of the decision tree group [4]. Two important parameters need to be set to run the random forest model: the number of decision trees and the number of features contained in each decision tree. These two parameters are usually determined by traversal based on the out-of-bag (OOB) error rate [8]. Firstly, the number of decision trees is set to 1000, the number of feature parameters (1~94) is traversed in turn, and the feature number with the smallest OOB error is selected as its best value; then the number of features is fixed as the best value, the number of decision trees (1~1000) is traversed, the number of decision trees with the smallest OOB error rate as its best value is selected, and the best combination of the number of decision trees and the number of features is determined through the above methods. The importance of features of different classification schemes is mainly determined based on the average decline accuracy [8]. The randomForest package of R language software (4.0.2) was used to perform the classification based on random forest algorithm.

2.3.5. Accuracy Evaluation

In this study, object samples were meticulously chosen from UAV high-resolution images through visual interpretation and field verification. The total number of samples for 11 types of objects was determined based on the distribution characteristics observed in the study area (Table 3). The sample counts for various objects ranged from 60 to 250 (Figure 3), resulting in a total of 1340 samples. To ensure that the distribution of different features in the training and test samples aligns with that of the total samples, a hierarchical sampling method was employed to construct both the training and verification sample sets. For each sample type, a random sampling approach was applied in a 7:3 ratio (Table 3), where 70% of the samples were used for establishing the classification model, and the remaining 30% were designated for validating the classification accuracy.
The accuracy assessment of classification results relies on the confusion matrix [9], from which various metrics, including overall accuracy (OA), producer accuracy (PA), user accuracy (UA), kappa coefficient (kappa), and F1-score, can be computed. Kappa coefficient and OA serve as indicators for the overall classification effectiveness, with kappa coefficient having a value range of approximately −1 to 1, while OA falls within the range of 0~1. The F1-score, calculated based on PA and UA, is an indicator assessing the consistency between predicted and actual category values. The closer the F1-score is to 1, the higher the classification accuracy for the category. The calculation formulas for each index (Equations (1)–(5)) are as follows:
O A = i = 1 K N i i N t o t a l
K a p p a = N t o t a l i = 1 K N i i i = 1 K N i + N + i N t o t a l 2 i = 1 K N i + N + i
P A = N i i N + i
U A = N i i N i +
F1-score = 2 × PA × UA/(PA + UA)
where N i i is the number of correctly classified samples, N + i is the number of real samples for the i class, N i + is the predicted number of samples for the i class, N t o t a l is the total number of samples, and K is the total number of categories.

3. Results

3.1. Determination of the Best Image Segmentation Scale

The ESP2 plug-in was employed for image segmentation, and the local variance and its change rate corresponding to different scales are illustrated in Figure 4. According to the established rules, the scale corresponding to the peak point is considered one of the alternative scales for the best scale. Therefore, the determined alternative scales for the best were 86, 116, 134, 140, 151, 162, 169, and 177. To finally determine the best scale, the aforementioned alternative scales were individually used to segment the image, and the segmentation results are presented in Figure 5. Upon comparing the actual segmentation results at different scales, it becomes evident that scales less than 151 led to oversegmentation of ground objects, posing challenges for subsequent classification. Conversely, scales greater than 151 resulted in inadequate segmentation, manifesting a mixed phenomenon in segmented objects that hindered effective classification. At a segmentation scale of 151, the object boundaries were clear, there was substantial heterogeneity among objects, and distinct objects could be well distinguished. Consequently, the optimal segmentation scale was conclusively determined as 151. The compactness and shape factor also played a role in the segmentation effect. Considering the flat terrain and concentrated crop planting, the compactness and shape factor were set to 0.5 and 0.1, respectively.

3.2. Parameter Debugging of Random Forest Model

The parameters setting of the RF model play a crucial role in the final classification results. To identify the optimal values for the number of feature and the number of decision trees, parameter debugging was conducted, and the results are illustrated in Figure 6. Notably, when the decision tree is set to 1000, varying the number of features causes the out-of-bag (OOB) error rate of different schemes to exhibit a similar trend of initially decreasing and then fluctuating. Consequently, the number of features corresponding to the smallest OOB error rate of each scheme is considered as the optimal value for that scheme. Once the number of features is set to the optimal value, altering the number of decision trees results in a similar trend of OOB errors decreasing initially and then fluctuating for different schemes. Subsequently, the number of decision trees corresponding to the smallest OOB error rate for each scheme is considered as the optimal value for that scheme. Ultimately, the optimal combinations of the number of features and decision trees of the eight schemes (S1, S2, S3, S4, S5, S6, S7, and S8) are summarized in Table 4.

3.3. Accuracy Assessment

As depicted in the histogram illustrating OA and kappa (Figure 7), each scheme demonstrates high accuracy, with the average OA consistently exceeding 86%, and the average kappa surpassing 0.84. Notably, S5 stands out with the highest accuracy, with its mean value of OA and kappa of 92.76% and 0.92, respectively. In contrast, S4 exhibits the lowest accuracy, with mean OA and kappa values of 86.19% and 0.84, respectively. The incorporation of index features and texture features proves beneficial for enhancing classification accuracy. For instance, adding texture features to spectral features result in a 0.71% improvement in accuracy for S2, and the addition of index features to spectral features leads to a substantial 5.38% accuracy improvement for S3. Conversely, geometric features have a negative effect on the classification results. For example, incorporating geometric features into the spectral features results in a 1.13% decrease in accuracy for S4. Furthermore, the addition of geometric features to S2 and S3 causes a 0.49% and 1.04% decrease in accuracy for S6 and S7, respectively. Therefore, different types of features exhibit varying impacts on classification outcomes, with SPEC features, INDE features, and GLCM features demonstrating positive effects, while GOEM features exert negative effects.
Upon scrutinizing the classification accuracy across different categories (Figure 8), it becomes evident that most classes exhibit an F1-score larger than 0.8. However, the accuracy of ginger, luffa, and sweet potato is notably smaller compared to other crop classes across most schemes. Particularly, the F1-score of luffa in the S6 scheme is merely 0.58, significantly lower than that of other classes. While the ginger and sweet potato have a mean F1-scores of 0.82 and 0.73 across all the schemes (S1–S8), slightly higher than that of luffa, they still fall significantly short of the F1-scores achieved by other crop classes. Among all crop classes, onion stands out with the highest F1-score, ranging from 0.92 to 0.97 across all schemes. Additionally, sesame exhibits relatively high accuracy, with F1-score ranging from 0.88 to 0.94. The highest accuracy of these two crops is observed in the classification result of S3. Therefore, it is speculated that the identification accuracy of onion and sesame is particularly sensitive to SPEC and INDE features. In contrast to crop classes, the recognition accuracy of noncrop classes is obviously higher. The F1-scores of plastic film and soil are close to 1 in all schemes, with a range of 0.95 to 0.98 and 0.985 to 0.997, respectively.

3.4. Accuracy Assessment

Figure 9 presents the feature importance ranking results for various classification schemes, with S1 showcasing all 12 features and other schemes displaying the top 20 most important features. Notably, significant differences exist in the feature ranking among the various schemes. It is evident that none of the top 20 most important features in the eight schemes includes GEOM features, establishing GEOM as the least important among the four types of selected features. Among the SPEC, INDE, and GLCM features, GLCM features consistently rank relatively low in importance. For instance, in S2, the top 8 importance features are SPEC features, while GLCM features following after the top 8. In S8, the top 7 features comprise SPEC and INDE features, with only 3 GLCM features among the 20 important features. Notably, compared to SPEC features, INDE features hold greater importance. For example, in S3, S5, S7, and S8, the top two features are INDE features, and the number of INDE features among the top 20 most important features in S7 and S8 surpasses that of SPEC features. Consequently, among the four types of features selected in this experiment, the most important feature is INDE feature, followed by SPEC feature and GLCM feature, with GEOM feature ranking as the least important. In the optimal scheme (S5), the top 20 most important features comprise 10 SPEC features, 7 INDE features, and 3 GLCM features.

3.5. Prediction Map

The best mapping result for the crops in the study area based on the optimal scheme is depicted in Figure 10. The majority of target crops are successfully identified in the mapping results and the spatial distributions of each category are also confirmed. The accuracy of all the categories aligns with the prior analysis of selected samples. Notably, noncrop categories, such as soil and plastic film, exhibit distinctive characteristics, ensuring consistent identification with the actual situation and comprehensive coverage. Distinct spectral, geometric, and textural features set corn, scallion, and pak choi apart from other crops, resulting in fewer areas of overestimation and underestimation. Figure 10 accurately maps the majority of pak choi and gingers. However, the accuracy of sesame mapping is not as robust. Specifically, certain areas in the southwest of the map are undervalued and mistakenly identified as sweet potato or water spinach. This misinterpretation primarily arises due to spectral similarities between sweet potato and water spinach, which resemble those of luffa and sesame. Consequently, sesame mapping results in lower estimation accuracy. Furthermore, it is noteworthy that the accuracy of luffa mapping is comparatively lower, with areas exhibiting both decreased precision and underestimation when compared to other crops.

4. Discussion

Our study reveals a significant variation in the accuracy among different schemes for the RF classifier, with S5 (SPEC + GLCM + INDE) achieving the best classification results among all eight schemes. This underscores the distinct roles played by various feature types in determining classification accuracy. Among the selected features, INDE, SPEC, and GLCM features positively impact classification accuracy, while GEOM features exhibit a negative impact, which is consistent with findings in other research [8]. GEOM features encompass shape index, density, roundness, aspect ratio, area, and other information commonly utilized in geological research, such as landslide mapping and rock identification [8,35]. However, since most subjects in this study lack a relatively regular shape, GEOM features seem to contribute minimally to the positive effects on crop identification and could potentially lead to reduced accuracy due to data redundancy. Furthermore, our study highlights the prominence of the INDE feature as the most crucial for the optimal scheme S5, occupying four out of the top-six positions. It is followed by SPEC and GLCM features, while GEOM features rank as the least important. Scrutinizing the feature importance ranking map (Figure 8) reveals that the leading INDE features encompass the near-infrared or red-edge bands. Guo et al. [8] and Abdollahnejad et al. [36] have similarly emphasized the significance of the red-edge band in plant identification. This is attributed to the sharp increase in plant reflectivity in the near-infrared band, resulting in a distinctive reflection peak at the red edge [4,37]. Consequently, plants exhibit sensitivity to the near-infrared and red-edge bands, making the addition of the INDE features with these two bands highly beneficial for crop species identification. In summary, the study suggests that the random forest algorithm, combined with an object-based method, performed well in crop classification and can effectively identify the importance of each feature.
The results unveil significant variations in recognition accuracy across different categories. Notably, onion and sesame emerge as standout performances with the highest accuracy among crops, showcasing an impressive F1-score of approximately 0.95. This heightened accuracy can be attributed to their distinct phenotypes, sharply contrasting with those of other crops. Conversely, ginger, luffa, and sweet potato generally exhibit lower precision compared to their crop counterparts. The suboptimal accuracy of these crops can be ascribed to two primary factors. Firstly, the limited sample size, with only 60 and 70 samples for ginger and luffa, respectively, plays a significant role in supervised classification. Insufficient samples lead to incomplete classifier training, resulting in misclassification and omitted data points [38]. Secondly, an analysis of the confusion matrix indicates that luffa and sweet potato are prone to misclassification due to similarities in color, shape, and texture of their leaves. The current feature set struggles to accurately differentiate between these two crops. To enhance recognition accuracy, future studies should explore additional features, such as crop height, which enhance the distinctiveness of luffa and sweet potato. In contrast to crops, noncrop categories consistently exhibit higher accuracy, aligning with findings from other vegetation classification studies [39]. The distinctive spectral characteristics of plastic film and soil, significantly different from those of crops, contribute to this heightened accuracy. The inclusion of texture and index features of plastic film and soil can further improve recognition accuracy. This analysis underscores the crucial role of sample number and quality in classification accuracy.
While this study demonstrates favorable outcomes in crop recognition, there are still noteworthy limitations outlined below. Firstly, the study exclusively relied on a single machine learning model. Amidst the abundance of evolving machine learning methods [35], this research opted solely for the random forest algorithm. This choice introduces a challenge in delivering a comprehensive evaluation of the effectiveness of machine learning in crop recognition. Secondly, the study relied on imagery captured during a specific timeframe. Given that vegetables exhibit variations in spectral characteristics and morphological features across different growth stages [40,41], relying solely on results from a singular imaging period proves inadequate in representing conditions in other time. Lastly, despite employing the ESP2 plug-in for optimal scale selection, it can only identify relatively superior alternatives for the optimal scale [4]. The final scale still necessitates determination through visual discrimination, to some extent, introducing subjectivity into the scale determination process and limiting the level of automation. It is imperative to explore methods for achieving fully automated optimization of image segmentation parameters in future research.

5. Conclusions

In this study, we propose an approach for classifying crops by combining object-oriented and RF algorithm, utilizing UAV multispectral images. The results indicate that most of the schemes exhibit high classification performance. Notably, scheme 5 (SPEC + GLCM + INDE) emerged as the most successful, achieving an overall accuracy of 92.76% and a kappa coefficient of 0.92. It was observed that different features exert varying effects on classification accuracy. SPEC, GLCM, and INDE features have a positive effect while GEOM has a negative impact. Moreover, among the four selected feature types, the most important feature is the INDE feature, followed by SPEC and GLCM, with GEOM being the least significant. While this study marks an initial exploration into the crop classification using object-oriented and RF algorithm, there is a need for a more extensive dataset comprising images of crops at different growth stages. This will allow for a comprehensive evaluation of the RF model’s performance and enhance its adaptability across diverse scenarios. The current research validates the efficacy of the proposed vegetation classification method based on UAV multispectral imagery and RF model, providing a new technique for crop classification in precision agriculture, which holds significant promise for optimizing crop management strategies, resource allocation, and decision-making processes in the agricultural sector.

Author Contributions

Conceptualization, W.Z. and X.Z.; methodology, W.Z., X.Z. and H.Z.; software, H.D. and H.Z.; formal analysis, H.D.; writing—original draft, W.Z., H.D. and X.Z.; writing—review and editing, W.Z., H.D., X.Z. and H.Z.; funding acquisition, H.D. and H.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Tibet Autonomous Region Science and Technology Plan Project Key Project (XZ202201ZY0003G) and Natural Science of the Education Department of Sichuan Province (18ZA0047).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Data are available upon request due to restrictions, e.g., privacy or ethics. The data presented in this study are available upon request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Dhenge, R.; Rinaldi, M.; Rodolfi, M.; Barbanti, D.; Ganino, T. Modification of Structural Characteristics of Vegetables by High-pressure Processing: A Review. Food Biosci. 2023, 56, 103407. [Google Scholar] [CrossRef]
  2. Chen, B.; Zhang, M.; Chen, H.; Aujumdar, A.S.; Guo, Z. Progress in Smart Labels for Rapid Quality Detection of Fruit and Vegetables: A Review. Postharvest Biol. Technol. 2023, 198, 112261. [Google Scholar] [CrossRef]
  3. Choudhury, B.; Narzari, M.; Zafar, H.; Singh, N.; Mishra, V.K.; Prabhakar, M. Spectral Library of Crops and Discrimination of Major Vegetables Grown in the Eastern Himalayan Ecosystem: A Proximal Hyperspectral Remote Sensing Approach. Ecol. Inform. 2023, 77, 102263. [Google Scholar] [CrossRef]
  4. Ye, Z.; Yang, K.; Lin, Y.; Guo, S.; Sun, Y.; Chen, X.; Lai, R.; Zhang, H. A Comparison between Pixel-Based Deep Learning and Object-based Image Analysis (OBIA) for Individual Detection of Cabbage Plants Based on UAV Visible-light Images. Comput. Electron. Agric. 2023, 209, 107822. [Google Scholar] [CrossRef]
  5. Sharma, R.C. Countrywide Mapping of Plant Ecological Communities with 101 Legends including Land Cover Types for the First Time at 10 m Resolution through Convolutional Learning of Satellite Images. Appl. Sci. 2022, 12, 7125. [Google Scholar] [CrossRef]
  6. Poblete, T.; Navas-Cortes, J.A.; Hornero, A.; Camino, C.; Calderon, R.; Hernandez-Clemente, R.; Landa, B.B.; Zarco-Tejada, P.J. Detection of Symptoms Induced by Vascular Plant Pathogens in Tree Crops Using High-resolution Satellite Data: Modelling and Assessment with Airborne Hyperspectral Imagery. Remote Sens. Environ. 2023, 295, 113698. [Google Scholar] [CrossRef]
  7. Ye, Z.; Wei, J.; Lin, Y.; Guo, Q.; Zhang, J.; Zhang, H.; Deng, H.; Yang, K. Extraction of Olive Crown Based on UAV Visible Images and the U2-Net Deep Learning Model. Remote Sens. 2022, 14, 1523. [Google Scholar] [CrossRef]
  8. Guo, Q.; Zhang, J.; Guo, S.; Ye, Z.; Deng, H.; Hou, X.; Zhang, H. Urban Tree Classification Based on Object-oriented Approach and Random Forest Algorithm Using Unmanned Aerial Vehicle (UAV) Multispectral Imagery. Remote Sens. 2022, 14, 3885. [Google Scholar] [CrossRef]
  9. Feng, C.; Zhang, W.; Deng, H.; Dong, L.; Zhang, H.; Tang, L.; Zheng, Y.; Zhao, Z. A Combination of OBIA and Random Forest Based on Visible UAV Remote Sensing for Accurately Extracted Information about Weeds in Areas with Different Weed Densities in Farmland. Remote Sens. 2023, 15, 4696. [Google Scholar] [CrossRef]
  10. Veramendi, W.N.C.; Cruvinel, P.E. Method For Maize Plants Counting and Crop Evaluation Based on Multispectral Images Analysis. Comput. Electron. Agric. 2024, 216, 108470. [Google Scholar] [CrossRef]
  11. Bai, Y.; Shi, L.; Zha, Y.; Liu, S.; Nie, C.; Xu, H.; Yang, H.; Shao, M.; Yu, X.; Cheng, M.; et al. Estimating Leaf Age of Maize Seedlings Using UAV-based RGB and Multispectral Images. Comput. Electron. Agric. 2023, 215, 108349. [Google Scholar] [CrossRef]
  12. Liu, D.; Yang, F.; Liu, S. Estimating Wheat Fractional Vegetation Cover Using a Density Peak k-Means Algorithm Based on Hyperspectral Image Data. J. Integr. Agric. 2021, 20, 2880–2891. [Google Scholar] [CrossRef]
  13. Ventura, D.; Napoleone, F.; Cannucci, S.; Alleaume, S.; Valentini, E.; Casoli, E.; Burrascano, S. Integrating Low-altitude Drone Based-imagery and OBIA for Mapping and Manage Semi Natural Grassland Habitats. J. Environ. Manag. 2022, 321, 115723. [Google Scholar] [CrossRef] [PubMed]
  14. Prince, A.; Franssen, J.; Lapierre, J.; Maranger, R. High-resolution Broad-scale Mapping of Soil Parent Material Using Object-based Image Analysis (OBIA) of Lidar Elevation Data. Catena 2020, 188, 104422. [Google Scholar] [CrossRef]
  15. Padua, L.; Matese, A.; Gennaro, S.F.D.; Morais, R.; Peres, E.; Sousa, J.J. Vineyard Classification Using OBIA on UAV-based RGB and Multispectral Data: A Case Study in Different Wine Regions. Comput. Electron. Agric. 2022, 196, 106905. [Google Scholar] [CrossRef]
  16. Gonzalez, C.R.; Guzman, C.; Andreo, V. Using VHR Satellite Imagery, OBIA and Landscape Metrics to Improve Mosquito Surveillance In Urban Areas. Ecol. Inform. 2023, 77, 102221. [Google Scholar] [CrossRef]
  17. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  18. Cao, M.; Yin, D.; Zhong, Y.; Lv, Y.; Lu, L. Detection of Geochemical Anomalies Related to Mineralization Using the Random Forest Model Optimized by the Competitive Mechanism and Beetle Antennae Search. J. Geochem. Explor. 2023, 249, 107195. [Google Scholar] [CrossRef]
  19. Liu, X.; Bo, Y.C. Object-Based Crop Species Classification Based on the Combination of Airborne Hyperspectral Images and LiDAR Data. Remote Sens. 2015, 14, 922–950. [Google Scholar] [CrossRef]
  20. Su, T.F.; Zhang, S.W. Object-based Crop Classification in Hetao Plain Using Random Forest. Earth Sci. Inform. 2021, 14, 119–131. [Google Scholar] [CrossRef]
  21. Feng, X.; Li, P. A Tree Species Mapping Method From Uav Images over Urban Area Using Similarity in Tree-Crown Object Histograms. Remote Sens. 2019, 11, 1982. [Google Scholar] [CrossRef]
  22. Drăguţ, L.; Csillik, O.; Eisank, C.; Tiede, D. Automated Parameterisation for Multi-scale Image Segmentation on Multiple Layers. ISPRS J. Photogramm. Remote Sens. 2014, 88, 119–127. [Google Scholar]
  23. Holland, K.H.; Lamb, D.W.; Schepers, J.S. Radiometry of Proximal Active Optical Sensors (AOS) for Agricultural Sensing. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2012, 5, 1793–1802. [Google Scholar] [CrossRef]
  24. Barnes, E.M.; Clarke, T.R.; Richards, S.E.; Colaizzi, P.D.; Thompson, T. Coincident Detection of Crop Water Stress, Nitrogen Status, and Canopy Density Using Ground Based Multispectral Data. In Proceedings of the 5th International Conference on Precision Agriculture and Other Resource Management, Bloomington, MN USA, 16–19 July 2000. [Google Scholar]
  25. Gitelson, A.A.; Kaufman, Y.J.; Merzlyak, M.N. Use of a Green Channel In Remote Sensing of Global Vegetation from EOS-modis. Remote Sens Environ. 1996, 58, 289–298. [Google Scholar] [CrossRef]
  26. Jordan, C.F. Derivation of Leaf-area Index From Quality of Light on the Forest Floor. Ecology 1969, 50, 663–666. [Google Scholar] [CrossRef]
  27. Vinciková, H.; Hais, M.; Brom, J.; Procházka, J.; Pecharová, E. Use of Remote Sensing Methods in Studying Agricultural Landscapes—A Review. J. Landsc. Stud. 2010, 3, 53–63. [Google Scholar]
  28. Merzlyak, M.N.; Gitelson, A.A.; Chivkunova, O.B.; Rakitin, V.Y. Non-destructive Optical Detection of Pigment Changes during Leaf Senescence and Fruit Ripening. Physiol. Plant. 1999, 106, 135–141. [Google Scholar] [CrossRef]
  29. Chen, P.; Feng, H.; Li, C.; Yang, G.; Yang, Y.; Yang, W.; Liu, S. Estimation of Chlorophyll Content in Potato Using Fusion of Texture and Spectral Features Derived from UAV Multispectral Image. Trans. Chin. Soc. Agric. Eng. 2019, 35, 63–74. [Google Scholar]
  30. Guo, Q.; Wei, J.; Zhang, J.; Ye, Z.; Zhang, H.; Lai, Z.; Deng, H. Vegetable Recognition Based on Unmanned Aerial Vehicle (UAV) Multispectral Imagery and Random Forest Algorithm. J. Agr. Sci. Tech. 2023, 25, 99–110. [Google Scholar]
  31. Rondeaux, G.; Steven, M.; Baret, F. Optimization of Soil-adjusted Vegetation Indices. Remote Sens Environ. 1996, 55, 95–107. [Google Scholar] [CrossRef]
  32. Kandare, K.; Ørka, H.O.; Dalponte, M.; Næsset, E.; Gobakken, T. Individual Tree Crown Approach for Predicting Site Index in Boreal Forests Using Airborne Laser Scanning and Hyperspectral Data. Int. J. Appl. Earth Obs. Geoinf. 2017, 60, 72–82. [Google Scholar] [CrossRef]
  33. Huete, A.; Didan, K.; Miura, T.; Rodriguez, E.P.; Gao, X.; Ferreira, L.G. Overview of the Radiometric and Biophysical Performance of the MODIS Vegetation Indices. Remote Sens. Environ. 2002, 83, 195–213. [Google Scholar] [CrossRef]
  34. Khan, N.M.; Rastoskuev, V.V.; Sato, Y.; Shiozawa, S. Assessment of Hydrosaline Land Degradation by Using a Simple Approach of Remote Sensing Indicators. Agr. Water Manag. 2005, 77, 96–109. [Google Scholar] [CrossRef]
  35. Garg, R.; Kumar, A.; Prateek, M.; Pandey, K.; Kumar, S. Land Cover Classification of Spaceborne Multifrequency SAR and Optical Multispectral Data Using Machine Learning. Adv. Space Res. 2022, 69, 1726–1742. [Google Scholar] [CrossRef]
  36. Abdollahnejad, A.; Panagiotidis, D. Tree Species Classification and Health Status Assessment For a Mixed Broadleaf-conifer Forest with UAS Multispectral Imaging. Remote Sens. 2020, 12, 3722. [Google Scholar] [CrossRef]
  37. Zeng, Y.; Hao, D.; Park, T.; Zhu, P.; Huete, A.; Myneni, R.; Knyazikhin, Y.; Qi, J.; Nemani, R.R.; Li, F.; et al. Structural Complexity Biases Vegetation Greenness Measures. Nat. Ecol. Evol. 2023, 7, 1790–1798. [Google Scholar] [CrossRef] [PubMed]
  38. Wang, N.; Pu, T.; Zhang, Y.; Liu, Y.; Zhang, Z. More Appropriate Densenetbl Classifier for Small Sample Tree Species Classification Using UAV-based RGB Imagery. Heliyon 2023, 9, e20467. [Google Scholar] [CrossRef]
  39. Komárek, J.; Klouček, T.; Prošek, J. the Potential of Unmanned Aerial Systems: A Tool Towards Precision Classification of Hard-to-distinguish Vegetation Types? Int. J. Appl. Earth Obs. Geoinf. 2018, 71, 9–19. [Google Scholar] [CrossRef]
  40. Wang, R.; Shi, W.; Kronzucker, H.; Li, Y. Oxygenation Promotes Vegetable Growth by Enhancing P Nutrient Availability and Facilitating a Stable Soil Bacterial Community in Compacted Soil. Soil Tillage Res. 2023, 230, 105686. [Google Scholar] [CrossRef]
  41. Sharma, R.C. Dominant Species-Physiognomy-Ecological (DSPE) System for the Classification of Plant Ecological Communities from Remote Sensing Images. Ecologies 2022, 3, 25. [Google Scholar] [CrossRef]
Figure 1. The geography of the study area.
Figure 1. The geography of the study area.
Agriculture 14 00548 g001
Figure 2. Workflow of crop classification combining unmanned aerial vehicle (UAV) images and random forest (RF) model.
Figure 2. Workflow of crop classification combining unmanned aerial vehicle (UAV) images and random forest (RF) model.
Agriculture 14 00548 g002
Figure 3. The spatial distribution of samples for various crops.
Figure 3. The spatial distribution of samples for various crops.
Agriculture 14 00548 g003
Figure 4. Estimation of scales based on ESP2 tool.
Figure 4. Estimation of scales based on ESP2 tool.
Agriculture 14 00548 g004
Figure 5. Segmentation result of different scales.
Figure 5. Segmentation result of different scales.
Agriculture 14 00548 g005
Figure 6. Out-of-bag error rate of different numbers of features (a) and different numbers of decision trees (b) for various schemes.
Figure 6. Out-of-bag error rate of different numbers of features (a) and different numbers of decision trees (b) for various schemes.
Agriculture 14 00548 g006
Figure 7. Box blot of classification accuracy of different schemes.
Figure 7. Box blot of classification accuracy of different schemes.
Agriculture 14 00548 g007
Figure 8. F1-scores of different schemes for different crop categories.
Figure 8. F1-scores of different schemes for different crop categories.
Agriculture 14 00548 g008
Figure 9. The 20 most important features for random forest based on S1–S8 (S1 only has 12 features).
Figure 9. The 20 most important features for random forest based on S1–S8 (S1 only has 12 features).
Agriculture 14 00548 g009
Figure 10. Classification result based on the optimal scheme using random forest model.
Figure 10. Classification result based on the optimal scheme using random forest model.
Agriculture 14 00548 g010
Table 1. Formulas of index features.
Table 1. Formulas of index features.
Index FeaturesFormulaReference
NDVI(NIR − R)/(NIR + R)[23]
NDRE(NIR − RE)/(NIR + RE)[24]
GNDVI(NIR − G)/(NIR + G)[25]
NIRRRNIR/R[26]
NIRGRNIR/G[27]
DVINIR − R[28]
DVIGRENIR − G[29]
MSWI(B − NIR)/NIR[30]
OSAVI(NIR − R)/(NIR + R + 0.16)[31]
IPVINIR/(NIR + R)[32]
EVI2.5 × (NIR − R)/(NIR + 6 × R − 7.5 × B + 1)[33]
BI(R2 + NIR2) × 0.5[34]
B, G, R, RE, and NIR represents blue, green, red, red edge, and near-infrared bands, respectively.
Table 2. The feature subsets of various classification schemes.
Table 2. The feature subsets of various classification schemes.
Classification SchemesFeature SubsetsSPEC FeatureGLCM FeatureGEOM FeatureINDE FeatureTotal Features
S1SPEC12---12
S2SPEC + GLCM1240--52
S3SPEC + INDE12--1224
S4SPEC + GEOM12-16-28
S5SPEC + GLCM + INDE1240-1264
S6SPEC + GLCM + GEOM124016-68
S7SPEC + INDE + GEOM12-161240
S8SPEC + GLCM + INDE + GEOM1240161280
Table 3. Training and test samples for various categories.
Table 3. Training and test samples for various categories.
Crop TypesTotal SamplesTraining SamplesTest Samples
Corn (Zea mays L.)1006040
Ginger (Zingiber officinale Roscoe)603624
Luffa (Luffa cylindrica (L.) Roem.)704228
Pak choi (Brassica pekinensis (Lour.) Rupr.)1207248
Plastic film804832
Scallion (Allium fistulosum Linn.)905436
Sesame (Sesamum indicum Linn.)1609664
Soil260156104
Soybean (Glycine max (Linn.) Merr.)603624
Sweet potato (Lycopersicon esculentum Miller)905436
Water spinach (Ipomoea aquatica Forsskal)250150100
Table 4. Optical number of features and decision trees for various schemes.
Table 4. Optical number of features and decision trees for various schemes.
SchemeOptical Number of FeaturesOptical Number of Decision Trees
S17763
S233565
S316716
S42384
S538313
S640939
S712219
S836669
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

Deng, H.; Zhang, W.; Zheng, X.; Zhang, H. Crop Classification Combining Object-Oriented Method and Random Forest Model Using Unmanned Aerial Vehicle (UAV) Multispectral Image. Agriculture 2024, 14, 548. https://doi.org/10.3390/agriculture14040548

AMA Style

Deng H, Zhang W, Zheng X, Zhang H. Crop Classification Combining Object-Oriented Method and Random Forest Model Using Unmanned Aerial Vehicle (UAV) Multispectral Image. Agriculture. 2024; 14(4):548. https://doi.org/10.3390/agriculture14040548

Chicago/Turabian Style

Deng, Hui, Wenjiang Zhang, Xiaoqian Zheng, and Houxi Zhang. 2024. "Crop Classification Combining Object-Oriented Method and Random Forest Model Using Unmanned Aerial Vehicle (UAV) Multispectral Image" Agriculture 14, no. 4: 548. https://doi.org/10.3390/agriculture14040548

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop