Advanced Search

ISSN1001-3806 CN51-1125/TN Map

Volume 44 Issue 2
Apr.  2020
Article Contents
Turn off MathJax

Citation:

Laser stripe center extraction algorithm based on gray weight model

  • Corresponding author: LI Lin, lilin@fafu.edu.cn
  • Received Date: 2019-05-27
    Accepted Date: 2019-07-18
  • In order to extract the center of laser stripe accurately in noisy environment, the improved gray-scale weight model was adopted to extract subpixel centers of laser fringes. The image acquired by 3-D laser imaging system was processed by means of mean threshold method and the improved gray weight model. The method was compared with the traditional algorithm. The results show that, the algorithm can extract laser fringe region more completely. The average fitting correlation coefficient is 0.9809 (closest to 1). The maximum difference of average column coordinates is 0.4518pixel (closest to 0). The average coefficient of variation is 0.0062 (closest to 0). Compared with other methods, it has better results. It can suppress the influence of multi-noise environment on laser stripe extraction and extract subpixel centers of laser fringes accurately. It has good robustness. The algorithm provides a reference for extracting the center of laser fringes accurately.
  • 加载中
  • [1]

    YE D H.Analysis of characteristics of Gaussian beam and its application[J].Laser Technology, 2019, 43(1):142-146(in Chinese).
    [2]

    LI L, WANG K C P, LI Q J, et al.Automated runway groove measurement andevaluation[J].KSCE Journal of Civil Engineering, 2017, 21(3):758-765. doi: 10.1007/s12205-016-0789-6
    [3]

    YANG T Sh, LI M, XIN H M, et al.The adaptive threshold segmentation algorithm based on morphology[J].Electronic Design Engineering, 2015, 23(13):102-104(in Chinese).
    [4]

    WANG W H, SUN J H, LIN Zh, et al. Stripe center extrication algo-rithm for structured-light in rail wear dynamic measurement[J].Laser & Infrared, 2010, 40(1):88-89(in Chinese).
    [5]

    LIU Ch, LI B, GUO Y.Research of rapid laser stripe extraction in real-time guiding of welding robots[J].Laser Technology, 2015, 39(5):642-647(in Chinese).
    [6]

    XIN J Q, WU Y B, HUANG J.Research on the extraction of large curvature laser stripes enter line[J].China Computer Communication, 2018(2):39-40(in Chinese).
    [7]

    WANG Z H, ZHANG Zh W.Adaptive direction template method to extract the center of structured light[J].Laser Journal, 2017, 38(1):60-64(in Chinese).
    [8]

    HE J J, ZHANG G J.Study on method for processing image of strip in structured-light 3-D vision measuring technique[J].Journal of Beijing University of Aeronautics and Astronautics, 2003, 29(7):593-597(in Chinese).
    [9]

    PARKA J Y, KMBC, NAC J, et al.Using structured light for efficient depth edge detection[J].Image and Vision Computing, 2008, 26(11):1446-1465.
    [10]

    GAO Sh Y, YANG K Zh.Research on central position extraction of laser strip based on varied-boundary Gaussian fitting[J].Chinese Journal of Scientific Instrument, 2011, 32(5):1132-1137(in Chinese).
    [11]

    ZHANG X Y, WANG X Q, BAI F Zh, et al.Improved gray centroid method for extracting the centre-line of light-stripe[J].Laser & Infrared, 2016, 46(5):622-626(in Chinese).
    [12]

    TANG Y Q, GU G H, QIAN W X, et al.Laser spot center location algorithm of four-quadrant detector based on Gaussian distribution[J].Infrared and Laser Engineering, 2017, 46(2):64-70(in Ch-inese).
    [13]

    ZHANG X H, ZHANG Sh, SUN Ch Sh.Modeling of Gaussian laser beam reflection from rough sea surface[J].Acta Physica Sinica, 2016, 65(14):144204(in Chinese).
    [14]

    SUN P Q, YANG Y Y, HE L L.An improved gaussian fitting method used in light-trap center acquiring[J].Electronic Design Engineering, 2012, 20(13):179-181(in Chinese).
    [15]

    CHEN H, ZHANG H, FAN H Y, et al.Measurement of laser wavefront curvature radius based on Talbot-Moire fringe[J].Laser Technology, 2018, 42(2):156-160(in Chinese).
    [16]

    HU Y, WANG P.Skeleton extracting algorithm via optimized discrete λ-medial axis[J]. Journal of Computer-Aided Design & Computer Graphics, 2017, 29(8):1505-1514(in Chinese).
    [17]

    WU E Ch, ZHANG H C, WU Sh.Automatic generation method of indoor and outdoor integrated navigation network based on medial axis transform algorithm[J].Journal of Geo-information Science, 2018, 20(6):730-737(in Chinese).
    [18]

    GAN H, ZHANG Ch, LI L, et al.Sub-pixel extraction of laser stripe in complex background[J]. Opto-Electronic Engineering, 2019, 46(2):85-92(in Chinese).
    [19]

    WANG L, CHEN N N, WU L, et al.Extraction of laser stripe sub-pixel center in high-noise background[J].Journal of Applied Optics, 2016, 37(2):321-326(in Chinese). doi: 10.5768/JAO201637.0207004
    [20]

    HU G L, ZHOU X, YANG T, et al.Sub-pixel centerline extraction based on light stripe adaptive grayscale weighting[J].Journal of Xi'an Jiaotong University, 2018, 52(5):21-28(in Chinese).
  • 加载中
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(18) / Tables(3)

Article views(6504) PDF downloads(25) Cited by()

Proportional views

Laser stripe center extraction algorithm based on gray weight model

    Corresponding author: LI Lin, lilin@fafu.edu.cn
  • 1. Department of Transportation and Civil Engineering, Fujian Agricultural and Forestry University, Fuzhou 350100, China
  • 2. Fujian Provincial Expressway Technology Consulting Co. Ltd., Fuzhou 350100, China

Abstract: In order to extract the center of laser stripe accurately in noisy environment, the improved gray-scale weight model was adopted to extract subpixel centers of laser fringes. The image acquired by 3-D laser imaging system was processed by means of mean threshold method and the improved gray weight model. The method was compared with the traditional algorithm. The results show that, the algorithm can extract laser fringe region more completely. The average fitting correlation coefficient is 0.9809 (closest to 1). The maximum difference of average column coordinates is 0.4518pixel (closest to 0). The average coefficient of variation is 0.0062 (closest to 0). Compared with other methods, it has better results. It can suppress the influence of multi-noise environment on laser stripe extraction and extract subpixel centers of laser fringes accurately. It has good robustness. The algorithm provides a reference for extracting the center of laser fringes accurately.

引言
  • 激光视觉成像测量系统一般由激光器和面(线)阵CCD相机构成系统主要的传感器,并与其它元件配合进行工作。激光器发射出的线结构光束投射到物体的表面,被调制成包含特定信息的激光条纹[1],通过相机记录图像信息,进行图像的分析处理、3维重建等工作,从而获取被检测物体的特征信息[2]

    线结构光条纹中心的提取是激光成像测量系统中的重要步骤,目前对于激光条纹中心的提取主要方法有极值法、阈值法、Steger算法、骨架细化法和灰度重心法等[3-7]。极值法是通过找到光强中心的极值,进而找到条纹的中心线,方法简单、处理速度较快,但是易受噪声的影响,并且当出现多个极值时,其准确性较低[8];阈值法的原理较为简单,但是当被测物体的曲率变化较大时,容易造成光纹信息的缺失;Steger算法是一种以Hessian矩阵为基础的一种方法,该算法的精度较高、鲁棒性较好,但是由于运算量大,因而处理时间较长,不适用于快速提取激光光纹中心;骨架提取法提取速度快,但是其抗噪性较差,且精度不高;灰度重心法的精度较高,但是其稳定度不高,适用于处理光强分布较为集中、宽度较为一致的情况[9-11]

    针对所采集的图片中含有多种噪声(尤其是激光器产生的噪声)的影响,提出一种准确提取激光条纹亚像素中心的方法。根据图像噪声的特性,采用双边滤波对图片进行预处理,去除图片的噪声,通过获取每一列像素极大值附近的10个像素点作为有效激光条纹提取区域,获取该区域灰度平均值,取其0.9倍作为阈值对图像进行二次分割,进一步去除图像的噪声,采用形态学转换对图片进一步处理,减少图片中毛刺并去除孤立点,利用中轴变换初步获取光条纹的像素中心,最后结合灰度权重模型精确提取条纹的中心。

1.   激光条纹中心的提取
  • 理想的激光条纹的灰度值(无量纲)呈现高斯分布[12-13],但是由于光照条件以及激光产生散斑等现象的干扰,难以获取到理想的激光条纹,因此需要对图片进行滤波处理。图片的滤波有多种成熟的算法,常用的有高斯滤波、均值滤波等。高斯模糊在图片平滑方面应用比较广泛,但是高斯模糊主要考虑像素间的空间距离关系,忽略了图片像素值之间的相似程度,易造成边缘的信息丢失。而双边滤波通过双高斯核的作用,在滤除噪声、平滑图像的同时,又做到边缘信息的保存。因此,采用双边滤波对图像进行预处理的效果较好。

  • 图像二值分割的方法主要有全局阈值、局部阈值、自适应阈值等,其中Otsu算法(最大类间差法)是自适应阈值中的一种经典的算法[14]。但是该方法对于光强分布不均,前景图和背景图像素相差较小,激光出现散斑现象,另外,激光条纹曲率变化较大的条纹中心线的提取效果并不理想。本文中提出在极值法的基础利用灰度平均阈值法,对二值图像进行分割,获取最大灰度值Tmax,采用极值法保留Tmax附近的10个像素点,得到条纹提取的区域M,此时仍有部分噪声点未消除,由(1)式计算该区域的所有像素点灰度平均值,取其0.9倍作为阈值,由(2)式对所获取的区域M再进行二次阈值分割,进一步去除噪声像素点,获取变宽度的初始条纹中心的区域。

    式中, M为极值法获取的提取区域,TaveM区域灰度平均值,I(x, y)为图像的第x行、第y列,N为该区域像素点个数。

  • 初步获取光纹中心的位置后,采用形态学方法处理图像,将形态学操作中两个基础操作腐蚀和膨胀进行组合,实现对二值图像的开运算和闭运算,去除孤立点、填补小空洞。细化法[15]是获取像素骨架常用的方法,但是其较为耗时。因而本文中采用中轴变换[16-17]处理获取的二值图像,通过计算图像的中轴作为其距离变换的脊,构造查找表,并根据它移除或维护1个像素,最终获取条纹中心(像素级)的骨架。

  • 由于噪声的影响,激光条纹灰度似高斯分布,因此,采用高斯拟合法对所提取的条纹中心的准确性有一定的影响,而采用灰度重心法提取变宽度的条纹中心,其准确性同样受到影响。本文中结合高斯拟合法、灰度重心法以及所提取的像素条纹中心,通过判断像素条纹中心的每个像素点ycyave, c差值的绝对值,提出改进的灰度权重模型:

    式中, Iy为提取的中心坐标,w(i)为初始条纹中心的宽度(变宽度),f(x, y)为初始条纹中心的灰度值,yc为像素级条纹的中心坐标,yave, c为像素级条纹中心的平均值,条纹宽度影响参量s取为20。

2.   实验及结果分析
  • 采用实验室自主开发的由MDL-F-808红外激光器和MER-230-168U3M面阵相机等为主要传感器组成的3维激光扫描系统。图 1为3维激光系统的流程图。系统可架设于导轨和实验小车,实现静态(见图 2)和动态(见图 3)环境的切换。表 1为实验测试过程的系统运行环境。系统分别采集了不同环境、像素尺寸的4组图片,来验证所提出的灰度平均阈值法和改进的灰度权重模型的稳定性和准确性。该系统采集的图像像素尺寸可自定义调整。图 4为自然光照条件下,激光光束投射在混凝土地面的图片(300pixel×400pixel)。图 5为激光投射在黑色眼镜盒上的图片(600pixel×800pixel)。图 6为激光在黑暗环境下投射在木地板的图像(320pixel×400pixel)。图 7为激光在自然光照下投射在木地板的图像(320pixel×400pixel)。

    Figure 1.  Flow chart of 3-D laser scanning system

    Figure 2.  Static 3-D laser scanning hardware

    Figure 3.  Dynamic 3-D laser scanning hardware

    the operating environment of system the configuration of system parameter
    hardware (computer) processor Intel(R)core i5-6500@3.20GHz
    random-access memory 8.00GB
    system 64-bit operating system
    software the running environment of algorithmic vs2015 and python

    Table 1.  Statement of system operating environment

    Figure 4.  Laser projection onto concrete floor

    Figure 5.  Laser projection onto glass box

    Figure 6.  Laser projection onto wood under dark background

    Figure 7.  Wood floor projected by natural light background laser

  • 首先采用双边滤波来处理图 4,并提取图片第1列像素点的灰度值,分析其灰度分布图。图 8为处理前的灰度分布图。图 9为滤波处理后灰度分布图。通过对比可见双边滤波能够较好的平滑噪声,有助于初始激光条纹中心的提取。其次,根据图像的灰度特性,分别采用自适应阈值法中的经典算法-Otsu算法,与灰度均值阈值法获取初始激光条纹区域。图 10为Otsu算法的处理结果。由于噪声较多,无法从复杂的背景中提取出有效的激光条纹区域。图 11为灰度均值自适应阈值法的处理结果。能够获取较为完整的初始激光条纹区域,并且能够有效降低复杂噪声的影响。

    Figure 8.  Gray value distribution

    Figure 9.  Gray value distribution after processing

    Figure 10.  Processing results of Otsu algorithm

    Figure 11.  Processing results of gray mean threshold method

  • 分别采用在噪声环境中光条纹提取效果较好的骨架提取法(像素级)、灰度重心法(亚像素级)、灰度权重模型(距离变换)和本文中采用的灰度权重模型(中轴变换)处理黑暗环境和自然光照下激光投射在木地板的图 6图 7,比较在不同环境下相同背景(木地板)的光条纹提取结果。同时,采用以上的4种方法处理10张自然光照条件下激光投射在木地板的图片,比较不同方法对同一背景下的光条纹提取结果。图片的像素尺寸为:320pixel×400pixel,将获取的320个数据点进行直线拟合,若数据点过少则拟合效果差,若数据过多,则会产生过拟合现象,掩盖其规律性。分别将不同方法提取的数据点进行直线拟合,通过分析直线拟合函数的相关系数R2(无量纲)的数值[18]以及相邻行的列坐标最大差值H来反映拟合效果并通过变异系数K(无量纲)来反映数据的离散性[19-20],如果R2的值越接近1,H的值越小,K的值越小则说明直线的拟合效果越好,数据的离散性较小,提取的激光条纹中心的波动性就越小、稳定性越高。将4种方法的条纹提取结果进行直线拟合,并计算相关参量,拟合结果见表 2以及图 12~图 14

    method fitting equation (natural illumination) fitting equation (darkness) R2(natural illumination) R2(darkness)
    skeleton extraction method y=-0.0097+211.0745 y=-0.0046+270.2331 0.8692 0.7298
    gray centroid method y=-0.0086+209.5805 y=-0.0050+270.0794 0.9271 0.9484
    gray level weight model (distance transform) y=-0.0056+211.9231 y=-0.0046+270.6820 0.9228 0.9279
    gray level weight model (mid-axis transform) y=-0.0059+211.1582 y=-0.0035+269.7807 0.9450 0.9522

    Table 2.  Data comparison of different methods for extracting the center of light pattern

    Figure 12.  Contrast of correlation coefficient

    Figure 13.  Contrast of the maximum difference of column coordinate

    Figure 14.  Contrast of variation coefficient

    表 2可以看出,无论在黑暗环境还是自然光照条件下骨架细化法的拟合函数的相关系数都较低,而灰度重心法和两种灰度权重模型拟合的相关系数较高,并且本文中采用的灰度权重模型(中轴变换)的相关系数更接近于1,说明本文中方法的精度、稳定性都优于其它方法。

    图 12~图 14可以看出,采用灰度权重模型(中轴变换)的相关系数的折线图接近1,且相邻行列坐标最大差值和变异系数的折线图都越接近横坐标。同时,从表 3中可得的灰度权重模型(中轴变换)相关系数平均值为0.9809,是最接近1的数值,而相邻行列坐标最大差值和变异系数的平均值分别为0.4518pixel, 0.0062,是最接近0的数值。因此,采用灰度权重模型(中轴变换)的方法提取激光条纹中心具有较好的精确性和稳定性。

    method the average of R2 the average of H/pixel the average of K
    skeleton extraction method 0.9496 1.0000 0.0085
    gray centroid method 0.9775 0.6756 0.0094
    gray level weight model (distance transform) 0.9599 0.5992 0.0063
    gray level weight model (mid-axis transform) 0.9809 0.4518 0.0062

    Table 3.  Average data comparison of different methods for extracting the center of light pattern

  • 图 4中带有多种噪声(激光器产生的电噪声以及散斑现象和漫反射现象等)激光条纹曲率小,图 5中存在噪声(存在明显散斑现象)的影响且激光条纹的曲率变化较大,图 6图 7分别是黑暗条件下(噪声较少)和自然光照条件下(噪声较多)的激光条纹曲率变化较小的图像。在不同条件下, 通过本文中方法提取的结果如图 15~图 18所示。所提取的条纹中心具有较好的稳定性和准确性,并且对于多种噪声影响的条件下仍有较好稳定性。说明该方法对于不同环境下的激光条纹中心的提取都具有较好的稳定性、鲁棒性。

    Figure 15.  Extraction result of concrete ground light center

    Figure 16.  Extraction result of glasses case light center

    Figure 17.  Extraction result of wooden floor light center under dark condition

    Figure 18.  Extraction result of wooden floor light center under natural light condition

3.   结论
  • 在多噪声背景下精确提取激光条纹中心是激光3维成像测量系统的重要步骤。本文中通过分析图像的多种噪声特性以及灰度值分布,基于灰度重心法,提出一种改进的灰度权重模型,精确提取激光条纹中心。首先,由于多噪声背景对激光条纹中心的分析提取的精度产生较大的影响,采用双边滤波去除噪声同时保存图像边缘信息,通过极值法与灰度均值阈值法的结合,实现对图像二次阈值分割,获取完整、噪声较少的初始条纹区域。其次,采用中轴变换获取条纹的像素中心,并通过与距离变换方法进行对比,结果表明, 中轴变换具有较好的稳定性。最后,结合灰度重心法和高斯拟合法,提出改进的灰度权重模型,有效改善因条纹粗细不均匀对灰度重心法提取精度的影响,具有较好稳定性和鲁棒性。目前系统的研究开发仍处于实验测试开发阶段,后期需要将激光3维测量系统应用于实验小车,系统工作环境将实现由静态到动态的转变,因此对于系统的稳定性则有更高的要求。

Reference (20)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return