An improved internal advancement algorithm for light stripe center extraction
-
摘要: 针对浑浊水体中光条纹中心点提取精度低、抗干扰能力弱的问题,提出一种改进的内部推进算法,旨在提升复杂环境下光条纹中心点提取的准确性和鲁棒性。首先利用中值滤波预处理图像以抑制噪声,结合八邻域法快速定位光条纹起始点;随后引入灰度邻域属性法,动态估算当前行的光条纹像素宽度,并基于此范围应用最大类间方差法自适应确定二值化阈值,有效减少背景干扰;最后在约束的像素宽度范围内采用灰度重心法计算初始中心点,并以此为基础向上、下方向推进搜索光条纹中心点。实验在多种浑浊水体环境及不同结构光形态下进行对比测试。结果表明,与原始内部推进算法相比,本文方法均方根误差降低了13.33%,算法运行速度较Steger算法提升了69.07%,实现了精度与速度的平衡。Abstract: Aiming at the problems of low extraction accuracy and weak anti-interference ability of line structure light centroids in turbid water bodies, this study proposes an improved internal advancement algorithm, which aims to enhance the accuracy and robustness of the extraction of line structure light centroids in complex environments. Firstly, the median filter is used to preprocess the image to suppress the noise, and combined with the eight-neighborhood method to quickly locate the starting point of the light stripe; subsequently, the grayscale neighborhood attribute method is introduced to dynamically estimate the pixel width of the current line of the line structured light, and based on the range of the maximum interclass variance method is applied to adaptively determine the binarized threshold value, which effectively reduces the background interference; finally, the grayscale gravity method is used to calculate the initial centroid in the constrained range of pixel widths and use this as the basis to advance upward and downward to search for the center point of the line structured light. Comparison tests are conducted in various turbid water environments and different structured light patterns. The results show that compared with the original internal advancement algorithm, the root mean square error of this paper's method is reduced by 13.33%, and the running speed of the algorithm is increased by 69.07% compared with Steger's algorithm, which realizes the balance between accuracy and speed.
-
Key words:
- structured light /
- center point extraction /
- self-adaption /
- pixel width
-
图 2 光条纹宽度不均匀图片提取结果
Figure 2. Image extraction results of uneven light stripe width
(a) Light stripe original image; (b) by proposed algorithm; (b1) first part by Proposed Algorithm (b2) second part by Proposed Algorithm; (c) by Internal Propulsion Algorithm; (c1)first part by Internal Propulsion Algorithm ; (c2) second part by Internal Propulsion Algorithm
图 5 不同浓度浑水环境结果图
Figure 5. The result diagram of different concentrations of turbid water environment
(a) 200 g/m3 by Proposed Algorithm; (a1) first part; (a2) second part; (b)200 g/m3 by Internal Propulsion Algorithm; (b1)first part; (b2) second part;(c) 200 g/m3 by Steger Algorithm; (c1) first part; (c2)second part; (d) 400 g/m3 by Proposed Algorithm; (d1) first part; (d2) The 400 g/m3 result diagram of Proposed Algorithm second part; (e) 400 g/m3 by Internal Propulsion Algorithm; (e1) first part; (e2) second part; (f) 400 g/m3 by Steger Algorithm; (f1) first part; (f2) second part; (g) 600 g/m3 by Proposed Algorithm; (g1)first part; (g2) second part; (h) 600 g/m3 by Internal Propulsion Algorithm; (h1) first part; (h2) second part; (i) 600 g/m3 by Steger Algorithm; (i1) first part; (i2) second part
图 6 中心点提取结果图
Figure 6. The extraction result diagram of center point;
(a) extraction result diagram of curve; (b1) by Proposed Algorithm first part; (b2) by Internal Propulsion Algorithm first part; (b3)first part of curve by Steger Algorithm ; (c1) second part of curve by Proposed Algorithm; (c2) second part of curve by Internal Propulsion Algorithm ; (c3)second part of curve by Steger Algorithm ; (d) extraction result diagram of arc; (e1)first part by Proposed Algorithm ; (e2) first part of arc by Internal Propulsion Algorithm first part; (e3) first part of arc by Steger Algorithm; (f1) second part of arc by Proposed Algorithm; (f2) second part of arc by Internal Propulsion Algorithm; (f3) second part by of by Steger Algorithm
图 7 三种算法直线提取结果图
Figure 7. The extraction result diagram of straight line;
(a) The result diagram of Proposed Algorithm; (a1) Proposed Algorithm first part; (a2) second part by Proposed Algorithm ; (b) Internal Propulsion Algorithm; (b1)Internal Propulsion Algorithm first part; (b2) Internal Propulsion Algorithm second part; (c) Steger Algorithm; (c1) Steger Algorithm first part; (c2) Steger Algorithm second part
表 1 三种算法获得的部分中心点像素坐标
Table 1. Partial center point pixel coordinates obtained by three algorithms
Turbid Water Concentration/(g/m3) Proposed Algorithm/pixel Internal Algorithm/pixel Steger Algorithm/pixel 200 g/m3 (671, 794.4017 )(671, 792.0) (671, 793.9933 )(672, 793.9663 )(672, 792.0) (672, 793.9936 )(673, 793.9679 )(672, 792.0) (673, 793.9941 )(674, 793.9685 )(672, 792.0) (674, 793.9949 )(675, 793.5261 )(672, 792.0) (675, 793.9958 )400 g/m3 (630, 800.8203 )(630, 800.5) (630, 801.0062 )(631, 800.8198 )(631, 800.0) (631, 801.0067 )(632, 800.8425 )(632, 800.5) (632, 801.0072 )(633, 800.8409 )(633, 800.5) (633, 801.0078 )(634, 800.8436 )(634, 800.5) (634, 801.0082 )600 g/m3 (695, 789.5021 )(695, 789.5) (695, 777.5806 )(696, 789.5316 )(696, 789.5) (696, 790.0134 )(697, 789.5316 )(697, 789.5) (697, 778.8940 )(698, 789.5316 )(698, 789.5) (698, 779.8494 )(699, 789.5169 )(699, 789.5) (699, 790.0259 )表 2 三种算法对两种曲线提取的部分中心点像素坐标
Table 2. Three algorithms extract pixel coordinates of partial center points for two types of curves
graph proposed algorithm/pixel internal algorithm/pixel Steger algorithm/pixel ( 1184 ,1414.7147 )( 1184 ,1410.0 )( 1184 ,1414.2848 )( 1185 ,1415.6620 )( 1185 ,1411.5 )( 1185 ,1416.4438 )curve ( 1186 ,1417.3783 )( 1186 ,1413.0 )( 1186 ,1419.2107 )( 1187 ,1419.3252 )( 1187 ,1415.5 )( 1187 ,1421.2575 )( 1188 ,1421.7549 )( 1188 ,1418.0 )( 1188 ,1423.2163 )(990, 1472.9834 )(990, 1473.0 )(990, 1473.0111 )(991, 1473.3488 )(991, 1473.5 )(991, 1473.0157 )arc (992, 1473.3056 )(992, 1473.5 )(992, 1473.0191 )(993, 1473.0977 )(993, 1473.0 )(993, 1473.0221 )(994, 1473.8159 )(994, 1474.0 )(994, 1473.0251 )表 3 光条纹中心点提取时间
Table 3. Extraction time of the center point of the light stripe
No. proposed algorithm/s internal algorithm/s Steger algorithm/s 1 0.42 0.34 1.49 2 0.50 0.48 1.63 3 0.68 0.52 1.89 4 0.73 0.40 2.34 5 0.69 0.53 2.37 表 4 光条纹中心点提取标准差
Table 4. Extraction standard deviation of the center point of the light stripe
No. Proposed Algorithm/pixel Internal Algorithm/pixel Steger Algorithm/pixel 1 0.19 0.28 0.23 2 0.22 0.28 0.26 3 0.26 0.30 0.24 4 0.31 0.32 0.24 5 0.31 0.34 0.26 -
[1] 王胜春, 韩强, 王昊, 等. 行车环境下钢轨轮廓激光条纹中心的提取方法[J]. 光学学报, 2019, 39:0212004Wang Shengchun, Han Qiang, Wang Hao, et al. Laser stripe center extraction method of rail profile in train-running environment[J]. Acta Optica Sinica, 2019, 39: 0212004 [2] 张宇, 黄丹平, 田颖, 等. 复杂物体线结构光中心线提取方法研究[J]. 电子测量技术, 2023, 46(1):167-172Zhang Yu, Huang Danping, Tian Ying, et al. Research on extraction method of structured light center line of complex object[J]. Electronic Measurement Technology, 2023, 46(1): 167-172 [3] 刘硕, 张宗华, 高楠, 等. 复合表面形貌测量中通道串扰和色差消除方法[J]. 光电工程, 2023, 50:220340Liu Shuo, Zhang Zonghua, Gao Nan, et al. Elimination method of crosstalk and chromatic aberration between color channels for composite surface measurement[J]. Opto-Electronic Engineering, 2023, 50: 220340 [4] 朱坡, 张宗华, 高楠, 等. 彩色高反光物体表面三维形貌测量技术[J]. 红外与激光工程, 2023, 52:20220761Zhu Po, Zhang Zonghua, Gao Nan, et al. Three-dimensional surface topography measurement technology of color highly reflective objects[J]. Infrared and Laser Engineering, 2023, 52: 20220761 [5] 许丽, 周永昊, 陆桂明, 等. 河流自然水体中三维视觉测量[J]. 光学 精密工程, 2021, 29(10):2465-2480Xu Li, Zhou Yonghao, Lu Guiming, et al. River underwater 3D vision measurement method[J]. Optics and Precision Engineering, 2021, 29(10): 2465-2480 [6] 许丽, 周永昊, 张帆, 等. 基于光平面约束的水下三维视觉测量系统[J]. 中国激光, 2020, 47:0904004Xu Li, Zhou Yonghao, Zhang Fan, et al. Underwater three-dimensional measurement vision system using light-plane constraint[J]. Chinese Journal of Lasers, 2020, 47: 0904004 [7] 商执亿, 王建华, 尹培丽, 等. 金属表面非相干线结构光条纹中心提取方法[J]. 应用光学, 2022, 43(3):503-509Shang Zhiyi, Wang Jianhua, Yin Peili, et al. Extraction of incoherent linear structured light stripe center on metal surface[J]. Journal of Applied Optics, 2022, 43(3): 503-509 [8] 甘宏, 张超, 李林, 等. 复杂背景下激光条纹中心亚像素提取方法[J]. 光电工程, 2019, 46:180457Gan Hong, Zhang Chao, Li Lin, et al. Sub-pixel extraction of laser stripe in complex background[J]. Opto-Electronic Engineering, 2019, 46: 180457 [9] 王志永, 于宇, 王武越, 等. 基于改进Steger算法流程的线激光中心提取[J]. 电子测量技术, 2023, 46(1):84-89Wang Zhiyong, Yu Yu, Wang Wuyue, et al. Line laser center extraction based on improved Steger algorithm[J]. Electronic Measurement Technology, 2023, 46(1): 84-89 [10] 杨毅, 闫兵, 董大伟, 等. 基于二次平滑算法的线结构光中心线提取方法[J]. 激光与光电子学进展, 2020, 57:101504Yang Yi, Yan Bing, Dong Dawei, et al. Method for extracting the centerline of line structured light based on quadratic smoothing algorithm[J]. Laser & Optoelectronics Progress, 2020, 57: 101504 [11] 贾倩倩, 王伯雄, 罗秀芝. 光切法形貌测量中光条中心的亚像素提取[J]. 光学 精密工程, 2010, 18(2):390-396Jia Qianqian, Wang Boxiong, Luo Xiuzhi. Extraction of central positions of light stripe in sub-pixel in 3D surface measurement based on light sectioning method[J]. Optics and Precision Engineering, 2010, 18(2): 390-396 [12] 潘硕, 邵新杰, 李晓磊, 等. 基于块匹配的激光条纹亚像素中心提取[J]. 激光与红外, 2021, 51(6):814-819Pan Shuo, Shao Xinjie, Li Xiaolei, et al. Sub-pixel extraction of laser stripe center based on block-matching[J]. Laser & Infrared, 2021, 51(6): 814-819 [13] 王荣军, 黄明明, 马立东. 基于单边跟踪与中点预测的线结构光中心提取算法研究[J]. 中国激光, 2024, 51:0804005Wang Rongjun, Huang Mingming, Ma Lidong. Research on center extraction algorithm of line structured light based on unilateral tracking and midpoint prediction[J]. Chinese Journal of Lasers, 2024, 51: 0804005 [14] 于新善, 孟祥印, 金腾飞, 等. 基于改进Canny算法的物体边缘检测算法[J]. 激光与光电子学进展, 2023, 60:2212002Yu Xinshan, Meng Xiangyin, Jin Tengfei, et al. Object edge detection algorithm based on improved Canny algorithm[J]. Laser & Optoelectronics Progress, 2023, 60: 2212002 [15] 卜民众, 吴国新, 黄金鹏, 等. 基于空间灰度重心推进的线结构光中心提取[J]. 电子测量技术, 2024, 47(2):44-50Bu Minzhong, Wu Guoxin, Huang Jinpeng, et al. Center extraction of linear structured light based on spatial gray centroid progression[J]. Electronic Measurement Technology, 2024, 47(2): 44-50 [16] 王泽浩, 张中炜. 自适应方向模板线结构光条纹中心提取方法[J]. 激光杂志, 2017, 38(1):60-64Wang Zehao, Zhang Zhongwei. Adaptive direction template method to extract the center of structured light[J]. Laser Journal, 2017, 38(1): 60-64 [17] 李伟明, 梅枫, 胡增, 等. 线激光光条中心内部推进提取算法[J]. 中国激光, 2021, 48:1104002Li Weiming, Mei Feng, Hu Zeng, et al. Internal propulsion algorithm for extracting center of line laser stripe[J]. Chinese Journal of Lasers, 2021, 48: 1104002 [18] 李伟明, 彭国, 高兴宇, 等. 线激光光条中心快速提取算法[J]. 中国激光, 2020, 47:0304002Li Weiming, Peng Guo, Gao Xingyu, et al. Fast extraction algorithm for line laser strip centers[J]. Chinese Journal of Lasers, 2020, 47: 0304002 [19] 严婷婷, 李锋, 王琦. 高斯加权的二维灰度重心法提取光条中心[J]. 计算机工程与设计, 2020, 41(12):3570-3574Yan Tingting, Li Feng, Wang Qi. Gaussian weighted two-dimensional gray center of gravity method for extracting strip center[J]. Computer Engineering and Design, 2020, 41(12): 3570-3574 -