Grape Berry Detection and Size Measurement Based on Edge Image Processing and Geometric Morphology
Abstract
:1. Introduction
- (1)
- This work proposes a detection model for multiple types of rounds or round-like grape berry counting and berry size. It solves the problem that the characterization information of grape berries cannot be accurately detected.
- (2)
- Before the berry edge contour segment grouping strategy, the corner detection algorithm and the fast radial symmetry change algorithm are introduced. These can help realize the segmentation of the overlapping edges of berries.
- (3)
- This paper proposes an algorithm for combining contour segments based on clustering search strategy and rotation direction determination, which realizes the correct reorganization of segmented contour segments. Finally, according to the obtained edge information of a single berry, the berry is fitted, and its size is estimated.
2. Datasets and Preprocessing
3. Edge Contour Segmentation Algorithm of Berries
3.1. Interest Point Extraction
3.2. Segmentation of Overlapping Edges of Berries
3.2.1. Pixel Sequence Search for Edge Contour of Grape Berry
3.2.2. Detection of Concave Points between Overlapping Berries
4. Correct Grouping of Contour Segments of Grape Berries
4.1. Calculation of the Centroid Point of the Contour Segments
4.2. Local Clustering Search Strategy and Rotation Direction Judgment Condition
5. Experiment Results and Discussion
5.1. Performance Measurement Evaluation Index
5.2. Analysis of the Concave Ppoint Detection of Different Types of Grapes
5.3. Analysis of the Results of Checking the Number of Berries on Grape
5.4. Discussion of Method Limitations
5.5. Berry Size Detection and Analysis on the Grape
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Luo, L.; Zou, X.; Wang, C.; Chen, X.; Situ, W. Recognition method for two overlaping and adjacent grape clusters based on image contour analysis. Trans. Chin. Soc. Agric. Mach. 2017, 48, 15–22. [Google Scholar]
- Rahman, S.M.M. Machine Learning-Based Cognitive Position and Force Controls for Power-Assisted Human-Robot Collaborative Manipulation. Machines 2021, 9, 28. [Google Scholar] [CrossRef]
- Lu, Q.H.; Zhang, X.M. Multiresolution edge detection in noisy images using wavelet transform. In Proceedings of the 2005 IEEE International Conference on Machine Learning and Cybernetics (ICMLC), Guangzhou, China, 18–21 August 2005; pp. 5235–5240. [Google Scholar]
- Balducci, F.; Impedovo, D.; Pirlo, G. Machine Learning Applications on Agricultural Datasets for Smart Farm Enhancement. Machines 2018, 6, 38. [Google Scholar] [CrossRef] [Green Version]
- Studer, S.; Bui, T.B.; Drescher, C.; Hanuschkin, A.; Winkler, L.; Peters, S.; Müller, K.-R. Towards CRISP-ML(Q): A Machine Learning Process Model with Quality Assurance Methodology. Mach. Learn. Knowl. Extr. 2021, 3, 392–413. [Google Scholar] [CrossRef]
- Aghi, D.; Mazzia, V.; Chiaberge, M. Local Motion Planner for Autonomous Navigation in Vineyards with a RGB-D Camera-Based Algorithm and Deep Learning Synergy. Machines 2020, 8, 27. [Google Scholar] [CrossRef]
- Tang, Y.; Chen, M.; Wang, C.; Luo, L.; Li, J.; Lian, G.; Zou, X. Recognition and localization methods for vision-based fruit picking robots: A review. Front. Plant Sci. 2020, 11, 510. [Google Scholar] [CrossRef]
- Huerta, M.H.; Aguilera, D.G.; Gonzalvez, P.R.; López, D.R. Vineyard yield estimation by automatic 3D bunch modelling in field conditions. Comput. Electron. Agric. 2015, 110, 17–26. [Google Scholar] [CrossRef]
- Rist, F.; Herzog, K.; Mack, J.; Richter, R.; Steinhage, V.; Töpfer, R. High-precision phenotyping of grape bunch architecture using fast 3D sensor and automation. Sensors 2018, 18, 763. [Google Scholar] [CrossRef] [Green Version]
- Schöler, F.; Steinhage, V. Automated 3D reconstruction of grape cluster architecture from sensor data for efficient phenotyping. Comput. Electron. Agric. 2015, 114, 163–177. [Google Scholar] [CrossRef]
- Kicherer, A.; Roscher, R.; Herzog, K.; Šimon, S.; Förstner, W.; Töpfer, R. BAT (Berry Analysis Tool): A high-throughput image interpretation tool to acquire the number, diameter, and volume of grapevine berries. Vitis-J. Grapevine Res. 2013, 52, 129–135. [Google Scholar]
- Liu, S.; Whitty, M.; Cossell, S. A lightweight method for grape berry counting based on automated 3D bunch reconstruction from a single image. In Proceedings of the 2015 IEEE International Conference on Robotics and Automation (ICRA), Workshop on Robotics in Agriculture, Seattle, WA, USA, 26–30 May 2015; p. 3. [Google Scholar]
- Liu, S.; Zeng, X.; Whitty, M. 3DBunch: A novel iOS-smartphone application to evaluate the number of grape berries per bunch using image analysis techniques. IEEE Access 2020, 8, 114663–114674. [Google Scholar] [CrossRef]
- Aquino, A.; Diago, M.P.; Millán, B.; Tardáguila, J. A new methodology for estimating the grapevine-berry number per cluster using image analysis. Biosyst. Eng. 2017, 156, 80–95. [Google Scholar] [CrossRef]
- Aquino, A.; Barrio, I.; Diago, M.P.; Millan, B.; Tardaguila, J. vitisBerry: An Android-smartphone application to early evaluate the number of grapevine berries by means of image analysis. Comput. Electron. Agric. 2018, 148, 19–28. [Google Scholar] [CrossRef]
- Chen, M.; Tang, Y.; Zou, X.; Huang, Z.; Zhou, H.; Chen, S. 3D global mapping of large-scale unstructured orchard integrating eye-in-hand stereo vision and SLAM. Comput. Electron. Agric. 2021, 187, 106237. [Google Scholar] [CrossRef]
- Śkrabánek, P. DeepGrapes: Precise Detection of Grapes in Low-resolution Images. IFAC-PapersOnLine 2018, 51, 185–189. [Google Scholar] [CrossRef]
- Coviello, L.; Cristoforetti, M.; Jurman, G.; Furlanello, C. GBCNet: In-Field Grape Berries Counting for Yield Estimation by Dilated CNNs. Appl. Sci. 2020, 10, 4870. [Google Scholar] [CrossRef]
- Zabawa, L.; Kicherer, A.; Klingbeil, L.; Töpfer, R.; Kuhlmann, H.; Roscher, R. Counting of grapevine berries in images via semantic segmentation using convolutional neural networks. ISPRS J. Photogramm. Remote Sens. 2020, 164, 73–83. [Google Scholar] [CrossRef]
- Zabawa, L.; Kicherer, A.; Klingbeil, L.; Milioto, A.; Topfer, R.; Kuhlmann, H.; Roscher, R. Detection of single grapevine berries in images using fully convolutional neural networks. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 2571–2579. [Google Scholar]
- Nellithimaru, A.K.; Kantor, G.A. ROLS: Robust Object-level SLAM for grape counting. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 2648–2656. [Google Scholar]
- Zafar, M.R.; Khan, N. Deterministic Local Interpretable Model-Agnostic Explanations for Stable Explainability. Mach. Learn. Knowl. Extr. 2021, 3, 525–541. [Google Scholar] [CrossRef]
- Luo, L.; Tang, Y.; Zou, X.; Wang, C.; Zhang, P.; Feng, W. Robust grape cluster detection in a vineyard by combining the Adaboost framework and multiple color components. Sensors 2016, 16, 2098. [Google Scholar] [CrossRef]
- Luo, L.; Tang, Y.; Zou, X.; Ye, M.; Feng, W.; Li, G. Vision-based extraction of spatial information in grape clusters for harvesting robots. Biosyst. Eng. 2016, 151, 90–104. [Google Scholar] [CrossRef]
- Feng, J.; Li, X.; Yuan, B.; Mu, W. Progress and trend of fruit detection by intelligent sensory technology. J. South. Agric. 2020, 51, 636–644. [Google Scholar]
- Luo, L.; Zou, X.; Xiong, J.; Zhang, Y.; Peng, H.; Lin, G. Automatic positioning for picking point of grape picking robot in natural environment. Trans. Chin. Soc. Agric. Eng. 2015, 31, 14–21. [Google Scholar]
- Xiao, Z.; Wang, Q.; Wang, B.; Xu, F.; Yang, P.; Li, L. A method for detecting and grading ‘Red Globe’ grape bunches based on digital images and random least squares. Food Sci. 2018, 39, 60–66. [Google Scholar]
- Liu, Z.H. Image-based detection method of kyoho grape fruit size research. Master’s Thesis, Northeast Forestry University, Harbin, Heilongjiang, China, 1 June 2019. [Google Scholar]
- Zhou, W.J.; Zha, Z.H.; Wu, J. Maturity discrimination of “Red Globe” grape cluster in grapery by improved circle Hough transform. Trans. Chin. Soc. Agric. Eng. 2020, 36, 205–213. [Google Scholar]
- Cubero, S.; Diago, M.P.; Blasco, J.; Tardáguila, J.; Millán, B.; Aleixos, N. A new method for pedicel/peduncle detection and size assessment of grapevine berries and other fruits by image analysis. Biosyst. Eng. 2014, 117, 62–72. [Google Scholar] [CrossRef] [Green Version]
- Behera, S.; Mahapatra, A.; Rath, A.; Sethy, P. Classification & grading of tomatoes using image processing techniques. Int. J. Innov. Technol. Explor. Eng. 2019, 8, 545. [Google Scholar]
- Langlard, M.D.; Al-Saddik, H.; Charton, S.; Debayle, J.; Lamadie, F. An efficiency improved recognition algorithm for highly overlapping ellipses: Application to dense bubbly flows. Pattern Recognit. Lett. 2018, 101, 88–95. [Google Scholar] [CrossRef]
- Chen, M.; Tang, Y.; Zou, X.; Huang, K.; Huang, Z.; Zhou, H.; Lian, G. Three-dimensional perception of orchard banana central stock enhanced by adaptive multi-vision technology. Comput. Electron. Agric. 2020, 174, 105508. [Google Scholar] [CrossRef]
- Canny, J. A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, 8, 679–698. [Google Scholar] [CrossRef]
- Loy, G.; Zelinsky, A. A fast radial symmetry transform for detecting points of interest. In Proceedings of the 2002 European Conference on Computer Vision (ECCV), Copenhagen, Denmark, 28–31 May 2002; pp. 358–368. [Google Scholar]
- Loy, G.; Zelinsky, A. Fast radial symmetry for detecting points of interest. IEEE Trans. Pattern Anal. Mach. Intell. 2003, 25, 959–973. [Google Scholar] [CrossRef] [Green Version]
- He, X.C.; Yung, N.H. Curvature scale space corner detector with adaptive threshold and dynamic region of support. In Proceedings of the 17th International Conference on Pattern Recognition (ICPR), Cambridge, UK, 23–26 August 2004; Volume 2, pp. 791–794. [Google Scholar]
- Fischler, M.A.; Bolles, R.C. Random sample consensus: A paradigm for model fitting with applications to image analysis and automated cartography. Commun. ACM 1981, 24, 381–395. [Google Scholar] [CrossRef]
- Horvat, M.; Jović, A.; Burnik, K. Assessing the Robustness of Cluster Solutions in Emotionally-Annotated Pictures Using Monte-Carlo Simulation Stabilized K-Means Algorithm. Mach. Learn. Knowl. Extr. 2021, 3, 435–452. [Google Scholar] [CrossRef]
Grape Type | TPR/% | PPV/% | AD/Pixel |
Red grape | 90.47 | 82.97 | 3.47 |
Black grape | 85.21 | 94.23 | 3.01 |
Niagara grape | 87.61 | 92.92 | 3.34 |
Methods | Grape Type | TPR/% | PPV/% | AJSC/% | Time/s |
---|---|---|---|---|---|
our Algorithm | Red grape | 92.15 | 87.59 | 88.33 | 17.848 |
Black grape | 90.63 | 84.61 | 90.46 | 36.651 | |
Niagara grape | 91.48 | 86.23 | 86.29 | 42.433 | |
Hough transform detection circle | Red grape | 84.71 | 76.46 | 86.91 | 7.389 |
Black grape | 87.49 | 83.08 | 88.17 | 5.796 | |
Niagara grape | 87.80 | 81.79 | 86.36 | 7.067 |
Number | Manual Detection Diameter/mm | Image Detection Diameter/mm | Diameter Error/mm |
---|---|---|---|
1 | 24.80 | 24.52 | 0.28 |
2 | 28.11 | 30.61 | 2.5 |
3 | 28.26 | 33.88 | 5.62 |
4 | 24.79 | 26.09 | 1.3 |
5 | 26.17 | 27.94 | 1.77 |
6 | 27.77 | 27.46 | 0.31 |
7 | 26.04 | 24.09 | 1.95 |
8 | 28.07 | 31.62 | 3.55 |
9 | 26.06 | 23.74 | 2.32 |
10 | 27.42 | 30.78 | 3.36 |
Average | 2.30 | ||
Max | 5.62 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Luo, L.; Liu, W.; Lu, Q.; Wang, J.; Wen, W.; Yan, D.; Tang, Y. Grape Berry Detection and Size Measurement Based on Edge Image Processing and Geometric Morphology. Machines 2021, 9, 233. https://doi.org/10.3390/machines9100233
Luo L, Liu W, Lu Q, Wang J, Wen W, Yan D, Tang Y. Grape Berry Detection and Size Measurement Based on Edge Image Processing and Geometric Morphology. Machines. 2021; 9(10):233. https://doi.org/10.3390/machines9100233
Chicago/Turabian StyleLuo, Lufeng, Wentao Liu, Qinghua Lu, Jinhai Wang, Weichang Wen, De Yan, and Yunchao Tang. 2021. "Grape Berry Detection and Size Measurement Based on Edge Image Processing and Geometric Morphology" Machines 9, no. 10: 233. https://doi.org/10.3390/machines9100233
APA StyleLuo, L., Liu, W., Lu, Q., Wang, J., Wen, W., Yan, D., & Tang, Y. (2021). Grape Berry Detection and Size Measurement Based on Edge Image Processing and Geometric Morphology. Machines, 9(10), 233. https://doi.org/10.3390/machines9100233