# Evaluation of Human Action Based on Feature-Weighted Dynamic Time Warping
## 4 Action Segmentation and Feature Extraction Strategy  
### Action Segmentation  
The collected action data included invalid actions, such as the preparation process at the beginning of the action and the static process at the end; the invalid information should be removed, and the effective action data should be segmented before action feature extraction to improve the efficiency and accuracy of action evaluation. The action segmentation process is as follows:  
1. Set the length of the window to \(w\) and the fixed sliding step to \(l\), where the units are all the number of samples;
2. Select hand key points, and calculate the sum of the X, Y, and Z three-axis differences \(E_{k}\) within each sliding window with the following equation:  
\[E_{k}=\sum_{i=1}^{w}\left(\left|P_{k+i}^{x}-P_{k+i-1}^{x}\right|+\left|P_{k+i} ^{y}-P_{k+i-1}^{y}\right|+\left|P_{k+i}^{z}-P_{k+i-1}^{z}\right|\right) \tag{1}\]  
where \(E_{k}\) is the sum of the X-, Y-, and Z-axis differences of the hand key points at moment \(k\); \(P_{k+i}^{x}\), \(P_{k+i}^{y}\), and \(P_{k+i}^{z}\) are the hand key-point X-, Y-, and Z-coordinates of the \(i\)th point in the window at moment \(k\), respectively; and \(P_{k+i-1}^{x}\), \(P_{k+i-1}^{y}\), and \(P_{k+i-1}^{z}\) are the X-, Y-, and Z-coordinates of the hand key points of the \(i\)-1 th point in the window at moment \(k\), respectively. Figure 5: Moving average. 5 Calculate the sum of the X-, Y-, and Z-axis variances, \(V_{k}\), of the key points of the hand within the sliding window with the following equation:  
\[V_{k}=\frac{\sum\limits_{i=0}^{w-1}\left(P_{k+i}^{x}-\overline{P^{x}}\right)^{2 }+\sum\limits_{i=0}^{w-1}\left(P_{k+i}^{y}-\overline{P^{y}}\right)^{2}+\sum \limits_{i=0}^{w-1}\left(P_{k+i}^{z}-\overline{P^{z}}\right)^{2}}{w} \tag{2}\]  
where \(V_{k}\) is the sum of the X, Y, and Z three-axis variances of the hand key points at moment \(k\), and \(\overline{P^{x}}\), \(\overline{P^{y}}\), and \(\overline{P^{z}}\) are the mean values of X, Y, and Z in the window, respectively. 4 Draw the \(V\)-value curve graph, and look for the peaks in the \(V\)-value curve that meet the trajectory threshold condition of the peaks, constituting the trajectory sequence \(V^{p}=\left\{V_{1}^{p},\cdots,V_{n}^{p}\right\}\), where \(V_{i}^{p}>t_{v}\), \(i\), \(\{1,\cdots n\}\) and \(t_{v}\) is the \(V\)-value trajectory threshold, the setting of which can remove the interference generated by key-point judder. 5 Find the starting point of the action, and traverse the elements in the trajectory sequence \(V^{p}\) from front to back. If the horizontal coordinate of the current \(V_{k}^{p}\) value corresponds to the difference and \(E_{k}>t_{E}\), then subtract the current sampling point from the start-point window length offset value \(m_{s}\), that is, obtain the start point of the action; if the current \(V_{k}^{p}\) value of the horizontal coordinates corresponds to the difference and \(E_{k}<t_{E}\), then the sampling point is judged to be an interference point, and continue to judge the next waveform. \(t_{E}\) is the threshold value of difference, and \(E\) is used to eliminate the interference generated by the judder of the key points of the hand. 5 Find the end point of the action, and traverse the elements in the trajectory sequence \(V^{p}\) from back to front. The judgement step is the same as in point 5; find the sampling point that meets the condition, add the sampling point to the end-point window length offset value \(m_{e}\), and obtain the end point of the action. B. Feature extraction  
In each frame of the human body key-point data, 16 main key points are selected and combined in pairs to form 15 vectors representing the human body structure. In addition, two auxiliary vectors for calculating angles are added, which are from the left shoulder pointing to the left hip and from the right shoulder pointing to the right hip, for a total of 17 vectors.