## 4 Experiment Study
### Centroid-Based Moving Ball Tracking Subjected to Three Motions  
The experiment on the video of a moving ball separately subjected to projectile motion, free-fall bouncing motion, and back-and-forth linear motion across the video is conducted to assess the performance of the proposed AKF-ALS algorithm. The video consists of 100 frames, with a resolution of 480 \(\times\) 640 pixels. Figure 3: Performance of measurement noise covariance estimation \(R_{ALS}\) using ALS algorithm over 500 Monte Carlo simulations. The blue bars denote the estimated measurement noise covariance value \(R_{MC}\) over each Monte Carlo simulation, where the x-axis and y-axis respectively represent the measurement noise covariance value and the probabilistic density. The black bold dot is the measurement noise covariance estimate \(\hat{Q}_{ALS}\) via the ALS algorithm. The intersection of the red dotted line and x-axis denotes the true noise covariance \(Q_{true}\). Figure 2: Performance of model noise covariance estimation \(Q_{ALS}\) using ALS algorithm over 500 Monte Carlo simulations. The blue dots denote the estimated diagonal-form model noise covariance matrix \(Q_{MC}=diag(Q_{11},Q_{22})\) over each Monte Carlo simulation, where the x-axis and y-axis represent the first and second diagonal elements respectively. The black bold dot is the model noise covariance estimate \(\hat{Q}_{ALS}\) via the ALS algorithm. The intersection of two red dotted lines denotes the true noise covariance \(Q_{true}\). * Projectile motion following a parabolic path refers to the motion of an object thrown into the air and subject to downward acceleration due to gravity. The challenge in tracking such motion is the constantly changing speed and direction of the object. * Free-fall bouncing motion is the motion of an object falling under gravity and then bouncing back upwards. The challenge is the object's velocity changes rapidly at the point of impact, which can be difficult for a tracking algorithm to handle. * Back-and-forth linear motion refers to an object moving to and fro along a straight line. The challenge is the abrupt change in velocity when the object changes direction. For visual object tracking (VOT), these different types of motion pose unique challenges. Rapid changes in direction and velocity may affect the ability of a VOT system to accurately track an object. Therefore, the proposed AKF-ALS algorithm is applied to show the performance. In the algorithm, the background subtraction method is first applied to each frame in the video to detect the ball. The background is initialized as the first frame of the video, and an adaptive threshold is applied to the difference image to create a binary image. The connected components in the binary image are identified as potential objects, and the centroid of the largest component is stored as the location of the ball. Then the Kalman filter is used to track the ball's movement, i.e., the centroid of a series of video frames. The ALS method is used to estimate the process and measurement noise covariance. The performance of the proposed method was compared with a standard Kalman filter with fixed noise covariance. Specifically, we consider the state of the ball as its position and velocity, and the observation as the detected position of the ball from the background subtraction. Based on the kinematic equation, the relation between the position \(x\) and velocity \(\dot{x}\) can be written as follows:  
\[\mathrm{x}_{k}=\left[ \begin{array}{c}x_{k}\\ \dot{x}_{k}\end{array} \right]=\left[ \begin{array}{c}x_{k-1}+\dot{x}_{k-1} \Delta t+1/2\dot{x}_{k-1}\Delta t^{2}\\ \dot{x}_{k-1}+\dot{x}_{k-1}\Delta t\end{array} \right] \tag{19}\]  
where \(\Delta t\) is the sampling time and can be set as 0.2. The 2-D kinetic equation can be shown for state \(\mathrm{x}_{k}\) as:  
\[\mathrm{x}_{k}=\left[ \begin{array}{c}x_{k}\\ y_{k}\\ \dot{x}_{k}\\ \dot{y}_{k}\end{array} \right]=\left[