Next Article in Journal
Development and Implementation of a Machine Learning Model to Identify Emotions in Children with Severe Motor and Communication Impairments
Next Article in Special Issue
Generative Adversarial Network-Based Lightweight High-Dynamic-Range Image Reconstruction Model
Previous Article in Journal
Underwater Ionic Current Signal Sensing and Information Transmission by Contact-Induced Charge Transfer
Previous Article in Special Issue
Improved Localization and Recognition of Handwritten Digits on MNIST Dataset with ConvGRU
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Identification and Segmentation of Overlapping Fog Droplets Using XGBoost and Image Segmentation

1
College of Engineering, Jiangxi Agricultural University, Nanchang 330045, China
2
Jiangxi Provincial Key Laboratory of Modern Agricultural Equipment, Nanchang 330045, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(5), 2847; https://doi.org/10.3390/app15052847
Submission received: 13 December 2024 / Revised: 1 March 2025 / Accepted: 4 March 2025 / Published: 6 March 2025
(This article belongs to the Special Issue Advances in Image Recognition and Processing Technologies)

Abstract

:
Water-sensitive paper (WSP) has been widely used to assess the quality of pesticide sprays. However, fog droplets tend to overlap on WSP. In order to accurately measure the droplet size and grasp the droplet distribution pattern, this study proposes a method based on the optimized XGBoost classification model combined with improved concave-point matching to achieve multi-level overlapping-droplet segmentation. For different types of overlapping droplets, the corresponding improved segmentation algorithm is used to improve the segmentation accuracy. For parallel overlapping droplets, the centre-of-mass segmentation method is used; for non-parallel overlapping droplets, the minimum-distance segmentation method is used; and for strong overlapping of a single concave point, the vertical-linkage segmentation method is used. Complex overlapping droplets were gradually segmented by loop iteration until a single droplet was obtained or no further segmentation was possible, and then ellipse fitting was used to obtain the final single-droplet profile. Up to 105 WSPs were obtained in an orchard field through drone spraying experiments, and were used to validate the effectiveness of the method. The experimental results show that the classification model proposed in this paper achieves an average accuracy of 98% in identifying overlapping-droplet types, which effectively meets the needs of subsequent segmentation. The overall segmentation accuracy of the method is 91.35%, which is significantly better than the contour-solidity and watershed-based algorithm (76.19%) and the improved-concave-point-segmentation algorithm (68.82%). In conclusion, the method proposed in this paper provides an efficient and accurate new approach for pesticide spraying quality assessment.

1. Introduction

In UAV [1] agricultural plant protection spraying operations, the droplet deposition characteristics [2] determine the effectiveness and efficiency of plant protection spraying, and are important indicators for evaluating and optimising spraying operations. Due to the high droplet density during spraying and the influence of natural conditions, the phenomenon of sticky droplets often occurs on the crop surface [3]. The study of accurate segmentation of overlapping droplets on crop leaves was of great significance in guiding the in-depth understanding of droplet deposition distribution characteristics [4]. At present, the field detection of overlapping-droplet-deposition distribution characteristics is mainly divided into two methods: direct detection and indirect detection [5]. Although the direct detection method can directly obtain the amount of droplet deposition on the leaf, there is uncertainty in its elution effect. In contrast, indirect detection methods are favoured for their intuitive nature and wide applicability. Among them, water-sensitive test paper has become the most commonly used overlapping-droplet collector due to its advantages such as obvious colour development, easy image processing, and storage [6,7,8]. Segmentation of overlapping droplets on water-sensitive test papers is a relatively complex process, and many strategies and methods have been proposed to improve and optimize the analysis process to obtain more accurate information [9].
Currently, several methods have been developed for overlapping-object-image-segmentation techniques, mainly including the concave-point method, watershed algorithm, and morphological algorithm [10]. Table 1 provides a systematic comparison and analysis of various methods.
Morphological segmentation methods achieve overlapping-object differentiation through morphological operators. Rahman et al. [11] proposed an improved image-segmentation algorithm based on morphological reconstruction and the fuzzy C-mean algorithm, which effectively improves the segmentation time and enhances the segmentation efficiency, but shows large differences when dealing with overlapping objects with different structures. Zhang et al. [12] developed a morphology-based cell-image-segmentation algorithm, which is simple and fast and which has high segmentation accuracy for mild to moderate overlapping cells, but is less effective in dealing with complex overlapping situations. The watershed algorithm is suitable for grey-scale image segmentation with the structure of mountain peaks and valleys, but gradient transformation is required for images that do not conform to this structure. The algorithm responds well to weak edges, but it is easily affected by image noise, local irregularities, and subtle grey-scale changes on the object surface, resulting in under-segmentation and over-segmentation phenomena. Miao et al. [13] proposed a distance-transform-based marker-controlled watershed algorithm, which achieves the simultaneous segmentation of red blood cells and white blood cells in a blood smear through phased processing. The method has high accuracy, stability, and anti-interference, but there are precision errors when dealing with targets with significant size differences. Ge et al. [14] proposed an improved watershed-image-segmentation algorithm, which effectively overcomes the over-segmentation problem of overlapping targets through the droplet-type-discrimination method based on the solidity of the contour and the overlapping-droplet iterative opening operation, but it is greatly affected by the saturation of the boundaries and the change in the brightness, and the stability needs to be improved. A concave point is a characteristic point formed at the edge of an object by two or more targets due to mutual contact or overlap. Most of the overlapping objects are convex polygons, and, if overlapping occurs, concave dots are usually formed at the overlap, and the degree of overlap varies among different sizes of objects [15]. The concave-point method utilises the edge feature points formed by the overlapping of objects for segmentation. Wang et al. [16] proposed a method combining concave-point matching and morphological multi-scale open and closed reconstruction to achieve the segmentation of overlapping objects, which is able to extract the contour edge information better, and the over-segmentation rate of overlapping Goji berry images is lower, but it is only applicable to the targets with a shallow overlapping degree. Liu et al. [17] proposed a concave-point-based detection of contact pearls segmentation method, which involves establishing the mathematical model of the edge-contour-point pinch angle, introducing the concave-point-matching algorithm, and using the Euclidean distance as the metric function to achieve the segmentation of tangent pearls. The method has a good segmentation accuracy, but has not yet solved the single-concave-point-segmentation problem.
This study addresses the key issues in overlapping-droplet segmentation. When the fog droplets overlap, the boundary of the overlapping region is blurred and the morphology is variable, especially, the irregular overlap will form a complex geometric structure. Overlapping droplets often have similar grey values, texture features, and size parameters, resulting in low feature-space differentiation, and morphological and watershed segmentation methods are prone to over-segmentation or under-segmentation. Segmentation methods based on concave-point detection can determine and match the droplet-overlapping region according to different degrees of edge concavity. This method only extracts data from the image boundary without morphological operations such as dilation and erosion, thus avoiding the loss of image detail information. However, segmentation algorithms relying on concave-point matching are more sensitive to noise, especially in the case of strongly overlapping droplets with only a single concave point, and existing concave-point methods are prone to misclassification. To address the above problems, this study proposes a multi-stage overlapping-droplet segmentation method that combines an optimised XGBoost classification model with an improved concave-point-matching strategy, aiming to effectively solve the difficulties of boundary blurring and insufficient feature differentiation faced by existing segmentation methods when dealing with irregular overlapping droplets. Specifically, by integrating the advantages of machine learning and geometric analysis, the method not only efficiently handles severe overlapping cases, including strongly overlapping scenes that produce only a single dimple, but also avoids the need for morphological operations (e.g., dilation and erosion) by optimising the feature classification and enhancing the dimple-matching strategy, thus maximising the preservation of critical detail information in the image. This study experimentally validates the effectiveness of the method, demonstrates the potential of combining machine learning with geometric analysis in dealing with overlapping-droplet segmentation under complex conditions, and provides a new technological path for research and applications in related fields. The main research contributions are as follows:
(1)
An overlapping fog droplet image preprocessing method is designed to effectively reduce interfering information through high-pass filtering, grey-scale transformation, binarisation, automatic thresholding and diffuse water filling.
(2)
Determination of overlapping fog-droplet categories, based on the number of depressions and morphological features detected in overlapping fog droplets, the types of overlapping fog droplets can be classified into three main categories: strong overlapping of single depressions, parallel overlapping, and non-parallel overlapping. This classification provides a clear guiding framework for subsequent segmentation and identification.
(3)
XGBoost-based type-recognition model. A Bayesian-optimised XGBoost-based triple-classification model is constructed, which takes the fog droplet’s contour parameters as the feature input, and significantly improves the classification accuracy and robustness through hyperparameter tuning. Experimental results show that the model achieves 98% classification accuracy for more than 3000 overlapping fog drops, which effectively meets the subsequent classification requirements.
(4)
Differentiated segmentation strategy and iterative segmentation for overlapping droplets of different overlapping types. This study innovatively proposes a differentiated segmentation strategy and an iterative segmentation mechanism that significantly improve segmentation accuracy and efficiency. This targeted segmentation strategy effectively solves the segmentation problem in complex overlapping scenarios. In order to further optimise the segmentation effect, this study introduces a cyclic iterative segmentation mechanism: the initial segmentation results are analysed twice, and the residual overlapping regions are identified and segmented iteratively until independent droplets are obtained or an inseparable state is reached.
(5)
Conduct overlapping-droplet segmentation tests for verification and analysis. The experimental results show that the method can efficiently extract overlapped and contacted droplets from a single WSP image in an average of 2.66 s, which is a significant advantage over existing segmentation methods. The method not only solves the problem of low segmentation accuracy when dealing with overlapping or large overlapping droplets, but also improves the unseparation phenomenon generated when segmenting strongly overlapping droplets, and effectively restores the edges of the droplets in the overlapping region. The rest of the article is organised as follows. Section 2 of the paper describes the materials and methods, detailing the system environment and hardware configuration, image acquisition and processing, dataset production, development of a multi-classification model for overlapping droplets using XGBoost, and segmentation of overlapping-droplet images. Section 3 describes the experimental results and analyses, and tests are conducted to verify and analyse the classification and segmentation of overlapping droplets, respectively. Section 4 provides a comprehensive discussion of the experimental results. Finally, Section 5 summarises the main findings of this study and the direction of subsequent research.

2. Materials and Methods

In this study, a multi-level overlapping-fog-droplet segmentation method based on the optimised XGBoost classification model and combined with an improved-concave-point-matching algorithm is proposed. Firstly, an efficient fog-droplet-image-preprocessing method is designed to preprocess the captured original fog droplet images and extract overlapping fog droplets by the algorithm. Subsequently, the constructed triple-classification model was used to classify the overlapping fog droplets. For overlapping droplets of different overlapping types, this study innovatively proposes a differentiated segmentation strategy and an iterative segmentation mechanism to achieve accurate and effective segmentation of overlapping droplets with complex shapes. The flowchart is shown in Figure 1.

2.1. System Environment and Hardware Configuration

All the image-processing algorithms and experiments in this study were constructed and executed under the Windows 11 operating system environment, and the experimental platform was a Lenovo P720 workstation equipped with 256 GB of operating memory, an NVIDIA RTX 5000 GPU and an Intel Xeon Gold 6142 CPU (2.6 GHz). The experiments were conducted in Python 3.7 programming language and developed and debugged in PyCharm integrated development environment. In the specific implementation, this study constructs and optimises the XGBoost model based on the Scikit-learn framework, and also extracts the key information for overlapping fog droplets in the image by using the functions in the OpenCV library.

2.2. Image Acquisition and Processing

2.2.1. Image Acquisition

In this study, a systematic approach was used to collect water-sensitive test paper image data to ensure the reliability and representativeness of the experimental results. The water-sensitive test paper model 20301-1N produced by Syngenta Crop Protection AG (CH-4002, Basel, Switzerland) was used in this study, which is widely acclaimed for its stability and sensitivity in agricultural spraying applications.
In order to simulate the actual agricultural environment, a T50 agricultural drone (model: 3WWDZ-40B) from DJI Innovative Technology Ltd. (Shenzhen, China) was used for the spraying operation. This model UAV (see Table 2 for model parameters) ensures uniform and controlled exposure of water-sensitive paper during spraying. During the spraying process, in order to reduce the non-uniformity of water droplet distribution, the test was conducted in an environment with low wind speed and stable wind direction to reduce the effect of wind on water droplet distribution [18]. All WSP samples were obtained from a field trial conducted on 15 July 2024 in the commercial orchard of Beitujia, Youlan Town, Nanchang County, Nanchang, Jiangxi Province (116°4′1″ N, 28°33′45″ E). The experimental design is shown in Figure 2. Three fruit trees were selected for sampling, and a zonal sampling strategy was used to assess the spray distribution. The whole tree was divided into three classes along the height and width of the canopy, and 10 sampling points were uniformly distributed within each contour level, and the water-sensitive paper was on the sampling surface facing the direction of the UAV spray at each point, and the three fruit trees were selected with a spacing of 3–5 m. A total of 480 samples of valid WSPs were collected in the experiment. Fog-droplet-image acquisition was carried out in the laboratory using an industrial camera to image the collected WSPs samples. The industrial camera model is RER-USB16MP01-AF70, the specific model parameters are shown in Table 3, and a fixed lens was used for the image acquisition. During the image acquisition, uneven light, too strong light, or too weak light will affect the visibility of the fog droplets on the WSPs, which will affect the contrast and clarity of the image. For this reason, the equipment was used in a closed environment and equipped with an artificial light source to ensure the lative stability of light intensity and the quality of the captured images. A total of 420 images of WSPs were collected.

2.2.2. Image Preprocessing

Image preprocessing includes image denoising, image binarisation, and image hole filling. Firstly, the original WSP fog droplet image was denoised using high-pass filtering to lay the foundation for subsequent droplet extraction and segmentation. Then, in order to effectively binarise the image, automatic thresholding was performed using the maximum inter-class variance method [19]. Next, diffuse water filling was performed on the binarised image to fill the small holes and gaps in the image to make the target region more complete and coherent, as shown in Figure 3.
The above preprocessing of the overlapping-droplet image can make the edges of the overlapping droplets clearer, reduce the interference of factors such as edge blurring and noise on the overlapping-droplet detection, and make the position and shape of the overlapping droplets more accurate, thus improving the accuracy and robustness of the overlapping-droplet detection, making it suitable for more complex environments, which plays a key role in the subsequent overlapping-droplet-segmentation process.

2.3. The Production of the Dataset

For the preprocessed 420 WSP images, they are randomly divided into classification model dataset and segmentation-model test set according to the ratio of 3:1, where 315 WSP images are used for classification model training and testing, and 105 WSP images are used for segmentation testing. More than 15,000 valid overlapping droplets were successfully extracted from 315 WSP images for classification model by the algorithm and randomly divided into training set and test set according to the ratio of 4:1, and, finally, 12,000 overlapping-droplets-training-set images and more than 3000 overlapping-droplets-test-set images were obtained, which were used for the training and testing of the subsequent classification model.

2.4. Multi-Classification Model for Overlapping Fog Droplets Based on XGBoost

2.4.1. XGBoost Model

The XGBoost (Version 2.0.3) algorithm [20] (Extreme Gradient Boosting Algorithm) is a newly developed machine learning technique that has significant advantages over traditional machine learning algorithms and is able to process large amounts of data in a shorter period of time. The algorithm is robust to outliers and missing values, which helps in solving problems that may exist during real image acquisition, and is, therefore, well suited to large-scale overlapping-fog-droplet-classification tasks. The algorithm consists of two main components. 1. Decision tree ensemble: this is the core structure of the XGBoost model and consists of multiple CART decision trees. Each tree is a weak learner, integrated together to form a powerful model that can effectively improve classification accuracy. This structure is particularly suitable for dealing with complex overlapping-droplet image data, and improves the robustness and generalisation of the model by integrating the prediction results from multiple trees. 2. Objective function: the objective function of XGBoost consists of a loss function and a canonical term, which is used to guide the optimisation process of the model. The loss function [21] is responsible for measuring the prediction error of the model, while the regularisation term is used to balance the prediction accuracy and model complexity to avoid overfitting. By co-optimising these two components, XGBoost is able to efficiently process big data while maintaining high classification accuracy. In addition, the XGBoost algorithm provides rich parameter tuning options to optimise the model for different overlapping-droplet-classification scenarios according to specific needs. In conclusion, the XGBoost algorithm has become the preferred method for solving the complex overlapping-droplet-classification task due to its high efficiency, robustness, and flexible parameter tuning ability.

2.4.2. Determination of Overlapping-Droplet Categories

The idea of categorising the type of overlap proposed in this paper is mainly inspired by some of the existing literature [22,23], based on the experimental observation that when multiple overlapping fog droplets overlap with each other, almost all of the contact points show different degrees of depressions. Given that individual fog droplets usually appear circular or elliptical on test paper [24], this paper infers that depressions are bound to form whenever fog droplets are in contact with each other. Combining the number and characterisation of depressions detected in overlapping droplets, the types of overlapping droplets can be classified into three main categories (as shown in Figure 4): strong overlap of individual depressions, parallel overlap, and non-parallel overlap. The strong overlap of a single depression, i.e., the presence of only one depression in the fog droplet detection of overlapping fog droplets; this type of fog droplets mostly belong to the strong degree of overlap of the fog spot. Parallel overlapping droplets, i.e., three droplets two by two, in contact with each other; the distribution of depressions in the contact area presents triangular geometric features. Non-parallel overlapping droplets include tandem type (chain arrangement) and hybrid type (multilevel nesting), and, depending on the number of depressions, it is considered whether or not to combine with the iterative segmentation mechanism to deal with it.

2.4.3. Selection of Morphological Characteristics of Droplets

To characterize morphological differences of droplet stains on water-sensitive papers, eight morphological feature parameters were selected: area (S), aspect ratio (AR), rect. coverage (C), solidity (R), shape factor (F), circularity (Y), concavity ratio (CR), and number of concave regions (N). The mathematical definitions of the key parameters are shown in Table 4.
This enhanced feature set provides a comprehensive description of the droplet morphology through geometric, topological, and invariant descriptors. It lays the foundation for the subsequent construction of a triple classification model for strongly overlapping fog droplets with single concave points, parallel overlapping fog droplets, and non-parallel overlapping fog droplets.

2.5. Segmentation of Overlapping-Droplet-Image-Processing Method

2.5.1. Process Overview

The overlapping droplets are further subdivided into three types: single-concave-point strongly overlapping, parallel overlapping, and non-parallel overlapping. According to different types of overlap, the corresponding improved segmentation algorithms are used for accurate segmentation: for parallel overlapping droplets, the centre-of-mass segmentation method is used; for non-parallel overlapping droplets, the minimum-distance segmentation method is used; and for single-concave-point strongly overlapping, the perpendicular line segmentation method is used. Overlapping judgement was performed on the segmented droplets, and, if overlap existed, the overlapping droplets were re-segmented until a single droplet was obtained or a state was reached where no further segmentation was possible. Ellipse fitting is performed on the segmented overlapping droplets using the least squares method to estimate the complete profile of each droplet in the overlapping droplets [25]. The flowchart of the algorithm is shown in Figure 5.

2.5.2. Overlapping-Droplet-Splitting Method

In this study, a fine and efficient segmentation process for overlapping droplets is designed, which consists of six key steps: pre-segmentation, concave-point detection and concave-point segmentation, further separation of complex overlapping droplets, and ellipse fitting. In order to achieve the best segmentation results, three specialised segmentation methods have been developed for each of the three typical types of overlapping droplets mentioned above (single-concave-point strong overlap, parallel overlap, and non-parallel overlap). This differentiated segmentation strategy takes into account the characteristics and structure of each type of overlapping droplet, ensuring the accuracy and adaptability of the segmentation process.
(1)
Pre-segmentation
Pre-segmentation of the extracted overlapping droplets is achieved by separating the overlapping droplets with low degree of overlap using morphological weak corrosion [26]. Figure 6 shows the pre-segmentation process.
(2)
Concave-point detection and segmentation
After the pre-segmentation process, the detection of concave points for strongly overlapping droplets begins, and in this paper, a convex-defect-based method is used to detect the concave points [27]. Firstly, the boundary of the contour is determined by calculating the convex packet of the contour; then, the convexity defect function is used to identify the concave region between the convex packet and the contour. For each depressed region, significant dents are screened according to a preset depth threshold, and their coordinates and depression depth are recorded. This method effectively identifies significant concave points in the contour and provides an accurate characterisation for further shape analysis.
For the single-concave-point strongly overlapping droplets, the vertical connective segmentation method is used to, firstly, extract a binarised image of the strongly overlapping droplets, as shown in Figure 7a. Subsequently, concave defects and concave points are detected on this binarised image, and the results are shown in Figure 7b. In this example, only one concave defect is detected in the overlapping target, and its critical points are labelled as concave point A, as well as the start point of the concave defect, B1, and the end point, B2. Next, the points B1 and B2 are connected, and the slope of this connecting line is calculated, as shown in Figure 7c. Using this slope, a straight line is drawn across the concave point A, which intersects the droplet-edge contour at points C1 and C2, and this line is labelled L [28], as shown in Figure 7d. In order to determine the best segmentation line, all points on the edge contour on the other side of the straight line, L, are traversed. The goal is to find a particular point, D, such that the line connecting AD is perpendicular to the straight line, L, as shown in Figure 7e. The point D is found and the points A and D are connected, and this connecting line (represented by a solid black line in the figure) is the optimal demarcation line for the overlapping droplets. Through this precise geometric analysis method, the complex overlapping droplets can be effectively segmented, laying the foundation for subsequent image analysis and processing.
For the non-parallel overlapping droplets, the minimum-distance segmentation method is used, and for the non-parallel overlapping droplets with the number of concave points exceeding 1, which occupies a considerable proportion of the overlapping-droplet types, the segmentation method is significantly different from the previous two cases. Non-parallel overlapping droplets can be further subdivided into serial-overlapping and mixed-overlapping droplets, within which the segmentation of mixed-overlapping droplets is mainly based on the segmentation method of serial-overlapping droplets. The following is the optimised segmentation process:
Contour analysis. Image processing techniques are used to extract the contour of the overlapping droplets, as shown in Figure 8a.
Convex-packet calculation and concave-point detection. Using the convex-packet algorithm in computational geometry, the smallest convex polygon encircling the entire contour can be obtained, as shown in Figure 8b. Then, by comparing the original contour with its convex envelope, convex-defect regions can be identified. The vertices of these convex-defect regions are the desired concave points.
Concave-point screening and candidate concave-point selection. Not all detected concave points are meaningful, and it is necessary to screen significant concave points based on the depth of convex defects, filtering out insignificant concave points by setting appropriate depth thresholds, retaining only the concave points that have a substantial impact on segmentation, and, finally, obtaining the three concave points, i, j, and k, as shown in Figure 8c. Based on the assumption that the deepest concave point usually represents the most significant segmentation location, we iterated through all the concave points that have been screened, and used the convex-defect-depth formula to select the deepest concave point as a candidate concave point. The candidate concave point is i.
D max = max ( D i )   , i = 1 , 2 , , n
where D i denotes the depth of the ith concave point and n is the total number of concave point.
The nearest concave-point pairing and segmentation-line generation uses Euclidean distance as a metric to find the concave point with the shortest distance to the candidate concave point among the non-candidate concave points. The Euclidean distance is calculated as follows:
d = ( x 2 x 1 ) 2 + ( y 2 y 1 ) 2
where ( x 1 , y 1 ) and ( x 2 , y 2 ) are the coordinates of the two concave points, respectively.
Connecting the candidate concave point i and the found nearest concave point j forms the segmentation line of the non-parallel overlapping droplets, as shown in Figure 8d. This improved segmentation method cannot only effectively deal with complex non-parallel overlapping droplets, but can also adapt to a variety of serial and mixed overlapping cases, greatly improving the accuracy and applicability of segmentation. By combining geometric analysis and mathematical modelling, it is possible to identify and segment all kinds of complex overlapping-droplet structures more accurately.
For parallel overlapping droplets, the centre-of-mass segmentation method is used. The segmentation method of parallel overlapping droplets is different to that of other types of overlapping droplets due to their unique structural features. In closed (non-porous) parallel overlapping droplets, the overlapping portion is located inside the entire region and the number of overlapping droplets is equal to the number of recessed regions. This property makes the segmentation methods for non-parallel overlapping droplets not applicable in this case. By analysing the image characteristics of parallel overlapping droplets, a concise and effective segmentation method was found. Figure 8 shows this process in detail, where the process is as follows:
Concave-point screening (Figure 9a–c). The same principle used for screening concave points as for non-parallel overlapping droplets was used to obtain three concave points, I, J, and K, in the end. Centre-of-mass calculation (Figure 9d). In the binarised image of an overlapping droplet, the centre of the contour can be represented by the centre of mass, which can be calculated from the image moments by noting the pixel value of the overlapping droplet to be segmented. Overlapping-droplet centroid can be represented as o ( c x , c y ) , which is calculated using the formula shown below:
C x = 1 m x m , C y = 1 m y m
where m is the total number of pixels within a contour, i.e., the area of the contour, 1 m x denotes the weighted sum of x coordinates within a droplet contour, and 1 m y denotes the weighted sum of y coordinates within a droplet contour.
Segmentation-line generation. The calculated centre-of-mass point o is connected to the screened concave points I, J, and K to form an ideal segmentation line [29], as shown in Figure 9e. By this method, parallel overlapping droplets can be accurately identified and segmented, and good results can be achieved even in complex images.
(3)
Further separation of complex overlapping droplets.
For overlapping droplets with complex structures that are difficult to completely segment at one time, an iterative separation strategy is used. This method gradually refines the segmentation results through multiple cycles of processing to effectively deal with complex overlap and improve the accuracy and completeness of separation.
(4)
Ellipse fitting.
Ellipse fitting is performed on the segmented overlapping droplets using the least squares method. The aim of this step is to accurately estimate the complete contour of each individual droplet in the overlapping droplet to improve the accuracy and reliability of the subsequent analyses.

3. Results and Analysis

3.1. Overlapping-Droplet-Classification-Test Validation and Analysis

3.1.1. Bayesian Optimisation-Based Hyperparameter Optimisation

Based on the experimentally collected fog-droplet-image dataset, this study used the XGBoost algorithm to construct a triple classification model for strongly overlapping fog droplets with a single concave point, parallel overlapping fog droplets, and non-parallel overlapping fog droplets, and selected the droplet morphological features (eight dimensions) as the classification driving variables. The training and test sets were randomly divided according to the ratio of 4:1, and 12,000 overlapping-droplet training sets and more than 3000 overlapping-droplet test sets were obtained, which were used for model training and generalisation performance evaluation, respectively.
The hyperparameter system in XGBoost controls the model performance through multi-dimensions, in which the tree structure parameters (e.g., max_depth and gamma) determine the model complexity, the regularisation parameters (lambda, alpha, colsample_bytree, and subsample) inhibit overfitting, and the learning process parameters (n_estimators and learning_rate) regulate the training dynamics. Traditional hyperparameter optimisation methods such as grid search and random search suffer from low efficiency and tend to fall into local optimums, while Bayesian optimisation achieves intelligent search by constructing a probabilistic agent model: it dynamically selects the evaluation points based on a priori knowledge, which improves the sample utilisation rate while maintaining the search speed, avoids the trap of local optimums, and possesses the overfitting-resistant property. The optimal configuration of XGBoost hyperparameters is in contrast to the tuning results that are shown in Table 5, which contains the initial value, search space, and final tuning results of each hyperparameter.
The results of XGBoost-based feature-importance analysis and Bayesian iterative optimisation are shown in Figure 10: (a) for the feature-importance distribution shows that N (concave regions), S (area), and Y (circularity) are the key discriminative features (top three in terms of importance share) and (b) Bayesian optimisation explores the hyper-parameter space through 100 iterations, so that the model accuracy to 0.98, F1 score reaches 0.96, and the classification performance of the validation set is significantly improved over the baseline. The optimised model achieves the optimal configuration of key parameters such as regularisation strength and effectively mitigating overfitting.

3.1.2. Comparative Study of Ablation Before and After Model Optimization

The confusion matrix is shown in Figure 11. In this study, more than 3000 overlapping fog droplets were classified using an optimised multi-classification model with an accuracy of 98%, which effectively meets the need for subsequent segmentation. This approach not only improves the classification performance of the model, but also proves its feasibility and effectiveness in practical application scenarios.
Accuracy, precision, recall, and F1 score are used as the evaluation indexes of the classification model to analyse the performance comparison of the model before and after Bayesian optimisation of the tuning parameters, as shown in Figure 12. The accuracy, precision, recall, and F1 score of the model are significantly enhanced by Bayesian optimisation of the hyperparameters, which comprehensively enhances the classification performance.

3.2. Overlapping-Droplet-Segmentation-Test Validation and Analysis

In order to verify the effectiveness of the proposed segmentation method, we compared it with existing state-of-the-art methods in the field of fog droplet segmentation, which are based on contour solidity and watershed algorithms [30,31] and improved-concave-point-segmentation algorithms [32,33]. Figure 13 shows the segmentation and extraction results of overlapping droplets by different methods. The results show that the contour-based solidity and watershed algorithm can effectively improve the relative error of the traditional distance-transform-watershed-segmentation algorithm and reduce the phenomenon of over-segmentation, but it is difficult to correctly deal with severely overlapping fog droplets, and it still causes damage to the key details of the image information, and the integrity of the image cannot be guaranteed. The existing concave-point-segmentation algorithm is better for ensuring the integrity of the fog droplet image, and the segmentation of the fog droplets with a lesser degree of overlap is good, but it is not effective in dealing with multiple overlapping droplets, and it is almost impossible to segment the strongly overlapping droplets that contain only one concave point.
For single concave strongly overlapping and parallel overlapping droplets, both algorithms have difficulty in finding accurate segmentation points, and the problem of inability to segment or inaccurate segmentation occurs. Even for parallel overlapping droplets with obvious concave features, the improved concave-point algorithm can segment correctly in some cases, but the extracted contour accuracy is not high. In the case of non-parallel overlapping, the two methods perform relatively well. The contour solidity and watershed-based algorithm is suitable for processing droplets with low overlap. However, it is still difficult to generate heavily overlapping segmentation points. The accuracy of the improved-concave-point-segmentation algorithm is improved, but the concave-point-detection accuracy is low and it is difficult to cope with complex overlapping situations.
The main limitations of the algorithm are:
(1)
it ignores multiple forms of overlap and is only applicable to the case of mild overlapping;
(2)
it is easy to make a mistake in the selection of candidate concave points for multiple overlapping droplets, which leads to segmentation errors.
In contrast, the method proposed in this paper has the best performance in terms of the segmentation of various types of overlapping droplets. It can accurately define the boundaries of droplets, and can accurately extract the complete contours of multiple overlapping droplets by ellipse fitting in the subsequent steps, which significantly reduces the phenomena of over-segmentation and under-segmentation, and effectively recovers the droplet edges in the overlapping regions.
Based on the segmentation method proposed in this paper, we tested the overlapping water droplet segmentation on 105 water-sensitive test paper images collected in the orchard, and compared and analysed the segmentation results with those of manual calibration. As shown in Figure 14, by comparing and verifying the segmentation results of manual calibration, the method in this paper is highly consistent with the manual calibration results in terms of the segmentation accuracy of overlapping droplets and the generation effect of segmentation lines, which indicates that the method has an excellent and accurate segmentation capability for overlapping water droplet images. Specifically, the method in this paper is able to accurately segment overlapping droplets into independent units, and its segmentation boundaries are almost completely consistent with the manual calibration results. This high degree of consistency is not only reflected in the number of segmented droplets, but also in the accuracy of the segmentation line.
In order to quantitatively assess the performance of overlapping-droplet separation, we used the following four key metrics: segmentation error rate S1 and segmentation accuracy S2 for specific overlap types, overall average segmentation accuracy, and average segmentation time for a single WSP image. These metrics are used to construct a complete segmentation algorithm performance evaluation system from three dimensions: segmentation accuracy, global performance, and computational efficiency. The calculation formula is as follows.
S 1 = T u i + T e i T 0 i × 100 %
S 2 = T ci T 0 i × 100 %
S 2 ¯ = T c T 0 × 100 %
T 0 i —Number of actual overlapping fog droplets of a certain type in the image.
T u i Number of overlapping droplets of a type not adequately segmented in the image.
T e i Number of over-segmented and mis-segmented overlapping fog droplets of a certain type in the image.
T c i Number of overlapping fog droplets of a certain type correctly segmented in the image.
T 0 Total number of actual overlapping droplets in the image.
T c Total number of correctly segmented overlapping fog droplets in the image.
Based on different segmentation methods, the segmentation performance of different types of overlapping fog droplet images was comprehensively evaluated, including the segmentation error rate (S1), the segmentation accuracy rate (S2), the overall average segmentation accuracy rate ( S 2 ¯ ), and the average segmentation time of a single WSP image. The statistical results of the performance metrics of each method are detailed in Table 6.
As can be seen from Table 6, the method in this paper shows significant advantages in the task of single-concave-point strongly overlapping-fog-droplet segmentation. Specifically, the segmentation error rate of this paper’s method is only 7.32%, which is 30.13 percentage points lower than that of the contour-fixation and watershed-based algorithm, while the segmentation error rate of the existing improved-concave-point segmentation method is up to 95% or more, which indicates that it is the worst for this type of overlapping-droplet segmentation. In terms of segmentation accuracy, the method in this paper also performs well. For single-concave-point strongly overlapping droplets, its segmentation accuracy is more than 90%, while in the segmentation task of non-parallel overlapping droplets, which accounts for a larger proportion of overlapping droplets, the segmentation error rate is only 8.57%, which is significantly lower than the other two methods. In addition, the segmentation accuracy of this paper’s method is more than 91%, while the segmentation accuracy based on the contour solidity and watershed algorithm and the improved-concave-point segmentation method are 89.83% and 76.19%, respectively. Even in the segmentation of parallel overlapping droplets, the segmentation accuracy of this paper’s method is better than the other two methods, showing stronger performance.
In terms of overall performance, the overall average segmentation accuracy of this paper’s method reaches 91.35%, which is 15.16 and 22.53 percentage points higher than that of the contour solidity and watershed-based algorithm and the improved-concave-point segmentation method, respectively. This result indicates that the method in this paper has a significant advantage in segmentation accuracy, and its performance is significantly better than the existing segmentation methods. In terms of segmentation time, the method in this paper also performs well. Compared with the algorithm based on contour solidity and watershed, the segmentation time of overlapping droplets on each water-sensitive test paper is shortened by 1.26 s on average, which shows a higher processing efficiency. Although the segmentation time of this paper’s method is slightly increased (by 0.33 s) compared to existing concave-point-matching algorithms, this small time difference has a negligible impact on the overall efficiency and performance.
In summary, the method in this paper significantly outperforms the existing advanced segmentation methods in the field of fog droplets in terms of segmentation accuracy, efficiency, and robustness, and provides an efficient and reliable solution for the task of overlapping fog droplet segmentation.

4. Discussion

In this study, an innovative multi-stage overlapping-fog-droplet segmentation method is proposed, which significantly improves the segmentation accuracy by fusing an optimised XGBoost classification model with an improved concave-point-matching strategy. Specifically, for different types of overlapping droplets, the method in this paper adopts a customised segmentation technique, which effectively solves the problem of the lack of accuracy faced by existing segmentation methods when dealing with complex overlapping droplets. Experimental results show that the method in this paper performs well in terms of the accurate segmentation of overlapping fog droplet images. Compared with the advanced watershed algorithm, the method in this paper not only significantly improves the segmentation accuracy in handling overlapping or large overlapping droplets, but also avoids the destruction of critical detail information in the image by morphological operations (e.g., dilation and erosion) by optimising the feature classification and enhancing the concave-point-matching strategy. This innovative design maximises the preservation of image integrity while significantly improving the prevalence of unseparation in existing concave-point-segmentation algorithms when dealing with single concave points of strongly overlapping fog droplets. In addition, the method in this paper further improves the robustness and adaptability of segmentation through a multi-stage segmentation process, which provides reliable technical support for high-precision segmentation of complex overlapping fog droplets. The results validate the comprehensive advantages of this paper’s method in preserving image details, improving segmentation accuracy, and optimising processing efficiency. However, the segmentation method proposed in this paper still has certain limitations. (1) For the overlapping droplet without concave features, the segmentation and extraction accuracy of this method still needs to be improved. (2) When dealing with extreme cases such as a small number of unconventional shaped droplets, due to the complexity of their boundaries and contours, this method is prone to false concave detection, which may lead to incorrect segmentation and affect the overall effect. (3) This method is optimised in an indoor experimental environment (uniform lighting and simple background), so its segmentation effect may be affected under uncontrolled conditions.

5. Conclusions

In this paper, we propose a multi-level overlapping-droplet segmentation method based on the optimised XGBoost classification model and combined with improved concave-point matching, which adopts different segmentation methods for different types of overlapping droplets by identifying the overlapping droplets after segmentation, separating the complex overlapping droplets step-by-step until we obtain the single droplet or to a state that cannot be continued to be segmented, and, finally, obtaining the final single droplet contour of the overlapping region through ellipse fitting. The final single droplet contour is obtained by ellipse fitting to achieve cyclic iterative segmentation. Through this multi-level iterative optimisation method, accurate and effective segmentation of overlapping droplets with complex shapes is achieved, which improves the segmentation accuracy and efficiency and can be adapted to various complex overlapping situations. Experimental results show that the overall segmentation accuracy of this method is 91.35%, which is significantly better than that of the contour solidity and watershed-based algorithm (76.19%) and the existing improved-concave-point-matching algorithm (68.82%). The average time consumed for segmenting overlapping water droplets on each WSP is within 2.66 s, which is a reasonably high processing speed. Compared with several existing state-of-the-art methods, this method has significant advantages, which not only effectively solves the problem of the low segmentation accuracy of the contour solidity and watershed-based algorithm when dealing with overlapping or large overlapping droplets, but also greatly improves the non-segmentation phenomenon of the existing optimised concave matching algorithms when segmenting strongly overlapping droplets with a single concave point. The proposed overlapping-droplet segmentation method shows great potential for application in the field of agricultural pre-cut image detection and analysis, and can significantly improve the extraction accuracy and efficiency of overlapping droplets with different overlapping shapes. In the subsequent study, we can set the segmentation line to be closer to the actual target contour by considering the change in image gradient in the overlapping region. Secondly, the ellipse fitting error of overlapping droplets is calculated to judge the concave-point attribution so as to accurately extract the contours of individual droplets in the overlapping region. Finally, the algorithm can be considered to be further optimised in complex scenarios (e.g., dynamic lighting and strong wind disturbance) by combining with deep learning techniques [34] to improve its robustness and adaptability.
The method is not only valuable in the field of agriculture, but can also be widely used in other fields, such as medical and industrial. In the medical field, the method can be used for biological-tissue segmentation to help identify and separate regions of cells or tissues that overlap with each other, which is crucial for analysing the boundaries between tumours and normal tissues. In the manufacturing industry, the proposed technique can be used to detect and identify defective areas on product surfaces caused by dirt, grease, etc. By accurately identifying these areas, the accuracy of quality control can be greatly improved.

Author Contributions

Conceptualization, D.L. and X.C.; data curation, D.L., X.C., P.F. and M.L.; formal analysis, X.C., M.L., Y.Z., P.F., J.L. and X.W.; funding acquisition, P.F. and X.C.; methodology, D.L., X.C. and P.F.; project administration, P.F. and X.C.; supervision, P.F. and M.L.; visualization, D.L. and P.F.; writing—original draft, D.L., X.C., M.L., Z.L., P.F., J.L. and X.W.; and writing—review and editing, X.C., D.L. and P.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Key R&D Program of China (grant number 2022YFD1600600).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Acknowledgments

We are thankful to Jinyang Jiang, Jialong Li, Qiang Lin, who have contributed to our data collection.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Romano, E.; Brambilla, M.; Chianucci, F.; Tattoni, C.; Puletti, N.; Chirici, G.; Travaglini, D.; Giannetti, F. Estimation of canopy and stand structure in hybrid poplar plantations from multispectral UAV images. Ann. For. Res. 2024, 67, 143–154. [Google Scholar] [CrossRef]
  2. Liao, J.; Zang, Y.; Zhou, Z.; Luo, X. Quality Evaluation Method and Optimization of Operating Parameters in Crop Aerial Spraying Technology. J. Agric. Eng. 2015, 31, 38–46. [Google Scholar] [CrossRef]
  3. Lan, Y.; Shan, C.; Wang, Q.; Liu, Q.; Yang, C.; Xie, Y.; Wang, G. Effects of Different Spray Additives on Droplet Deposition Characteristics during Plant Protection UAV Spraying Operations. J. Agric. Eng. 2021, 37, 31–38. [Google Scholar] [CrossRef]
  4. Cerruto, E.; Manetto, G.; Privitera, S.; Papa, R.; Longo, D. Effect of Image Segmentation Thresholding on Droplet Size Measurement. Agronomy 2022, 12, 1677. [Google Scholar] [CrossRef]
  5. Guo, N.; Liu, S.; Xu, H.; Tian, S.; Li, T. Improvement on Image Detection Algorithm of Droplets Deposition Characteristics. J. Agric. Eng. 2018, 34, 176–182. [Google Scholar] [CrossRef]
  6. Nahiyoon, S.; Ren, Z.; Wei, P.; Li, X.; Li, X.; Xu, J.; Yan, X.; Yuan, H. Recent Development Trends in Plant Protection UAVs: A Journey from Conventional Practices to Cutting-Edge Technologies—A Comprehensive Review. Drones 2024, 8, 457. [Google Scholar] [CrossRef]
  7. Tadić, V.; Radočaj, D.; Jurišić, M. Machine Learning Methods for Evaluation of Technical Factors of Spraying in Permanent Plantations. Agronomy 2024, 14, 1977. [Google Scholar] [CrossRef]
  8. Zheng, Q.; Wu, J. Humidity Resistance Test System for Spray Droplet Density and Size Based on NO2 Color Reaction. J. Agric. Eng. 2015, 31, 107–112. [Google Scholar] [CrossRef]
  9. Emanuele, C.; Giuseppe, M.; Domenico, L.; Sabina, F.; Rita, P. A model to Estimate the Spray Deposit by Simulated Water Sensitive Papers. Crop Prot. 2019, 124, 104861. [Google Scholar] [CrossRef]
  10. He, L.; Wang, S.; Guo, Y. DE-XRT Coal Preparation Image Overlapping and Overlapping Particle Segmentation Method. Physicochem. Probl. Miner. Process. 2022, 58, 155840. [Google Scholar] [CrossRef]
  11. Rahman, T.; Islam, M.S. Image Segmentation Based on Fuzzy C Means Clustering Algorithm and Morphological Reconstruction. In Proceedings of the International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD), Dhaka, Bangladesh, 27–28 February 2021; pp. 259–263. [Google Scholar]
  12. Zhang, F.; Wu, Y.; Xu, M.; Liu, S.; Peng, C.; Gao, Z. A Morphological Image Segmentation Algorithm forCircular Overlapping Cells. Intell. Autom. Soft Comput. 2022, 32, 301–321. [Google Scholar] [CrossRef]
  13. Miao, H.; Xiao, C. Simultaneous Segmentation of Leukocyte and Erythrocyte in Microscopic Images Using a Marker-Controlled Watershed Algorithm. Comput. Math. Methods Med. 2018, 2018, 7235795. [Google Scholar] [CrossRef] [PubMed]
  14. Ge, X.; Lu, J.; Cao, D.; Jin, T. Image segmentation of adhesive droplets based on contour solidness and watershed algorithm on leaves. J. Chin. Agric. Mech. 2023, 44, 182–191. [Google Scholar] [CrossRef]
  15. Gao, S.; Wang, G.; Zhou, Y.; Wang, M.; Yang, D.; Yuan, H.; Yan, X. Water-Soluble Food Dye of Allura Red as a Tracer to Determine the Spray Deposition of Pesticide on Target Crops. Pest Manag. Sci. 2019, 75, 2592–2597. [Google Scholar] [CrossRef]
  16. Wang, X.; Yao, L.; Wen, H.; Zhao, J. Wolfberry Image Segmentation Based on Morphological Multi-scale Reconstruction and Concave Points Matching. J. Agric. Eng. 2018, 34, 212–218. [Google Scholar] [CrossRef]
  17. Liu, X.; Jin, S.; Yang, Z.; Krolczyk, G.; Li, Z. Measuring Shape Parameters of Pearls in Batches Using Machine Vision: A Case Study. Micromachines 2022, 13, 546. [Google Scholar] [CrossRef]
  18. Memos, V.; Psannis, K. UAV-Based Smart Surveillance System over a Wireless Sensor Network. IEEE Commun. Stand. Mag. 2022, 5, 68–73. [Google Scholar] [CrossRef]
  19. Liu, Q.; Qi, Q.; Li, N. Federated Opposite Learning Based Arithmetic Optimization Algorithm for Image Segmentation Using Multilevel Thresholding. In Proceedings of the 2023 26th International Conference on Computer Supported Cooperative Work in Design (CSCWD), Rio de Janeiro, Brazil, 24–26 May 2023; pp. 1257–1262. [Google Scholar]
  20. Ogunleye, A.; Wang, Q. XGBoost Model for Chronic Kidney Disease Diagnosis. IEEE/ACM Trans. Oncomputational Biol. Bioinform. 2020, 17, 2131–2140. [Google Scholar] [CrossRef]
  21. Maideen, A.K.; Basha, S.M.N.; Basha, V.A. Effective Utilisation of AI to Improve Global Warming Mitigation Strategies through Predictive Climate Modelling. Int. J. Data Inform. Intell. Comput. 2024, 3, 43–52. [Google Scholar] [CrossRef]
  22. Liu, T.; Chen, W.; Wang, Y.; Wu, W.; Sun, C.; Ding, J.; Guo, W. Rice and Wheat Grain Counting Method and Software Development Based on Android System. Comput. Electron. Agric. 2017, 141, 302–309. [Google Scholar] [CrossRef]
  23. Lu, M.; Xiong, Y.; Li, K.; Liu, L.; Yan, L.; Ding, Y.; Lin, X.; Yang, X.; Shen, M. An Automatic Splitting Method for the Adhesive Piglets’ Gray Scale Image Based on the Ellipse Shape Feature. Comput. Electron. Agric. 2016, 120, 53–62. [Google Scholar] [CrossRef]
  24. Xun, L.; Gil, E. A Novel Methodology for Water-Sensitive Papers Analysis Focusing on the Segmentationof Overlapping Droplets to Better Characterize Deposition Pattern. Crop Prot. 2024, 176, 106492. [Google Scholar] [CrossRef]
  25. Bai, X.; Sun, C.; Zhou, F. Splitting Touching Cells Based on Concave Points and Ellipse Fitting. Pattern Recognit. 2009, 42, 2434–2446. [Google Scholar] [CrossRef]
  26. Yue, S.; Lu, J.; Cao, D.; Zhou, J. Detection of Plant Leaf Deposition Parameters Based on Watershed Algorithm. Jiangsu Agric. Sci. 2024, 52, 217–224. [Google Scholar] [CrossRef]
  27. Zhang, Z. Concave Point Segmentation Algorithm Based on Convex Defect for Adhesive Raindrops. Adv. Int. Comput. Sci. 2022, 2, 9–16. [Google Scholar] [CrossRef]
  28. He, L.; Wang, S.; Guo, Y.; Cheng, G.; Hu, K.; Zhao, Y.; Wang, X. Multi-Scale Coal and Gangue Dual-Energy X-ray Image Concave Point Detection and Segmentation Algorithm. Measuremen 2022, 196, 111041. [Google Scholar] [CrossRef]
  29. Zafari, S.; Murashkina, M.; Eerola, T.; Sampo, J.; Kälviäinen, H.; Haario, H. Resolving Overlapping Convex Objects in Silhouette Images by Concavity Analysis and Gaussian Process. J. Vis. Commun. Image Represent. 2020, 73, 102962. [Google Scholar] [CrossRef]
  30. Wu, Y.; Qi, L.; Zhang, Y.; Cheng, Z.; Cheng, Y.; Yang, Z. Optimized Method of Improved Characteristics Judgment and Separation Counting for Adhesive Droplets. J. Agric. Mach. 2017, 48, 220–227. [Google Scholar] [CrossRef]
  31. Zhu, D.; Liu, H.; Zhu, Y. Airspace Real-time Flow Monitoring Based on Improved Watershed Algorithm. Comput. Digit. Eng. 2022, 50, 1444–1448+1551. [Google Scholar] [CrossRef]
  32. Yang, L.; Qin, H. Research on Corn Ears Overlapping Image Segmentation Algorithm Based on Concave Point Detection. J. Hangzhou Dianzi Univ. (Nat. Sci.) 2022, 42, 42–48+63. [Google Scholar] [CrossRef]
  33. Xi, X.; Zhao, J.; Shi, Y.; Qu, J.; Gan, H.; Zhang, R. Online Detection Method for Wheat Seeding Distribution Based on Improved Concave Point Segmentation. J. Agric. Mach. 2015, 31, 38–46. [Google Scholar] [CrossRef]
  34. Thangarasu, N.; Network, G.A. Deep Learning Algorithms and Their Relevance: A Review. Int. J. Data Inform. Intell. Comput. 2023, 2, 1–10. [Google Scholar] [CrossRef]
Figure 1. Overall flow chart.
Figure 1. Overall flow chart.
Applsci 15 02847 g001
Figure 2. Test sample collection. The UAV was operated at a flight speed of 3–5 m/s and at a flight height of 1.5–3 m above the crop canopy. WSPs were placed on the leaves, and WSPs were placed on the sampling plane facing the direction of the UAV spray at each point.
Figure 2. Test sample collection. The UAV was operated at a flight speed of 3–5 m/s and at a flight height of 1.5–3 m above the crop canopy. WSPs were placed on the leaves, and WSPs were placed on the sampling plane facing the direction of the UAV spray at each point.
Applsci 15 02847 g002
Figure 3. WSP image preprocessing: (a) was the original WSP’s image captured from the orchard and (b) was the denoising, binarisation, and filling of the original WSP’s image.
Figure 3. WSP image preprocessing: (a) was the original WSP’s image captured from the orchard and (b) was the denoising, binarisation, and filling of the original WSP’s image.
Applsci 15 02847 g003
Figure 4. Schematic diagram of droplet overlapping types. (a) shows a single concave strongly overlapping droplet (SC), (b) shows a parallel overlapping droplet (PA), and (c) shows a non-parallel overlapping droplet (NP).
Figure 4. Schematic diagram of droplet overlapping types. (a) shows a single concave strongly overlapping droplet (SC), (b) shows a parallel overlapping droplet (PA), and (c) shows a non-parallel overlapping droplet (NP).
Applsci 15 02847 g004
Figure 5. Overlapping-droplet-splitting flow chart.
Figure 5. Overlapping-droplet-splitting flow chart.
Applsci 15 02847 g005
Figure 6. Pre-segmentation of overlapping images.
Figure 6. Pre-segmentation of overlapping images.
Applsci 15 02847 g006
Figure 7. Segmentation of strongly overlapping droplets in a single concave point. Where (a) is Binary Image Extraction; (b) shows Concave Defect Detection& Key Points Localization; (c) shows Key Points Connection & Slope Calculation; (d) shows Baseline L Generation & Intersection Detection; (e) is Perpendicular Segmentation Line AD Identification.
Figure 7. Segmentation of strongly overlapping droplets in a single concave point. Where (a) is Binary Image Extraction; (b) shows Concave Defect Detection& Key Points Localization; (c) shows Key Points Connection & Slope Calculation; (d) shows Baseline L Generation & Intersection Detection; (e) is Perpendicular Segmentation Line AD Identification.
Applsci 15 02847 g007
Figure 8. Segmentation process for non-parallel overlapping droplet. Where (a) is Binary Image Extraction; (b) shows Convex Hull Construction; (c) shows Concave Points Filtering & Candidate Selection; (d) shows Non-Parallel Segmentation Line Generation.
Figure 8. Segmentation process for non-parallel overlapping droplet. Where (a) is Binary Image Extraction; (b) shows Convex Hull Construction; (c) shows Concave Points Filtering & Candidate Selection; (d) shows Non-Parallel Segmentation Line Generation.
Applsci 15 02847 g008
Figure 9. Segmentation process for parallel overlapping droplets. Where (a) is Binary Image Extraction; (b) shows Convex Hull Construction; (c) shows Concave Points Detection; (d) shows Centre of mass calculation; (e) is Parallel Segmentation Line Generation.
Figure 9. Segmentation process for parallel overlapping droplets. Where (a) is Binary Image Extraction; (b) shows Convex Hull Construction; (c) shows Concave Points Detection; (d) shows Centre of mass calculation; (e) is Parallel Segmentation Line Generation.
Applsci 15 02847 g009
Figure 10. Feature Analysis and Optimization Algorithm Performance Evaluation. (a) Feature Importance Ranking (XGBoost-based); (b) Bayesian Iterative Optimization Process.
Figure 10. Feature Analysis and Optimization Algorithm Performance Evaluation. (a) Feature Importance Ranking (XGBoost-based); (b) Bayesian Iterative Optimization Process.
Applsci 15 02847 g010
Figure 11. Confusion matrix based on improved XGBoost experimental results.
Figure 11. Confusion matrix based on improved XGBoost experimental results.
Applsci 15 02847 g011
Figure 12. Changes in performance metrics of XGBoost model before and after optimisation.
Figure 12. Changes in performance metrics of XGBoost model before and after optimisation.
Applsci 15 02847 g012
Figure 13. Segmentation effect of different types of overlapping droplets. Where (a) is the original overlapping droplet on WSP; (b) shows the segmentation results of the proposed method in this paper; (c) presents the result of segmentation based on contour solidity and watershed algorithm; and (d) shows the segmentation results using the classic concave-point-matching algorithm.
Figure 13. Segmentation effect of different types of overlapping droplets. Where (a) is the original overlapping droplet on WSP; (b) shows the segmentation results of the proposed method in this paper; (c) presents the result of segmentation based on contour solidity and watershed algorithm; and (d) shows the segmentation results using the classic concave-point-matching algorithm.
Applsci 15 02847 g013
Figure 14. Single WSP overlapping-droplet segmentation results. Where (a) is the original overlapping-droplet layer extracted from the sample and (b) shows the segmentation results of the manual calibration.
Figure 14. Single WSP overlapping-droplet segmentation results. Where (a) is the original overlapping-droplet layer extracted from the sample and (b) shows the segmentation results of the manual calibration.
Applsci 15 02847 g014
Table 1. Overview of different overlapping target detection methods.
Table 1. Overview of different overlapping target detection methods.
MethodsKey InstrumentsAdvantagesLimitationsSamplesAccuracy
MorphologyMorphological optimisationSimple, quick and able to manage mild or moderate overlapUnable to segment
severely overlap
Cell images92.4%
morphological reconstruction, fuzzy C means algorithmSplit times have improvedWide variation in segmentation across structuresCluster Images_
watersheddistance transformation, watershed algorithmAccuracy, stability and resistance to interferenceFor large size differences and large target errorsBlood Cell Images94.80
Contour solidity, watershed algorithmRobust and better at overcoming over-segmentationVulnerable to changes in border saturation and brightnessoverlapping fog droplets94.74
concave point matchingmulti-scale opening and closing reconstruction, concave points matchingBetter contour edge information, lower over-segmentation rateFor images with light overlapGoji Berry Images96%
Table 2. 3WWDZ-40B model plant protection UAV product parameters.
Table 2. 3WWDZ-40B model plant protection UAV product parameters.
ItemParameter
Total Weight40 KG
Overall Dimensions2800 × 3085 × 820 mm
Number of Nozzles4
Spraying Width8 m
Maximum Chemical Capacity40 L
Operating Speed0–5 m/s
Operating Height1.5–3.5 m
Table 3. Model RER-USB16MP01-AF70 Camera Product Parameters.
Table 3. Model RER-USB16MP01-AF70 Camera Product Parameters.
SpecificationsParameter
SensorSony IMX298
Sensor Size1/2.8 inch
Pixel Size1.12 um
Image Area6.4 mm × 5.3 mm
Maximum Effective Pixels4656(H) × 3496(V)
Lens Parameters3.5 mm lens, 70° distortion-free
Output Image FormaMJPEG/YUV2 (YUYV)
Table 4. Morphological feature definitions.
Table 4. Morphological feature definitions.
FeatureSymbolFormulaDescription
AreaS i = 1 n j = 1 m f ( i , j ) Pixel count within droplet contour
Aspect ratioAR W / L MBR width-to-length ratio
Rect. coverageC S / S Z Area fraction relative to MBR
SolidityR S / S o Convex hull area ratio
Shape factorF 4 π S / L p 2 Perimeter-normalized compactness
CircularityY S / π D m a x 2 Radial uniformity metric
Concavity ratioCR L p / L c o n v e x Perimeter concavity metric
Concave regionsN N c Discrete concave contour segments
MBR: Minimum bounding rectangle; L p : p e r i m e t e r ; and D m a x : maximum centroid distance.
Table 5. Adjustment of model hyperparameters.
Table 5. Adjustment of model hyperparameters.
HyperparametersInitial ValueSearch SpaceTuning Results
colsample_bytree0.9[0.4, 1.0]0.5353
n_estimators100[1, 70, 150]123
learning_rate0.1[0.005, 0.3]0.0896
gamma3.8[0, 8]0.0776
max_depth6[2, 15, 1]11
alpha0[0, 5]0.3580
lambda1[0, 5]3.8116
subsample0.9[0.4, 1.0]0.6297
Table 6. Evaluation performance of overlapping-droplet segmentation under different methods.
Table 6. Evaluation performance of overlapping-droplet segmentation under different methods.
Segmentation MethodType of OverlapS1/%S2/% S 2 ¯ /% Average Time/s
Method of this paperSC7.3292.6891.352.66
NP8.5791.43
PA13.3386.67
Based on contour solidity with watershed algorithmSC37.4562.5576.193.92
NP10.1789.83
PA49.8350.17
Improved concave point matchingSC95.124.8868.822.33
NP23.8176.19
PA38.7761.23
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

Liao, D.; Chen, X.; Liu, M.; Zhou, Y.; Fang, P.; Lin, J.; Liu, Z.; Wang, X. Automatic Identification and Segmentation of Overlapping Fog Droplets Using XGBoost and Image Segmentation. Appl. Sci. 2025, 15, 2847. https://doi.org/10.3390/app15052847

AMA Style

Liao D, Chen X, Liu M, Zhou Y, Fang P, Lin J, Liu Z, Wang X. Automatic Identification and Segmentation of Overlapping Fog Droplets Using XGBoost and Image Segmentation. Applied Sciences. 2025; 15(5):2847. https://doi.org/10.3390/app15052847

Chicago/Turabian Style

Liao, Dongde, Xiongfei Chen, Muhua Liu, Yihan Zhou, Peng Fang, Jinlong Lin, Zhaopeng Liu, and Xiao Wang. 2025. "Automatic Identification and Segmentation of Overlapping Fog Droplets Using XGBoost and Image Segmentation" Applied Sciences 15, no. 5: 2847. https://doi.org/10.3390/app15052847

APA Style

Liao, D., Chen, X., Liu, M., Zhou, Y., Fang, P., Lin, J., Liu, Z., & Wang, X. (2025). Automatic Identification and Segmentation of Overlapping Fog Droplets Using XGBoost and Image Segmentation. Applied Sciences, 15(5), 2847. https://doi.org/10.3390/app15052847

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