## 6 Conclusions  
This work focuses on the difficulty of precisely and efficiently recognizing targets for agricultural harvesting robots. This challenge arises mainly from the presence of backgrounds with similar colors, complicated growing settings, and irregular lighting conditions, all of which make it harder to separate fruit targets from their surroundings. A novel target recognition method is developed to precisely identify fruit targets, utilizing color and shape information. The research subject chosen for this study is cucumber. The method exploits the distinctive form characteristics of the fruit, which are markedly dissimilar to those of the stem and leaves. The study presents a multitude of fruit target picture templates and outlines the process of reconstructing their borders to produce the standard template contour using the normalized Fourier descriptor. Additionally, in order to accommodate the nonuniform growth of cucumber, the scale and rotation angle are computed to enhance the precision of matching. Integrating multi-scale template matching results in an abundance of template data, hence causing an increase in the time required for matching. In order to enhance the accuracy of real-time matching, the image undergoes preprocessing using an algorithm that segments colors based on the HSV color space. This procedure effectively reduces the area to be matched, resulting in improved operational efficiency of the method.  
Recognition studies are conducted using 200 photos obtained from the field, and are compared with four classic recognition methods. The method presented in this research demonstrates high accuracy and efficiency in target recognition, particularly in the context of identifying targets within greenhouse environments. The method is straightforward, the necessary hardware resources are cost-effective and adaptable, and it may be effectively utilized in agricultural robots, making a substantial contribution to the field of agricultural robot vision.  
Future research should prioritize enhancing the algorithm by transferring and rectifying it on hardware devices, as well as expanding its applicability to the practical domain of fruit recognition.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **Correctly** & **Incorrect** & **Accuracy** & **Average Time/ms** \\ \hline RGB\_Color & 120 & 80 & 60\% & 26.83 \\ Shape Match & 168 & 32 & 84\% & 198.21 \\ SIFT & 92 & 108 & 46\% & 118.61 \\ SURF & 86 & 114 & 43\% & 91.42 \\ Color and Shape & 172 & 28 & 86\% & 35.71 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Cucumber target recognition results of several algorithms.  
**Author Contributions:** Investigation, W.L.; methodology, H.S.; software, H.S.; supervision, W.L.; writing--original draft preparation, H.S.; writing--review and editing, W.L., Y.X. and J.K. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This work was supported by the Youth Fund of the National Natural Science Foundation of China (Grant No. 62203285) and the Youth Fund of Shaanxi Provincial Natural Science Basic Research Program General Project (Grant No. 2022 JQ-181).  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The dataset can be found at: [[https://www.kaggle.com/datasets/farahseifeld/greenhouse-cucumber-growth-stages](https://www.kaggle.com/datasets/farahseifeld/greenhouse-cucumber-growth-stages)]([https://www.kaggle.com/datasets/farahseifeld/greenhouse-cucumber-growth-stages](https://www.kaggle.com/datasets/farahseifeld/greenhouse-cucumber-growth-stages)) (accessed on 21 February 2024).  
**Acknowledgments:** The authors would like to thank the anonymous reviewers for their constructive comments and suggestions.  
**Conflicts of Interest:** The authors declare no conflicts of interest.