# Human Action Recognition Based on Foreground Trajectory and Motion Difference Descriptors
## 5 Experimental Results and Discussion  
In order to verify the effectiveness of the human behavior recognition algorithm in this paper, experimental tests were conducted on two real scene datasets, YouTube [19] and UCF sports [20]. The YouTube dataset had 11 behavior categories as well as 1168 fragments that were divided into 25 groups. The UCF sports dataset had 10 sports categories from sports videos. Because of the interference of perspective, background, and light, there were large intraclass differences and some challenges. The software environment used in the experiment was OpenCV + Visual Studio. In both datasets, the ratios of the number of videos in the training set and test set were set to 2:1. Firstly, this paper calculated the optical flow of the video to get the foreground region, and it extracted the trajectory based on the foreground region. Taking the UCF sports data set as an example, the results were compared with those in reference [12], as shown in Figure 2. From left to right are the original map, the traditional trajectory, and the foreground trajectory. As can be seen from Figure 2, the foreground trajectory obtained after foreground extraction suppressed the interference caused by background noise to a certain extent, greatly reducing the number of trajectories and improving the speed and quality of subsequent feature coding. Figure 1: Flow chart of the human behavior recognition algorithm. HOG, histogram of oriented gradient; HOF, optical flow; MBH, motion boundary histogram; MDD, motion difference descriptor; PCA, principal component analysis; GMM, Gauss mixture model; FV, Fisher vector; and SVM, support vector machine. Many works proved the recognition abilities of HOG, HOF, and MBH; therefore, these three descriptors were used as basic descriptors in this paper. At the same time, in order to verify the validity of the motion difference descriptor, the recognition ability of a single motion difference descriptor was tested and combined with three basic descriptors. Experimental results are shown in Table 1. Combination 1 represents the combination of three basic descriptors: HOG, HOF, and MBH. Combination 2 represents the combination of three basic descriptors and the motion difference descriptors mentioned in this paper, namely HOG, HOF, MBH, and MDD. \"Combination 2\" added to MDD was superior to the combination of traditional basic descriptors in recognition rates of both benchmark data and above, which illustrated the effectiveness of the method proposed in this paper. In addition, in order to show more intuitively the accuracy of classification and recognition results obtained by this algorithm, confusion matrices of recognition results on UCF sports and YouTube datasets were calculated respectively, as shown in Figure 3. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Descriptor** & **UCF Sports (\%)** & **YouTube (\%)** \\ \hline HOG & 84.3 & 74.3 \\ HOF & 79.2 & 70.9 \\ MBH & 84.5 & 81.5 \\ MDD & 87.5 & 81.3 \\ Combination 1 & 90.4 & 87.0 \\ Combination 2 & **92.8** & **89.6** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of recognition results of different descriptors. Figure 3: Obfuscation matrixes obtained by the algorithm in this paper on different data sets. Figure 2: Comparison of traditional dense trajectory and foreground trajectory extraction in this paper. From the obfuscation matrix in Figure 3 we saw that in the UCF sports data set, because there were some similarities between \"skating\" and \"walking\" actions, some \"skating\" actions were recognized as \"walking\" actions, so there was a false recognition rate of 0.13 between them. In the YouTube dataset, because of the instability of samples and the complexity of background, it was difficult to identify the dataset itself. A high false recognition rate was seen with \"basketball shoot\" because, compared to other actions, this action was more complex and was composed of multiple actions, so it was very difficult to identify.