## 2 Methods
### Stripe Extraction and Tracking
#### 2.3.2 Establishment of aTemporal Decision Tree Model (T-DTM)  
Similar to spatial context correlation, there is a strong temporal relationship between a light stripe and its background in video frame sequences. A traditional research about target tracking proposes that the local context of a current frame helps predict the location of light stripe in the next frame, because the shape, color, position of the target will not change muchbetween adjacent frames, and the rate of change is relatively stable [22; 23]. Video sequences captured by a structured-light sensor also have the same characteristics. Ideally, laser linesin adjacent frames are represented as many line segments and arcs with similar shape, area and color, unlessthey are changed by the texture and reflection of snow sculpture surface, sensor movement and so on. Therefore, the line segments and arcs in each frame may or may not be on the laser stripe, and they also can be classified by a decision tree. Several possible laser strip regions, which include the optimal solution and several suboptimal solutions of the S-DTM, are defined as a series of sub-windows \(W_{n}(k)=(x,y,I,\Delta,s)\), where \(x\) and \(y\) are size of the window, \(I\) is mean brightness of thelaser stripe in the window, \(\Delta\) is the change rate of tracking result relative to the previous frame, \(s\) is the scale factor, \(s\in[0.1,\,10]\), \(n\) is the amount of candidate windows per frame, \(n\in[1,N(k)]\), \(N(k)\) is the amount of sub-windows at step \(k\), \(k=1\), \(2\),..., \(F\), and \(F\) is the number of the frame. Each sub-window \(W_{n}\) (\(k\)) is defined as a positionset of the current frame as shown in Figure 8, and measurable features between two adjacent frames are expressed as Equations (10) and (11). \[P_{mn}=\sqrt{\left(\overline{x}_{m}(k)-\overline{x}_{n}(k-1)\right)^{2}+\left( \overline{y}_{m}(k)-\overline{y}_{n}(k-1)\right)^{2}}, \tag{10}\]  
\[I_{mn}=|I_{m}(k)-I_{n}(k-1)|, \tag{11}\]  
Figure 7: The process of the stripe extractionbyS-DTM, with“\(\square\)” being the edge pixel point [\(t\), \(er(t)\)] and“\(\blacksquare\)” thecenter-of-mass point \(\omega_{r}(t)\). (**a**) Thinning result by center-of-mass method; (**b**) Explanation of classification of S-DTMby takingthree columns of pixels from the red line in (**a**); (**c**) The resultof stripe extraction by S-DTM. where \(P_{mn}\) and \(I_{nm}\) present the position and brightness change between \(W_{m}(k)\) and \(W_{n}(k-1)\) respectively. In sub-window \(W_{n}(k)\), the average coordinates of all pixels on the laser stripe are \((\overline{x}_{n}(k),\overline{y}_{n}(k))\) and the mean brightness of R component is \(I_{n}(k)\). Considering the speed and direction of the scanning device, Equation (10) is rewritten as Equation (12). \[P_{mn}=\sqrt{\left(\overline{x}_{m}(k)-\left(\overline{x}_{n}(k-1)+\int_{0}^{ \tau}du\right)\right)^{2}+\left(\overline{y}_{m}(k)-\left(\overline{y}_{n}(k- 1)+\int_{0}^{\tau}dv\right)\right)^{2}}, \tag{12}\]  
where \(du\) and \(dv\) represent the velocity of the scanner in the \(u\) and \(v\) directions of the image space respectively, and \(\tau\) is the interval between adjacent frames. So, the change rate of tracking position \(P_{\Delta}\) is described as Equation (13). \[P_{\Delta}=P_{mn}(k)-P_{mn}(k-1), \tag{13}\]  
The selected features are substantiated with data to derive \(H_{I}\) and \(H_{\Delta}\), which are the upper limit values of \(I_{mn}\) and \(P_{\Delta}\) respectively, with \(\text{Gain}(P_{\Delta})>\text{Gain}(I_{nm})\). The sub-window position set is then classified according to the gain values in proper order. The process of thelaser stripe tracking by T-DTM is shown in Figure 8, where the filled circles represent the laser stripe positions. At this point, the STC-DTM has beenestablished. Here S-DTM and T-DTM are not in a cascade relation, but unified as a whole. The video collected by structured-light sensor is the input of STC-DTM, and the output is a series of smooth centerline tracks, which are also a global optimal solution of the model.