# Recognition and Prediction of Badminton Attitude Based on Video Image Analysis

Authors: Songsong He; Ruyao Gong
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Among many sports, badminton is one of the most popular events and it is deeply loved by people. However, there is relatively little research on pose recognition and prediction of badminton, so this paper uses video image analysis to perform badminton action recognition prediction and action classification. In order to better realize the lower limb movement pattern recognition and motion posture prediction of badminton players, this paper chooses BP neural network algorithm to establish a badminton motion posture recognition and prediction model based on video image analysis. The simulation results of the models are compared, and it is found that the recognition of the motion pose and the prediction model established by the neural network are accurate, and they almost coincide with the actual motion trend. In this paper, a face detection and recognition framework is established. The algorithm is used to filter the pictures of the input recognition network. Through calculation, the average accuracy rate of the face detection algorithm realized in this paper can reach 92.6%. This shows that the face detection algorithm implemented in this paper basically meets the standards. In this paper, a single inertial sensor is used to classify and recognize badminton movements using sensors located on the right wrist, left wrist, waist, and right ankle. This shows that the right wrist is the best position and achieves different strokes.


---

## Body

## 1. Introduction

Since the 1980s, the behavior recognition of badminton players has attracted a large number of researchers. With the emergence and development of various advanced technologies, the content of badminton sports recognition has been continuously enriched. The current research areas mainly include badminton serve recognition, badminton shot recognition and analysis, badminton posture detection, and various action recognition and prediction. The above research on behavior recognition can provide theoretical and basic support for a variety of practical applications.In order to better realize the lower limb movement pattern recognition and motion posture prediction of badminton players, this paper chooses BP neural network algorithm to establish a badminton motion posture recognition and prediction model based on video image analysis. In this paper, a face detection and recognition framework is established, and the algorithm is used to filter the pictures input to the recognition network. In this paper, a single inertial sensor is used to classify and recognize badminton movements using sensors located on the right wrist, left wrist, waist, and right ankle. This shows that the right wrist is the best position and achieves different strokes.The Section1 of this article introduces the research background of the article and explains the main work of the article. The Section 2 is a review of references at home and abroad on recognition and prediction of motion poses. The Section 3 is the algorithm model and specific implementation steps constructed by the article. The Section 4 is the experimental data and set parameters of the article, and the evaluation index is set. The Section 5 is the analysis and research of the experimental results, and the main conclusions of the full text are summarized in the Section 6.


## 2. Related Work

In view of the importance of current motion recognition and prediction, many research teams at home and abroad have conducted in-depth research. In [1], the author introduces a new method for single-shot gesture recognition, processing motion pictures associated with video to obtain a PCA model. In [2], the authors developed a new method for gesture recognition using jointly calibrated jumping motions. The correct recognition rates were reported as 94.2%, 95.1%, and 90.2%, respectively. In [3], the authors propose a novel system for measuring the 3D motion of multiple independently moving objects at a macroscopic distance. The author also developed a method for measuring 3D micro-motion histograms of multiple independent moving objects without tracking a single motion trajectory. In [4, 5], the authors propose an interactive diagnosis system based on augmented reality for preoperative coronary heart disease gestures. All gesture recognition experiments have shown the discriminative ability and generalization ability of the algorithm. In [6], the authors proposed a method of motion segmentation and classification based on sequence alignment, which reconstructs the template sequence by estimating the average motion of the category.However, there are many researches on badminton at home and abroad, but mainly focus on the analysis of the video images to study the relationship between racket and ball speed, the relationship between arm movement and racket speed and ball speed, and the study of badminton trajectory. However, few studies have focused on the identification and prediction of badminton players’ movements.Super-resolution reconstruction of video images is a research hotspot in the field of image processing [7]. In [8], in order to overcome the influence of stray light and impurities on the video laryngoscope image, the author eliminated the stray light and image impurities and improved the image quality. In [9], this paper proposes a one-dimensional (1-D) coding framework for images and videos based on deep learning neural networks and image patch clustering. The proposed method can achieve higher compression ratio and peak signal-to-noise ratio at the same time than the existing methods [10]. In [11], the author proposed a deep learning method. Experimental results show that the author’s method is superior to the latest method in pairing drone video image patches. In [12], the author introduced a study of a new type of traffic flow measurement system by processing regularly acquired video images, which can determine the size of each vehicle and measure its two-dimensional motion. In order to reduce bandwidth requirements, the redundancy present in multimedia signals must be removed [13–15].


## 3. Method

### 3.1. Three-Dimensional Trajectory Tracking and Prediction Model Based on Kinematics Equation of Badminton

#### 3.1.1. Badminton Trajectory Prediction

There are slight differences in the position of the points on the shuttlecock in space, because these slight differences have little effect on the overall flight trajectory prediction. In this paper, in the prediction of the trajectory, the shuttlecock is regarded as the centroid, and the median of the disparity map is used as the parallax of the centroid. Calculate three-dimensional space coordinates, the calculation formula is as follows:(1)XYZW=Qxyd1,Q=100−cx010−cy000f00−1/Txcxl−cxrWherex and y are the pixel coordinates of the badminton centroid in the left image, d is the parallax, and the three-dimensional coordinates of this point are (X/W, Y/W, Z/W). To simplify the model, this article assumes that C, ρ, and S are constant during the flight of badminton, so k is a constant. To simplify the calculation, the force of badminton is decomposed:
(2)axm=fx=fsinφcosθ=−kvx2aym=fy=fsinφsinθ=−kvy2azm=fz=fcosφ−mg=−kvz2−mgThe estimation accuracy of the least squares method depends on the accuracy of the measurement. If the obtained data contains large noise, the results obtained by using the least squares method will be far from the true value. Badminton is an irregular object. There is an error in the estimation of the center of mass. Due to the limitation of the camera’s resolving ability at a distance from the camera, there is also an error in the calculation of parallax. In order to improve the accuracy of solving the kinematics equation of badminton, it is necessary to pre-process the obtained space track position of the empty wool ball to reduce the noise in the data.


#### 3.1.2. Kalman Filter

The following badminton takes thex-axis movement as an example to construct an extended Kalman filter. The extended Kalman filter state equation is:
(3)xk=fxk−1,uk−1,wk−1,zk=hxk,vkExpand the Taylor series offxk−1,uk−1,wk−1 and hxk,vk, and take a term to get:
(4)xk=x~k+Axk−1−x^k−1+Wwk−1,zk≈z^k+Hxk−x~kVvkFor movementwk−1=0 in the x and y directions, and movement W=001T and wk−1=−g in the z direction. Using extended Kalman filter to filter the badminton flight trajectory can get the badminton flight trajectory closer to the real value.


### 3.2. Construction of Face Detection Model Based on Video Images

The extraction of face samples, non-face samples and some face samples is accomplished in the following steps:Step 1: Randomly select candidate frames from Wider_face and calculate the IOU value from the labeled data. If it is greater than 0.65, then the candidate area is a face. If it is greater than 0.4 and less than 0.65, then it is part of the face data, and less than 0.4 is non-face data;Step 2: There will be border data for face data and some face data, but there is no border data for non-face data.After everything is ready, the real face detection of the video begins [16–18]. The first step is to generate an image pyramid. Enter the picture and calculate the transformed image size using the following formula:
(5)minL=org−L12/minsizefactorn,n=0,1,2,3,⋯,NThe number ofn is the number of pictures that can be scaled out. It should be noted here that the zoom size cannot be less than 12, when the length or width of the image is about to be less than 12, the zoom stops; minsize is the smallest detectable image, and factor is the zoom factor when forming the image pyramid.Step 3: Enter the image into the first layer networkPnet. Put each picture in the image pyramid obtained in the previous step into the neural network of this layer to train, and get the results of face score and border regression. After obtaining the face score, it is filtered according to the score, and the sliding box with the score below the threshold (0.6) is excluded. Then, the candidate boxes retained after the screening are merged by the NMS method.Step 4: Use theRnet layer to perform more detailed processing on the image, and score and filter the face frame obtained by Pnet again. In order to complete the task, first cut the face frame output from the Pnet network from the original image, and shrink it to a size of 24∗24∗3, and input it into the Rnet layer.


### 3.3. Motion Pose Recognition and Prediction Algorithm Based on Neural Network

#### 3.3.1. BP Neural Network Algorithm Based on L-M Back Propagation Algorithm

In the above formula,y′k is the expected output of the neural network, and yk represents the actual output of the network.
(6)Δw=JTJ+μI−1JTeIn the above formula,e is the error vector generated by the learning and training of the neural network, J is the Jacobian matrix of the error versus weight differentiation, and μ is a scalar. With the change of μ, the L-M back propagation algorithm will produce different training effects. When μ increases, the training effect of the L-M algorithm gradually approaches the gradient descent algorithm. When μ decreases to 0, the training effect of the algorithm is equivalent to Newton’s algorithm. When the final sum of the squared errors is less than a certain target error, the algorithm can be considered to converge.


#### 3.3.2. Self-Organizing Competition Neural Network Algorithm

The input vector of a self-organizing competitive neural network is usually a binary vector, that is, all the elements in the input vector are 0 or 1, the relationship between the neuronj in the competition layer and the i in the input layer and the connection weight wij are as follows:sj=∑i=1Nwijxi. Where xi is the ith element of the input sample vector. After the competition is over, the connection weights of the winning neurons need to be adjusted and optimized, as shown in the following formula.
(7)wij=wij+∝xim−wijAmong them,∝ is the learning parameter of the neural network, which usually satisfies the condition 0 <∝<<1, and generally takes a value between 0.01 and 0.03 in specific experiments; m represents the number of input layer neurons with an output value of 1, and xi/m represents that when xi is 1, the corresponding connection weight increases, otherwise the connection weight decreases. As mentioned above, all connection weights satisfy the condition that “sum is 1”, so if the connection weight wij of a certain input layer neuron changes in some way, the remaining connection weights may change in the opposite direction.


## 3.1. Three-Dimensional Trajectory Tracking and Prediction Model Based on Kinematics Equation of Badminton

### 3.1.1. Badminton Trajectory Prediction

There are slight differences in the position of the points on the shuttlecock in space, because these slight differences have little effect on the overall flight trajectory prediction. In this paper, in the prediction of the trajectory, the shuttlecock is regarded as the centroid, and the median of the disparity map is used as the parallax of the centroid. Calculate three-dimensional space coordinates, the calculation formula is as follows:(1)XYZW=Qxyd1,Q=100−cx010−cy000f00−1/Txcxl−cxrWherex and y are the pixel coordinates of the badminton centroid in the left image, d is the parallax, and the three-dimensional coordinates of this point are (X/W, Y/W, Z/W). To simplify the model, this article assumes that C, ρ, and S are constant during the flight of badminton, so k is a constant. To simplify the calculation, the force of badminton is decomposed:
(2)axm=fx=fsinφcosθ=−kvx2aym=fy=fsinφsinθ=−kvy2azm=fz=fcosφ−mg=−kvz2−mgThe estimation accuracy of the least squares method depends on the accuracy of the measurement. If the obtained data contains large noise, the results obtained by using the least squares method will be far from the true value. Badminton is an irregular object. There is an error in the estimation of the center of mass. Due to the limitation of the camera’s resolving ability at a distance from the camera, there is also an error in the calculation of parallax. In order to improve the accuracy of solving the kinematics equation of badminton, it is necessary to pre-process the obtained space track position of the empty wool ball to reduce the noise in the data.


### 3.1.2. Kalman Filter

The following badminton takes thex-axis movement as an example to construct an extended Kalman filter. The extended Kalman filter state equation is:
(3)xk=fxk−1,uk−1,wk−1,zk=hxk,vkExpand the Taylor series offxk−1,uk−1,wk−1 and hxk,vk, and take a term to get:
(4)xk=x~k+Axk−1−x^k−1+Wwk−1,zk≈z^k+Hxk−x~kVvkFor movementwk−1=0 in the x and y directions, and movement W=001T and wk−1=−g in the z direction. Using extended Kalman filter to filter the badminton flight trajectory can get the badminton flight trajectory closer to the real value.


## 3.1.1. Badminton Trajectory Prediction

There are slight differences in the position of the points on the shuttlecock in space, because these slight differences have little effect on the overall flight trajectory prediction. In this paper, in the prediction of the trajectory, the shuttlecock is regarded as the centroid, and the median of the disparity map is used as the parallax of the centroid. Calculate three-dimensional space coordinates, the calculation formula is as follows:(1)XYZW=Qxyd1,Q=100−cx010−cy000f00−1/Txcxl−cxrWherex and y are the pixel coordinates of the badminton centroid in the left image, d is the parallax, and the three-dimensional coordinates of this point are (X/W, Y/W, Z/W). To simplify the model, this article assumes that C, ρ, and S are constant during the flight of badminton, so k is a constant. To simplify the calculation, the force of badminton is decomposed:
(2)axm=fx=fsinφcosθ=−kvx2aym=fy=fsinφsinθ=−kvy2azm=fz=fcosφ−mg=−kvz2−mgThe estimation accuracy of the least squares method depends on the accuracy of the measurement. If the obtained data contains large noise, the results obtained by using the least squares method will be far from the true value. Badminton is an irregular object. There is an error in the estimation of the center of mass. Due to the limitation of the camera’s resolving ability at a distance from the camera, there is also an error in the calculation of parallax. In order to improve the accuracy of solving the kinematics equation of badminton, it is necessary to pre-process the obtained space track position of the empty wool ball to reduce the noise in the data.


## 3.1.2. Kalman Filter

The following badminton takes thex-axis movement as an example to construct an extended Kalman filter. The extended Kalman filter state equation is:
(3)xk=fxk−1,uk−1,wk−1,zk=hxk,vkExpand the Taylor series offxk−1,uk−1,wk−1 and hxk,vk, and take a term to get:
(4)xk=x~k+Axk−1−x^k−1+Wwk−1,zk≈z^k+Hxk−x~kVvkFor movementwk−1=0 in the x and y directions, and movement W=001T and wk−1=−g in the z direction. Using extended Kalman filter to filter the badminton flight trajectory can get the badminton flight trajectory closer to the real value.


## 3.2. Construction of Face Detection Model Based on Video Images

The extraction of face samples, non-face samples and some face samples is accomplished in the following steps:Step 1: Randomly select candidate frames from Wider_face and calculate the IOU value from the labeled data. If it is greater than 0.65, then the candidate area is a face. If it is greater than 0.4 and less than 0.65, then it is part of the face data, and less than 0.4 is non-face data;Step 2: There will be border data for face data and some face data, but there is no border data for non-face data.After everything is ready, the real face detection of the video begins [16–18]. The first step is to generate an image pyramid. Enter the picture and calculate the transformed image size using the following formula:
(5)minL=org−L12/minsizefactorn,n=0,1,2,3,⋯,NThe number ofn is the number of pictures that can be scaled out. It should be noted here that the zoom size cannot be less than 12, when the length or width of the image is about to be less than 12, the zoom stops; minsize is the smallest detectable image, and factor is the zoom factor when forming the image pyramid.Step 3: Enter the image into the first layer networkPnet. Put each picture in the image pyramid obtained in the previous step into the neural network of this layer to train, and get the results of face score and border regression. After obtaining the face score, it is filtered according to the score, and the sliding box with the score below the threshold (0.6) is excluded. Then, the candidate boxes retained after the screening are merged by the NMS method.Step 4: Use theRnet layer to perform more detailed processing on the image, and score and filter the face frame obtained by Pnet again. In order to complete the task, first cut the face frame output from the Pnet network from the original image, and shrink it to a size of 24∗24∗3, and input it into the Rnet layer.


## 3.3. Motion Pose Recognition and Prediction Algorithm Based on Neural Network

### 3.3.1. BP Neural Network Algorithm Based on L-M Back Propagation Algorithm

In the above formula,y′k is the expected output of the neural network, and yk represents the actual output of the network.
(6)Δw=JTJ+μI−1JTeIn the above formula,e is the error vector generated by the learning and training of the neural network, J is the Jacobian matrix of the error versus weight differentiation, and μ is a scalar. With the change of μ, the L-M back propagation algorithm will produce different training effects. When μ increases, the training effect of the L-M algorithm gradually approaches the gradient descent algorithm. When μ decreases to 0, the training effect of the algorithm is equivalent to Newton’s algorithm. When the final sum of the squared errors is less than a certain target error, the algorithm can be considered to converge.


### 3.3.2. Self-Organizing Competition Neural Network Algorithm

The input vector of a self-organizing competitive neural network is usually a binary vector, that is, all the elements in the input vector are 0 or 1, the relationship between the neuronj in the competition layer and the i in the input layer and the connection weight wij are as follows:sj=∑i=1Nwijxi. Where xi is the ith element of the input sample vector. After the competition is over, the connection weights of the winning neurons need to be adjusted and optimized, as shown in the following formula.
(7)wij=wij+∝xim−wijAmong them,∝ is the learning parameter of the neural network, which usually satisfies the condition 0 <∝<<1, and generally takes a value between 0.01 and 0.03 in specific experiments; m represents the number of input layer neurons with an output value of 1, and xi/m represents that when xi is 1, the corresponding connection weight increases, otherwise the connection weight decreases. As mentioned above, all connection weights satisfy the condition that “sum is 1”, so if the connection weight wij of a certain input layer neuron changes in some way, the remaining connection weights may change in the opposite direction.


## 3.3.1. BP Neural Network Algorithm Based on L-M Back Propagation Algorithm

In the above formula,y′k is the expected output of the neural network, and yk represents the actual output of the network.
(6)Δw=JTJ+μI−1JTeIn the above formula,e is the error vector generated by the learning and training of the neural network, J is the Jacobian matrix of the error versus weight differentiation, and μ is a scalar. With the change of μ, the L-M back propagation algorithm will produce different training effects. When μ increases, the training effect of the L-M algorithm gradually approaches the gradient descent algorithm. When μ decreases to 0, the training effect of the algorithm is equivalent to Newton’s algorithm. When the final sum of the squared errors is less than a certain target error, the algorithm can be considered to converge.


## 3.3.2. Self-Organizing Competition Neural Network Algorithm

The input vector of a self-organizing competitive neural network is usually a binary vector, that is, all the elements in the input vector are 0 or 1, the relationship between the neuronj in the competition layer and the i in the input layer and the connection weight wij are as follows:sj=∑i=1Nwijxi. Where xi is the ith element of the input sample vector. After the competition is over, the connection weights of the winning neurons need to be adjusted and optimized, as shown in the following formula.
(7)wij=wij+∝xim−wijAmong them,∝ is the learning parameter of the neural network, which usually satisfies the condition 0 <∝<<1, and generally takes a value between 0.01 and 0.03 in specific experiments; m represents the number of input layer neurons with an output value of 1, and xi/m represents that when xi is 1, the corresponding connection weight increases, otherwise the connection weight decreases. As mentioned above, all connection weights satisfy the condition that “sum is 1”, so if the connection weight wij of a certain input layer neuron changes in some way, the remaining connection weights may change in the opposite direction.


## 4. Experiment

### 4.1. Data Sources

#### 4.1.1. Equipment and Environment

The wireless node signal acquisition software used in this research was developed under the Windows platform, with Visual Studio 2010 as the development environment, and written in C # language. The algorithm used in this study for data preprocessing and action classification is implemented under the Microsoft Windows platform with Matlab as the development platform and M language. The wireless inertial sensor node is mainly composed of an accelerometer and a gyroscope. The accelerometer model is ADXL326, and its measurement range is ±16 g; the gyroscope models are LPR550 and LY550, with a measurement range of ±500dps, which fully meets the needs of high-speed sports monitoring such as badminton. The wireless inertial sensor node transmits data to the personal computer terminal through the wireless receiving node.


#### 4.1.2. Experimental Data

A total of 12 volunteers participated in the experiment. The volunteers were members of the XX University badminton school team and the badminton association. The volunteers were between 18-25 years old. Before the experiment, all volunteers were informed of the purpose of the experiment and the course of the experiment. Table1 shows the types of actions performed for this experiment. A1-A12 are batting actions and A13-A14 are non-batting actions. The four wireless sensor nodes used in the experiment were worn on the left wrist, right wrist, right waist and right ankle of volunteers. The sampling frequency of the wireless node in the experiment is 100 Hz, and each action is repeated 55 times.Table 1
Types of human shots performed in the experiment.
Action numberAction typeAction numberAction typeBatting actionA1Forehand serveA7Backhand net rubbingA2Backhand serveA8ForehandA3Forehand high far ballA9BackhandA4Backhand high far ballA10Forehand push ballA5Bash the ball in front of the forehandA11Forehand corner kickA6Rub the ball in front of the forehandA12Backhand corner kickNon-battingA13Pick up the ball while walkingA14Prepare your posture while shaking your wrists up and down


### 4.2. Experimental Parameter Settings

This article randomly selects 6 movements in 14 sets of data, and collects 100 sets of data, respectively, for a total of 600 sets of data. Then randomly select 50 groups from each action sample as the training sample set of the neural network classifier, and then randomly select 50 sets of feature data as the test sample set to test the accuracy of the classifier. For the training samples of various actions, the corresponding output nodes are set to 1, and the other output nodes are set to 0, which are used as the desired output for training.According to the approximate relationship between the number of neurons in the hidden layer and the number of neurons in the input layer, and multiple experiments, this paper chooses a hidden layer with 13 neurons; in the end, there are 6 types of motion patterns that need to be identified from the 14 sets of data, so the number of neurons in the output layer is 6. In addition, in order to improve the learning rate, the learning rate of the BP neural network model is set to 0.5; the target error is 0.001, that is, the training is stopped when the number of trainings exceeds 1000 times or the training error is less than 0.001. According to theT vector representing the expected output, we can see that the one-to-one correspondence between the recognition results of the motion pose recognition and prediction model based on the neural network and the specific motion mode is shown in Table 2 below.Table 2
One-to-one correspondence between the results of motion pose recognition and motion patterns based on neural networks.
Recognition resultSpecific exercise modeRecognition resultSpecific exercise mode0 0 0 0 0 1A1 forehand serve0 0 1 0 0 0A7 backhand net rubbing0 0 0 0 1 0A3 forehand high far ball0 1 0 0 0 0A10 forehand push ball0 0 0 1 0 0A5 bash the ball in front of the forehand1 0 0 0 0 0A13 pick up the ball while walking


### 4.3. Badminton Attitude Recognition Process

This article uses BP neural network to recognize badminton strokes. The specific steps are as follows:(1)
Collect acceleration and angular velocity data of batting action and non-batting action, and extract feature values to obtain feature vectors. Each feature vector is a sample(2)
This paper uses neural network pose recognition and prediction algorithm for posture recognition. Firstly, the algorithm model is used to distinguish the two categories of hitting action and non-hitting action, and then the model is used to identify the type of hitting action. The attitude recognition model is trained based on data including batting and non-batting movements; the attitude prediction model is trained based on data on 12 batting movements. In both models, algorithms using neural networks are used for classification and recognition. The specific action recognition process is shown in Figure1Figure 1
Flowchart for recognition and prediction of badminton movement based on neural network.


### 4.4. Evaluation Index

Some indicators commonly used for the recognition and detection of motion gestures are: Accuracy, Precision, Recall, and so on. The simplest of these is accuracy, and the most commonly used are accuracy and recall. This article will test the algorithm through these two indicators and evaluate the performance of the algorithm.True positive (TP): a subset of samples that are detected as true and actually also true;True negative (TN): a subset of samples that are detected as negative and actually not;False positive (FP): a subset of samples that are detected as true but not actually;False negative (FN): A subset of samples that are detected as negative but actually true.The calculation formula for accuracy is:(8)Accuracy=TP+FNP+NThe calculation formula of accuracy is:(9)Precision=TPTP+FPThe formula for calculating the recall rate is:(10)Recall=TPP


## 4.1. Data Sources

### 4.1.1. Equipment and Environment

The wireless node signal acquisition software used in this research was developed under the Windows platform, with Visual Studio 2010 as the development environment, and written in C # language. The algorithm used in this study for data preprocessing and action classification is implemented under the Microsoft Windows platform with Matlab as the development platform and M language. The wireless inertial sensor node is mainly composed of an accelerometer and a gyroscope. The accelerometer model is ADXL326, and its measurement range is ±16 g; the gyroscope models are LPR550 and LY550, with a measurement range of ±500dps, which fully meets the needs of high-speed sports monitoring such as badminton. The wireless inertial sensor node transmits data to the personal computer terminal through the wireless receiving node.


### 4.1.2. Experimental Data

A total of 12 volunteers participated in the experiment. The volunteers were members of the XX University badminton school team and the badminton association. The volunteers were between 18-25 years old. Before the experiment, all volunteers were informed of the purpose of the experiment and the course of the experiment. Table1 shows the types of actions performed for this experiment. A1-A12 are batting actions and A13-A14 are non-batting actions. The four wireless sensor nodes used in the experiment were worn on the left wrist, right wrist, right waist and right ankle of volunteers. The sampling frequency of the wireless node in the experiment is 100 Hz, and each action is repeated 55 times.Table 1
Types of human shots performed in the experiment.
Action numberAction typeAction numberAction typeBatting actionA1Forehand serveA7Backhand net rubbingA2Backhand serveA8ForehandA3Forehand high far ballA9BackhandA4Backhand high far ballA10Forehand push ballA5Bash the ball in front of the forehandA11Forehand corner kickA6Rub the ball in front of the forehandA12Backhand corner kickNon-battingA13Pick up the ball while walkingA14Prepare your posture while shaking your wrists up and down


## 4.1.1. Equipment and Environment

The wireless node signal acquisition software used in this research was developed under the Windows platform, with Visual Studio 2010 as the development environment, and written in C # language. The algorithm used in this study for data preprocessing and action classification is implemented under the Microsoft Windows platform with Matlab as the development platform and M language. The wireless inertial sensor node is mainly composed of an accelerometer and a gyroscope. The accelerometer model is ADXL326, and its measurement range is ±16 g; the gyroscope models are LPR550 and LY550, with a measurement range of ±500dps, which fully meets the needs of high-speed sports monitoring such as badminton. The wireless inertial sensor node transmits data to the personal computer terminal through the wireless receiving node.


## 4.1.2. Experimental Data

A total of 12 volunteers participated in the experiment. The volunteers were members of the XX University badminton school team and the badminton association. The volunteers were between 18-25 years old. Before the experiment, all volunteers were informed of the purpose of the experiment and the course of the experiment. Table1 shows the types of actions performed for this experiment. A1-A12 are batting actions and A13-A14 are non-batting actions. The four wireless sensor nodes used in the experiment were worn on the left wrist, right wrist, right waist and right ankle of volunteers. The sampling frequency of the wireless node in the experiment is 100 Hz, and each action is repeated 55 times.Table 1
Types of human shots performed in the experiment.
Action numberAction typeAction numberAction typeBatting actionA1Forehand serveA7Backhand net rubbingA2Backhand serveA8ForehandA3Forehand high far ballA9BackhandA4Backhand high far ballA10Forehand push ballA5Bash the ball in front of the forehandA11Forehand corner kickA6Rub the ball in front of the forehandA12Backhand corner kickNon-battingA13Pick up the ball while walkingA14Prepare your posture while shaking your wrists up and down


## 4.2. Experimental Parameter Settings

This article randomly selects 6 movements in 14 sets of data, and collects 100 sets of data, respectively, for a total of 600 sets of data. Then randomly select 50 groups from each action sample as the training sample set of the neural network classifier, and then randomly select 50 sets of feature data as the test sample set to test the accuracy of the classifier. For the training samples of various actions, the corresponding output nodes are set to 1, and the other output nodes are set to 0, which are used as the desired output for training.According to the approximate relationship between the number of neurons in the hidden layer and the number of neurons in the input layer, and multiple experiments, this paper chooses a hidden layer with 13 neurons; in the end, there are 6 types of motion patterns that need to be identified from the 14 sets of data, so the number of neurons in the output layer is 6. In addition, in order to improve the learning rate, the learning rate of the BP neural network model is set to 0.5; the target error is 0.001, that is, the training is stopped when the number of trainings exceeds 1000 times or the training error is less than 0.001. According to theT vector representing the expected output, we can see that the one-to-one correspondence between the recognition results of the motion pose recognition and prediction model based on the neural network and the specific motion mode is shown in Table 2 below.Table 2
One-to-one correspondence between the results of motion pose recognition and motion patterns based on neural networks.
Recognition resultSpecific exercise modeRecognition resultSpecific exercise mode0 0 0 0 0 1A1 forehand serve0 0 1 0 0 0A7 backhand net rubbing0 0 0 0 1 0A3 forehand high far ball0 1 0 0 0 0A10 forehand push ball0 0 0 1 0 0A5 bash the ball in front of the forehand1 0 0 0 0 0A13 pick up the ball while walking


## 4.3. Badminton Attitude Recognition Process

This article uses BP neural network to recognize badminton strokes. The specific steps are as follows:(1)
Collect acceleration and angular velocity data of batting action and non-batting action, and extract feature values to obtain feature vectors. Each feature vector is a sample(2)
This paper uses neural network pose recognition and prediction algorithm for posture recognition. Firstly, the algorithm model is used to distinguish the two categories of hitting action and non-hitting action, and then the model is used to identify the type of hitting action. The attitude recognition model is trained based on data including batting and non-batting movements; the attitude prediction model is trained based on data on 12 batting movements. In both models, algorithms using neural networks are used for classification and recognition. The specific action recognition process is shown in Figure1Figure 1
Flowchart for recognition and prediction of badminton movement based on neural network.


## 4.4. Evaluation Index

Some indicators commonly used for the recognition and detection of motion gestures are: Accuracy, Precision, Recall, and so on. The simplest of these is accuracy, and the most commonly used are accuracy and recall. This article will test the algorithm through these two indicators and evaluate the performance of the algorithm.True positive (TP): a subset of samples that are detected as true and actually also true;True negative (TN): a subset of samples that are detected as negative and actually not;False positive (FP): a subset of samples that are detected as true but not actually;False negative (FN): A subset of samples that are detected as negative but actually true.The calculation formula for accuracy is:(8)Accuracy=TP+FNP+NThe calculation formula of accuracy is:(9)Precision=TPTP+FPThe formula for calculating the recall rate is:(10)Recall=TPP


## 5. Results and Discussions

### 5.1. Performance Evaluation of Face Detection Algorithms Based on Video Images

#### 5.1.1. Test Accuracy

Next, the performance of the algorithm is tested for accuracy. A total of 100 surveillance video clips were collected in this article. Each clip is about 20 seconds. The resolution of the video is 1280 × 720 and the frame rate is 29 frames/second. The detected lighting conditions include strong light, low light and light changes. The detection scenarios are indoor and outdoor. When testing the accuracy, a total of 10 videos were randomly selected in each time period and scene. In order to ensure the quality of the test and the real-time detection, the video is detected every three frames. In this way, about 196 times will be detected for a video of about 20 seconds. Next, the results are shown in a chart.Through the above-mentioned Figure2, it can be intuitively felt that the face detection algorithm implemented in this paper has a high accuracy rate and has a good effect. By calculation, the average accuracy of the face detection algorithm realized in this paper can reach 92.6%. This shows that the face detection algorithm implemented in this paper basically meets the standards. When the light is weak or the face is severely occluded, the detection effect is poor, but for the case where the light is sufficient and the face is full, the detection effect is good.Figure 2
Detection results of the algorithm in this paper under 10 groups of videos.


#### 5.1.2. Evaluation of Experimental Performance

By comparing the face detection and tracking algorithm implemented in this paper with the best face extraction algorithm and the test results without the algorithm, the following Table3 can be obtained.Table 3
Performance test of face extraction algorithm.
Data compression ratioScreening image recognition ratioFull face recognition rateAdd face extraction algorithm9.3 (%)83.1 (%)78 (%)No face extraction algorithm added100 (%)83.9 (%)72 (%)After obtaining the comparison data results, a histogram is used to visually show the comparison of the index results in the two cases, as shown in Figure3.Figure 3
Performance test chart of face extraction algorithm.Through the above test results, we can analyze:(1)
Compared with the data in rows 2 and 3 under column 3, the addition of the face extraction algorithm only reduces the recognition rate by 0.8%, and the recognition rate does not decrease significantly. It is proved that the extraction algorithm does filter out some low-quality video images and does not affect the overall recognition rate(2)
Analyze the data in rows 2 and 3 under column 4 and add the face retrieval algorithm to increase the recall rate by 6% compared to the case without adding recognition. This shows that the face extraction algorithm proposed in this paper does filter out some low-quality face images, so the recognition rate of the push video image is improved(3)
Analyze the data in rows 2 and 3 under the first column, and the compression rate of the data extracted by adding the face extraction algorithm is greatly reduced compared with the data extracted without adding the face. It shows that the face extraction algorithm presented in this paper reduces a lot of redundant data calculationsThrough the above experimental analysis, we can get that the face extraction algorithm given in this paper can extract high-quality video images, meet the real-time needs of the system, and improve the accuracy and efficiency of subsequent recognition.


### 5.2. Analysis of Posture Recognition Results in Badminton

In the actual game, you will encounter non-hitting actions such as walking and picking up the ball. The acceleration generated by these actions is greater than 1.5 g, which cannot be filtered out during window division. Therefore, it is necessary to filter out non-hitting actions before the hitting action recognition. This paper uses a model to distinguish between hitting and non-hitting actions. The specific classification and recognition results are shown in Table4.Table 4
Recognition results of batting action and non-batting action.
Batting actionNon-batting actionAverage recognition rate99.46%98.97%As can be seen from the table, the algorithm constructed in this paper can almost completely distinguish between the hitting action and the non-hitting action, further reducing the impact of non-hitting information on the classification and recognition of hitting action. In order to verify the feasibility of the above indicators, the following explores the feasibility of hierarchical classification using only angular velocity data and both acceleration data and angular velocity data. The classification result is shown in Figure4:Figure 4
3 levels of recognition results.It can be known from Figure4 that when only the angular velocity data is used for classification, the recognition rate can reach 98.32%, and the feasibility of the above indicators is verified from another aspect. This paper also did an experiment of using the acceleration and angular velocity data to classify the classification. The recognition rate can reach 98.84%, which again shows that acceleration and angular velocity can be used to classify the classification. It shows that electronic equipment can be used to help coaches perform rating evaluations, making the rating evaluation more scientific. The following explores the impact of different body parts’ motion data on the classification of levels. The motion data of the four body parts of the right wrist, right side of the waist, right ankle, and left ankle are used to classify the classification. The recognition results are shown in the table:It can be seen from Figure5 that no matter whether only acceleration data or angular velocity data is used or both types of data are used at the same time, the classification recognition rate obtained by the right wrist is the highest. This shows that the right wrist is the best place for classification, and it is the waist, left ankle, and right ankle. By comparing the data of Figures 4 and 5, it can be known that when a single sensor is used for classification, the recognition result using acceleration and angular velocity data at the same time is the best, followed by acceleration data and finally angular velocity data. However, the recognition rate obtained from the data of multiple body parts is higher than the recognition rate of a single body part, indicating that badminton is a sports that requires the coordination of different parts of the human body.Figure 5
Recognition results of different body parts motion data.


### 5.3. Test of Badminton Attitude Recognition System Based on Video Image Analysis

#### 5.3.1. Analysis of System Runtime

Under a master node and a 7-node system cluster, the processing time of each module is recorded by processing 50G video data. The module running time distribution is shown in Figure6:Figure 6
System module running time.It can be obtained from the data of the graph that the first few process video key frame acquisition, image pre-processing and motion gesture recognition all need to perform massive video processing, resulting in the need to consume most of the time, accounting for 74.04% of the entire application time. After the first few processes are screened and optimized, the amount of data in the subsequent kinematic attitude prediction process is greatly reduced, so the time consumed in these processes is also greatly reduced, accounting for 7.05% of the entire system application time.


#### 5.3.2. Analysis of System Cluster Size on Data Processing Efficiency

The system tests the impact of cluster size on data processing efficiency by processing the time required for 50G data in different system cluster sizes. First, configure the size of the cluster by configuring the number of worker nodes, and the number of worker nodes will be configured to 1, 3, 5, and 7.The experimental results are shown in Figure7. When there are 7 worker nodes, the system cluster processing time for processing 50G data is 75058 seconds, and the total time for the system cluster machine to run 7S is reduced by 207 seconds compared to 1 worker node. More importantly, the application runtime 7 T is 26437 seconds with 7 Worker nodes, which is 48621 shorter than the 78539 seconds of a single Worker node. It can also be seen from the experimental data iA that 7 Worker nodes can accelerate 78.46% compared to a single Worker node. It can be concluded that the larger the system’s cluster (that is, the more processing nodes), the less time the system needs for data processing and the faster the efficiency.Figure 7
Analysis of cluster size versus data processing efficiency.


## 5.1. Performance Evaluation of Face Detection Algorithms Based on Video Images

### 5.1.1. Test Accuracy

Next, the performance of the algorithm is tested for accuracy. A total of 100 surveillance video clips were collected in this article. Each clip is about 20 seconds. The resolution of the video is 1280 × 720 and the frame rate is 29 frames/second. The detected lighting conditions include strong light, low light and light changes. The detection scenarios are indoor and outdoor. When testing the accuracy, a total of 10 videos were randomly selected in each time period and scene. In order to ensure the quality of the test and the real-time detection, the video is detected every three frames. In this way, about 196 times will be detected for a video of about 20 seconds. Next, the results are shown in a chart.Through the above-mentioned Figure2, it can be intuitively felt that the face detection algorithm implemented in this paper has a high accuracy rate and has a good effect. By calculation, the average accuracy of the face detection algorithm realized in this paper can reach 92.6%. This shows that the face detection algorithm implemented in this paper basically meets the standards. When the light is weak or the face is severely occluded, the detection effect is poor, but for the case where the light is sufficient and the face is full, the detection effect is good.Figure 2
Detection results of the algorithm in this paper under 10 groups of videos.


### 5.1.2. Evaluation of Experimental Performance

By comparing the face detection and tracking algorithm implemented in this paper with the best face extraction algorithm and the test results without the algorithm, the following Table3 can be obtained.Table 3
Performance test of face extraction algorithm.
Data compression ratioScreening image recognition ratioFull face recognition rateAdd face extraction algorithm9.3 (%)83.1 (%)78 (%)No face extraction algorithm added100 (%)83.9 (%)72 (%)After obtaining the comparison data results, a histogram is used to visually show the comparison of the index results in the two cases, as shown in Figure3.Figure 3
Performance test chart of face extraction algorithm.Through the above test results, we can analyze:(1)
Compared with the data in rows 2 and 3 under column 3, the addition of the face extraction algorithm only reduces the recognition rate by 0.8%, and the recognition rate does not decrease significantly. It is proved that the extraction algorithm does filter out some low-quality video images and does not affect the overall recognition rate(2)
Analyze the data in rows 2 and 3 under column 4 and add the face retrieval algorithm to increase the recall rate by 6% compared to the case without adding recognition. This shows that the face extraction algorithm proposed in this paper does filter out some low-quality face images, so the recognition rate of the push video image is improved(3)
Analyze the data in rows 2 and 3 under the first column, and the compression rate of the data extracted by adding the face extraction algorithm is greatly reduced compared with the data extracted without adding the face. It shows that the face extraction algorithm presented in this paper reduces a lot of redundant data calculationsThrough the above experimental analysis, we can get that the face extraction algorithm given in this paper can extract high-quality video images, meet the real-time needs of the system, and improve the accuracy and efficiency of subsequent recognition.


## 5.1.1. Test Accuracy

Next, the performance of the algorithm is tested for accuracy. A total of 100 surveillance video clips were collected in this article. Each clip is about 20 seconds. The resolution of the video is 1280 × 720 and the frame rate is 29 frames/second. The detected lighting conditions include strong light, low light and light changes. The detection scenarios are indoor and outdoor. When testing the accuracy, a total of 10 videos were randomly selected in each time period and scene. In order to ensure the quality of the test and the real-time detection, the video is detected every three frames. In this way, about 196 times will be detected for a video of about 20 seconds. Next, the results are shown in a chart.Through the above-mentioned Figure2, it can be intuitively felt that the face detection algorithm implemented in this paper has a high accuracy rate and has a good effect. By calculation, the average accuracy of the face detection algorithm realized in this paper can reach 92.6%. This shows that the face detection algorithm implemented in this paper basically meets the standards. When the light is weak or the face is severely occluded, the detection effect is poor, but for the case where the light is sufficient and the face is full, the detection effect is good.Figure 2
Detection results of the algorithm in this paper under 10 groups of videos.


## 5.1.2. Evaluation of Experimental Performance

By comparing the face detection and tracking algorithm implemented in this paper with the best face extraction algorithm and the test results without the algorithm, the following Table3 can be obtained.Table 3
Performance test of face extraction algorithm.
Data compression ratioScreening image recognition ratioFull face recognition rateAdd face extraction algorithm9.3 (%)83.1 (%)78 (%)No face extraction algorithm added100 (%)83.9 (%)72 (%)After obtaining the comparison data results, a histogram is used to visually show the comparison of the index results in the two cases, as shown in Figure3.Figure 3
Performance test chart of face extraction algorithm.Through the above test results, we can analyze:(1)
Compared with the data in rows 2 and 3 under column 3, the addition of the face extraction algorithm only reduces the recognition rate by 0.8%, and the recognition rate does not decrease significantly. It is proved that the extraction algorithm does filter out some low-quality video images and does not affect the overall recognition rate(2)
Analyze the data in rows 2 and 3 under column 4 and add the face retrieval algorithm to increase the recall rate by 6% compared to the case without adding recognition. This shows that the face extraction algorithm proposed in this paper does filter out some low-quality face images, so the recognition rate of the push video image is improved(3)
Analyze the data in rows 2 and 3 under the first column, and the compression rate of the data extracted by adding the face extraction algorithm is greatly reduced compared with the data extracted without adding the face. It shows that the face extraction algorithm presented in this paper reduces a lot of redundant data calculationsThrough the above experimental analysis, we can get that the face extraction algorithm given in this paper can extract high-quality video images, meet the real-time needs of the system, and improve the accuracy and efficiency of subsequent recognition.


## 5.2. Analysis of Posture Recognition Results in Badminton

In the actual game, you will encounter non-hitting actions such as walking and picking up the ball. The acceleration generated by these actions is greater than 1.5 g, which cannot be filtered out during window division. Therefore, it is necessary to filter out non-hitting actions before the hitting action recognition. This paper uses a model to distinguish between hitting and non-hitting actions. The specific classification and recognition results are shown in Table4.Table 4
Recognition results of batting action and non-batting action.
Batting actionNon-batting actionAverage recognition rate99.46%98.97%As can be seen from the table, the algorithm constructed in this paper can almost completely distinguish between the hitting action and the non-hitting action, further reducing the impact of non-hitting information on the classification and recognition of hitting action. In order to verify the feasibility of the above indicators, the following explores the feasibility of hierarchical classification using only angular velocity data and both acceleration data and angular velocity data. The classification result is shown in Figure4:Figure 4
3 levels of recognition results.It can be known from Figure4 that when only the angular velocity data is used for classification, the recognition rate can reach 98.32%, and the feasibility of the above indicators is verified from another aspect. This paper also did an experiment of using the acceleration and angular velocity data to classify the classification. The recognition rate can reach 98.84%, which again shows that acceleration and angular velocity can be used to classify the classification. It shows that electronic equipment can be used to help coaches perform rating evaluations, making the rating evaluation more scientific. The following explores the impact of different body parts’ motion data on the classification of levels. The motion data of the four body parts of the right wrist, right side of the waist, right ankle, and left ankle are used to classify the classification. The recognition results are shown in the table:It can be seen from Figure5 that no matter whether only acceleration data or angular velocity data is used or both types of data are used at the same time, the classification recognition rate obtained by the right wrist is the highest. This shows that the right wrist is the best place for classification, and it is the waist, left ankle, and right ankle. By comparing the data of Figures 4 and 5, it can be known that when a single sensor is used for classification, the recognition result using acceleration and angular velocity data at the same time is the best, followed by acceleration data and finally angular velocity data. However, the recognition rate obtained from the data of multiple body parts is higher than the recognition rate of a single body part, indicating that badminton is a sports that requires the coordination of different parts of the human body.Figure 5
Recognition results of different body parts motion data.


## 5.3. Test of Badminton Attitude Recognition System Based on Video Image Analysis

### 5.3.1. Analysis of System Runtime

Under a master node and a 7-node system cluster, the processing time of each module is recorded by processing 50G video data. The module running time distribution is shown in Figure6:Figure 6
System module running time.It can be obtained from the data of the graph that the first few process video key frame acquisition, image pre-processing and motion gesture recognition all need to perform massive video processing, resulting in the need to consume most of the time, accounting for 74.04% of the entire application time. After the first few processes are screened and optimized, the amount of data in the subsequent kinematic attitude prediction process is greatly reduced, so the time consumed in these processes is also greatly reduced, accounting for 7.05% of the entire system application time.


### 5.3.2. Analysis of System Cluster Size on Data Processing Efficiency

The system tests the impact of cluster size on data processing efficiency by processing the time required for 50G data in different system cluster sizes. First, configure the size of the cluster by configuring the number of worker nodes, and the number of worker nodes will be configured to 1, 3, 5, and 7.The experimental results are shown in Figure7. When there are 7 worker nodes, the system cluster processing time for processing 50G data is 75058 seconds, and the total time for the system cluster machine to run 7S is reduced by 207 seconds compared to 1 worker node. More importantly, the application runtime 7 T is 26437 seconds with 7 Worker nodes, which is 48621 shorter than the 78539 seconds of a single Worker node. It can also be seen from the experimental data iA that 7 Worker nodes can accelerate 78.46% compared to a single Worker node. It can be concluded that the larger the system’s cluster (that is, the more processing nodes), the less time the system needs for data processing and the faster the efficiency.Figure 7
Analysis of cluster size versus data processing efficiency.


## 5.3.1. Analysis of System Runtime

Under a master node and a 7-node system cluster, the processing time of each module is recorded by processing 50G video data. The module running time distribution is shown in Figure6:Figure 6
System module running time.It can be obtained from the data of the graph that the first few process video key frame acquisition, image pre-processing and motion gesture recognition all need to perform massive video processing, resulting in the need to consume most of the time, accounting for 74.04% of the entire application time. After the first few processes are screened and optimized, the amount of data in the subsequent kinematic attitude prediction process is greatly reduced, so the time consumed in these processes is also greatly reduced, accounting for 7.05% of the entire system application time.


## 5.3.2. Analysis of System Cluster Size on Data Processing Efficiency

The system tests the impact of cluster size on data processing efficiency by processing the time required for 50G data in different system cluster sizes. First, configure the size of the cluster by configuring the number of worker nodes, and the number of worker nodes will be configured to 1, 3, 5, and 7.The experimental results are shown in Figure7. When there are 7 worker nodes, the system cluster processing time for processing 50G data is 75058 seconds, and the total time for the system cluster machine to run 7S is reduced by 207 seconds compared to 1 worker node. More importantly, the application runtime 7 T is 26437 seconds with 7 Worker nodes, which is 48621 shorter than the 78539 seconds of a single Worker node. It can also be seen from the experimental data iA that 7 Worker nodes can accelerate 78.46% compared to a single Worker node. It can be concluded that the larger the system’s cluster (that is, the more processing nodes), the less time the system needs for data processing and the faster the efficiency.Figure 7
Analysis of cluster size versus data processing efficiency.


## 6. Conclusions

In order to better recognize the lower limb movement pattern and predict the posture of the badminton player, this paper converts the knee joint angle signal into the knee joint angle characteristic value, and performs simple normalization processing on the knee joint angle signal. In this paper, the more mature BP neural network algorithm and self-organizing competitive neural network are used to establish a badminton sport posture recognition model, and the model is trained and simulated separately. The simulation results of the models are compared, and it is found that the recognition of the motion pose and the prediction model established by the neural network are accurate, and they almost coincide with the actual motion trend.In order to improve the efficiency and accuracy of face recognition, this paper establishes a face detection and recognition framework, and presents a face recognition and feature extraction algorithm. The algorithm is used to filter the pictures of the input recognition network, thereby improving the performance of the overall recognition process. By calculation, the average accuracy of the face detection algorithm realized in this paper can reach 92.6%. This shows that the face detection algorithm implemented in this paper basically meets the standards. When the light is weak or the face is seriously blocked, the detection effect is poor, but when the light is sufficient and the face is full, the detection effect will be very good.This article uses a single inertial sensor to classify badminton movements, and uses sensors located on the right wrist, left wrist, waist, and right ankle to classify badminton movements. The recognition rates are 99.84%, 99.76%, 97.87%, and 98.08%. The right wrist has the highest recognition rate, indicating that the right-handed athletes mainly control the racket through the right wrist and achieve different strokes, indicating that the right wrist is the best position.



---

*Source: 6960343-2022-03-27.xml*