## 3 Experiments and Results
### Performance of the Proposed Method against Adjacent and Occlusion Conditions  
In the detection experiment, grape clusters that were adjacent or partially occluded were tested. In these situations, when the grape clusters were not greatly covered by other obstacles, the grape clusters could still be well detected using the developed approach. For example, Figure 7 shows that the grape clusters were correctly detected although two grape clusters in the image are adjacent. Figure 8 shows that the grape cluster was accurately detected although the upper-left part of the grape cluster was occluded by leaves. However, if the grape clusters were largely hidden by foliage, the recognition accuracy of the grape clusters would greatly be reduced. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Lighting Conditions**} & \multirow{2}{*}{
\begin{tabular}{c} **Grap** \\ **Clusters** \\ \end{tabular} } & \multicolumn{2}{c}{**True Positives**} & \multicolumn{2}{c}{**False Negatives**} & \multicolumn{2}{c}{**False Positives**} \\ \cline{3-8}  & & **Amount** & **TPR/\%** & **Amount** & **FNR/\%** & **Amount** & **FPR/\%** \\ \hline Sunny frontlight & 136 & 128 & 94.12 & 5 & 3.76 & 8 & 5.88 \\ Sunny overshadow & 129 & 118 & 91.47 & 6 & 4.84 & 11 & 8.53 \\ Overcast lighting & 182 & 173 & 95.05 & 8 & 4.42 & 9 & 4.95 \\ Total & 447 & 419 & 93.74 & 19 & 4.34 & 28 & 6.26 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The detection results of the proposed method. Figure 8: _Cont._  
Figure 7: The detection results of the grape clusters from the images captured under three different lighting conditions by the developed method. (**a**) Image captured under sunny frontlight conditions; (**b**) Image captured under sunny overshadow conditions; (**c**) Image captured under overcast lighting conditions. The grape cluster in the Figure 8b was mostly occluded and only the bottom part of the grape cluster was ultimately detected. In this case, the obtained information would hardly meet the requirement of the harvesting robots. To know how much the pixels recognition accuracy (PRA) can meet the requirement of the harvesting robots, 22 grape clusters with different occlusion degrees in the collected images were taken as the test cases, the PRA of these grape clusters were calculated by the following Equation (15):  
\[\text{PRA}=\frac{\text{Region}_{\text{manual}}\cap\text{Region}_{\text{algorithm }}}{\text{Region}_{\text{manual}}}\times 100\% \tag{15}\]  
where \(\text{Region}_{\text{manual}}\) is the pixels region of grape clusters that were extracted manually, and \(\text{Region}_{\text{algorithm}}\) is the pixels region of grape clusters acquired by the algorithm. The testing results indicated that the grape clusters could be well detected when 75% or more of grape pixels region were correctly classified. When some unripe grape berries appeared among the ripe grape clusters or multiple grape clusters overlapped, false or failure identification would occur, and it would be difficult to accurately detect the grape clusters. As it can be seen in Figure 9, some unripe berries whose color was green and three overlapping grape clusters could be found in Figure 9a, and from the segmentation result in Figure 9b we can see that those unripe berries at the bottom of the left grape clusters were not identified, so that final detection results in Figure 9c were not ideal. At last, only the right grape cluster was correctly detected, the left grape clusters were not accurately detected. In addition, in order to test the applicability of the developed approach for other black varieties besides the tested 'Summer Black' grape variety, the 'Cabernet Sauvignon' whose color was similar to the 'Summer Black' was also tested. As it can be seen in Figure 10, the grape clusters in the images were finally detected, and only a small number of ground and reflective leaves pixels were misclassified into the grape.