## 2 Methods
### Stripe Extraction and Tracking
#### 2.3.1 Establishment of aSpatial Decision Tree Model(S-DTM)  
In a single frame, there are two basic spatial constraints between thelaser stripe and background nearby: continuity and uniqueness [20]. Although thelaser stripe is a smooth and continuous line, the jump or break points indicate it is shaded. In addition, in the same frame, thelaser stripe cannot appear in more than one place (parallel or grid light stripe as a whole). Based on these constraints, the image pixels can be classified as two states: on or off thelaser stripe. Therefore, stripe extraction can be considered a dichotomy of decision trees, taking the pixels in each column of the image as a sample set, and thenbeing classified by selected features column by column.  
The brightness distribution of a laser stripeis shown in Figure 6. We can learn from the figure thatthe central point is much brighter than neighboring points, and the distribution is continuous. So, the brightness of central points is very close between adjacent columns, and their distance is usually very small. Therefore, the brightness difference and the distance are candidate features for our study.  
The laser stripe represents foreground information in the image, and it can be segmented effectively by the center of mass [14; 21], which can be used to thin the light stripe. Canny edge detection is performed on the obtained monochromatic image to find edge pixel points, and match adjacent edge pixel points in each column to form point-pairs. In this way, the laser stripe presents a series of point-pairs. The distance between point-pairs is relatively small and their positions are concentrated. Moreover, the brightness in the point-pairs is also very similaron the corresponding monochromatic value image. So, we can calculate the center-of-mass position of R component for each point-pair by Equation (7).  
\[M_{i}(w)=\frac{\sum\limits_{\begin{subarray}{c}j_{\max}^{n}+\frac{w}{2}\\ j_{\max}^{n}+\frac{w}{2}\end{subarray}}^{j_{\max}+\frac{w}{2}}I_{ij}\times j}{ \sum\limits_{\begin{subarray}{c}j_{\max}^{n}+\frac{w}{2}\\ j_{\max}^{n}-\frac{w}{2}\end{subarray}}^{j_{\max}+\frac{w}{2}}I_{ij}},i\in[0,n ),j\in[0,m), \tag{7}\]  
where \(w\) is window value (in the unit of pixel) of the calculated area, \(I_{ij}\) is brightness value of the pixel at row \(i\) and column \(j\) on the image, and \(M_{i}(w)\) is column coordinates. After obtaining a series of brightness peaks, the laser stripe is refined into a chain of laser skeleton, as shown in Figure 7a. However, because of noise, there cannot be only one center-of-mass point in each column, and the light stripe skeleton must be accompanied by some noise points, so we must classify it further.  
All the center-of-mass positions obtained in each column are taken as a position set of potentiallight stripe center points, and each position is represented as \(\omega_{r}(t)\), \(t=1\), \(2\dots\)\(T\), where \(T\) is step(column) number of the image, \(r\) is the index at step \(t\)  
In addition, the distance between the centers of mass is also an important feature to judge whether they are the center points of the laser stripe, because the center points on the laser stripe do not change position suddenly. The Euclidean distance between two pixel points can be expressed as  
\[d_{ij}=\sqrt{\left(c_{i}(t-1)-c_{j}(t)\right)^{2}+1}, \tag{9}\]  
where \(c_{i}(t-1)\) and \(c_{j}(t)\) are column coordinates of the two center-of-mass points.  
The selected features are substantiated with data to derive \(H_{f}\) and \(H_{d}\), which are the upper limit values of \(f_{ij}\) and \(d_{ij}\) respectively, with \(\text{Gain}(f_{ij})>\text{Gain}(d_{ij})\). So, the position set is classified by brightness difference \(f_{ij}\) at first, and then estimated by distance \(d_{ij}\). The process of thelaser stripe extraction by S-DTM is shown in Figure 7b. The result in Figure 7c shows thelaser stripe is smoother and clearer, and noise has been well eliminated.