Real-Time Cucumber Target Recognition in Greenhouse Environments Using Color Segmentation and Shape Matching
Abstract
:1. Introduction
2. System Architecture
3. Materials and Methods
3.1. Physical Components of a Computer System
3.1.1. Charge-Coupled Device (CCD) Camera
3.1.2. Photographic Optics
3.1.3. Additional Hardware
3.2. Dataset
3.2.1. Example Image Data
3.2.2. Target Image Data
3.3. Geometric Characteristics
3.3.1. Fourier Descriptor
3.3.2. Fourier Descriptor in Normalized Form
3.4. Calculation of Angles and Scales
3.4.1. Calculation of Angles
3.4.2. Calculation of Scale
3.5. Geometric Correspondence
3.5.1. Feature Extraction
3.5.2. Metrics for Measuring Similarity
4. Experimental Results and Analysis
4.1. Laboratory Setting
4.2. Image Processing
4.2.1. Example Image Pre-Processing
4.2.2. Target Image Preprocessing
4.3. Geometric Correspondence
4.3.1. Image Placeholder
4.3.2. Templates with Several Angles
4.3.3. Templates at Many Scales
4.3.4. Object Identification
4.4. Recognition of Targets at Several Scales and Angles
4.5. Identification of Fruit Fields
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Huan, H. Nutritional Value of Cucumbers: A Look at the Benefits for Skin Health. Youth Soc. 2011, 10, 90. [Google Scholar]
- Li, D.L.; Li, X. System Analysis and Development Prospect of Unmanned Farming. Trans. Chin. Soc. Agric. Mach. 2020, 51, 1–12. [Google Scholar]
- Yuan, J. Research Progress Analysis of Robotics Selective Harvesting Technologies. Trans. Chin. Soc. Agric. Mach. 2022, 51, 1–17. [Google Scholar]
- Liu, J.Z. Research Progress Analysis of Robotic Harvesting Technologies in Greenhouse. Trans. Chin. Soc. Agric. Mach. 2017, 48, 1–18. [Google Scholar]
- Vitzrabin, E.; Edan, Y. Adaptive thresholding with fusion using a RGBD sensor for red sweet-pepper detection. Biosyst. Eng. 2016, 146, 45–56. [Google Scholar] [CrossRef]
- Moghimi, A.; Hossein Aghkhani, M.; Reza Golzarian, M. A Robo-vision Algorithm for Automatic Harvesting of Green Bell Pepper. In Proceedings of the 2015 ASABE Annual International Meeting, New Orleans, LA, USA, 26–29 July 2015; ASABE: St. Joseph, MI, USA, 2015; Volume 4, pp. 3185–3193. [Google Scholar]
- Zhang, C.L.; Zhang, Y.; Zhang, J.X.; Li, W. Recognition of Green Apple in Similar Backgroud. Trans. Chin. Soc. Agric. Mach. 2014, 45, 277–281. [Google Scholar]
- Li, H.; Zhang, M.; Gao, Y.; Li, M.Z.; Ji, Y.H. Green Ripe Tomato Detection Method Based on Machine Vision in Greenhouse. Trans. Chin. Soc. Agric. Eng. 2017, 33, 328–334+388. [Google Scholar]
- Bao, G.J.; Cai, S.B.; Qi, L.Y. Multi-template matching algorithm for cucumber recognition in natural environment. Comput. Electron. Agric. 2016, 127, 754–762. [Google Scholar] [CrossRef]
- Fernandez, R.; Salinas, C.; Montes, H. Multisensory system for fruit harvesting robots. experimental testing in natural scenarios and with different kinds of crops. Sensors 2014, 14, 23885–23904. [Google Scholar] [CrossRef] [PubMed]
- Okamoto, H.; Lee, W.S. Green citrus detection using hyperspectral imaging. Comput. Electron. Agric. 2009, 66, 201–208. [Google Scholar] [CrossRef]
- Wendel, A.; Underwood, J.; Walsh, K. Maturity estimation of mangoes using hyperspectral imaging from a ground based mobile platform. Comput. Electron. Agric. 2018, 155, 298–313. [Google Scholar] [CrossRef]
- Tian, Y. Fast Recognition and Location of Target Fruit Based on Depth Information. IEEE Access 2019, 7, 170553–170563. [Google Scholar] [CrossRef]
- Liu, C.Y.; Lai, N.X.; Bi, X.J. Spherical Fruit Recognition and Location Algorithm Based on Depth Image. Trans. Chin. Soc. Agric. Mach. 2022, 53, 228–235. [Google Scholar]
- Barnea, E.; Mairon, R.; Ben-Shahar, O. Colour-agnostic shape-based 3D fruit detection for crop harvesting robots. Biosyst. Eng. 2016, 146, 57–70. [Google Scholar] [CrossRef]
- Kusumam, K.; Krajnik, T.; Pearson, S. 3D-vision based detection, localization, and sizing of broccoli heads in the field. J. Field Robot. 2017, 34, 1505–1518. [Google Scholar] [CrossRef]
- Nyarko, E.K.; Vidovic, I.; Radocaj, K. A nearest neighbor approach for fruit recognition in RGB-D images based on detection of convex surfaces. Expert Syst. Appl. 2018, 114, 454–466. [Google Scholar] [CrossRef]
- Tao, H.W.; Zhao, L.; Xi, J. Fruits and Vegetables Recognition Based on Color and Texture Features. Trans. Chin. Soc. Agric. Eng. 2014, 30, 305–311. [Google Scholar]
- Song, H.B.; Shang, Y.Y.; He, D.J. Review on Deep Learning Technology for Fruit Target Recognition. Trans. Chin. Soc. Agric. Mach. 2023, 54, 1–19. [Google Scholar]
- Li, H.; Nan, X.Y.; Gao, B.P.; Ma, Z.G. A Green Round-like Fruits Identification Method Based on GhostNet. Jiangsu Agric. Sci. 2023, 39, 724–731. [Google Scholar]
- Zhang, Z.Y.; Luo, M.Y.; Guo, S.X. Cherry Fruit Detection Method in Natural Scene Based on Improved YOLO v5. Trans. Chin. Soc. Agric. Mach. 2022, 53, 232–240. [Google Scholar]
- He, B.; Zhang, Y.B.; Gong, J.L. Fast Recognition of Tomato Fruit in Greenhouse at Night Based on Improved YOLO v5. Trans. Chin. Soc. Agric. Mach. 2022, 53, 201–208. [Google Scholar]
- Gene-Mola, J.; Vilaplana, V.; Rosell-Polo, J.R. Multi-modal deep learning for Fuji apple detection using RGB-D cameras and their radiometric capabilities. Comput. Electron. Agric. 2019, 162, 689–698. [Google Scholar] [CrossRef]
- Liu, C.L.; Gong, L.; Yuan, J.; Li, Y.M. Current Status and Development Trends of Agricultural Robots. Trans. Chin. Soc. Agric. Mach. 2022, 53, 1–22+55. [Google Scholar]
- Koirala, A.; Walsh, K.B.; Wang, Z. Deep learning for real-time fruit detection and orchard fruit load estimation: Benchmarking of ‘MangoYOLO’. Precis. Agric. 2019, 20, 1107–1135. [Google Scholar] [CrossRef]
- Qi, L.Y.; Gao, F.; Tan, Y.Z. Cucumber Shape Description Based on Elliptic Fourier Descriptor. Trans. Chin. Soc. Agric. Mach. 2011, 42, 164-142. [Google Scholar]
- Yan, T.X.; Liu, Y.H.; Wei, D.; Sun, X.F.; Liu, Q. Shape Analysis of Sand Particles Based on Fourier Descriptors. Environ. Sci. Pollut. Res. 2023, 30, 62803–62814. [Google Scholar] [CrossRef] [PubMed]
- Gelareh, V.; Farshid, M.B. A Comprehensive Survey on Two and Three-Dimensional Fourier Shape Descriptors: Biomedical Applications. Arch. Comput. Methods Eng. 2022, 29, 4643–4681. [Google Scholar]
- Ouyang, Z.H.; Xue, L.; Ding, F.; Li, D. An Algorithm for Extracting Similar Segments of Moving Target Trajectories Based on Shape Matching. Eng. Appl. Artif. Intell. 2024, 127, 107243. [Google Scholar] [CrossRef]
- Michele, C.; Giacomo, B.; Simone, M. Extracting a Functional Representation from a Dictionary for Non-rigid Shape Matching. Comput. Graph. 2023, 113, 43–56. [Google Scholar]
- Tian, B.; Wei, W. Research Overview on Edge Detection Algorithms Based on Deep Learning and Image Fusion. Secur. Commun. Netw. 2022, 2022, 1155814. [Google Scholar] [CrossRef]
- Wisaeng, K.; Sangiamvibool, W. Brain Tumor Segmentation Using Fuzzy Otsu Threshold Morphological Algorithm. IAENG Int. J. Appl. Math. 2023, 53, 1–12. [Google Scholar]
- Guo, Y.M.; Wang, Y.; Meng, K.; Zhu, Z.N. Otsu Multi-Threshold Image Segmentation Based on Adaptive Double-Mutation Differential Evolution. Biomimetics 2023, 8, 418. [Google Scholar] [CrossRef] [PubMed]
- Chen, L.P.; Gao, J.H.; Lopes António, M.; Zhang, Z.Q.; Chu, Z.B.; Wu, R.C. Adaptive Fractional-order Genetic-particle Swarm Optimization Otsu Algorithm for Image segmentation. Appl. Intell. 2023, 53, 26949–26966. [Google Scholar] [CrossRef]
- Gelana, W.F.; Girma, D.T.; Megersa, A.Y. Harumanis Mango Leaves Image Segmentation on RGB and HSV Colour Spaces using Fast k-Means Clustering. J. Phys. Conf. Ser. 2021, 2107, 012068. [Google Scholar]
- Song, Q.Q.; Yang, G.P. Lane Line Detection Besed on HSV Color Threshold Segmentation. Comput. Digit. Eng. 2021, 49, 1895–1898. [Google Scholar]
- Shen, J.H.; Wu, X.J.; Wang, X.H.; Liang, G.Y. Robust Shape-based Template Matching Algorithm for Target Localization under SEM. Opt. Express 2023, 31, 32652–32668. [Google Scholar] [CrossRef]
Parametric | Configure |
---|---|
Name | MV-UBS130RC/MP-IR |
Lens | 3.5~8 mm |
Resolution | 1280 × 960/1.4 |
Lens Interface | C/CS |
CCD Size | 1/3″ |
Image Size | D(1) | D(2) | D(3) | D(4) | D(5) | D(6) | D(7) | D(8) |
---|---|---|---|---|---|---|---|---|
Original | 0.039948 | 0.067076 | 0.002810 | 0.022196 | 0.005083 | 0.011672 | 0.004651 | 0.004707 |
Zoom in 1× | 0.037774 | 0.066517 | 0.003465 | 0.022031 | 0.005360 | 0.011737 | 0.004438 | 0.004625 |
Zoom in 0.5× | 0.038786 | 0.070002 | 0.003502 | 0.023646 | 0.005702 | 0.013010 | 0.005489 | 0.005857 |
Rotate 90° | 0.042617 | 0.062035 | 0.003128 | 0.018816 | 0.003987 | 0.009311 | 0.003844 | 0.002795 |
Parametric | Configure |
---|---|
Operating System | Windows 11 |
CPU | 12th Gen Intel(R) Core(TM) i7-12700H 2.70 GHz |
Image Processing Libraries | OpenCV, Halcon |
Programming Language | C++, Python |
IDE | Visual Studio 2019 |
Serial No. | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
Angle Ratio | −30° | −15° | 0° | 15° | 30° |
Scales Ratio | 0.8 | 0.9 | 1 | 1.1 | 1.2 |
Algorithm | ω = −15°/S = 0.8 | ω = −10°/S = 0.9 | ω = 0°/S = 1 | ω = 10°/S = 1.1 | ω = 15°/S = 1.2 |
---|---|---|---|---|---|
RGB_Color | ×/× | ×/× | ×/× | ×/× | ×/× |
Shape Match | √/√ | √/√ | √/√ | √/√ | √/√ |
SIFT | ×/√ | √/× | √/√ | √/√ | √/× |
SURF | ×/× | ×/√ | √/√ | ×/× | ×/× |
Color and Shape | √/√ | √/√ | √/√ | √/√ | √/√ |
Algorithm | Correctly | Incorrect | Accuracy | Average Time/ms |
---|---|---|---|---|
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 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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
Liu, W.; Sun, H.; Xia, Y.; Kang, J. Real-Time Cucumber Target Recognition in Greenhouse Environments Using Color Segmentation and Shape Matching. Appl. Sci. 2024, 14, 1884. https://doi.org/10.3390/app14051884
Liu W, Sun H, Xia Y, Kang J. Real-Time Cucumber Target Recognition in Greenhouse Environments Using Color Segmentation and Shape Matching. Applied Sciences. 2024; 14(5):1884. https://doi.org/10.3390/app14051884
Chicago/Turabian StyleLiu, Wenbo, Haonan Sun, Yu Xia, and Jie Kang. 2024. "Real-Time Cucumber Target Recognition in Greenhouse Environments Using Color Segmentation and Shape Matching" Applied Sciences 14, no. 5: 1884. https://doi.org/10.3390/app14051884
APA StyleLiu, W., Sun, H., Xia, Y., & Kang, J. (2024). Real-Time Cucumber Target Recognition in Greenhouse Environments Using Color Segmentation and Shape Matching. Applied Sciences, 14(5), 1884. https://doi.org/10.3390/app14051884