Keywords

1 Introduction

Through the interaction of vision, hearing and touch, virtual reality can completely immerse people in the virtual world [1]. Virtual reality technology will be widely used, and it will change people’s lives [2]. Using virtual reality technology, it reproduces the coach’s teaching experience, the coach’s training intention, the coach’s organizational plan, and the whole process of athlete training, so as to achieve an experimental technology for the interpretation, analysis, prediction and organizational evaluation of the sports system. In recent years, the system simulation has become a research hotspot [3].

Reference [4] using virtual reality technology to design badminton auxiliary training system, and Kinect The system uses virtual reality technology to carry out virtual modeling of the training ground through 3dsmax tools, and renders the scene of the training ground with cry engine technology Kinect is used to recognize these actions and the user’s position changes, and transmit the recognition results to the VR glasses through the Bluetooth module, so that the virtual environment in the VR glasses can make corresponding changes in images, sounds and so on. Reference [5] introduced a virtual training system for upper limb coordination function based on occupational therapy. The system uses a high-precision 5DT data glove and an electromagnetic position tracking system to collect finger bending data and arm motion data respectively. Through socket communication, the system controls the bending and movement of the virtual hand in the game, and realizes the operation training of “hand opening grasping” and “two fingertips pinching” The application of virtual reality technology in occupational therapy has greatly improved the safety of occupational training, increased the enthusiasm of patients to participate in training, and achieved remarkable results in rehabilitation training. Compared with object-oriented simulation, qualitative simulation, distributed interactive simulation, visual simulation and multimedia simulation, virtual reality simulation focuses on multiple perception capabilities such as multiple perception, interaction and immersion, while many sports training only requires the participation of multiple senses of athletes. With the continuous development of virtual reality technology, virtual reality technology will be more and more used in sports training. Based on virtual reality technology, this paper develops a set of motion simulation training system. It optimizes the hardware configuration of the system from three aspects: input system, output system and virtual environment generator. The image processing algorithm based on VR technology obtains sports training information, optimizes the sports simulation training process, and realizes the system software function and operation process.

2 Sports Simulation Training System

The characteristics of VR based sports simulation system are strong immersion, economy and convenience. The VR based sports simulation system consists of input system, output system and virtual environment generator, as shown in Fig. 1.

Fig. 1.
figure 1

Structure diagram of competitive sports simulation system based on VR

The input system includes data glove, position tracker, converter, glove input conversion device, etc. The virtual environment generator includes user system, simulation manager, 3D processor, high-performance computer, graphics card, 3D model database, haptic force and other feedback devices, and input/output interface [6]. The output system includes a signal converter and an effect generator (a raster display). The user can experience more realistic stereo and stereo, and can also interact with the surrounding virtual scene naturally, so that the user can be completely in the virtual environment, as if in it.

2.1 Hardware Structure of Sports Simulation Training System

The system uses embedded Linux kernel to process moving images in real time, load them into the process of control information, and transmit them to the root file system of Linux through CAN. In the image processing part, through data processing, image analysis, image capture and other functions, the corresponding script and server configuration are written. In the output part, the virtual reality technology is used to analyze the images and images in the process of sports training, and download them to the development board to complete the analysis and software driving of sports training. Based on the above analysis and description, the overall architecture of the motion image analysis system designed in this paper is shown in Fig. 2.

Fig. 2.
figure 2

Overall hardware structure model of the system

The power supply is the main condition for whether the sensor node can work or not, and it is powered by the battery. The data collection module is mainly composed of two sub modules: A/D converter and sensor [7]. The main purpose of the processing unit is to control the operation of sensor nodes, store and process the collected data and other node data. The main goal of wireless communication system is to communicate with other nodes. The structure of a sensor based on virtual reality is shown in Fig. 3.

Fig. 3.
figure 3

Hardware structure of virtual reality sensor nod

Virtual reality sensor network software mainly includes application program, operating system, data collection program, bottom driver, etc. the figure shows the software structure of virtual reality sensor node. Among them, network communication protocol belongs to the main part of virtual reality sensor network software structure, which has a direct impact on network performance.

2.2 Software Function of Sports Simulation Training System

This paper introduces an image processing method based on VR technology, which mainly consists of moving image detection and feature extraction [8]. Moving image feature extraction based on gradient histogram [9]. This paper uses solution of EXHOG feature algorithm the problem that the same gradient feature cannot be detected. The algorithm is as follows set \(M_{{{\text{HG}}}}\) as the gradient direction of sports training and sports monitoring video image, and set 0–60 as the direction space; Extract the gradient histogram feature \(M_{{{\text{HG}}}} (i)\), which is 0°–80° unsigned gradient direction space. Its feature is \(\theta\), \(L\) represents quantization channels, and \(S\) represents the number of channels. Then the calculation method of hog is:

$$ M_{{\text{HOG }}} (i) = \left| {SM_{{{\text{HG}}}} (i) + M_{{{\text{HG}}}} \left( {i + \frac{L}{2\theta }} \right)} \right| $$
(1)

Based on noise suppression, singular value decomposition (SVD) and phase convolution (PC) are used to extract features from moving images. Finally, the least square method is used for the difference analysis of moving images. The characteristics of machine vision at pixel level are as follows:

$$ k_{{\text{m}}}^{\prime } = X_{{\text{w}}} + A_{1} - \frac{{p_{{\text{w}}}^{\prime } - X_{n}^{\prime } \sum {\rho^{\prime } } + \left( {3X_{w}^{\prime } - 1} \right)}}{{\left[ {\frac{{X_{m}^{\prime } }}{{\lambda_{m} }}\left( {\frac{{x_{n} }}{{\lambda_{n} }} + \frac{{x_{a} }}{{\lambda_{a} }} + \frac{{x_{b} }}{{\lambda_{b} }}} \right) - x_{m} } \right]}} - M_{{\text{HOG }}} (i) $$
(2)

For sit ups, there are left and right bone nodes. The human skeleton nodes of the athlete are left shoulder joint point \(\lambda_{m}\), right shoulder joint point \(\lambda_{n}\), left elbow joint point \(\lambda_{a}\), right elbow joint point \(\lambda_{b}\), left hand joint point \(x_{n}\), right elbow joint point \(x_{a}\), right knee joint point \(x_{b}\), left foot joint point \(x_{m}\), right foot joint point \(X_{m}^{\prime }\), hip joint point \(p_{{\text{w}}}^{\prime }\) and hip joint point \(X_{w}^{\prime }\). The setting \(\alpha\) of this system is the angle between EHC and ESL, \(\beta\) is the angle between EHR and ES, \(\gamma\) is the angle between K7L and KFL, and \(\delta\) is the angle between KTR and KF. The feature matrix is extracted according to the actual motion scene. As shown in the formula, the period of sit ups is represented by T, and the time to complete one sit ups is represented by r.

$$ S_{T} = \left[ {\alpha_{1} ,\beta_{1} ,\gamma_{1} ,\delta_{1} } \right] $$
(3)

The movement is in the key state, so the score ratio of supine state and sitting state is \(b_{1}\): \(b_{2}\). Taking a complete sit up exercise cycle as an example, the full score of sit up exercise cycle is \(k_{i}\), and in practice, k is 100. Suppose the tester completes n sit ups, in which the similarity of supine state is \(g_{i}\) and the similarity of sitting state is \(m\). The final score is obtained according to the formula:

$$ S = \frac{{S_{T} m\sum\limits_{i = 1}^{n} {\left( {b_{1} g_{i} + b_{2} k_{i} } \right)} }}{{4k_{{\text{m}}}^{\prime } n^{2} }} $$
(4)

Before extracting bone features from athletes, it is necessary to ensure the accuracy of bone data. Extracting abnormal data will cause position deviation of bone data and directly affect the effect of motion recognition [10]. The most likely data abnormality in this system is that there may be interference caused by some accidental factors when collecting data in virtual reality, resulting in errors in bone node data. Therefore, it is necessary to filter the collected data. Because the system needs to identify different movements, the filtering algorithm selected is required to meet the stability of the test data and the high accuracy of the position perception of bone nodes, so the system finally selects the amplitude limiting filtering algorithm to eliminate the jitter of bone node data [11]. In the amplitude limiting filtering algorithm, there are two important attributes, namely, bone jitter radius threshold and bone deviation radius threshold. (1) Bone jitter radius threshold: when the jitter of bone node data is greater than the bone jitter radius threshold, it can be judged that the bone confirmation degree of this point is low, so the bone node must be corrected. (2) Bone deviation radius threshold: when the bone node data movement is greater than the bone deviation radius threshold, but less than the wide value of bone jitter radius, it indicates that it is caused by the new position movement of bone node position data, so as to eliminate the possibility of the influence of bone data node jitter. The system requires the bone node data to meet the bone jitter radius and bone deviation radius at the same time. The limiting filtering flow chart is shown in Fig. 4.

Fig. 4.
figure 4

Flow chart of motion simulation filtering based on virtual reality

Virtual reality algorithm is used in parameter learning. After the parameter initialization in the previous section, the initialization parameters are obtained. On this basis, the initialized parameters are input into the virtual reality model for parameter training. Because the parameters of each action x = {A,B,m) are learned through the process of parameter training, the forward algorithm is carried out on these actions to calculate P(xoy), and finally the motion action with the largest P(O2) can be selected as the recognition result of the test action. The complete process of motion training and recognition is shown in Fig. 5:

Fig. 5.
figure 5

Recognition process of sports training information based on virtual reality

The system adopts usb 30 interface for data exchange, and uses virtual reality technology to process real-time data of human body color, depth, bone, etc. The application accepts instant data for processing. The system is developed and designed using Visual Studio 2015 software. The system includes data layer, bone algorithm layer, motion recognition layer, motion presentation layer, etc. The client communicates with ECS using TCP/IP communication protocol. The specific software operation process is shown in Fig. 6:

Fig. 6.
figure 6

Operation flow of system software

The sports training system uses cameras to measure athletes’ bones in real time. After the coordinate transformation, the smooth data of the skeleton is obtained through filtering. Secondly, the space vector method is used to extract the angular features between bone nodes, and the collected motion characteristics are used to train the HMM model. By selecting the maximum output probability, a set of somatosensory motion training system with high reliability and low delay is realized. It can be seen from Fig. 7 that the technical architecture of the system can be divided into four levels:

Fig. 7.
figure 7

Framework of physical training system

Through the movement recognition layer, identify the different movements of athletes participating in training, save all data of all actions, including action time, action times, score settlement, etc., and then upload them to the server for scientific analysis and management, and finally form a suitable action training plan [12]. The structure of each functional module of the system is shown in Fig. 8.

Fig. 8.
figure 8

Structure of each functional module of the system

As can be seen from Fig. 8, the system consists of four parts. Among them, adding and deleting athletes and adding and deleting training items are two auxiliary function modules; Data analysis of single person multi training program and data analysis of multi person training program are two main functional modules, which will be introduced in detail below.

2.3 Realization of Sports Simulation Training

Implement the goal for the healthy development of College Students’ physique clearly stipulated in the national system exercise standard policy, and achieve the purpose of comprehensive and balanced development by fully studying the improvement path of College Students’ comprehensive physical quality and reasonably planning the training content. In view of the fact that the traditional single sports training function design can no longer meet the sports training needs of students at this stage, under the guidance of professional fitness coaches, A variety of different exercises including upper limb strength, waist and abdomen strength and leg strength are designed and developed, which integrate sit ups, pull ups, squats and standing long jump respectively. The corresponding sports training purposes and standard movements of various sports functions are shown in Table 1.

Table 1. Different sports training functions of sports simulation

The moving area is the projection of the moving object in the video window. The movement of the object causes the gray value change of the pixels in the moving area, which can be reflected in the frame difference diagram of two adjacent video images After binarization, the frame difference image can be used to mark the moving region and the still region with the same size as the frame difference image. In the segmentation, 0 indicates that the pixel at the corresponding position belongs to the still region, and 1 indicates that the pixel at the corresponding position belongs to the moving region. Some early moving region segmentation methods are based on this binarized frame difference image, and the binarized frame difference image can be described as:

$$ dk{(}i,j{)} = \left\{ {\begin{array}{*{20}l} {1} \hfill & {|greyk{(}i,j{)} - greyk - L{(}i,j{)}| > T} \hfill \\ 0 \hfill & {|greyk{(}i,j{)} - greyk - L{(}i,j{)}| \le T} \hfill \\ \end{array} } \right. $$
(5)

Among them, \(k{(}i,j{)}\) is the binarized frame difference image, \(L{(}i,j{)}\) is the pixel position, \(greyk\) is the gray value of pixel \({(}i,j{)}\) in frame k, t is the threshold required for binarization, which is an empirical value. In this paper, T = 1. When the object moves slowly, the change of the corresponding motion region between adjacent frames is very small, which can be improved by increasing the interval of frame difference image, that is, when detecting the motion region, calculate the frame difference between frame k and k2, L is the number of interval frames. This simple difference algorithm has many problems. A secondary frame difference method is proposed to improve it. Let \(d{(}i,j{)}\) be the two frame difference images obtained by the above formula, and the secondary frame difference D is defined as:

$$ D = \left\{ {\begin{array}{*{20}l} {1} \hfill & {d{(}i,j{)} \le L} \hfill \\ 0 \hfill & {d{(}i,j{)} > L} \hfill \\ \end{array} } \right. $$
(6)

The application of computer to the daily training management of athletes will inevitably affect the process of sports training. Based on the traditional training process, this paper proposes a virtual reality assisted training process, as shown in Fig. 9.

Fig. 9.
figure 9

Flow of Virtual Reality Assisted Training Mode

The process of virtual reality assisted training consists of two closed loops. The inner loop maintains the negative feedback loop of the traditional training mode, and the outer loop is a discontinuous positive feedback loop. The two loops are nested in the inner loop. Compared with the traditional process, only two modules of “historical database” and “Virtual Reality Assisted Analysis” are added to the feedback loop. The “historical database” records the content and effect of all previous training of athletes for analysis; It is an auxiliary method of “physical analysis” and “physical analysis” for the training of athletes, including the application of “physical analysis” and “physical analysis”, which is a new training method for coaches, After obtaining various data, the “virtual simulation and mechanism calculation” module simulates the changes of athletes’ competitive level after changing the “conventional training routine”, so as to change the training elements and jump out of the local minimum. With the help of some software development tools or environments, a simplified model of the actual system can be constructed as soon as possible, as shown in Fig. 10.

Fig. 10.
figure 10

Simulation training processing flow

Using virtual reality technology, an initial model of the system can be quickly established for developers to communicate with users, so as to accurately obtain the sports simulation needs of users. The gradual refinement method is used to gradually improve the prototype. It is a process of continuous and repeated promotion at a new high level. It can greatly avoid the phenomenon that the prototype of the product can not be seen in the lengthy development process of waterfall model. Compared with waterfall model, prototype model can better reflect people’s cognitive and thinking activities. Rapid prototyping can easily improve the communication between the two sides in the early stage of development, and the bow guide stimulates the sports simulation needs of the application side. From the results of practice, it is a more suitable model for the development of sports simulation system.

3 Analysis of Experimental Results

Investigate relevant coaches and athletes in this regard. More than 100 coaches and athletes from sports teams and sports colleges in many places were sampled and investigated by means of telephone consultation and field investigation. Table 2 shows the survey results.

Table 2. Questionnaire on understanding of simulation training

The development of sports simulation system needs the close cooperation of sports technology, training experience, computer simulation technology and other majors. In the process of cooperative development, cooperation faults are easy to appear between disciplines (see Table 3).

Table 3. Sampling questionnaire on skills of both parties in cooperative development

Before the development, coaches do not know what kind of function computer simulation can achieve. Computer personnel are difficult to understand sports technology and experience in place, and there are various objective restrictions in practice, so it is very difficult to cooperate, so the cooperation method is a big problem that needs to be solved urgently. According to the characteristics of physical training, this paper requires to discuss the development mode of each discipline. Before the system is applied, it is necessary to analyze the experimental results of identification and stability of the motion identification algorithm detected by the system. In the experiment, 15 male subjects and 5 female subjects participated in the test for 5 days. During these five days, each participant uses the system for exercise training in the morning and afternoon of each day, and 200 sample data are obtained after the test, The motion recognition rate and accuracy of the motion results of the system are calculated by summarizing the sample data, as shown in Table 4.

Table 4. Motion test results based on virtual reality simulation training

Through the data analysis of the test results, the results show that the system has a high recognition rate for various functional actions, and the identification function of the system is stable and reliable. In these projects, the accuracy of sit ups, pull ups and squats has met the market demand. Relatively speaking, the recognition accuracy of standing long jump is relatively low. It can be seen from the table that with the increase of training accuracy, the recall rate increases, indicating that there is a positive correlation between the two, and the use accuracy and recall rate of the system in this paper are better than those of traditional methods. It can be predicted that the sports training simulation based on VR has a variety of perceptual abilities, so it can enhance the ability of trainees to interact with the motion simulation system, the effect of simulation training can be effectively improved. The application of VR technology in sports training simulation can effectively promote the scientific and technological training and competitive level of Chinese athletes. And is conducive to the extensive development of national fitness. The application of VR technology can also realize virtual Olympics, Improving the high-tech content in all preparations for the Olympic Games and completing many difficult preparations efficiently. The application of virtual reality technology in sports simulation technology is increasingly extensive.

4 Conclusion

In order to further improve the scientific nature of sports teaching, this paper proposes a new type of sports teaching video analysis system. First, the whole system design is completed, then the specific design is carried out, and the whole system is simulated. The experiment proves that the system can accurately describe the steps of sports training, effectively improve the accuracy of key frame extraction, and achieve good retrieval results. This method is of great significance in guiding physical exercise. The next research will refine the specific sports training content and apply it to the specific sports curriculum training. To further test the effectiveness of the design system.