## 2 Materials and Methods
### Motion Trajectory Compensation  
Correlation filter algorithms do not use the motion object state information for position prediction. In contrast, the KF optimally estimates the state of a stochastic dynamic system by combining information such as target velocity and acceleration to predict the position of the next frame, enabling accurate object position prediction under rapid motion, motion blur, and occlusion. The KF method is computationally low-cost, affording fast object tracking. Figure 5: The graph of feature response. The KF provides the optimal signal estimation in the time domain utilizing a linear minimum variance estimation scheme. However, applying the filter requires setting the filter parameters, which are not trivial, during the system determination and noise measurement. Nevertheless, both noises hugely impact the filter's estimation effectiveness. Hence, to ease the calculations, it is generally considered that both follow a normal distribution with zero mean and are constant throughout the time series. However, in the actual KF, the state and measurement system noise variances are set empirically, with a certain degree of randomness and blindness. After performing a relevant case study, we conclude that different variance values heavily impact the filtering results. The system's noise cannot be eliminated, and thus it is essential to reduce its interference as the noise variance is directly related to the extent that noise impacts the KF results. Next, we discuss the effect of variance on KF. KF is a real-time recursive algorithm that utilizes the system's estimate (state or parameter) originating from the filter's output and estimates the system to be processed based on the system and the observation equations. Essentially, KF is an optimal estimation method, with its mathematical model presented next. Let the state and the measurement equations of the stochastic linear discrete system be denoted as:  
\[\left\{ \begin{array}{c}X_{t}=A_{t,t-1}X_{t-1}+\omega_{t-1}\\ Z_{t}=H_{t}X_{t}+v_{t}\end{array} \right. \tag{16}\]  
where \(X_{t}\) and \(Z_{t}\) are the system's state and observation vectors at time \(t\), respectively, \(A_{t,t-1}\) is the state transfer matrix, \(H_{t}\) is the observation matrix, \(\omega_{t-1}\) is the process noise matrix, and \(v_{t}\) is the observation noise matrix. The prediction and update equations for the Kalman filter are:  
\[\left\{ \begin{array}{c}X_{t,t-1}=A_{t,t-1}X_{t-1}\\ P_{t,t-1}=A_{t,t-1}P_{t-1}A_{t,t-1}^{T}+Q_{t-1}\\ K_{t}=P_{t,t-1}H_{t}^{T}\left(H_{t}P_{t,t-1}H_{t}^{T}+R_{t}\right)^{-1}\\ X_{t}=X_{t,t-1}+K_{t}(Z_{t}-H_{t}X_{t,t-1})\\ P_{t}=(I_{t}-K_{t}H_{t})P_{t,t-1}\end{array} \right. \tag{17}\]  
where \(X_{t,t-1}\) is the state prediction at time \(t\), \(X_{t-1}\) is the optimal estimate at time \(t-1\), \(P_{t,t-1}\) is the state covariance matrix at time \(t\), \(Q_{t-1}\) is the noise covariance matrix of \(\omega_{t-1}\), \(R_{t}\) is the covariance matrix of the measurement noise \(v_{t}\), \(K_{t}\) is the gain matrix, and \(Z_{t}\) is the input variable matrix at time \(t\). From Equations (33) and (34), we observe that the gain matrix \(K_{t}\) is related to the initialization \(P_{0}\), the system process noise covariance matrix \(Q_{t}\), and the measurement noise covariance matrix \(R_{t}\). Moreover, the gain matrix decreases as \(R_{t}\) increases because if the measurement noise increases, it causes a significant error, and therefore, the filter gain should be set to a smaller value to reduce the effect of the observation noise on the filter value. If \(P_{0}\) and \(Q_{t}\) become smaller, the process noise covariance matrix \(P_{t,t-1}\) and the optimal filter covariance matrix \(P_{t}\) become smaller, and the gain matrix \(K_{t}\) decreases. Therefore, the gain matrix \(K_{t}\) is proportional to \(Q_{t}\) and inversely proportional to \(R_{t}\). \(K\) reflects how close the filter value is to the actual value. The larger the \(K\), the greater the difference between the filter and the actual value, and vice versa.