## 3 Algorithm and Principle
### Algorithm for HMT Gesture Recognition
#### 3.1.2 Background Velocity Calculation  
In this study, background velocity is the dominant feature reflecting the trajectory of the hand. How to obtain the background velocity in the video image is a problem to be solved after the foreground of the hand region and the background of the environment have been segmented. The acquisition of  
Figure 5: The processing of video image for hand region segmentation: (**a**) Original red–green–blue (RGB) image; (**b**) Image after compressing and cutting pixels; (**c**) RGB image is transformed into \(L^{*}u^{*}b^{*}\) color space; (**d**) The superpixels result of the simple linear iterative cluster (SLIC) algorithm; (**e**) Seed pixels of the foreground and background for the lazy snapping algorithm; (**f**) The result of hand region segmentation using the lazy snapping algorithm.  
velocity depends on the selection of reference points. In this study, the Speeded-Up Robust Features (SURF) [34] keypoints are chosen to be the reference points, and the background velocity is obtained by the average displacement of the matched SURF keypoints between two adjacent image frames.  
This part of the specific algorithm flow is introduced below. Firstly, the SURF keypoints of two adjacent image frames are extracted, and the keypoints in the foreground are removed according to the segmentation results of the hand region, which results that only the keypoints in the background are retained. As shown in Figure 6a,b, the green plus signs and the red dots are the keypoints extracted from the two adjacent image frames, respectively. Moreover, the corresponding matching distance is calculated by using the method [PERSON] et al. proposed in [35]. The keypoints obtained from the two adjacent image frames are matched according to the minimum distance, and the matching keypoints whose distance exceeds the threshold [PERSON] et al. proposed in [35] will be removed.  
As shown in Figure 6c, after obtaining the matching keypoints between two adjacent image frames, the displacement of the matching keypoints between two adjacent image frames with that of the frame interval is 1/12 s, according to the above data configuration. The velocity vector of each matching was shown by the yellow arrow in Figure 6c. In order to quantify the background velocity by the velocity vector of the matching points, all of the velocity vectors are represented in the coordinate system, as shown in Figure 6d. The 1/5 maximum and the 1/5 minimum values of the vector components \(V_{X}\) and \(V_{y}\) are deemed invalid, which may be affected by the matching at the edge of the image. The invalid values are shown by the pink circle marker in Figure 6d, while the remaining valid values are shown by the blue dot marker. The final velocity values of the current  
Figure 6: Speeded-Up Robust Features (SURF) keypoints are extracted, and the average displacement of matching keypoints between the adjacent frames was used to characterize the velocity of background. (**a**) The extracted SURF keypoints of the previous image frame; (**b**) The extracted SURF keypoints of the current image frame; (**c**) The matching keypoints between adjacent image frames; (**d**) Determination of the effective values of current frame’s velocity.  
frame are represented by the red plus sign marker in Figure 6d, which was obtained by averaging all of the valid velocity values.