Line Segment Extraction Algorithm Optimization Based on Shi-Tomasi Corner Detector
-
摘要: 针对现有的线段提取算法在图像中的天空、阴影、玻璃以及地板等模糊区域提取出较多的无意义线段的问题,提出了一种基于Shi-Tomasi角点验证的线段提取算法优化方法(ST-Lines算法):首先,使用经典线段提取算法进行线段提取;然后,采用Shi-Tomasi角点检测算法提取角点,并利用滑动窗口对所得的角点进行非极大值抑制;最后,根据线段长度、线段端点圆形框内的角点分布情况以及K最近邻算法对每条线段进行有无意义验证,尽可能多地剔除无意义线段。并利用YorkUrban线段数据集,对ST-Lines算法与原线段提取方法进行测试对比。对比结果表明:ST-Lines算法在平均准确率、F-score、平均线段长度上有所提高,且降低了平均线段数量。
-
关键词:
- Shi-Tomasi角点检测 /
- 无意义线段 /
- 线段提取优化 /
- K最近邻算法
Abstract: The existing line segment extraction algorithm extracts many meaningless lines from blurred areas such as the sky, shadow, glass and floor in the image. To solve this problem, a method for line segment extraction algorithm optimization based on Shi-Tomasi corner detector is proposed, which is called ST-Lines. It firstly uses a classic line segment extraction algorithm to extract lines. Then corners are extracted with the Shi-Tomasi corner detector and non-maximum suppression is applied to them with a sliding window. Finally, it verifies the meaning of each line segment and removes as many meaningless line segments as possible to optimize the line segment extraction algorithm based on the length of the line segment, the distribution of corners in the circle region of endpoints, and the K-nearest neighbor algorithm. The YorkUrban line segment dataset is used to compare ST-Lines algorithm and the original algorithm. The experimental results show that ST-Lines algorithm can improve the accuracy, F-score and the averageline length and reduce the average line number. -
表 1 6种算法在数据集的平均结果对比
Table 1. The comparison of average results of 6 algorithms in the dataset
算法 AP AR F-score NUM LENGTH FPS EDLines 0.149 1 0.530 0 0.232 8 953.323 5 26.275 9 36.428 5 LSD 0.167 7 0.432 1 0.241 6 757.578 4 25.173 6 15.887 8 LSM 0.146 9 0.319 5 0.201 2 690.951 0 28.300 0 0.257 7 Linelet 0.159 1 0.507 0 0.242 2 940.656 9 23.028 7 0.037 7 EDLines+Corner 0.178 9 0.512 1 0.265 1 699.509 8 30.485 8 29.059 8 LSD+Corner 0.181 4 0.409 2 0.251 3 608.156 9 27.609 2 13.298 5 -
[1] ETEMADI A. Robust segmentation of edge data[C]//Proceedings of the 1992 International Conference on Image Processing and its Applications. Maastricht, Netherlands: IET, 1992: 311-314. [2] TOPAL C, AKINLAR C. Edge drawing: a combined real-time edge and segment detector[J]. Journal of Visual Communication and Image Representation, 2012, 23(6): 862-872. doi: 10.1016/j.jvcir.2012.05.004 [3] AKINLAR C, TOPAL C. EDLines: a real-time line segment detector with a false detection control[J]. Pattern Recognition Letters, 2011, 32(13): 1633-1642. doi: 10.1016/j.patrec.2011.06.001 [4] BURNS J B, HANSON A R, RISEMAN E M. Extracting straight lines[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1986, 8(4): 425-455. [5] GROMPONE VON GIOI R, JAKUBOWICZ J, MOREL J, et al. LSD: a fast line segment detector with a false detection control[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2008, 32(4): 722-732. http://www.researchgate.net/profile/Gregory_Randall/publication/41910459_LSD_A_Fast_Line_Segment_Detector_with_a_False_Detection_Control/links/559561e208ae21086d20657c.pdf [6] DESOLNEUX A, MOISAN L, MOREL J M. Meaningful alignments[J]. International Journal of Computer Vision, 2000, 40(1): 7-23. doi: 10.1023/A:1026593302236 [7] HAMID N, KHAN N. LSM: perceptually accurate line segment merging[J]. Journal of Electronic Imaging, 2016, 25(6): 061620/1-11. [8] SUÁREZ I, MUOZ E, BUENAPOSADA J M, et al. FSG: a statistical approach to line detection via fast segments grouping[C]//Proceedings of the 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems. Madrid, Spain: IEEE, 2018: 97-102. [9] SALAUN Y, MARLET R, MONASSE P. Multiscale line segment detector for robust and accurate SfM[C]//Proceedings of the 23rd International Conference on Pattern Recognition. Cancun, Mexico: IEEE, 2017: 2000-2005. [10] CHO N G, YUILLE A, LEE S W. A novel linelet-based representation for line segment detection[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017, 40(5): 1195-1208. [11] LIU C, ABERGEL R, GOUSSEAU Y, et al. LSDSAR, a Markovian a contrario framework for line segment detection in SAR images[J]. Pattern Recognition, 2020, 98: 107034/1-13. [12] LI H, YU H, YANG W, et al. ULSD: unified line segment detection across pinhole, fisheye, and spherical cameras[J]. ISPRS Journal of Photogrammetry and Remote Sen-sing, 2021, 178: 187-202. doi: 10.1016/j.isprsjprs.2021.06.004 [13] XUE N, BAI S, WANG F, et al. Learning attraction field representation for robust line segment detection[C]//Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach, CA: IEEE, 2020: 1595-1603. [14] XUE N, BAI S, WANG F D, et al. Learning regional attra-ction for line segment detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021, 43(6): 1998-2013. doi: 10.1109/TPAMI.2019.2958642 [15] MORAVEC H P. Techniques towards automatic visual obstacle avoidance[C]//Proceedings of the 1977 International Joint Conference on Artificial Intelligence. Tokyo, Japan: IJCAI, 1977: 584-584. [16] HARRIS C, STEPHENS M. A combined comer and edge detector[C]//Proceedings of the 4th Alvey Vision Conference. Manchester: University of Sheffield Printing Unit, 1988: 147-151. [17] SHI J, TOMASI C. Good features to track[C]//Procee-dings of the 1994 IEEE Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 1994: 593-600. [18] SMITH S M, BRADY J M. SUSAN-A new approach to low-level image processing[J]. International Journal of Computer Vision, 1997, 23(1): 45-78. doi: 10.1023/A:1007963824710 [19] ROSTEN E, DRUMMOND T. Machine learning for high-speed corner detection[C]//Proceedings of the 8th European Conference on Computer Vision. Berlin: Springer, 2006: 430-443. [20] ROSTEN E, PORTER R, DRUMMOND T. Faster and be-tter: a machine learning approach to corner detection[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2010, 32(1): 105-119. [21] DENIS P, ELDER J H, ESTRADA F J. Efficient edge-based methods for estimating manhattan frames in urban imagery[C]//Proceedings of the 10th European Confe-rence on Computer Vision: Part Ⅱ. Berlin: Springer, 2008: 197-210. -