## 3 Discussion  
Images of plants acquired from environments with varying conditions present daunting tasks for accurate segmentation of the foreground and background. This is due to conditions such as illumination variability and different coloration of plant leaves resulting from factors such as nutrient deficiencies. These challenges are particularly predominant in field-based images, where there exist other complex situations, such as cluttered backgrounds and leaf occlusion, resulting in the underestimation of vegetation pixels within the images. While color-index-based segmentation is a widely used low-level pixel feature for images with uniform background and contrast, it is not effective for images with complex backgrounds or canopies with non-uniform color distribution. In this study, the color-index methods failed to adequately segment vegetation, resulting in multiple fragments of the plants due to color disparities. However, ExGR demonstrated good segmentation quality for images taken from the glasshouse and field compared to ExG. This is in agreement with [PERSON] et al. [26] and [PERSON] and [PERSON] [7], who found that ExGR and combinations of other color indices produce improved segmentation quality compared to the ExG method. A single-layer MLP network was proposed that takes in annotated and color-transformed pixels and outputs binary classified pixels. The annotation covered all plant growth stages to ensure that the model effectively learns different scenarios of plant color characteristics, such as yellow-to-brown color due to nitrogen deficiency and deep green color from healthy plant leaves. The MLP model with a high training and testing accuracy produced quality segmented images with reduced noise levels. In a similar study, [PERSON] et al. [27] used an artificial neural network (ANN) trained with wavelet texture features to achieve a 96% accuracy in discriminating weeds from sugar beets in the field. This supports the idea that neural networks such as MLP and ANN can successfully segment plant images when trained with the right phenotypic traits. The results show that the proposed MLP segmentation model is robust, achieving a high segmentation accuracy when used on plants from different environment scenarios and with complex leaf architecture and occlusion. Furthermore, the feature selection technique employed improved the robustness of the model by reducing the processing time and ensuring that the model was trained on only sensitive and non-redundant features. With a reduced number of training features, the MLP processing time was reduced by 62.8%, whilst the SVM and RF processing time was reduced by 49.1% and 57.4%, respectively. This is important in real-time processing, where high computational speed is required for the batch processing of images. Although the proposed method by [PERSON] [3] successfully segmented plant vegetation from cluttered backgrounds, the large-features dataset used for model training presented a computational challenge. Unlike the proposed method, a high-powered computer memory is required to implement such segmentation techniques for the automated processing of images. Furthermore, although deep learning networks such as convolution neural networks (CNNs) have been successful in plant segmentation [23; 24; 25; 26; 27; 28], they require large datasets to train and validate the model to ensure better performance. However, in this study, only a small dataset (less than 10% of the total dataset) was used to train the neural network for segmentation. Moreover, due to the fast nature and less training data requirement of the proposed method, it can easily be deployed on edge devices such as mobile phones, Raspberry Pi, and other devices as compared to CNN-based segmentation models. Generally, ML-based methods have been successful in segmenting plant vegetation from complex environments under varying illumination conditions compared to color-index-based methods.