# Automatic Tracking Method of Basketball Flight Trajectory Based on Data Fusion and Sparse Representation Model

Authors: Cuiping Cao; Hai Yu; Yun Liu
Journal: Complexity
 (2021)

---

## Abstract

The appearance model of flying basketball obtained by the traditional basketball flight trajectory tracking method is not accurate, which leads the anti-interference performance of trajectory tracking not ideal. Based on data fusion and sparse representation model, a new automatic trajectory tracking method is proposed. Firstly, the relevant technologies of basketball flight trajectory automatic tracking are studied and summarized, and then the method is studied. The specific implementation steps of this method are as follows: the features of flying basketball images were extracted by the target feature extraction algorithm, and the appearance model of flying basketball was built based on sparse representation. Data fusion technology and particle filter algorithm are combined to realize automatic tracking of basketball flight path. Through three axial basketball trajectories of automatic tracking test and noise test and verify the design method under the 3D world coordinate system to achieve the X, Y, and Z axis up more accurate tracking, at the same time, after applying measurement signal to noise, automatic trajectory tracking results affected by some, but still managed to realize the trajectory tracking.


---

## Body

## 1. Introduction

The current research on sports video mainly focuses on the following aspects: first, extract wonderful clips, that is, summarize and collect the wonderful clips, so as to meet the audience who cannot watch the live broadcast, so that they can save time and enjoy the fun of watching the game to the greatest extent [1]. The second is the technical statistical analysis of the event [2], that is, the analysis of the competition situation. Through computer-aided, it can automatically analyze and count the competition video so as to obtain detailed competition technical statistics, reduce errors, and save human resources. And the last is identifying athletes’ behavior, which is not only the most widely used but also the ultimate goal of most sports video analysis work. Through the recognition of athletes’ competition actions, more advanced applications can be realized, such as simulated sports competition. In basketball, most of the content of the game is the interaction between basketball and players. Tracking basketball is the basic work of game situation analysis and other applications [3, 4].Foreign countries began to study and analyze sports video in the late 1980s. This field has potential economic value and broad application prospects. For the flight trajectory tracking problem of the ball, some classical research results have been obtained at home and abroad. Literature [5] proposed an image fusion scheme based on image cartoon texture decomposition and sparse representation. The proposed image fusion method decomposes the source multimodal image into cartoon image and texture image. For cartoon components, a suitable space-based morphological structure preservation method is proposed. Energy-based fusion rules are used to maintain the structure information of the source image. For texture components, a method based on sparse representation is proposed. For the proposed fusion method based on sparse representation, a dictionary with strong representation ability is trained. Finally, according to the texture enhancement fusion rules, the fused animation and texture components are fused. Reference [6] proposed a twin neural network target tracking algorithm integrating the disturbance perception model. The low-level structural features extracted by twin neural network are effectively fused with high-level semantic features to improve the representation ability of features. The disturbance perception model based on color histogram feature is introduced into the algorithm. The target response score map is obtained by weighted fusion to estimate the target position, and the optimal target scale is estimated by using the adjacent frame scale adaptive strategy.However, the target appearance model obtained by the above traditional target tracking methods is not accurate enough, resulting in the unsatisfactory anti-interference performance of trajectory tracking. Referring to the previous research results, this paper introduces data fusion and sparse representation model to realize the automatic tracking of basketball flight trajectory.


## 2. Problems in Basketball Flight Trajectory Tracking

In the research of basketball flight trajectory tracking, there are still many problems, such as the difficulty of shooting clear images when the basketball is moving at high speed, the distortion [7] phenomenon of camera imaging, and the air resistance when the ball is flying.


### 2.1. Motion Blur Problem

Motion blur means that the relative motion speed of the basketball and camera is too fast, which will expose different scene points in the photosensitive device at the same time and at the same point, resulting in image quality degradation [8]. There is a serious motion blur problem in the basketball at high speed, which will affect the accuracy of trajectory tracking.


### 2.2. Lens Distortion

Lens distortion is actually the general term of the inherent perspective distortion of the optical lens, that is, the distortion caused by perspective, which is very unfavorable to the imaging quality of photos [9]. There are some distortion factors in the camera lens in the real situation, which is difficult to be described by the ideal distortion model.


### 2.3. Air Resistance

When flying at high speed in the air, the basketball will be disturbed by Magnus force, air resistance, and so on, which makes its real flight trajectory deviate from its ideal flight trajectory.


## 2.1. Motion Blur Problem

Motion blur means that the relative motion speed of the basketball and camera is too fast, which will expose different scene points in the photosensitive device at the same time and at the same point, resulting in image quality degradation [8]. There is a serious motion blur problem in the basketball at high speed, which will affect the accuracy of trajectory tracking.


## 2.2. Lens Distortion

Lens distortion is actually the general term of the inherent perspective distortion of the optical lens, that is, the distortion caused by perspective, which is very unfavorable to the imaging quality of photos [9]. There are some distortion factors in the camera lens in the real situation, which is difficult to be described by the ideal distortion model.


## 2.3. Air Resistance

When flying at high speed in the air, the basketball will be disturbed by Magnus force, air resistance, and so on, which makes its real flight trajectory deviate from its ideal flight trajectory.


## 3. Related Technologies of Automatic Tracking of Basketball Flight Trajectory

### 3.1. Data Fusion Technology

#### 3.1.1. Overview of Data Fusion

Data fusion refers to the realization of estimation tasks and decision-making through multisource information and integrated multisensor, which specifically includes a variety of concepts such as information fusion and data fusion [10, 11].


#### 3.1.2. Data Fusion Classification

Based on the abstraction level, data fusion can be divided into three categories: feature level, decision level, and pixel level.


#### 3.1.3. Key Points of Data Fusion

In data fusion, both traditional theories and new technologies are applied. The traditional theories include optimization theory and decision theory, while the new technologies include weighted average method and D.S. [12].


### 3.2. Fundamentals of Basketball Flight Trajectory Automatic Tracking Algorithm

#### 3.2.1. Target Feature Extraction

Target feature extraction algorithms mainly include local preserving mapping and independent component analysis.


#### 3.2.2. Particle Filter Algorithm

The particle filter algorithm is a Monte Carlo filtering method [13], which is mainly based on Bayesian theory. The basic idea is to express the posterior probability distribution corresponding to the system random variables through a group of random particles with weights, which can solve the non-Gaussian and nonlinear problems [14].


#### 3.2.3. Sparse Representation Theory

The sparse representation model includes synthetic sparse model and analytical sparse model. The analytical sparse model is an expansion of the field of signal sparse modeling, which mainly emphasizes the position and number of nonzero elements in the sparse coefficient elements to characterize the spatial dimension of signalX. The synthetic sparse model uses the super complete redundant dictionary to sparse decompose the image signal.


## 3.1. Data Fusion Technology

### 3.1.1. Overview of Data Fusion

Data fusion refers to the realization of estimation tasks and decision-making through multisource information and integrated multisensor, which specifically includes a variety of concepts such as information fusion and data fusion [10, 11].


### 3.1.2. Data Fusion Classification

Based on the abstraction level, data fusion can be divided into three categories: feature level, decision level, and pixel level.


### 3.1.3. Key Points of Data Fusion

In data fusion, both traditional theories and new technologies are applied. The traditional theories include optimization theory and decision theory, while the new technologies include weighted average method and D.S. [12].


## 3.1.1. Overview of Data Fusion

Data fusion refers to the realization of estimation tasks and decision-making through multisource information and integrated multisensor, which specifically includes a variety of concepts such as information fusion and data fusion [10, 11].


## 3.1.2. Data Fusion Classification

Based on the abstraction level, data fusion can be divided into three categories: feature level, decision level, and pixel level.


## 3.1.3. Key Points of Data Fusion

In data fusion, both traditional theories and new technologies are applied. The traditional theories include optimization theory and decision theory, while the new technologies include weighted average method and D.S. [12].


## 3.2. Fundamentals of Basketball Flight Trajectory Automatic Tracking Algorithm

### 3.2.1. Target Feature Extraction

Target feature extraction algorithms mainly include local preserving mapping and independent component analysis.


### 3.2.2. Particle Filter Algorithm

The particle filter algorithm is a Monte Carlo filtering method [13], which is mainly based on Bayesian theory. The basic idea is to express the posterior probability distribution corresponding to the system random variables through a group of random particles with weights, which can solve the non-Gaussian and nonlinear problems [14].


### 3.2.3. Sparse Representation Theory

The sparse representation model includes synthetic sparse model and analytical sparse model. The analytical sparse model is an expansion of the field of signal sparse modeling, which mainly emphasizes the position and number of nonzero elements in the sparse coefficient elements to characterize the spatial dimension of signalX. The synthetic sparse model uses the super complete redundant dictionary to sparse decompose the image signal.


## 3.2.1. Target Feature Extraction

Target feature extraction algorithms mainly include local preserving mapping and independent component analysis.


## 3.2.2. Particle Filter Algorithm

The particle filter algorithm is a Monte Carlo filtering method [13], which is mainly based on Bayesian theory. The basic idea is to express the posterior probability distribution corresponding to the system random variables through a group of random particles with weights, which can solve the non-Gaussian and nonlinear problems [14].


## 3.2.3. Sparse Representation Theory

The sparse representation model includes synthetic sparse model and analytical sparse model. The analytical sparse model is an expansion of the field of signal sparse modeling, which mainly emphasizes the position and number of nonzero elements in the sparse coefficient elements to characterize the spatial dimension of signalX. The synthetic sparse model uses the super complete redundant dictionary to sparse decompose the image signal.


## 4. Basketball Trajectory Tracking Method Based on Data Fusion and Sparse Representation Model

### 4.1. Appearance Model Based on Sparse Representation

In image target tracking, features such as contour, texture, and color are often used to describe the target. However, in some images, the target contour is not obvious and the background is complex. Tracking algorithms based on traditional observation models often lose the target [15]. Therefore, a new appearance model of the flying basketball based on the sparse representation model is proposed in this paper.It is assumed that the target in the image sequence is located in a low dimensional subspaceG = {g1,…,gn}; that is, the target can be sparse represented by this subspace:(1)F=G⋅P+eλ=g1⋅p1+g2⋅p2+⋯+gn⋅pn+eλ,where the subspace is called target subspace a, which is composed of the eigenvectors of the target observation vector matrix in the previous B frame image; C stands for super complete dictionary; D represents the representation error caused by noise and occlusion; and E represents sparsity [16].The feature of basketball flying image is extracted by the target feature extraction algorithm, and the appearance model of the flying basketball is constructed based on the sparse representation model. When extracting the features of basketball flight image, the algorithm used is the local preserving mapping algorithm [17], that is, to reduce the dimension of basketball flight image data while retaining the features of the original data.In the feature extraction of basketball flight image, the k-nearest neighbor method is used to construct the interclass adjacency graph and intraclass adjacency graph [18].Then, the weight on the edge is determined. The method used is as follows:(2)Si,j=1,vi,vj∈E,0,vi,vj∉E.In formula (2), Si,j represents the weight on the edge and i and j represent the edges of basketball flight image features, respectively.Taking the edge weight as the weight matrix of the adjacency graph, it can be found that the matrix is sparse and symmetric. For the basketball flight image data set, it is transformed and projected through the weight matrix of the adjacency graph to obtain the basketball flight image features [19, 20]. In projection, the objective function needs to be minimized to rationalize the projection criterion. The specific calculation formula of minimization objective function T is as follows:(3)T=∑i=1N∑j=1Nyi−yj2Wij.In equation (3), Wij represents the weight matrix of the adjacency graph; yi and yj represent two adjacent points in the basketball flight image data set; N represents the number of data in the basketball flight image data set; and T represents the minimization objective function.Then, the appearance model of the flying basketball is constructed based on the sparse representation model; that is, the appearance model of flying basketball is constructed by the sparse reconstruction algorithm. The specific construction process of the appearance model is as follows:(1)
The basketball flight image features are input [21] and trained to obtain dictionary pairs with high resolution and low resolution, which are represented by Dl and Dh.(2)
For each image blockyi (size b × b) in the basketball flying image Y, each image block is processed sequentially from the image block in the upper left corner [22].(3)
The mean value ofYi is calculated and expressed by Μ.(4)
The feature block ofyi is extracted and represented by F{k}Yi.(5)
Dictionaries vec (Zi) and D are calculated as follows:(4)vecZi=vecX˜ivecF1Yi⋮vecFkYi⋮vecFNYi,(5)D=D2h⊗D1hC21⊗C11⋮C2k⊗C1k⋮C2N⊗C1N.In equation (3), Xi represents the reconstructed high-resolution basketball flight image of the reconstructed area.(6)
The sparse reconstruction problem [23] is solved as follows:(6)P=minvecBiTvecZi−DvecBiTF2+λvecBiT1.In equation (4), P represents the objective function of sparse reconstruction problem [24, 25]; BiT represents sparse representation matrix; F stands for linear feature extraction operator; and λ is the fidelity balance parameter.(7)
The image block of the high-resolution basketball flight appearance model is constructed, as shown in the following formula:(7)Xi=D1hBiTD2hT.In equation (7), Xi represents the constructed high-resolution basketball flight appearance model image block and T represents the sparsity balance parameter.The high-resolution basketball flight appearance model [26] is constructed by repeated operations of partial weighted average on the image blocks of the high-resolution basketball flight appearance model X0. Finally, the high-resolution basketball flight appearance model X0 is output.


### 4.2. Establishment of Algorithm Model

Then, the model of the basketball flight trajectory automatic tracking algorithm is constructed by using data fusion technology and particle filter algorithm. Firstly, the data of the high-resolution basketball flight appearance model are processed by data fusion technology. The data fusion method used isD-S evidence theory [27], that is, divide the evidence set, use the divided part to make independent judgment on the identification framework, and then use the Dempster rule to recombine the previously divided parts. The combination rules are as follows:(8)mA=11−k∑AiBjm1Aim2Bj,A=φ,mφ=0,Ai∩Bj=A.In formula (8), Ai and Bj, respectively, represent two independent sources of evidence; A represents proposition; m (Ø) represents the universe set of trust function; m represents trust function; and k stands for the number of propositions.Then, the automatic tracking algorithm model of basketball flight trajectory is constructed by the particle filter algorithm. In the model construction, the measurement covariance has an important impact on the output of the final filter. In order to avoid the influence of measurement covariance, dynamic correction is introduced, as shown in the following formula:(9)Rk=fdk.In formula (9), Rk represents the measurement covariance; f (·) represents the dynamic correction function; dk represents the distance between binocular camera and basketball at time k in three-dimensional space, that is, the automatic tracking algorithm model of basketball flight trajectory, as shown in the following formula:(10)dk=xk−xc2+yk−yc2+zk−zc2.In equation (10), xc, yc, and zc, respectively, represent the midpoint position when the left and right cameras are connected with the two optical centers; xk, yk, and zk, respectively, represent the coordinate measurement values corresponding to basketball flight in the three-dimensional world coordinate system.


### 4.3. Two-Step Tracking

The designed basketball flight trajectory automatic tracking algorithm determines the value range and increasing process of the dynamic correction function according to the actual calibration results of the camera.In the initial tracking stage, the small measurement covariance difference is set, so that the algorithm can quickly follow the basketball flight.Then, the size of the measured covariance difference is gradually increased so as to improve the output stability of the particle filter algorithm.In the process of two-step tracking, the expression of measurement covariance is defined as the following formula:(11)Rk=R0dkd.0In equation (11), d0 represents the initial distance value corresponding to the optical center of the basketball and the midpoint of the connecting line of the binocular camera and R0 represents the initial measurement covariance.


### 4.4. Algorithm Steps

The steps of the designed basketball flight trajectory automatic tracking algorithm are summarized. The steps of the algorithm are divided into three steps, as follows:(i)
The most difficult problem of basketball target tracking is that the appearance model of the flying basketball is not accurate enough, which is still an unsolved problem in the traditional basketball flight trajectory tracking method. Therefore, based on the feature extraction of basketball flight image features by target feature extraction algorithm, I construct the appearance model of sparse representation of flying basketball, which lays the foundation for high-precision target tracking of basketball targets.(ii)
Using data fusion technology and particle filter algorithm, the model of the basketball flight trajectory automatic tracking algorithm is constructed.D-S evidence theory data fusion technology is used to complete the information processing of high-resolution basketball flight appearance model data.(iii)
Finally, the basketball flight appearance model is tracked by using the constructed basketball flight trajectory automatic tracking algorithm model.


## 4.1. Appearance Model Based on Sparse Representation

In image target tracking, features such as contour, texture, and color are often used to describe the target. However, in some images, the target contour is not obvious and the background is complex. Tracking algorithms based on traditional observation models often lose the target [15]. Therefore, a new appearance model of the flying basketball based on the sparse representation model is proposed in this paper.It is assumed that the target in the image sequence is located in a low dimensional subspaceG = {g1,…,gn}; that is, the target can be sparse represented by this subspace:(1)F=G⋅P+eλ=g1⋅p1+g2⋅p2+⋯+gn⋅pn+eλ,where the subspace is called target subspace a, which is composed of the eigenvectors of the target observation vector matrix in the previous B frame image; C stands for super complete dictionary; D represents the representation error caused by noise and occlusion; and E represents sparsity [16].The feature of basketball flying image is extracted by the target feature extraction algorithm, and the appearance model of the flying basketball is constructed based on the sparse representation model. When extracting the features of basketball flight image, the algorithm used is the local preserving mapping algorithm [17], that is, to reduce the dimension of basketball flight image data while retaining the features of the original data.In the feature extraction of basketball flight image, the k-nearest neighbor method is used to construct the interclass adjacency graph and intraclass adjacency graph [18].Then, the weight on the edge is determined. The method used is as follows:(2)Si,j=1,vi,vj∈E,0,vi,vj∉E.In formula (2), Si,j represents the weight on the edge and i and j represent the edges of basketball flight image features, respectively.Taking the edge weight as the weight matrix of the adjacency graph, it can be found that the matrix is sparse and symmetric. For the basketball flight image data set, it is transformed and projected through the weight matrix of the adjacency graph to obtain the basketball flight image features [19, 20]. In projection, the objective function needs to be minimized to rationalize the projection criterion. The specific calculation formula of minimization objective function T is as follows:(3)T=∑i=1N∑j=1Nyi−yj2Wij.In equation (3), Wij represents the weight matrix of the adjacency graph; yi and yj represent two adjacent points in the basketball flight image data set; N represents the number of data in the basketball flight image data set; and T represents the minimization objective function.Then, the appearance model of the flying basketball is constructed based on the sparse representation model; that is, the appearance model of flying basketball is constructed by the sparse reconstruction algorithm. The specific construction process of the appearance model is as follows:(1)
The basketball flight image features are input [21] and trained to obtain dictionary pairs with high resolution and low resolution, which are represented by Dl and Dh.(2)
For each image blockyi (size b × b) in the basketball flying image Y, each image block is processed sequentially from the image block in the upper left corner [22].(3)
The mean value ofYi is calculated and expressed by Μ.(4)
The feature block ofyi is extracted and represented by F{k}Yi.(5)
Dictionaries vec (Zi) and D are calculated as follows:(4)vecZi=vecX˜ivecF1Yi⋮vecFkYi⋮vecFNYi,(5)D=D2h⊗D1hC21⊗C11⋮C2k⊗C1k⋮C2N⊗C1N.In equation (3), Xi represents the reconstructed high-resolution basketball flight image of the reconstructed area.(6)
The sparse reconstruction problem [23] is solved as follows:(6)P=minvecBiTvecZi−DvecBiTF2+λvecBiT1.In equation (4), P represents the objective function of sparse reconstruction problem [24, 25]; BiT represents sparse representation matrix; F stands for linear feature extraction operator; and λ is the fidelity balance parameter.(7)
The image block of the high-resolution basketball flight appearance model is constructed, as shown in the following formula:(7)Xi=D1hBiTD2hT.In equation (7), Xi represents the constructed high-resolution basketball flight appearance model image block and T represents the sparsity balance parameter.The high-resolution basketball flight appearance model [26] is constructed by repeated operations of partial weighted average on the image blocks of the high-resolution basketball flight appearance model X0. Finally, the high-resolution basketball flight appearance model X0 is output.


## 4.2. Establishment of Algorithm Model

Then, the model of the basketball flight trajectory automatic tracking algorithm is constructed by using data fusion technology and particle filter algorithm. Firstly, the data of the high-resolution basketball flight appearance model are processed by data fusion technology. The data fusion method used isD-S evidence theory [27], that is, divide the evidence set, use the divided part to make independent judgment on the identification framework, and then use the Dempster rule to recombine the previously divided parts. The combination rules are as follows:(8)mA=11−k∑AiBjm1Aim2Bj,A=φ,mφ=0,Ai∩Bj=A.In formula (8), Ai and Bj, respectively, represent two independent sources of evidence; A represents proposition; m (Ø) represents the universe set of trust function; m represents trust function; and k stands for the number of propositions.Then, the automatic tracking algorithm model of basketball flight trajectory is constructed by the particle filter algorithm. In the model construction, the measurement covariance has an important impact on the output of the final filter. In order to avoid the influence of measurement covariance, dynamic correction is introduced, as shown in the following formula:(9)Rk=fdk.In formula (9), Rk represents the measurement covariance; f (·) represents the dynamic correction function; dk represents the distance between binocular camera and basketball at time k in three-dimensional space, that is, the automatic tracking algorithm model of basketball flight trajectory, as shown in the following formula:(10)dk=xk−xc2+yk−yc2+zk−zc2.In equation (10), xc, yc, and zc, respectively, represent the midpoint position when the left and right cameras are connected with the two optical centers; xk, yk, and zk, respectively, represent the coordinate measurement values corresponding to basketball flight in the three-dimensional world coordinate system.


## 4.3. Two-Step Tracking

The designed basketball flight trajectory automatic tracking algorithm determines the value range and increasing process of the dynamic correction function according to the actual calibration results of the camera.In the initial tracking stage, the small measurement covariance difference is set, so that the algorithm can quickly follow the basketball flight.Then, the size of the measured covariance difference is gradually increased so as to improve the output stability of the particle filter algorithm.In the process of two-step tracking, the expression of measurement covariance is defined as the following formula:(11)Rk=R0dkd.0In equation (11), d0 represents the initial distance value corresponding to the optical center of the basketball and the midpoint of the connecting line of the binocular camera and R0 represents the initial measurement covariance.


## 4.4. Algorithm Steps

The steps of the designed basketball flight trajectory automatic tracking algorithm are summarized. The steps of the algorithm are divided into three steps, as follows:(i)
The most difficult problem of basketball target tracking is that the appearance model of the flying basketball is not accurate enough, which is still an unsolved problem in the traditional basketball flight trajectory tracking method. Therefore, based on the feature extraction of basketball flight image features by target feature extraction algorithm, I construct the appearance model of sparse representation of flying basketball, which lays the foundation for high-precision target tracking of basketball targets.(ii)
Using data fusion technology and particle filter algorithm, the model of the basketball flight trajectory automatic tracking algorithm is constructed.D-S evidence theory data fusion technology is used to complete the information processing of high-resolution basketball flight appearance model data.(iii)
Finally, the basketball flight appearance model is tracked by using the constructed basketball flight trajectory automatic tracking algorithm model.


## 5. Analysis of Experimental Results

### 5.1. Case Tracking Test

In the experiment, the binocular vision system is used to collect the basketball flight images in the robot basketball. Under the conditions of i5-7300hq processor and 10 GB memory, the moving image sequence is processed based on MATLAB 2020b for automatic tracking of basketball flight trajectory in the experiment. The experimental image is shown in Figure1.Figure 1
Experimental image.The visual results of basketball target tracking are shown in Figure2.Figure 2
Visual results of basketball target tracking.In the experiment, the average value ofM in Yi is 32, k is 6, and the initial value of Tk is 10 mm. With the reduction of the distance between binocular camera and basketball at k time in three-dimensional space, Rk gradually increases to 40 mm.


### 5.2. Three Axis Tracking Results

Because the process of basketball flight is in three-dimensional space, the test of its tracking effect is divided into three directions:x-axis, y-axis, and z-axis. The basketball motion image is processed by MATLAB 2020b to obtain the trajectory coordinates of basketball flight. The basketball flight trajectory is tracked by using the method proposed in this paper, and the tracking results are compared with the actual coordinates. If they are close, the tracking results of the proposed method are ideal.


#### 5.2.1.X-Axis Tracking Results

The designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model is used to track the trajectory of basketball thrown by the experimental basketball robot. The experimental results ofx-axis basketball flight trajectory automatic tracking are shown in Figure 2.From the experimental results ofx-axis basketball flight trajectory automatic tracking in Figure 3 and Table 1, it can be seen that there is almost no obvious difference between the output of the basketball flight trajectory automatic tracking algorithm model and the actual basketball flight trajectory. In the 400 ms of the experiment, there is a small deviation between the original flight speed and the tracking speed, and the deviation value is 0.1 m/s, which shows that with the increase in experimental time, the tracking result of the design method is still relatively stable and the output noise is small, which proves that the automatic tracking effect of x-axis basketball flight trajectory of the design method is better.Figure 3
Experimental results of basketball flight trajectory automatic tracking onx-axis.Table 1
Automatic tracking data of basketball flight trajectory onx-axis.
t (ms)V (m/s)Actual flight trajectory of the basketballTracking results of the proposed method01.160.161000.800.812000.700.703000.820.804000.940.92


#### 5.2.2.Y-Axis Tracking Results

Then, the automatic tracking ofy-axis basketball flight trajectory of the design method is tested, and the specific test results are shown in Figure 3.According to the automatic tracking ofy-axis basketball flight trajectory in Figure 4 and Table 2, when the experimental time is 300 ms and 350 ms, the proposed method has two tracking errors, 3 mm/MS and 2 mm/MS, respectively, but the error does not affect the overall tracking effect of y-axis. It can be seen that the automatic tracking method of basketball flight trajectory based on data fusion and sparse representation model can track the y-axis more accurately in the three-dimensional world coordinate system. That is, the output of the basketball flight trajectory automatic tracking algorithm model during y-axis tracking is very close to the reality, which proves that the design method can accurately track the y-axis trajectory.Figure 4
Automatic tracking ofy-axis basketball flight trajectory.Table 2
Automatic tracking data of basketball flight trajectory ony-axis.
t (ms)V (m/s)Actual flight trajectory of basketballTracking results of the proposed method087871007982200777730082814008787


#### 5.2.3.Z-Axis Tracking Results

Finally, the automatic tracking ofz-axis basketball flight trajectory of the design method is tested, and the specific test results are shown in Figure 4.It can be seen from the automatic tracking ofz-axis basketball flight trajectory in Figure 5 and Table 3 that the automatic tracking accuracy of z-axis basketball flight trajectory of the design method is lower than that of x-axis and y-axis basketball flight trajectory. There is a certain error in the overall tracking trajectory, but the error value is always less than 33 mm/MS, which shows that it still maintains a high accuracy.Figure 5
Automatic tracking ofz-axis basketball flight trajectory.Table 3
Automatic tracking data of basketball flight trajectory inZ axis.
t (ms)V (m/s)Actual flight trajectory of basketballTracking results of the proposed method096961008484200757430081824009493Based on the three-axis tracking results, it can be found that the output of the basketball flight trajectory automatic tracking algorithm model is very close to the reality; that is, the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model can track the basketball flight trajectory more accurately.


#### 5.2.4. Error and Deviation Correction Test

After the test, the error and correction test of the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model is carried out; that is, a certain noise is added during the tracking to test the anti-interference performance of the design method in the automatic tracking of basketball flight trajectory.For automatic flight trajectory tracking method, anti-interference performance is an important index to measure its tracking performance. Taking the automatic tracking performance test ofx-axis basketball flight trajectory as an example, a certain noise is applied during the test, the automatic tracking of x-axis basketball flight trajectory is tested under the noise interference, and the test results are compared with the tracking results in Section 5.2.1 to observe the anti-interference of the automatic tracking method of basketball flight trajectory based on data fusion and sparse representation model.In the test, the noise is mainly applied at 200 ms, and the applied noise is the measurement signal noise. The test results ofx-axis basketball flight trajectory automatic tracking performance of the design method after noise are shown in Figure 5.According to Figure6 and Table 4, the comparison results of the x-axis basketball flight trajectory automatic tracking test at the place where the noise is added (200 ms) show that after the measurement signal noise is applied, the flight trajectory automatic tracking result at 200 ms is affected to a certain extent. However, the trajectory tracking is still successfully realized, which proves that the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model has good anti-interference performance and can resist the influence of noise.Figure 6
Test results ofx-axis basketball flight trajectory automatic tracking after noise application.Table 4
Comparison ofx-axis basketball flight trajectory automatic tracking data after noise application.
Flight speed (m·s−1)Flight time (ms)0100200300400Proposed methodOriginal flight speed1.170.830.70.810.94Track tracking speed1.170.830.740.810.92Literature [5] methodsOriginal flight speed1.170.830.70.810.94Track tracking speed1.010.280.250.390.66Literature [6] methodsOriginal flight speed1.170.830.70.810.94Track tracking speed1.120.520.120.520.25


## 5.1. Case Tracking Test

In the experiment, the binocular vision system is used to collect the basketball flight images in the robot basketball. Under the conditions of i5-7300hq processor and 10 GB memory, the moving image sequence is processed based on MATLAB 2020b for automatic tracking of basketball flight trajectory in the experiment. The experimental image is shown in Figure1.Figure 1
Experimental image.The visual results of basketball target tracking are shown in Figure2.Figure 2
Visual results of basketball target tracking.In the experiment, the average value ofM in Yi is 32, k is 6, and the initial value of Tk is 10 mm. With the reduction of the distance between binocular camera and basketball at k time in three-dimensional space, Rk gradually increases to 40 mm.


## 5.2. Three Axis Tracking Results

Because the process of basketball flight is in three-dimensional space, the test of its tracking effect is divided into three directions:x-axis, y-axis, and z-axis. The basketball motion image is processed by MATLAB 2020b to obtain the trajectory coordinates of basketball flight. The basketball flight trajectory is tracked by using the method proposed in this paper, and the tracking results are compared with the actual coordinates. If they are close, the tracking results of the proposed method are ideal.


### 5.2.1.X-Axis Tracking Results

The designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model is used to track the trajectory of basketball thrown by the experimental basketball robot. The experimental results ofx-axis basketball flight trajectory automatic tracking are shown in Figure 2.From the experimental results ofx-axis basketball flight trajectory automatic tracking in Figure 3 and Table 1, it can be seen that there is almost no obvious difference between the output of the basketball flight trajectory automatic tracking algorithm model and the actual basketball flight trajectory. In the 400 ms of the experiment, there is a small deviation between the original flight speed and the tracking speed, and the deviation value is 0.1 m/s, which shows that with the increase in experimental time, the tracking result of the design method is still relatively stable and the output noise is small, which proves that the automatic tracking effect of x-axis basketball flight trajectory of the design method is better.Figure 3
Experimental results of basketball flight trajectory automatic tracking onx-axis.Table 1
Automatic tracking data of basketball flight trajectory onx-axis.
t (ms)V (m/s)Actual flight trajectory of the basketballTracking results of the proposed method01.160.161000.800.812000.700.703000.820.804000.940.92


### 5.2.2.Y-Axis Tracking Results

Then, the automatic tracking ofy-axis basketball flight trajectory of the design method is tested, and the specific test results are shown in Figure 3.According to the automatic tracking ofy-axis basketball flight trajectory in Figure 4 and Table 2, when the experimental time is 300 ms and 350 ms, the proposed method has two tracking errors, 3 mm/MS and 2 mm/MS, respectively, but the error does not affect the overall tracking effect of y-axis. It can be seen that the automatic tracking method of basketball flight trajectory based on data fusion and sparse representation model can track the y-axis more accurately in the three-dimensional world coordinate system. That is, the output of the basketball flight trajectory automatic tracking algorithm model during y-axis tracking is very close to the reality, which proves that the design method can accurately track the y-axis trajectory.Figure 4
Automatic tracking ofy-axis basketball flight trajectory.Table 2
Automatic tracking data of basketball flight trajectory ony-axis.
t (ms)V (m/s)Actual flight trajectory of basketballTracking results of the proposed method087871007982200777730082814008787


### 5.2.3.Z-Axis Tracking Results

Finally, the automatic tracking ofz-axis basketball flight trajectory of the design method is tested, and the specific test results are shown in Figure 4.It can be seen from the automatic tracking ofz-axis basketball flight trajectory in Figure 5 and Table 3 that the automatic tracking accuracy of z-axis basketball flight trajectory of the design method is lower than that of x-axis and y-axis basketball flight trajectory. There is a certain error in the overall tracking trajectory, but the error value is always less than 33 mm/MS, which shows that it still maintains a high accuracy.Figure 5
Automatic tracking ofz-axis basketball flight trajectory.Table 3
Automatic tracking data of basketball flight trajectory inZ axis.
t (ms)V (m/s)Actual flight trajectory of basketballTracking results of the proposed method096961008484200757430081824009493Based on the three-axis tracking results, it can be found that the output of the basketball flight trajectory automatic tracking algorithm model is very close to the reality; that is, the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model can track the basketball flight trajectory more accurately.


### 5.2.4. Error and Deviation Correction Test

After the test, the error and correction test of the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model is carried out; that is, a certain noise is added during the tracking to test the anti-interference performance of the design method in the automatic tracking of basketball flight trajectory.For automatic flight trajectory tracking method, anti-interference performance is an important index to measure its tracking performance. Taking the automatic tracking performance test ofx-axis basketball flight trajectory as an example, a certain noise is applied during the test, the automatic tracking of x-axis basketball flight trajectory is tested under the noise interference, and the test results are compared with the tracking results in Section 5.2.1 to observe the anti-interference of the automatic tracking method of basketball flight trajectory based on data fusion and sparse representation model.In the test, the noise is mainly applied at 200 ms, and the applied noise is the measurement signal noise. The test results ofx-axis basketball flight trajectory automatic tracking performance of the design method after noise are shown in Figure 5.According to Figure6 and Table 4, the comparison results of the x-axis basketball flight trajectory automatic tracking test at the place where the noise is added (200 ms) show that after the measurement signal noise is applied, the flight trajectory automatic tracking result at 200 ms is affected to a certain extent. However, the trajectory tracking is still successfully realized, which proves that the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model has good anti-interference performance and can resist the influence of noise.Figure 6
Test results ofx-axis basketball flight trajectory automatic tracking after noise application.Table 4
Comparison ofx-axis basketball flight trajectory automatic tracking data after noise application.
Flight speed (m·s−1)Flight time (ms)0100200300400Proposed methodOriginal flight speed1.170.830.70.810.94Track tracking speed1.170.830.740.810.92Literature [5] methodsOriginal flight speed1.170.830.70.810.94Track tracking speed1.010.280.250.390.66Literature [6] methodsOriginal flight speed1.170.830.70.810.94Track tracking speed1.120.520.120.520.25


## 5.2.1.X-Axis Tracking Results

The designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model is used to track the trajectory of basketball thrown by the experimental basketball robot. The experimental results ofx-axis basketball flight trajectory automatic tracking are shown in Figure 2.From the experimental results ofx-axis basketball flight trajectory automatic tracking in Figure 3 and Table 1, it can be seen that there is almost no obvious difference between the output of the basketball flight trajectory automatic tracking algorithm model and the actual basketball flight trajectory. In the 400 ms of the experiment, there is a small deviation between the original flight speed and the tracking speed, and the deviation value is 0.1 m/s, which shows that with the increase in experimental time, the tracking result of the design method is still relatively stable and the output noise is small, which proves that the automatic tracking effect of x-axis basketball flight trajectory of the design method is better.Figure 3
Experimental results of basketball flight trajectory automatic tracking onx-axis.Table 1
Automatic tracking data of basketball flight trajectory onx-axis.
t (ms)V (m/s)Actual flight trajectory of the basketballTracking results of the proposed method01.160.161000.800.812000.700.703000.820.804000.940.92


## 5.2.2.Y-Axis Tracking Results

Then, the automatic tracking ofy-axis basketball flight trajectory of the design method is tested, and the specific test results are shown in Figure 3.According to the automatic tracking ofy-axis basketball flight trajectory in Figure 4 and Table 2, when the experimental time is 300 ms and 350 ms, the proposed method has two tracking errors, 3 mm/MS and 2 mm/MS, respectively, but the error does not affect the overall tracking effect of y-axis. It can be seen that the automatic tracking method of basketball flight trajectory based on data fusion and sparse representation model can track the y-axis more accurately in the three-dimensional world coordinate system. That is, the output of the basketball flight trajectory automatic tracking algorithm model during y-axis tracking is very close to the reality, which proves that the design method can accurately track the y-axis trajectory.Figure 4
Automatic tracking ofy-axis basketball flight trajectory.Table 2
Automatic tracking data of basketball flight trajectory ony-axis.
t (ms)V (m/s)Actual flight trajectory of basketballTracking results of the proposed method087871007982200777730082814008787


## 5.2.3.Z-Axis Tracking Results

Finally, the automatic tracking ofz-axis basketball flight trajectory of the design method is tested, and the specific test results are shown in Figure 4.It can be seen from the automatic tracking ofz-axis basketball flight trajectory in Figure 5 and Table 3 that the automatic tracking accuracy of z-axis basketball flight trajectory of the design method is lower than that of x-axis and y-axis basketball flight trajectory. There is a certain error in the overall tracking trajectory, but the error value is always less than 33 mm/MS, which shows that it still maintains a high accuracy.Figure 5
Automatic tracking ofz-axis basketball flight trajectory.Table 3
Automatic tracking data of basketball flight trajectory inZ axis.
t (ms)V (m/s)Actual flight trajectory of basketballTracking results of the proposed method096961008484200757430081824009493Based on the three-axis tracking results, it can be found that the output of the basketball flight trajectory automatic tracking algorithm model is very close to the reality; that is, the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model can track the basketball flight trajectory more accurately.


## 5.2.4. Error and Deviation Correction Test

After the test, the error and correction test of the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model is carried out; that is, a certain noise is added during the tracking to test the anti-interference performance of the design method in the automatic tracking of basketball flight trajectory.For automatic flight trajectory tracking method, anti-interference performance is an important index to measure its tracking performance. Taking the automatic tracking performance test ofx-axis basketball flight trajectory as an example, a certain noise is applied during the test, the automatic tracking of x-axis basketball flight trajectory is tested under the noise interference, and the test results are compared with the tracking results in Section 5.2.1 to observe the anti-interference of the automatic tracking method of basketball flight trajectory based on data fusion and sparse representation model.In the test, the noise is mainly applied at 200 ms, and the applied noise is the measurement signal noise. The test results ofx-axis basketball flight trajectory automatic tracking performance of the design method after noise are shown in Figure 5.According to Figure6 and Table 4, the comparison results of the x-axis basketball flight trajectory automatic tracking test at the place where the noise is added (200 ms) show that after the measurement signal noise is applied, the flight trajectory automatic tracking result at 200 ms is affected to a certain extent. However, the trajectory tracking is still successfully realized, which proves that the designed basketball flight trajectory automatic tracking method based on data fusion and sparse representation model has good anti-interference performance and can resist the influence of noise.Figure 6
Test results ofx-axis basketball flight trajectory automatic tracking after noise application.Table 4
Comparison ofx-axis basketball flight trajectory automatic tracking data after noise application.
Flight speed (m·s−1)Flight time (ms)0100200300400Proposed methodOriginal flight speed1.170.830.70.810.94Track tracking speed1.170.830.740.810.92Literature [5] methodsOriginal flight speed1.170.830.70.810.94Track tracking speed1.010.280.250.390.66Literature [6] methodsOriginal flight speed1.170.830.70.810.94Track tracking speed1.120.520.120.520.25


## 6. Conclusion

In order to solve the problems of poor anti-interference and low tracking accuracy of traditional basketball flight trajectory tracking methods, a new trajectory automatic tracking method is proposed. Combined with the sparse representation model, data fusion, target feature extraction, and particle filter algorithm, basketball flight trajectory tracking is studied. To sum up, the following achievements have been made in this study:(1)
The sparse representation model, data fusion, target feature extraction, and particle filter algorithm are deeply studied and comprehensively classified.(2)
Taking basketball as the research object, through the comprehensive application of various algorithms, this paper constructs the basketball flight trajectory automatic tracking algorithm model, realizes the basketball flight trajectory automatic tracking with high precision and strong anti-interference, and has a broad application prospect.(3)
In order to verify the effectiveness of the proposed method, simulation experiments are designed. Through the trajectory tracking ofx-axis, y-axis, and z-axis, it is proved that the proposed method can track the basketball flight trajectory with high precision, and the tracking accuracy can be maintained above 95%. In order to verify its anti-interference performance, noise was added when the experimental time was 200 ms low. The experimental results show that the velocity tracking error of the proposed method is only 0.04 m·S−1 at the noise interference, which shows that the trajectory tracking accuracy can still maintain a high level under the noise interference.



---

*Source: 9568753-2021-09-29.xml*