## 2 Materials and Methods
### Motion Trajectory Compensation
The state and measurement equation of the KF can be easily determined when the system is stable. However, in reality, the system process and measurement noise are unknown and thus are generally treated as white noise. In fact, the system process and measurement noise are dynamic. Thus, to simplify the calculations, the system process and measurement noise covariances are set as constants, where the specific values are heuristically set, involving some blindness and thus may reduce the filtering effect. Spurred by this, we improve the KF by improving the convergence speed and altering the covariance values. The related process initially calculates the _SDM_ value of the adjacent frame object to decide whether to adjust the process noise covariance of the KF, which can be written as:  
\[SDM=\zeta\times(1/V_{max})+(1-\zeta)\times d \tag{18}\]  
\[d=\sqrt{\left(C_{r}-C_{k}\right)^{2}} \tag{19}\]  
where \(C_{r}\) is the object center position of the current frame obtained by the _KCF_ tracker, \(C_{k}\) is the object center position of the current frame obtained by the _AKF_ tracker, \(V_{max}\) is the maximum feature response, \(d\) is the Euclidean distance, and \(\zeta\) is a parameter set to 0.4. When the _SDM_ value is less than the occlusion threshold (_OT_), i.e., the object is not occluded, we combine _AKF_ and _KCF_ trackers to track the object and obtain its position in the current frame. Simultaneously, the estimated position is further exploited to select the search region in the next frame, avoiding searching in the wrong region. The final object position (_FOP_) is:  
\[\left\{ \begin{array}{c}FOP=(1-\gamma)OP_{KCF}+\gamma OP_{AKF}\ \,\ \ \ SDM\leq OT\\ FOP=OP_{AKF}\ \,\ \ SDM>OT\\ FOP=OP_{KCF}\ \,\ \ without\ convergence\end{array} \right. \tag{20}\]  
where \(OP_{KCF}\), \(OP_{AKF}\) are the object center positions calculated from the _KCF_ and _AKF_ trackers, respectively, and \(OT\) is the occlusion threshold that determines whether the object is occluded or not. After several experimental verifications, we set the occlusion threshold (_OT_) to 3.2. When the _SDM_ value exceeds 3.2, the object is heavily occluded or disappears. The selection of the occlusion threshold will be described in detail in Section 4.2. The algorithm presented in this paper constructs an _AKF_ tracker utilizing the object position obtained by the correlation filter as the observation value to compensate for the object motion trajectory and improve tracking accuracy. During the _AKF_ tracker operation, two critical issues need to be addressed. The first is the convergence problem, where judging the _AKF_ tracker's convergence determines whether the object's motion trajectory can be compensated for the tracking result. This paper solves the convergence problem by calculating the Euclidean distance between the object center position obtained by the _KCF_ and the _AKF_ trackers, which determines whether the _AKF_ tracker has reached convergence, expressed as:  
\[\sqrt{OP_{KCF}-OP_{AKF}}\leq 2 \tag{21}\]  
when the Euclidean distance is less than 2 pixels in 5 consecutive frames, we consider that the _AKF_ tracker has converged. Another problem is setting the state variables. The object's system state \(X_{t}\) is \(X_{t}=\left[x_{center},y_{center},\ \Delta V_{x},\Delta V_{y}\right]\), where \(x_{center},y_{center}\) are the center position's horizontal and vertical object coordinates per frame, \(\Delta V_{x},\Delta V_{y}\) are the object's speed in the horizontal and vertical coordinate directions, respectively, and \(Z_{t}=\left[x_{center},y_{center}\right]\) is the object measurement value, i.e., the object's center position. Since the object's motion time in adjacent frames is very short, the object's motion is regarded as a short-time uniform linear motion, and thus we set the transfer matrix \(A\) and observation matrix \(H\) to be:  
\[A=\left[ \begin{array}{cccc}1&0&1&0\\ 0&1&0&1\\ 0&0&1&0\\ 0&0&0&1\end{array} \right]\!\!,\ \ H=\left[ \begin{array}{cccc}1&0&0&0\\ 0&1&0&0\end{array}