## 3 Results and Discussion  
### Segmentation Results  
Examples of leaf segmentation results of visible, NoIR, and thermal images taken during the day are illustrated in Figures 10-12, respectively. In each figure, panel (a) shows the original tested image and panel (b) shows the leaf segmentation results using Isodata, Li, Local, Mean, Minimum, Otsu, Multi-Otsu, Triangle, Yen, K-Means (K = 2), and K-Means (K = 3), respectively. Recall (Rec), Precision (Prec), and F1 score (F1) are shown at the bottom of each image. The white and black colors in the figures represent the foreground (extracted leaf pixels) and background, respectively.  
Figure 10 shows that when given a visible image depicted in Figure 10a, most of the algorithms achieve high Recall, except the images in Figure 10d,h,l, which achieved lower Recall. Higher Recall is indicated by many white pixels in the leaf object. The lower Recall for the image in Figure 10d was caused by Local thresholding using the local window to segment the image, resulting in some parts of the leaves not being extracted. Multi-Otsu thresholding (Figure 10h) and the K-Means algorithm (Figure 10l) use three classes in the segmentation, and they fail to extract some parts of the leaves when the color intensity is not uniform, thus they achieved lower Recall.  
Figure 9: Sample ground-truth images: (**a**) visible camera and (**b**) NoIR camera.  
Figure 10 shows that most of the algorithms achieved medium Precision. This can be observed by the presence of white on non-leaf objects, which indicates false positive results. As false positives increase, Precision will decrease. The unbalance of Recall and Precision results yields a medium F1 score value for most algorithms. It is noted that Local thresholding had the worst F1 score value.  
Observing Figure 10, it is found that due to the nature of the backgrounds, the wall (upper left side in the image) and concrete floor (lower right side in the image and white gap below the black fence) produce false positives with most algorithms, except Multi-Otsu and K-Means (K = 3). This condition suggests that bi-level segmentation techniques cannot separate these particular backgrounds from the foreground (leaf). They can be detected as backgrounds by multi-level segmentation techniques such as Multi-Otsu and K-Means (K = 3). However, the multi-level segmentation techniques tend to extract some parts of leaves as the background, as shown in Figure 10h,l, thus producing lower Recall. From this discussion, it is clear that our image dataset offers a challenge in achieving a high F1 score. It is worth noting that this challenge allows our aim to evaluate the thresholding techniques and the camera types for a suitable real-time leaf segmentation application. Similar results were obtained for the NoIR images shown in Figure 11. However, the performance of NoIR images was lower than that of visible images, as can be seen by the higher color contrast of the visible image in Figure 10a than the NoIR image in Figure 11a.  
Figure 10: Image segmentation results of visible images: (**a**) original tested image; (**b**) Isodata; (**c**) Li; (**d**) Local; (**e**) Mean; (**f**) Minimum; (**g**) Otsu; (**h**) Multi-Otsu; (**i**) Triangle; (**j**) Yen; (**k**) K-Means (K = 2); (**l**) K-Means (K = 3).  
The thermal images in Figure 12 appear different from the visible and NoIR images. Due to the thermal camera's resolution and characteristics, the extracted leaves are condensed rather than dispersed as in Figures 10 and 11. Furthermore, the edge and thin parts of the leaves are not extracted. Therefore, the Recall, Precision, and F1 scores are lower compared to visible and NoIR images. Figure 12 also shows an interesting phenomenon: the plants' polybags contribute to false positive results, which is opposite to the visible and NoIR cameras. It is also noted in Figure 12i that the Triangle thresholding failed to extract the leaves.