激光线提取

需要使用激光线提取(LLE)算法从相机传感器捕获的对象的轮廓序列中创建深度图。

LLE算法的目的是为了测量用户自定义感兴趣区域(ROI)中每列传感器帧的垂直轮廓的线位置。

对于对象位置的每一步,检测都单独分析每一列帧,产生一行输出位置,存储为灰度值。

下图说明了深度图的生成。

The class ELaserLineExtractor provides the laser line extraction functionality in Open eVision.

Uses the method ELaserLineExtractor.AnalysisMode to select one of the following algorithms to extract the laser line (see below for more details):

最大检测返回强度最大像素的位置。这是最快的方法,但不支持子像素精度。
峰值检测方法检测局部的最大值。如果检测到几个最大值,则返回强度最高的值。以子像素精度返回位置。
当激光线分布在几个像素上时,重心算法是合适的。以子像素精度返回位置。

您还可以设置阈值以排除强度较低的像素。

激光线提取算法返回的线位置是相对于关注区域的底部。因此,深度图中的值范围介于0(ROI的底部)到ROI高度之间。

激光线提取方法

最大检测

最大检测算法分析ROI列中的所有像素,以确定具有最大强度的像素。下图显示了给定ROI列上的激光线位置。

ROI轮廓上的最大检测

我们还建议在处理链中包括:

降低图像高频变化的低通滤波器。
消除传感器背景噪声的阈值。

峰值检测

峰值检测算法依赖于一阶导数函数的离散简化。

f'(x) 输出给定 f(x) 的斜率,其沿着 x

f(x)f'(x) 绘制

我们根据两点形式的线方程,通过检测 f’(x) 改变其信号位置来计算线位置:

其中 (x1, y1) 和 是线上的(x2, y2)两点并带有 ,我们获得 的以下方程:x2≠ x1y = 0

重心

重心(COG)方法使用了计算图像对象质心的算法。也被称为“平面图形的质心”,COG由以下方程式获得:

    

其中 是CoG的坐标, 是沿 和 轴的像素强度。axy

ROI轮廓上的重心

低通线性滤波器

或者,您还可以在线提取之前应用低通线性滤波器,以便降低图像中的噪声和高频。

低通滤波器在1x3滑动窗口上应用卷积运算符。卷积内核的3个元素(A、B和C)是可配置的,可以为任何正整数。下图说明了卷积内核元素在给定ROI内的定位。

You can activate the low-pass filter for any of the laser line extraction methods with the method ELaserLineExtractor.EnableSmoothing(true/false). Parameters A, B and C are set with ELaserLineExtractor.SetSmoothingParameters(A, B, C).

Depth map Z resolution

As explained above, the laser line extraction computes the sub-pixel position of the laser line profile for each column of the region of interest.
This position is encoded in a 16-bit depth map (EDepthMap16).
The resolution controls the way the sub-pixel positions are converted to 16-bit fixed point values (that is how many bits are allocated to represent the fractional part of the sub-pixel position).
On a EDepthMap16, use the method EDepthMap16.ZResolution to retrieve the resolution. It is a floating-point value used to convert the integer pixel value to a real depth value.
By default, ELaserLineExtractor computes the best resolution depending on the height of the region of interest. The following table lists typical resolution values depending on the height of the processed frame or region of interest.

Frame or ROI height

Bits used for the fractional part

Z resolution

100

8

1/256 = 0.00390625

200

8

1/256 = 0.00390625

400

7

1/128 = 0.0078125

800

6

1/64 = 0.015625

2500

4

1/16 = 0.0625

Use the optional parameter zResolution of the constructor ELaserLineExtractor.ElaserLineExtractor to fix the Z resolution.
If you do not set the parameter zResolution, an algorithm computes the optimal value. Use ElaserLineExtractor.DepthMap to query the returned depth map and get the effective resolution.
If you are using the hardware laser line extraction with the Coaxlink Quad 3D-LLE, the fixed point format is set by the configuration: 8_8 or 11_5 for 8- or 5-bit fractional part.
2 See documentation.euresys.com/Products/COAXLINK/COAXLINK/en-us/Content/03_Interfaces/functional-guide/lle/LLE_Processing_Core_Characteristics.htm