Threshold Segmentation and Length Measurement Algorithms for Irregular Curves in Complex Backgrounds
Abstract
:1. Introduction
- (1)
- We propose the QBTS algorithm based on a grayscale histogram, which can quickly and accurately segment the target curve from the neon light design renderings with background interference.
- (2)
- We propose the SPSLM algorithm based on the 8-neighborhood model, which improves the accuracy of irregular curve length measurement.
- (3)
- We constructed three new image datasets for performance testing of the two proposed algorithms.
2. Proposed Method
2.1. Image Preprocessing
2.1.1. Image Color Space Conversion
2.1.2. HSV Image Channel Separation and Grayscale Processing
2.2. Curve Extraction
2.2.1. Get Grayscale Distribution Chart by Sliding Filter Method
2.2.2. Get the Segmentation Threshold by the Quasi-Bimodal Characteristics of the Gray Distribution Chart
2.3. Length Measurement
2.3.1. Curve Refinement
2.3.2. Skeleton Length Measurement
- If , as shown in Figure A1, then there are
- If , as shown in Figure A2, then there are
- If , as shown in Figure A3, then there are
- If , as shown in Figure A4, then there are
- If , as shown in Figure A5, then there are
- If , as shown in Figure A6, then there are
- If , as shown in Figure A7, then there are
- If , as shown in Figure A8, then there are
2.3.3. Size Transformation
3. Experiments and Results
3.1. Performance Metrics
3.2. Dataset
3.3. Experimental Results
3.3.1. Performance Analysis of the QBTS Algorithm
- Accuracy of Segmentation
- Running Speed of QBTS Algorithm
3.3.2. Performance Analysis of the SPSLM Algorithm
- Accuracy of Measurement
- Running Speed of SPSLM Algorithm
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
References
- Jing, P. Landscape Green Lighting Design in Urban Derelict Land Based on Ecological Concept. Light Eng. 2017, 25, 121–127. [Google Scholar]
- Kwok, B.S.H. The Imageable City–Visual Language of Hong Kong Neon Lights Deconstructed. DES J. 2020, 23, 535–556. [Google Scholar] [CrossRef]
- Yan, J. Color Research in Urban Planning. In Proceedings of the 2018 7th International Conference on Energy and Environmental Protection (ICEEP 2018), Shenzhen, China, 15 July 2018. [Google Scholar]
- Hsieh, Y.A.; Tsai, Y.J. Machine learning for crack detection: Review and model performance comparison. J. Comput. Civil. Eng. 2020, 34, 04020038. [Google Scholar] [CrossRef]
- Kheradmandi, N.; Mehranfar, V. A critical review and comparative study on image segmentation-based techniques for pavement crack detection. Constr. Build. Mater. 2022, 321, 126162. [Google Scholar] [CrossRef]
- Al Tawil, L.; Aldokhayel, S.; Zeitouni, L.; Qadoumi, T.; Hussein, S.; Ahamed, S.S. Prevalence of self-reported computer vision syndrome symptoms and its associated factors among university students. Eur. J. Ophthalmol. 2020, 30, 189–195. [Google Scholar] [CrossRef] [PubMed]
- Chawla, A.; Lim, T.C.; Shikhare, S.N.; Munk, P.L.; Peh, W.C. Computer vision syndrome: Darkness under the shadow of light. Can. Assoc. Radiol. J. 2019, 70, 5–9. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Canny, J. A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, PAMI-8, 679–698. [Google Scholar] [CrossRef]
- Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef] [Green Version]
- Al-Smadi, M.M.; Abdulrahim, K.; Seman, K.; Salam, R.A. A new spatio-temporal background–foreground bimodal for motion segmentation and detection in urban traffic scenes. Neural Comput. Appl. 2020, 32, 9453–9469. [Google Scholar] [CrossRef]
- Akagic, A.; Buza, E.; Omanovic, S.; Karabegovic, A. Pavement crack detection using Otsu thresholding for image segmentation. In Proceedings of the 2018 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 21 May 2018. [Google Scholar]
- Lin, L.; Yang, S. Weighted two-dimensional Otsu threshold approached for image segmentation. In Proceedings of the 2019 IEEE Symposium Series on Computational Intelligence (SSCI), Xiamen, China, 6 December 2019. [Google Scholar]
- Quan, Y.; Sun, J.; Zhang, Y.; Zhang, H. The method of the road surface crack detection by the improved Otsu threshold. In Proceedings of the 2019 IEEE International Conference on Mechatronics and Automation (ICMA), Tianjin, China, 4 August 2019. [Google Scholar]
- Ji, A.; Xue, X.; Wang, Y.; Luo, X.; Xue, W. An integrated approach to automatic pixel-level crack detection and quantification of asphalt pavement. Autom. Constr. 2020, 114, 103176. [Google Scholar] [CrossRef]
- Shao, C.; Chen, Y.; Xu, F.; Wang, S. A kind of pavement crack detection method based on digital image processing. In Proceedings of the 2019 IEEE 4th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chengdu, China, 20 December 2019. [Google Scholar]
- Li, S.; Zhao, X. Pixel-level detection and measurement of concrete crack using faster region-based convolutional neural network and morphological feature extraction. Meas. Sci. Technol. 2021, 32, 065010. [Google Scholar] [CrossRef]
- Yang, X.; Li, H.; Yu, Y.; Luo, X.; Huang, T.; Yang, X. Automatic pixel-level crack detection and measurement using fully convolutional network. Comput.-Aided Civil Infrastruct. Eng. 2018, 33, 1090–1109. [Google Scholar] [CrossRef]
- Kim, S.K.; Shin, H.G.; Timilsina, S.; Kim, J.S. Determining the Fracture Process Zone Length and Mode I Stress Intensity Factor in Concrete Structures via Mechanoluminescent Technology. Sensors 2020, 20, 1257. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Li, G.; Lan, D.; Zheng, X.; Li, X.; Zhou, J. Automatic pavement crack detection based on single stage salient-instance segmentation and concatenated feature pyramid network. IEEE Trans. Autom. Sci. Eng. 2021, 1–17. [Google Scholar] [CrossRef]
- Fan, Z.; Lin, H.; Li, C.; Su, J.; Bruno, S.; Loprencipe, G. Use of Parallel ResNet for High-Performance Pavement Crack Detection and Measurement. Sustainability 2022, 14, 1825. [Google Scholar] [CrossRef]
- Huang Peng, Q.Z.; Huang, W.W.; Lu, Y. Automatic crack length measurement of concrete structure based on image processing. Adv. Mater. Res 2014, 1030, 728–731. [Google Scholar] [CrossRef]
- Chao, Y.U.; Geng, D.; Huang, Z.J.; Zhu, Z.H.; Shi, Y.F. Refinement Identification and Evaluation of Tunnel Lining Cracks. J. Highway Transp. Res. Dev. 2020, 14, 75–83. [Google Scholar]
- Ghafil, H.N.; Ali, D.M.B. Cracks measurement on the basis of machine vision. IJVIPNS-IJENS 2016, 16, 1–6. [Google Scholar]
- Adhikari, R.S.; Moselhi, O.; Bagchi, A. Image-based retrieval of concrete crack properties for bridge inspection. Autom. Constr 2014, 39, 180–194. [Google Scholar] [CrossRef]
- Ganesan, P.; Rajini, V. Assessment of satellite image segmentation in RGB and HSV color space using image quality measures. In Proceedings of the 2014 International Conference on Advances in Electrical Engineering (ICAEE), Paris, France, 5 May 2014. [Google Scholar]
- Herng, O.W.; Nasir, A.S.A.; Chin, O.B.; Tan, E.S.M.M. Harumanis Mango Leaves Image Segmentation on RGB and HSV Colour Spaces using Fast k-Means Clustering. In Proceedings of the International Conference on Man Machine Systems (ICoMMS 2021), Perlis, Malaysia, 19 October 2021. [Google Scholar]
- Mou, S.-M.; Du, H.-Y.; Su, P.; Cha, X.-H.; Chen, G.-Y. A new improved fast parallel thinning algorithm. Microelectron. Comput. 2013, 30, 53–55. [Google Scholar]
Method | Average Accuracy (%) | Time / Time Bimodal |
---|---|---|
QBTS | 97.9 | 0.47 |
OTSU | 89.6 | 0.98 |
Bimodal | 64.4 | 1 |
Method | Average Accuracy (%) | Average Running Time (S) |
---|---|---|
SPSLM | 99.1 | 0.615 |
Method 1 | 88.3 | 0.565 |
Method 2 | 92.5 | 0.577 |
Method 3 | 19.9 | 0.001 |
Method 4 | 88.1 | 6.90 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Ruan, X.; Deng, H.; Xu, Q.; Liu, Y.; He, J. Threshold Segmentation and Length Measurement Algorithms for Irregular Curves in Complex Backgrounds. Sensors 2022, 22, 5761. https://doi.org/10.3390/s22155761
Ruan X, Deng H, Xu Q, Liu Y, He J. Threshold Segmentation and Length Measurement Algorithms for Irregular Curves in Complex Backgrounds. Sensors. 2022; 22(15):5761. https://doi.org/10.3390/s22155761
Chicago/Turabian StyleRuan, Xusheng, Honggui Deng, Qiguo Xu, Yang Liu, and Jun He. 2022. "Threshold Segmentation and Length Measurement Algorithms for Irregular Curves in Complex Backgrounds" Sensors 22, no. 15: 5761. https://doi.org/10.3390/s22155761
APA StyleRuan, X., Deng, H., Xu, Q., Liu, Y., & He, J. (2022). Threshold Segmentation and Length Measurement Algorithms for Irregular Curves in Complex Backgrounds. Sensors, 22(15), 5761. https://doi.org/10.3390/s22155761