Laser Line Extraction
A Laser Line Extraction (LLE) algorithm is required to create a depth map from a sequence of profiles of the object captured by the camera sensor.
The objective of an LLE algorithm is to measure the line position along a vertical profile in every column of a sensor frame, within a user-defined region of interest (ROI).
For every step of the object position, the detection analyzes each column of a frame individually and produces a row of output positions, stored as gray values.
The figure below illustrates a depth map generation.
The ELaserLineExtractor class provides the laser line extraction functionality in Open eVision. It implements several algorithms to extract the laser line:
| □ | Maximum detection returns the position of maximum intensity. It’s the fastest method but don’t supports sub-pixel precision. |
| □ | Peak detection approach detects local maxima. If several maxima are detected, the one with the highest intensity is returned. The position is returned with sub-pixel precision. |
| □ | Center of gravity algorithm is suitable when the laser line is spread over several pixels. The position is returned with sub-pixel precision. |
Optionally, a low-pass linear filter can be applied in front of the line extraction in order to reduce the noise and the high frequencies in the image. A threshold value excludes pixels with low intensity.
Values returned by the laser line extraction algorithms are relative to the bottom of the region of interest. Thus values in the depth map range from 0 (bottom on the ROI) to the height of the ROI.
Low-pass linear filter
The low-pass filter applies a convolution operator on a 1x3 sliding window. The 3 elements of the convolution kernel (A, B, and C) are configurable, accepting any positive integer. The figure below illustrates the positioning of the convolution kernel elements within a given ROI.
The low-pass filter can be activated for any of the laser line extraction methods with the method ELaserLineExtractor::SetEnableSmoothing(true/false). Parameters A, B and C are set with ELaserLineExtractor::SetSmoothingParameters(A, B, C).
