## 1 Introduction
They implemented and validated their algorithm with a new software tool called ACPS (Automatic Plant and Soil Classification) and claimed that the algorithm could be used in mobile applications and portable controllers that are currently being developed. [PERSON] et al. [20] proposed an algorithm based on mathematical morphology and pixel classification for grape berry counting. Features were extracted using a supervised approach. Eighteen images of seven individual varieties were obtained using a low-cost cell phone camera. The results implied that the ANN method performed better than the support vector machine (SVM) with recall and precision values of 0.9572 and 0.8705, respectively. [PERSON] and [PERSON] [21] presented a deep-learning based fruit detector for harvesting. The developed framework includes an auto label generation module and a deep learning-based fruit detector named \"LedNet\". LedNet used multi-scale pyramid and clustering classifier to improve model recognition performance. LedNet achieved recall and precision of 0.821 and 0.853 in apple detection and the inference time was 28 ms.  
[PERSON] et al. [22] identified guava fruit in outdoor conditions. It is very important to pick the fruit without colliding with its mother branch. Thus, they evaluated the estimation of fruit using the low-cost red-green-blue-depth method. Based on the fruit binary image and RGB-D depth, Euclidean clustering was applied to group the point cloud into a set of individuals. Next, a 3D linear multi-segment detection method was developed to reconstruct the branches. Finally, the 3D position of the fruit was estimated using its center position and nearest branch information. Results showed that the accuracy of guava detection was 0.983. The run time of algorithm was 0.565 s.  
Estimating nitrogen content in wheat plant is a very crucial task in the application of precision farming. For this reason, [PERSON]. [23; 24; 25] presented a method for predicting nitrogen content in wheat plant. Their methods were based on a segmentation algorithm that was trained in three light intensities for separating wheat plants from the background. Since light intensity changes during the day, training the segmentation algorithm based on only three light intensities can be a weakness for the segmentation algorithm. As observed, different researchers have focused on segmentation as an important step in designing a different machine vision. In fact, the performance of each machine vision system has a direct relation with the segmentation accuracy. Most segmentation algorithms work based on high quality images. This is the first problem for machine vision systems that work in natural garden conditions, since these methods are not applicable for operations where the camera must be moved in the field such as spraying in proportion to the density of products because when the camera is moving, the quality of the received frames is much less than when images are captured in static mode. The second problem is that most studies focus on images that do not have complicated backgrounds. However, in fruit gardens, there are different backgrounds including the trunks of trees, leaves, different branches with different colors, plants on the surface of the ground, sky in cloudy conditions, sky in clear state, and other objects. The third problem is imaging at one time of day. In fact, little research has been done on images taken throughout the day, so the segmentation algorithm cannot work correctly during the day. Therefore, a new segmentation algorithm that resolves these problems is necessary. For this reason, the aim of this study was to offer a pixel-by-pixel segmentation algorithm based on an ensemble with a majority voting rule for segmentation of plum fruits in orchards at different ripeness stages under natural conditions.