A Vision Method for Detecting Citrus Separation Lines Using Line-Structured Light
Abstract
1. Introduction
- To address interference from complex textures formed by the unique reticulated oil gland structure on citrus peels, we pioneeringly employ line-structured light for 3D reconstruction of citrus. Combined with PCA and LSPIA, the spatial locations of citrus separation lines are detected.
- To improve the accuracy of the line-structured light 3D reconstruction system, the original skeleton extraction algorithm is improved to enhance the precision of extracting the centerline of laser fringes.
2. Measurement System Based on Line-Structured Light
2.1. Measuring Principle
2.2. Experimental Platforms
2.3. Camera Calibration
3. Laser Centerline Extraction
3.1. Region of Interest Extraction
3.1.1. Gamma Correction
3.1.2. OTSU Algorithm
3.1.3. Region of Interest Extraction Results
3.2. Improved Skeleton Extraction Algorithm
- Let be the set of all pixel coordinates on the skeleton curve, and let denote the length of the main branch of the skeleton, with an initial value of 0. The number of pixel points in is counted as , and the number of other pixel points in the eight-neighborhood of pixel is counted as , with = 1, 2, …, ;
- Determine the point type of pixel . If , store pixel in a new set of endpoints ; if , store pixel in a new set of branching points ;
- Pixel in the endpoint set adopts an eight-neighborhood tracking strategy, and when the next pixel belonging to is accessed, the pixel is deposited into the access branch stack ;
- Repeat step 3 until pixel in the next set is found, note the path length as the number of consecutive pixel points from pixel to pixel . Compare with , if > , the path from pixel to pixel is noted as the set of pixel coordinates , = ;
- Determine whether is empty, if non-empty, access the pixel back to the pixel at the top of the stack in , and repeat steps 3, 4; if is an empty stack, output the set of pixel coordinates of the main branch of the skeleton after the pruning process.
3.3. Laser Centerline Extraction Results
3.3.1. Applicability Analysis
- The Grayscale center of gravity method [23], which only considers the longitudinal grayscale distribution, exhibits a folding phenomenon. This results in significant deviations from the actual centerline, leading to poor extraction performance.
- The Steger algorithm [24] is susceptible to uneven illumination, causing the grayscale distribution to deviate from the Gaussian model and resulting in centerline discontinuities.
- In contrast, the proposed algorithm extracts a continuous centerline without breaks or deviations from the energy concentration region. Compared with the traditional methods, it achieves better smoothness and higher consistency with the laser stripe distribution.
3.3.2. Accuracy Analysis
4. Method for Detecting the Separation Lines of Citrus
4.1. Point Cloud Registration
4.2. Citrus Surface Curve Fitting
4.3. Separation Lines Detection Method
4.4. Separation Line Detection Results
5. Discussion
6. Conclusions
- To address the issue where original skeleton extraction algorithms tend to generate redundant branches in complex textures, an improved skeleton extraction algorithm is proposed. The proposed algorithm achieves an average accuracy of 1.684 pixels, representing a 41.8% improvement over the Grayscale center of gravity method and a 25.2% improvement over the Steger algorithm. It significantly enhances centerline extraction accuracy and robustness in strongly interfering scenarios.
- The proposed method realizes automatic detection and an average similarity of 92.5% to manually defined standard separation lines. This meets the high-precision and non-destructive requirements of automated citrus splitting, offering technical support for improving processing efficiency, reducing product loss, and promoting industrial upgrading in the citrus processing sector.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
RMSE | Root Mean Square Error |
ICP | Iterative Closest Point |
LSPIA | Least Squares Progressive Iterative Approximation |
PCA | Principal Component Analysis |
MAE | Mean Absolute Error |
References
- He, Y. Assessment of Climate Adaptability in the Late-Maturing Citrus Industry in Sichuan Province. Agriculture 2024, 14, 1101. [Google Scholar] [CrossRef]
- Spreen, T.H.; Gao, Z.F.; Gmitter, F.; Norberg, R. An Overview of the Citrus Industry of China. In Proceedings of the 125th Annual Meeting of the Florida-State-Horticultural-Society (FSHS), Delray Beach, FL, USA, 3–5 June 2012; Volume 125, pp. 119–121. [Google Scholar]
- Panwar, D.; Saini, A.; Panesar, P.S.; Chopra, H.K. Unraveling the scientific perspectives of citrus by-products utilization: Progress towards circular economy. Trends Food Sci. Technol. 2021, 111, 549–562. [Google Scholar] [CrossRef]
- Huang, H.Q.; Huang, T.B.; Li, Z.; Lyu, S.L.; Hong, T. Design of Citrus Fruit Detection System Based on Mobile Platform and Edge Computer Device. Sensors 2022, 22, 59. [Google Scholar] [CrossRef]
- Garza, B.N.; Ancona, V.; Enciso, J.; Perotto-Baldivieso, H.L.; Kunta, M.; Simpson, C. Quantifying Citrus Tree Health Using True Color UAV Images. Remote Sens. 2020, 12, 170. [Google Scholar] [CrossRef]
- Cubero, S.; Lee, W.S.; Aleixos, N.; Albert, F.; Blasco, J. Automated Systems Based on Machine Vision for Inspecting Citrus Fruits from the Field to Postharvest—A Review. Food Bioprocess Technol. 2016, 9, 1623–1639. [Google Scholar] [CrossRef]
- Hu, Z.; He, J. Research on the visual measurement algorithm of cam base circle radius based on virtual structured light plane. Meas. Sci. Technol. 2025, 36, 016033. [Google Scholar] [CrossRef]
- Zhang, J. Centerline Extraction of Line Structured Light in 3D Reconstruction. In Proceedings of the 7th International Conference on Electrical, Mechanical and Computer Engineering, Xi’an, China, 20–22 October 2023; pp. 27–30. [Google Scholar]
- Dai, G.; Zhang, Q.; Xu, X.; Zhao, B. A calibration method of line-structured light system for measuring outer circle dimension during machining. Results Eng. 2024, 23, 102525. [Google Scholar] [CrossRef]
- Chen, L.; He, J.; Wu, Y.; Tang, Y.; Ge, G.; Wang, W. Detection and 3-D Visualization of Human Tooth Surface Cracks Using Line Structured Light. IEEE Sens. J. 2024, 24, 13958–13967. [Google Scholar] [CrossRef]
- Veinidis, C.; Arnaoutoglou, F.; Syvridis, D. 3D Reconstruction of Fishes Using Coded Structured Light. J. Imaging 2023, 9, 189. [Google Scholar] [CrossRef]
- Song, X.; Zhang, S.; Wu, Y. An accurate measurement of high-reflective objects by using 3D structured light. Meas. J. Int. Meas. Confed. 2024, 237, 115218. [Google Scholar] [CrossRef]
- Xu, M.; Lu, X.X.; Huang, H.M.; Zhai, M.J.; Luo, Q.; Ji, J.H. Dual surface structured light vision system based on multidimensional parameter coding. Appl. Opt. 2019, 58, 7212–7221. [Google Scholar] [CrossRef]
- Zhang, B.X.; Yu, J.H.; Jiao, X.X.; Lei, Z. Line Structured Light Binocular Fusion Filling and Reconstruction Technology. Laser Optoelectron. Prog. 2023, 60, 1611001. [Google Scholar]
- Zhou, C.D.; Lu, P.Y.; Yue, Z.Y.; Xu, J.L.; Teng, S.Y. Polarization-Encoded Structured Light Generation Based on Holographic Metasurface. Plasmonics 2023, 18, 653–659. [Google Scholar] [CrossRef]
- Zhu, X.J.; Zhao, H.M.; Wang, H.Y.; Song, L.M.; Sun, R.Q. A hybrid network based on light self-limited attention for structured light phase and depth estimation. Chin. Opt. 2024, 17, 118–127. [Google Scholar] [CrossRef]
- Wang, Z.X.; Fu, Y.J.; Li, Y.; Zhong, K.J.; Bao, W. Calibration Method for Line Structured Light Measurement System Based on Vanishing Point. Laser Optoelectron. Prog. 2021, 58, 127699. [Google Scholar] [CrossRef]
- Baek, J.; Noh, G.; Seo, J. Robotic Camera Calibration to Maintain Consistent Percision of 3D Trackers. Int. J. Precis. Eng. Manuf. 2021, 22, 1853–1860. [Google Scholar] [CrossRef]
- Sun, X.; Zhang, Y.P.; Kong, L.B.; Peng, X.; Luo, Z.J.; Shi, J.; Tian, L.P. Multi-Color Channel Gamma Correction in Fringe Projection Profilometry. Photonics 2025, 12, 74. [Google Scholar] [CrossRef]
- Du, Y.; Yuan, H.L.; Jia, K.J.; Li, F.F. Research on Threshold Segmentation Method of Two-Dimensional Otsu Image Based on Improved Sparrow Search Algorithm. IEEE Access 2023, 11, 70459–70469. [Google Scholar] [CrossRef]
- Wang, Y.; Tan, Z.P.; Chen, Y.C. An adaptive gravitational search algorithm for multilevel image thresholding. J. Supercomput. 2021, 77, 10590–10607. [Google Scholar] [CrossRef]
- Song, C.F.; Pang, Z.Q.; Jing, X.Y.; Xiao, C.X. Distance field guided-median skeleton extraction. Vis. Comput. 2018, 34, 243–255. [Google Scholar] [CrossRef]
- Yao, R.B.; Wang, B.Y.; Hu, M.Y.; Hua, D.Z.; Wu, L.Q.; Lu, H.; Liu, X.H. A Method for Extracting a Laser Center Line Based on an Improved Grayscale Center of Gravity Method: Application on the 3D Reconstruction of Battery Film Defects. Appl. Sci. 2023, 13, 9831. [Google Scholar] [CrossRef]
- Giulietti, N.; Chiariotti, P.; Revel, G.M. Automated Measurement of Geometric Features in Curvilinear Structures Exploiting Steger’s Algorithm. Sensors 2023, 23, 4023. [Google Scholar] [CrossRef] [PubMed]
- Song, T.; Liu, G.H.; Huang, H.M.; Gong, Y.X.; Qin, F.P.; Xie, H. Structured Light Centerline Extraction Method for Ice Surface Based on Normal Guidance. Laser Optoelectron. Prog. 2025, 62, 0215002. [Google Scholar]
- Kapoutsis, C.A.; Vavoulidis, C.P.; Pitas, I. Morphological iterative closest point algorithm. IEEE Trans. Image Process. Publ. IEEE Signal Process. Soc. 1999, 8, 1644–1646. [Google Scholar] [CrossRef] [PubMed]
- Deng, C.; Lin, H. Progressive and iterative approximation for least squares B-spline curve and surface fitting. Comput.-Aided Des. 2014, 47, 32–44. [Google Scholar] [CrossRef]
- Hu, Y.; Fang, S.P. Extraction Method of Light Stripe Center of Linear Structure. Laser Optoelectron. Prog. 2021, 58, 112005. [Google Scholar] [CrossRef]
Types of Methods | Advantages | Limitations |
---|---|---|
Machine vision | High computational efficiency | Susceptible to texture interference with low precision |
Structured light technology | Enables 3D detection | Highly affected by surface reflection, with inaccurate detection in occluded areas |
Deep learning | Strong anti-interference ability | Requires massive, labeled data with poor real-time performance |
Parameters | Calibration Results |
---|---|
Camera Internal Parameters | |
Radial Distortion Factor | |
Tangential Distortion Factor | |
Rotating Vector | |
Translating Vector |
Algorithms | RMSE | ||||||
---|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | ||
Grayscale center of gravity method | 3.860 | 4.071 | 1.737 | 1.215 | 3.073 | 3.414 | 2.895 |
Steger | 3.388 | 2.843 | 1.786 | 1.218 | 2.557 | 1.726 | 2.253 |
Our algorithm | 2.235 | 2.214 | 1.346 | 1.397 | 1.587 | 1.325 | 1.684 |
Methods | Similarity of Samples | Average | ||
1 | 2 | 3 | ||
DcMcNet | 0.768 | 0.717 | 0.795 | 0.760 |
Chen [10] | 0.824 | 0.837 | 0.878 | 0.846 |
Ours | 0.923 | 0.916 | 0.937 | 0.925 |
Sample Number | MAE | RMSE |
1 | 1.853 | 2.278 |
2 | 1.795 | 2.173 |
3 | 1.726 | 2.141 |
4 | 1.718 | 2.131 |
5 | 1.860 | 2.352 |
6 | 1.884 | 2.392 |
7 | 1.828 | 2.298 |
average | 1.809 | 2.252 |
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. |
© 2025 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
Yu, Q.; Xue, S.; Zheng, Y. A Vision Method for Detecting Citrus Separation Lines Using Line-Structured Light. J. Imaging 2025, 11, 265. https://doi.org/10.3390/jimaging11080265
Yu Q, Xue S, Zheng Y. A Vision Method for Detecting Citrus Separation Lines Using Line-Structured Light. Journal of Imaging. 2025; 11(8):265. https://doi.org/10.3390/jimaging11080265
Chicago/Turabian StyleYu, Qingcang, Song Xue, and Yang Zheng. 2025. "A Vision Method for Detecting Citrus Separation Lines Using Line-Structured Light" Journal of Imaging 11, no. 8: 265. https://doi.org/10.3390/jimaging11080265
APA StyleYu, Q., Xue, S., & Zheng, Y. (2025). A Vision Method for Detecting Citrus Separation Lines Using Line-Structured Light. Journal of Imaging, 11(8), 265. https://doi.org/10.3390/jimaging11080265