# A Sports Digital Training System Based on Middle and Bottom Visual Information

Authors: Le Luo
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Physical exercise has become increasingly popular in China in recent years, and the number of individuals participating in physical activities is growing year after year. Therefore, they are facing the problem of a serious shortage of sports resources, especially in the central and western regions where a complete physical education teaching system has not been established yet. The introduction of sports digital training alleviates this problem to a great extent. This approach uses advanced computer technology for digital training, collects people’s sports information, and formulates suitable sports programs for different groups. The system can collect people’s action videos at the same time by two cameras, analyze the athletes’ actions from the side and face by using the software, and compare the professional athletes’ actions with the collected video action for in-depth analysis. The sports digital training system proposed in this study focuses on collecting the bottom visual information of sports. The visual information in the middle and low levels is mainly used to describe the content of video segments, i.e., key primitives, including motion trajectory, motion action, and tracking motion, and establishes a sports digital training system based on the bottom visual information. In addition to the completion of basic functions of a sports digital training system, the system also adds the functions of video segmentation, action freezing, speed calculation, table display, local locking, and tracking, which can accurately collect the bottom visual information of people’s sports and realizes the digital sports training.


---

## Body

## 1. Introduction

Sports participation is one of the most effective strategies to improve the national health and fitness standards [1]. China has added “comprehensive fitness” and “building a healthy China” to its national development strategy. One of China’s ambitions is to acquire dominance via sports, and the number of athletes in China is expanding at a great pace, but still one of the main problems is that the sports supply does not meet the requirements [2]. Apart from this, the central and western regions of China lack an adequate number of sports training coaches, and the quality of coaches is also inappropriate. Among them, the proportion of high-quality coaches is very low, and the aging problem is indeed a serious one. The new generation of coaches is not professional enough, because under the existing sports evaluation system, the subjective comments given by coaches are questioned, and people are not convinced of the results given by the coaches. A coach must be highly educated and aware of the consequences of a particular exercise technique. Improper physical training techniques not only fail in achieving the training goals but also cause injuries to the players’ bodies [3, 4].In traditional sports training, individual trainees are highly dependent on the teaching methods and personal understanding of coaches. When teaching the same content, each trainer has a varied knowledge and teaching aptitude, therefore, learning progress varies, and everyone makes different mistakes. Therefore, the coaches should communicate with the trainees many times and formulate training plans and contents, helping them achieve their training goals. But this method requires a large number of coaches because a few coaches cannot meet the basic requirements of trainers.Nowadays, we are engaged with technology enough that it is not just present around us but also present within ourselves in the form of artificial hearts and contact lenses. Technology in general and computer technology in special plays a key role in the growth of sports and improving performance across the board. Hence, technological applications provide more effective training, management, the accuracy of results, stimulations and tracking of athletes, increased spectator observation, performance development, and injury prevention, among many other purposes [5]. Computer technology has a significant impact on the enhancement of sports training by collecting, communicating, processing, and simulating the athletes’ training data [5]. As a significant tool for the development of sports training, video processing, statistical analysis, functional technology, simulation technology, and other information may be gradually combined in sports training [6].The main contributions/innovations of this paper are as follows. (1) This study uses sports digital training technology to segment the collected athlete training videos and reduce the noise in the collected video data. Through the motion video tracking algorithm that is used to track the athletes’ movements and speed in video, the accuracy of video tracking can be improved. (2) This paper extracts the middle and bottom sports digital training information, including training structure, training moment, and training process, and establishes a sports digital training system based on the middle and bottom visual information. (3) The developed system is based on the original sports digital training system, through which the video segmentation, action freezing, speed calculation, table display, local locking, and tracking can be performed.The rest of the paper is organized as follows. Section2 is about the related work. Section 3 describes different digital training technologies in sports. Further, this section elaborates different methods and techniques that can be used in sports training, including video segmentation algorithm, video panorama synthesis algorithm, motion video tracking algorithm, and target tracking algorithm. Section 4 is about the extraction of digital training information for middle and bottom sports. This section focuses on the analysis of sports digital training information, extraction of the middle and bottom video segmentation information, action freezing algorithm, speed calculation algorithm, and local locking and tracking algorithm. The sports digital training system based on middle and bottom visual information is presented in Section 5. This section further discusses the sports digital training system, system operation analysis, and systematic analysis of golf swing posture. The overall theme of the paper is presented in Section 6.


## 2. Related Work

Sports digital training systems comprehensively collect and sort out athletes’ training data and simulate the training results, so as to accumulate training experience from a complete set of theories and test some unreasonable training methods. Sports training can organically combine video processing, statistical analysis, functional technology, simulation technology, and other information as an important tool for the development of sports training [7]. Chinese scholars have developed inertial sensors and have installed them on table tennis or tennis rackets, which can compare the acceleration values of various actions and accurately identify various action information through acceleration [8]. Some scholars have compared the sensor information of novice and expert athletes in sports states, calculated the characteristics based on the sensor information, and have judged the different indicators between novice and expert by principal component analysis, so as to take accurate practice [9]. Sayary et al. [10] regarded the data of athletes with higher sports levels as “full score” and compared the data of athletes with higher sports levels with that of ordinary athletes, so as to calculate the sports score of trainees. At the same time, Yonsutrisno experts have selected some expert video data with the same score and trainer’s sports characteristics as the learning objectives and recommended them to the trainer [11]. In addition, Zhu [12] explained the content of data detection and analysis in detail, including how to effectively select the type of sports monitoring data and how to process the monitoring data, so as to give some guidance to the digitization of national sports training. However, at present, there is no trainee-oriented model. Experts such as Li et al. have focused on the student model in the intelligent system and regard it as a “trainee” module [13]. Kurilov [14] explained students’ different learning styles based on the conceptual model. Each student has also certain differences in the scores of four indicators such as perception, processing, understanding, and input. They can give feedback on the practice results to each student according to their learning styles. Yang et al. [15] comprehensively carried out the digital system of physical training. Further, he studied the hitting strategy of table tennis based on the inverse reinforcement learning model and established the reward model after training the sports data, which can improve the hitting ability of athletes, including hitting point and speed. However, this study can only be used in table tennis and does not fully promote the digital form for other sports. In addition, sports learning researchers mainly analyze the ideal feedback timing, feedback form, and feedback frequency in feedback training to provide an ideal operation scheme for the digitization of sports training [16].


## 3. Digital Training Technology in Sports

### 3.1. Video Segmentation Algorithm

At present, a new algorithm, namely, the video segmentation algorithm, is proposed. This algorithm is developed according to the concept of change detection, which is different from the other change detection methods [17]. The video segmentation algorithm does not use the difference between the two consecutive images to judge motion. But first, it analyzes the basic law of different pixels changing with time, establishes the background image based on the statistical law, and then compares the difference between the background image and each frame of the image [6]. The pixels that are not the same as the background image are in the target region. Figure 1 shows the working and flow of the video segmentation algorithm.Figure 1
Working and flow of video segmentation algorithm.One of the biggest issues with video segmentation algorithms is that they are extremely susceptible to noise. If there is noise in the image, the background area will be regarded as the moving foreground object area. There is an exposure and occlusion relationship between the background and the foreground object. The background area shown by the foreground object after moving is regarded as the moving foreground area. Even though the foreground area with the same color is huge, the frame difference image cannot correctly acquire and portray a substantial quantity of pixel motion information in this area.In order to address the above-mentioned problem, a gray continuous region segmentation algorithm is proposed. The components of this algorithm include moving region detection and gray continuous region segmentation [18]. The frame gray continuous information in the moving area may be recognized using interframe pixel motion information, which considerably enhances segmentation accuracy. Figure 2 shows the video object segmentation method based on gray continuous region segmentation.Figure 2
Video object segmentation method based on gray continuous region segmentation.


### 3.2. Video Panorama Synthesis Algorithm

Some movements of athletes during training are very representative, so, the foreground information of this frame should be superimposed on the background. In an ideal state, if there is no overlapping area in the frame after projection transformation, the superimposed frame will overlap in the background area of one frame or the foreground area of the other frames, and the foreground parts of two frames will overlap each other. Therefore, in the stacking process, the background part on the frame waiting for stacking should be removed, and the value selection method of the overlapping area between each foreground part should be analyzed [19].The frame waiting to be superimposed by affine transformation is projected onto the panorama coordinate system. The background panorama and the projected frame image are selected as the difference in the projection area, and the difference is represented by the gray image. The following is the formula for calculating the difference:(1)εx,y=RFx,y−RBx,y+GFx,y−GBx,y+BFx,y−BBx,y,0εx,y<ε0,Dx,y=εx,y,ε0≤εx,y≤255,255,εx,y>255,where x and y are the coordinates of the panorama, GF (x, y), RF (x, y), and BF (x, y) represent the RGB value on the projected frame image, the RGB value on the background panorama is represented by RB (x, y), GB (x, y), BB (x, y), the gray level of the difference image is represented by D (x, y), and the empirical closed value is represented by ε0. This means that a part of the difference caused by lighting factors can be removed through the use of this formula, and the difference gray image can be obtained.


### 3.3. Motion Video Tracking Algorithm

The model-based tracking framework tracks thet state vector at each time, predicts the t+l state vector of the next frame, and obtains the projection of the model on the image according to the manikin and the state vector. Further, it matches the detected image observation results and projection values, modifies them with reference to the matching degree, and finally obtains the tracking results of the t + 1 time frame. It further predicts and matches the next frame [20].In the tracking process, the motion model is selected as the attitude frame to predict the attitude of the next frame. The second-order regression process model is used to process the acceleration of different state parameters to calculate the constant change.(2)xt−xt−1=xt−1−xt−2+ηwt,where wt represents the Gaussian distribution obeying the zero mean value and ηwt represents the noise component. More complex motion models can be obtained after training, and two different measurement matrices, namely, edge and color, are adopted to improve the robustness of tracking results. In this paper, HSV color space is selected as the color histogram, the histogram intersection is used to measure the model histogram, and the similarity of the image histogram is predicted. Taking the gray gradient value of the image as the edge feature, the color image needs to be converted into a gray image first; then, the projection gradient value of the model on the image is calculated while taking the gradient directionality into account.On the premise that the state transition of the state vector conforms to the first-order Markov property, that is,pxt|Xt−1=pxt|xt−1, the tracking process is represented by the following Bayesian filtering formula:(3)pxt|Zt=pZt|xt∫pxt|xt−1pxt−1|Zt−1dx−1.The state vector before the time of the above formula is represented byXt−1 = (x1, x2, …, xt−1), and the observed value is represented by Zt−1 = (Z1, Z2, …, Zt−1). The observation similarity of P (zt|xt) and the motion model of p (xt|xt−1) are known, and the posterior probability of p (xt|zt) is recursively calculated by using the above formula. The particle filter algorithm is characterized by many assumptions and nonlinearity, which can be used in a complex background environment. Based on this characteristic, this paper selects a particle filter tracking algorithm. The improved particle filter (IPF) is selected in the implementation of the algorithm. The concept of a simulated annealing optimization algorithm is used in this model, which significantly improves the budget efficiency of the algorithm. For each time tracking, the M layer should be sampled repeatedly, and the distribution of the P (zt|xt) similarity function further converges from the previous wide to the global best.


### 3.4. Target Tracking Algorithm

The target tracking algorithm is highly dependent on the selected target model. The two target models that are extensively employed nowadays are the color features based on the target and the contour features based on the target. Contour features have very high accuracy, but the main disadvantage associated with this approach is that the calculation process is cumbersome and the anti-interference ability is insufficient. The advantages of color features are strong robustness, antimodeling, and strong antiocclusion. Therefore, this paper selects the color histogram as the target model, processes the color histogram based on kernel function normalization, and extracts the target color distribution feature [21].Let the tracked target be a rectangular window, whose width is represented byh, y represents the center, and (xi) i = 1, 2, 3, …, n represents the pixel position of the target on the image. If the target model is a histogram with value m, the target function is expressed by the following formula after normalization:(4)q′y=q′yu=1,…,m∑u=1mqu′y=1,q′y=cn∑i=1Ngxiσbxi−u.The index value of pixelxi on the m-value histogram is represented by function b (xi), where function σx=1x=00x≠0. The weight of pixel xi in the target color distribution is represented by gxi.The closer the pixel is to the center of the target, the higher the weight is, because the background and occlusion will interact with the target’s peripheral pixels and diminish its dependability. In the calculation process, the functiongxi can be represented by the following kernel function:(5)gxi=kxi−x0h2.Based on the condition∑u=1mqu′y=1, the Cn constant is expressed by the following formula:(6)Cn=1∑Ni=1kxi−x0/h2.In this paper, the Bhattacharyya coefficient is used to evaluate the degree of histogram matching, and the similarity measure is defined. If the m-value histogram represents the target model,p′=pu′u=1,..,m represents the normalized color histogram of the target model, and q′=qu′yu=1,..,m represents the normalized color histogram of the candidate target at the y position. The following formula is used to calculate the similarity between the candidate target and the target model:(7)ρp′,q′y=∑u=1mpu′qu′y.The prediction module uses the Kalman filter to predict the moving target eigenvalues, which mainly include moving speed, window centroid position, and window length and width, and predicts the next frame area of the moving target. After tracking the moving target on the previous frame, the matching update module changes the motion between adjacent frames, calculates the cost function value using the eigenvalue, calculates the subsequent target of the next frame, constructs the correlation relationship, and then tracks the tracked moving target’s “target chain.” [22]. Figure 3 shows the structural relationship of the tracking algorithm module.Figure 3
Structure diagram of tracking algorithm module.


## 3.1. Video Segmentation Algorithm

At present, a new algorithm, namely, the video segmentation algorithm, is proposed. This algorithm is developed according to the concept of change detection, which is different from the other change detection methods [17]. The video segmentation algorithm does not use the difference between the two consecutive images to judge motion. But first, it analyzes the basic law of different pixels changing with time, establishes the background image based on the statistical law, and then compares the difference between the background image and each frame of the image [6]. The pixels that are not the same as the background image are in the target region. Figure 1 shows the working and flow of the video segmentation algorithm.Figure 1
Working and flow of video segmentation algorithm.One of the biggest issues with video segmentation algorithms is that they are extremely susceptible to noise. If there is noise in the image, the background area will be regarded as the moving foreground object area. There is an exposure and occlusion relationship between the background and the foreground object. The background area shown by the foreground object after moving is regarded as the moving foreground area. Even though the foreground area with the same color is huge, the frame difference image cannot correctly acquire and portray a substantial quantity of pixel motion information in this area.In order to address the above-mentioned problem, a gray continuous region segmentation algorithm is proposed. The components of this algorithm include moving region detection and gray continuous region segmentation [18]. The frame gray continuous information in the moving area may be recognized using interframe pixel motion information, which considerably enhances segmentation accuracy. Figure 2 shows the video object segmentation method based on gray continuous region segmentation.Figure 2
Video object segmentation method based on gray continuous region segmentation.


## 3.2. Video Panorama Synthesis Algorithm

Some movements of athletes during training are very representative, so, the foreground information of this frame should be superimposed on the background. In an ideal state, if there is no overlapping area in the frame after projection transformation, the superimposed frame will overlap in the background area of one frame or the foreground area of the other frames, and the foreground parts of two frames will overlap each other. Therefore, in the stacking process, the background part on the frame waiting for stacking should be removed, and the value selection method of the overlapping area between each foreground part should be analyzed [19].The frame waiting to be superimposed by affine transformation is projected onto the panorama coordinate system. The background panorama and the projected frame image are selected as the difference in the projection area, and the difference is represented by the gray image. The following is the formula for calculating the difference:(1)εx,y=RFx,y−RBx,y+GFx,y−GBx,y+BFx,y−BBx,y,0εx,y<ε0,Dx,y=εx,y,ε0≤εx,y≤255,255,εx,y>255,where x and y are the coordinates of the panorama, GF (x, y), RF (x, y), and BF (x, y) represent the RGB value on the projected frame image, the RGB value on the background panorama is represented by RB (x, y), GB (x, y), BB (x, y), the gray level of the difference image is represented by D (x, y), and the empirical closed value is represented by ε0. This means that a part of the difference caused by lighting factors can be removed through the use of this formula, and the difference gray image can be obtained.


## 3.3. Motion Video Tracking Algorithm

The model-based tracking framework tracks thet state vector at each time, predicts the t+l state vector of the next frame, and obtains the projection of the model on the image according to the manikin and the state vector. Further, it matches the detected image observation results and projection values, modifies them with reference to the matching degree, and finally obtains the tracking results of the t + 1 time frame. It further predicts and matches the next frame [20].In the tracking process, the motion model is selected as the attitude frame to predict the attitude of the next frame. The second-order regression process model is used to process the acceleration of different state parameters to calculate the constant change.(2)xt−xt−1=xt−1−xt−2+ηwt,where wt represents the Gaussian distribution obeying the zero mean value and ηwt represents the noise component. More complex motion models can be obtained after training, and two different measurement matrices, namely, edge and color, are adopted to improve the robustness of tracking results. In this paper, HSV color space is selected as the color histogram, the histogram intersection is used to measure the model histogram, and the similarity of the image histogram is predicted. Taking the gray gradient value of the image as the edge feature, the color image needs to be converted into a gray image first; then, the projection gradient value of the model on the image is calculated while taking the gradient directionality into account.On the premise that the state transition of the state vector conforms to the first-order Markov property, that is,pxt|Xt−1=pxt|xt−1, the tracking process is represented by the following Bayesian filtering formula:(3)pxt|Zt=pZt|xt∫pxt|xt−1pxt−1|Zt−1dx−1.The state vector before the time of the above formula is represented byXt−1 = (x1, x2, …, xt−1), and the observed value is represented by Zt−1 = (Z1, Z2, …, Zt−1). The observation similarity of P (zt|xt) and the motion model of p (xt|xt−1) are known, and the posterior probability of p (xt|zt) is recursively calculated by using the above formula. The particle filter algorithm is characterized by many assumptions and nonlinearity, which can be used in a complex background environment. Based on this characteristic, this paper selects a particle filter tracking algorithm. The improved particle filter (IPF) is selected in the implementation of the algorithm. The concept of a simulated annealing optimization algorithm is used in this model, which significantly improves the budget efficiency of the algorithm. For each time tracking, the M layer should be sampled repeatedly, and the distribution of the P (zt|xt) similarity function further converges from the previous wide to the global best.


## 3.4. Target Tracking Algorithm

The target tracking algorithm is highly dependent on the selected target model. The two target models that are extensively employed nowadays are the color features based on the target and the contour features based on the target. Contour features have very high accuracy, but the main disadvantage associated with this approach is that the calculation process is cumbersome and the anti-interference ability is insufficient. The advantages of color features are strong robustness, antimodeling, and strong antiocclusion. Therefore, this paper selects the color histogram as the target model, processes the color histogram based on kernel function normalization, and extracts the target color distribution feature [21].Let the tracked target be a rectangular window, whose width is represented byh, y represents the center, and (xi) i = 1, 2, 3, …, n represents the pixel position of the target on the image. If the target model is a histogram with value m, the target function is expressed by the following formula after normalization:(4)q′y=q′yu=1,…,m∑u=1mqu′y=1,q′y=cn∑i=1Ngxiσbxi−u.The index value of pixelxi on the m-value histogram is represented by function b (xi), where function σx=1x=00x≠0. The weight of pixel xi in the target color distribution is represented by gxi.The closer the pixel is to the center of the target, the higher the weight is, because the background and occlusion will interact with the target’s peripheral pixels and diminish its dependability. In the calculation process, the functiongxi can be represented by the following kernel function:(5)gxi=kxi−x0h2.Based on the condition∑u=1mqu′y=1, the Cn constant is expressed by the following formula:(6)Cn=1∑Ni=1kxi−x0/h2.In this paper, the Bhattacharyya coefficient is used to evaluate the degree of histogram matching, and the similarity measure is defined. If the m-value histogram represents the target model,p′=pu′u=1,..,m represents the normalized color histogram of the target model, and q′=qu′yu=1,..,m represents the normalized color histogram of the candidate target at the y position. The following formula is used to calculate the similarity between the candidate target and the target model:(7)ρp′,q′y=∑u=1mpu′qu′y.The prediction module uses the Kalman filter to predict the moving target eigenvalues, which mainly include moving speed, window centroid position, and window length and width, and predicts the next frame area of the moving target. After tracking the moving target on the previous frame, the matching update module changes the motion between adjacent frames, calculates the cost function value using the eigenvalue, calculates the subsequent target of the next frame, constructs the correlation relationship, and then tracks the tracked moving target’s “target chain.” [22]. Figure 3 shows the structural relationship of the tracking algorithm module.Figure 3
Structure diagram of tracking algorithm module.


## 4. Extraction of Digital Training Information of Middle and Bottom Sports

### 4.1. Analysis of Sports Digital Training Information

The sports digital training information analysis framework is a three-tier architecture, namely, the intermediate key element generation layer, the low-level feature layer, and the high-level event analysis layer as shown in Figure4. The purpose of the low-level feature layer is to extract information from the video, such as visual, audio, and text features. The visual information mainly includes single-frame picture shape and color and dynamic content, while the auditory information mainly includes audio information. Semantic entities are saved in the top-level structure, such as training moments, training structures, training processes, and special events. This paper focuses on the analysis of feature extraction and generation of intermediate key primitives based on middle and bottom visual information. Figure 4 shows the analysis structure of sports digital training information.Figure 4
Information analysis structure of Sports Digital Training.There are middle-level and bottom-level semantic problems in the analysis of sports digital training information. When dealing with this problem, we must build an intermediate description layer to connect the bottom and middle levels [23]. The special domain rules and prior knowledge are integrated into it to assist the bottom judgment and then infer the high-level semantics. The main function of the middle layer is to define video clips, which are called key primitives, mainly including ① key primitives of video, such as motion mode, lens type, moving target trajectory, and shape and ② key primitive of audio, mainly including coach sound, guidance sound, and other noise.


### 4.2. Extract the Middle and Bottom Video Segmentation Information

This method uses the simplest video segmentation approach, known as the continuous frame difference method, to extract the center and bottom video segmentation information [24]. Generally, there is a huge difference between the background gray and the foreground moving target. The difference image, after the difference calculation, is that the gray value is high on the moving object. If an optimal threshold of T is set, the gray value of the difference image exceeds T and is regarded as the foreground target. If the gray value is smaller than t, it is the background target. The calculation process of the continuous frame difference method is described below in detail:(1)
Extract the value of II (x, y) pixel on each frame of the image(2)
Set the thresholdT(3)
The gray value of the moving target on the foreground picture is substantially different from that of the background image after extracting it from the video, although the gray value difference of the moving item itself is very small. Then, the image pixels of theIi frame image are represented by Ii (x, y), and the following are differential binary images:(8)Dix,y=255,Iix,y−Ii+1x,y≥T,0,Iix,y−Ii+1x,y<T.The pixel points with the gray value of 255 in the differential binary image are regarded as the foreground moving target points.(4)
Compare the pixels of the original image with the pixels of the binary image, and return the pixel value:(9)Iix,y=0,ifDix,y=0,Iix,y,else.This method can extract the background model in a complex background environment and can effectively suppress the interference caused by the background disturbance, scene change, and shadow.


### 4.3. Action Freezing Algorithm

In this paper, a variety of algorithms are comprehensively analyzed, and the time-effective method is used to stack the adjacent frame images in sequence. For the pixels on the bottom layer, all foreground image values are allocated to the bottom layer, and the bottom layer is picked as the initial frame imageI0 during the stacking process, as illustrated as follows:(10)VFx,y=R0x,y,G0x,y,B0x,yT.We use the following formula to calculate the pixels on the previous bottom layer:(11)VFx,y′=VFx,y+Vkx,y2=RFx,y+Rkx,y2,GFx,y+Gkx,y2,BFx,y+Bkx,y2T.In the above formula,k represents the frame number of the frame waiting to be superimposed in the foreground, and the two groups of pixel values are mixed in the proportion of 1/2. It is assumed that two frames are superimposed at the same point, and the proportion of each frame is half. After the third frame is superimposed, the proportion of the first two frames is 1/4, which is calculated in this order. The final result can be obtained by superimposing all the frame images waiting for superimposition.


### 4.4. Algorithm of Speed Calculation and Table Display

When studying the sports digital training system based on the middle and bottom visual information, golf is taken as an example, and the average swing speed according to the golf club and the interval between two frames is calculated, which is expressed by the following formula:(12)v¯=2πL/NTkn−km,where L represents the golf club length, the length value selected here is 0.95 m, N represents a specific point position, T represents the unit time, as 25 images can be selected per second, i.e., T = 1/25; km indicates the number of initial action frames, kn indicates the number of end action frames, and the values of m and n are 1,2,3, …, z.


### 4.5. Local Locking and Tracking Algorithm

This paper uses the framework of differential image moving target detection. This method needs to compare the two images before and after a short time interval and effectively distinguish the moving object from the background image according to the guided change area [25]. Based on this method, to determine the optimal interval time, the interval time should be judged according to the moving speed of the object. For fast-moving objects, a shorter interval should be selected. If the selected interval is unreasonable, the objects in the front and back frames will not overlap, so as to separate the two detected objects, and the interval selected for slow-moving objects is large. If it is not properly chosen, the items in the first and second frames will essentially overlap, making it impossible to discern the object’s location.The moving target detection framework of the image is designed based on the interframe difference method and is represented in Figure5.Figure 5
Interframe motion difference detection.


## 4.1. Analysis of Sports Digital Training Information

The sports digital training information analysis framework is a three-tier architecture, namely, the intermediate key element generation layer, the low-level feature layer, and the high-level event analysis layer as shown in Figure4. The purpose of the low-level feature layer is to extract information from the video, such as visual, audio, and text features. The visual information mainly includes single-frame picture shape and color and dynamic content, while the auditory information mainly includes audio information. Semantic entities are saved in the top-level structure, such as training moments, training structures, training processes, and special events. This paper focuses on the analysis of feature extraction and generation of intermediate key primitives based on middle and bottom visual information. Figure 4 shows the analysis structure of sports digital training information.Figure 4
Information analysis structure of Sports Digital Training.There are middle-level and bottom-level semantic problems in the analysis of sports digital training information. When dealing with this problem, we must build an intermediate description layer to connect the bottom and middle levels [23]. The special domain rules and prior knowledge are integrated into it to assist the bottom judgment and then infer the high-level semantics. The main function of the middle layer is to define video clips, which are called key primitives, mainly including ① key primitives of video, such as motion mode, lens type, moving target trajectory, and shape and ② key primitive of audio, mainly including coach sound, guidance sound, and other noise.


## 4.2. Extract the Middle and Bottom Video Segmentation Information

This method uses the simplest video segmentation approach, known as the continuous frame difference method, to extract the center and bottom video segmentation information [24]. Generally, there is a huge difference between the background gray and the foreground moving target. The difference image, after the difference calculation, is that the gray value is high on the moving object. If an optimal threshold of T is set, the gray value of the difference image exceeds T and is regarded as the foreground target. If the gray value is smaller than t, it is the background target. The calculation process of the continuous frame difference method is described below in detail:(1)
Extract the value of II (x, y) pixel on each frame of the image(2)
Set the thresholdT(3)
The gray value of the moving target on the foreground picture is substantially different from that of the background image after extracting it from the video, although the gray value difference of the moving item itself is very small. Then, the image pixels of theIi frame image are represented by Ii (x, y), and the following are differential binary images:(8)Dix,y=255,Iix,y−Ii+1x,y≥T,0,Iix,y−Ii+1x,y<T.The pixel points with the gray value of 255 in the differential binary image are regarded as the foreground moving target points.(4)
Compare the pixels of the original image with the pixels of the binary image, and return the pixel value:(9)Iix,y=0,ifDix,y=0,Iix,y,else.This method can extract the background model in a complex background environment and can effectively suppress the interference caused by the background disturbance, scene change, and shadow.


## 4.3. Action Freezing Algorithm

In this paper, a variety of algorithms are comprehensively analyzed, and the time-effective method is used to stack the adjacent frame images in sequence. For the pixels on the bottom layer, all foreground image values are allocated to the bottom layer, and the bottom layer is picked as the initial frame imageI0 during the stacking process, as illustrated as follows:(10)VFx,y=R0x,y,G0x,y,B0x,yT.We use the following formula to calculate the pixels on the previous bottom layer:(11)VFx,y′=VFx,y+Vkx,y2=RFx,y+Rkx,y2,GFx,y+Gkx,y2,BFx,y+Bkx,y2T.In the above formula,k represents the frame number of the frame waiting to be superimposed in the foreground, and the two groups of pixel values are mixed in the proportion of 1/2. It is assumed that two frames are superimposed at the same point, and the proportion of each frame is half. After the third frame is superimposed, the proportion of the first two frames is 1/4, which is calculated in this order. The final result can be obtained by superimposing all the frame images waiting for superimposition.


## 4.4. Algorithm of Speed Calculation and Table Display

When studying the sports digital training system based on the middle and bottom visual information, golf is taken as an example, and the average swing speed according to the golf club and the interval between two frames is calculated, which is expressed by the following formula:(12)v¯=2πL/NTkn−km,where L represents the golf club length, the length value selected here is 0.95 m, N represents a specific point position, T represents the unit time, as 25 images can be selected per second, i.e., T = 1/25; km indicates the number of initial action frames, kn indicates the number of end action frames, and the values of m and n are 1,2,3, …, z.


## 4.5. Local Locking and Tracking Algorithm

This paper uses the framework of differential image moving target detection. This method needs to compare the two images before and after a short time interval and effectively distinguish the moving object from the background image according to the guided change area [25]. Based on this method, to determine the optimal interval time, the interval time should be judged according to the moving speed of the object. For fast-moving objects, a shorter interval should be selected. If the selected interval is unreasonable, the objects in the front and back frames will not overlap, so as to separate the two detected objects, and the interval selected for slow-moving objects is large. If it is not properly chosen, the items in the first and second frames will essentially overlap, making it impossible to discern the object’s location.The moving target detection framework of the image is designed based on the interframe difference method and is represented in Figure5.Figure 5
Interframe motion difference detection.


## 5. Sports Digital Training System Based on Middle and Bottom Visual Information

### 5.1. Sports Digital Training System

The sports digital training system developed in this paper is used in golf. The purpose that may be achieved is to capture the athletes’ action video, upload the data to the computer, and process the video data using the software. Figure6 shows the system processing and analysis golf video system structure.Figure 6
Structure of sports digital training system.According to the function of the sports digital training system, a number of other functions are added to establish a complete sports digital training system based on middle and bottom visual information. Therefore, multiple buttons are added to the function interface of the previous system to design multiple new function interfaces.The new controls added to the system include Sui Button, Sui Form, Video Panel, Open Picture Dialog, Sui Scroll Bar, and timer. The functions of different controls are described below in detail:(i)
The Sui form control can create a new form(ii)
Sui button control is a controlling button. To write the function, double-click the button(iii)
The video panel control can display the image, and use the attributes to control the image size and display(iv)
Sui scroll bar adjusts the image of each frame through the change event of the scroll bar and calls the time event control to change the scroll bar to play the video normally. After pausing the time control event, the playback function can be stopped.(v)
Open picture dialog control can select to open the file(vi)
The timer is a clock control. Click the timer to trigger the eventFigure7 shows the new functions of the system.Figure 7
New functions of the system.


### 5.2. System Operation Analysis

This paper focuses on the sports digital training system based on the middle and bottom visual information. Through this system, the middle and bottom visual information on the collected sports video is filtered. Taking golf sports as an example, the training process of golfers can be simplified. Based on the details of each action of golfers during training, this system analyzes the action from multiple perspectives, compares and analyzes the collected athlete information and professional athlete action, and finds its shortcomings. At the same time, video segmentation, video tracking, and local locking functions are newly added. The selected programming environment is Borland C++ Builder, which is used to debug and write software programs based on this platform.


#### 5.2.1. Video Segmentation

The video segmentation algorithm is used to segment the moving target in the complex background environment into two parts: foreground and background. The frame difference method is used to segment the background information on the foreground moving target. This method can extract foreground targets in a complex background environment and can effectively suppress the interference caused by background disturbance, foreground change, and shadow.


#### 5.2.2. Action Freeze

The actions of all athletes can be decomposed and displayed as formulated by the following formula.(13)VFx,y′=VFx,y+Vkx,y2=RFx,y+Rkx,y2,GFx,y+Gkx,y2,BFx,y+Bkx,y2T.The panorama is combined at a 1/2 ratio, which is the ratio of blending two sets of pixel values.


#### 5.2.3. Speed Calculation and Table Display

The speed of a swing is measured with the help of the algorithm, and all the measured data is listed in Table1 and Figure 8. The swing speed and specific position are calculated according to the intervals between the two frames of images and the length of the club of 0.95 m [26].Table 1
Measure swing speed.
Swing waySpeed (m/s)Rear swing rod speed2.46To the top speed2.11Cross the speed0.93Ball speed44.26Through the speed11.02Figure 8
Swing speed measurement.


#### 5.2.4. Local Locking and Tracking

In this study, the difference between two images is used in order to detect the moving object. This method needs to compare two images with an interval of one hour and distinguish the moving object from the background image according to the changing area in the image.


### 5.3. Systematic Analysis of Golf Swing Posture

In this study, the sports digital training system based on the middle and bottom visual information is developed to collect the action information of golf sports personnel and analyze the swing posture. The influencing factors of swing posture are listed in Table2.Table 2
Evaluation of the grade of influencing factors of swing attitude.
Influence factors of swing attitudeLevelHips4Center of gravity5Standing4Swing plane5Shoulder3Swing rhythm4Feet distance3Shoulder breadth2The histogram is generated according to the data listed in Table2, and the factors affecting the swing posture are displayed in a visual way. Figure 9 shows that the high influence factor indicates that the swing action of golf sports is large, and the low value indicates that the influence is small.Figure 9
Influencing factors of swing posture.According to the characteristics of golf events, the golf swing process is divided into four characteristic actions, namely, preparation action, system apex, strokes, and end action. The impact factors of swing attitude of different attitude categories are listed in Table3.Table 3
Influence factors of swing attitude in different attitude categories.
Gesture categoriesInfluence factor of swing attitudeTo prepareStanding position, knee joint, grip position, elbow angle, head position, shoulder joint, strong gripThe stem apexKnee joint, left and right elbow joint, vertex position of the wrist, rotation angle of the shoulder joint, rotation angle of the hip jointStrokesStroke speed, wrist flip angle, right knee angleEnd of the actionLeft and right elbow angles, shoulder angles, foot position, shoulder width position


## 5.1. Sports Digital Training System

The sports digital training system developed in this paper is used in golf. The purpose that may be achieved is to capture the athletes’ action video, upload the data to the computer, and process the video data using the software. Figure6 shows the system processing and analysis golf video system structure.Figure 6
Structure of sports digital training system.According to the function of the sports digital training system, a number of other functions are added to establish a complete sports digital training system based on middle and bottom visual information. Therefore, multiple buttons are added to the function interface of the previous system to design multiple new function interfaces.The new controls added to the system include Sui Button, Sui Form, Video Panel, Open Picture Dialog, Sui Scroll Bar, and timer. The functions of different controls are described below in detail:(i)
The Sui form control can create a new form(ii)
Sui button control is a controlling button. To write the function, double-click the button(iii)
The video panel control can display the image, and use the attributes to control the image size and display(iv)
Sui scroll bar adjusts the image of each frame through the change event of the scroll bar and calls the time event control to change the scroll bar to play the video normally. After pausing the time control event, the playback function can be stopped.(v)
Open picture dialog control can select to open the file(vi)
The timer is a clock control. Click the timer to trigger the eventFigure7 shows the new functions of the system.Figure 7
New functions of the system.


## 5.2. System Operation Analysis

This paper focuses on the sports digital training system based on the middle and bottom visual information. Through this system, the middle and bottom visual information on the collected sports video is filtered. Taking golf sports as an example, the training process of golfers can be simplified. Based on the details of each action of golfers during training, this system analyzes the action from multiple perspectives, compares and analyzes the collected athlete information and professional athlete action, and finds its shortcomings. At the same time, video segmentation, video tracking, and local locking functions are newly added. The selected programming environment is Borland C++ Builder, which is used to debug and write software programs based on this platform.


### 5.2.1. Video Segmentation

The video segmentation algorithm is used to segment the moving target in the complex background environment into two parts: foreground and background. The frame difference method is used to segment the background information on the foreground moving target. This method can extract foreground targets in a complex background environment and can effectively suppress the interference caused by background disturbance, foreground change, and shadow.


### 5.2.2. Action Freeze

The actions of all athletes can be decomposed and displayed as formulated by the following formula.(13)VFx,y′=VFx,y+Vkx,y2=RFx,y+Rkx,y2,GFx,y+Gkx,y2,BFx,y+Bkx,y2T.The panorama is combined at a 1/2 ratio, which is the ratio of blending two sets of pixel values.


### 5.2.3. Speed Calculation and Table Display

The speed of a swing is measured with the help of the algorithm, and all the measured data is listed in Table1 and Figure 8. The swing speed and specific position are calculated according to the intervals between the two frames of images and the length of the club of 0.95 m [26].Table 1
Measure swing speed.
Swing waySpeed (m/s)Rear swing rod speed2.46To the top speed2.11Cross the speed0.93Ball speed44.26Through the speed11.02Figure 8
Swing speed measurement.


### 5.2.4. Local Locking and Tracking

In this study, the difference between two images is used in order to detect the moving object. This method needs to compare two images with an interval of one hour and distinguish the moving object from the background image according to the changing area in the image.


## 5.2.1. Video Segmentation

The video segmentation algorithm is used to segment the moving target in the complex background environment into two parts: foreground and background. The frame difference method is used to segment the background information on the foreground moving target. This method can extract foreground targets in a complex background environment and can effectively suppress the interference caused by background disturbance, foreground change, and shadow.


## 5.2.2. Action Freeze

The actions of all athletes can be decomposed and displayed as formulated by the following formula.(13)VFx,y′=VFx,y+Vkx,y2=RFx,y+Rkx,y2,GFx,y+Gkx,y2,BFx,y+Bkx,y2T.The panorama is combined at a 1/2 ratio, which is the ratio of blending two sets of pixel values.


## 5.2.3. Speed Calculation and Table Display

The speed of a swing is measured with the help of the algorithm, and all the measured data is listed in Table1 and Figure 8. The swing speed and specific position are calculated according to the intervals between the two frames of images and the length of the club of 0.95 m [26].Table 1
Measure swing speed.
Swing waySpeed (m/s)Rear swing rod speed2.46To the top speed2.11Cross the speed0.93Ball speed44.26Through the speed11.02Figure 8
Swing speed measurement.


## 5.2.4. Local Locking and Tracking

In this study, the difference between two images is used in order to detect the moving object. This method needs to compare two images with an interval of one hour and distinguish the moving object from the background image according to the changing area in the image.


## 5.3. Systematic Analysis of Golf Swing Posture

In this study, the sports digital training system based on the middle and bottom visual information is developed to collect the action information of golf sports personnel and analyze the swing posture. The influencing factors of swing posture are listed in Table2.Table 2
Evaluation of the grade of influencing factors of swing attitude.
Influence factors of swing attitudeLevelHips4Center of gravity5Standing4Swing plane5Shoulder3Swing rhythm4Feet distance3Shoulder breadth2The histogram is generated according to the data listed in Table2, and the factors affecting the swing posture are displayed in a visual way. Figure 9 shows that the high influence factor indicates that the swing action of golf sports is large, and the low value indicates that the influence is small.Figure 9
Influencing factors of swing posture.According to the characteristics of golf events, the golf swing process is divided into four characteristic actions, namely, preparation action, system apex, strokes, and end action. The impact factors of swing attitude of different attitude categories are listed in Table3.Table 3
Influence factors of swing attitude in different attitude categories.
Gesture categoriesInfluence factor of swing attitudeTo prepareStanding position, knee joint, grip position, elbow angle, head position, shoulder joint, strong gripThe stem apexKnee joint, left and right elbow joint, vertex position of the wrist, rotation angle of the shoulder joint, rotation angle of the hip jointStrokesStroke speed, wrist flip angle, right knee angleEnd of the actionLeft and right elbow angles, shoulder angles, foot position, shoulder width position


## 6. Conclusions

China completely executes the “national sports” program and brings national sports and national construction to fruition. Sports have become an important daily activity for people. Sports training systems are now one of the most essential components of equipment for assisting students’ training in colleges and universities, as well as the primary method for professional sports colleges to train students in sports. The sports digital training system based on middle and bottom visual information developed in this paper can collect athletes’ sports video information and segment video image information. The basic functions of the proposed system are action freezing, segmented image information, speed calculation, table display, local locking, tracking, etc. Through this system, the gap between athletes’ training actions and professional athletes can be judged. It is favorable for the right activities, self-training, and overcoming the problem of a scarcity of expert coaches after comparing and assessing the difficulties. This paper applies the proposed system in golf sports, calculates the swing speed according to the swing length and swing action, and judges whether the golfer’s action is standard, which is of high value in the field of sports training. The analysis result shows that the performance of the proposed system is superior compared to the earlier approaches.



---

*Source: 6765954-2022-05-18.xml*