# RAMC: A Rotation Adaptive Tracker with Motion Constraint for Satellite Video Single-Object Tracking
## 3 Methodology
### Translation Branch with Motion Constraint  
The object angle \(\alpha(t)\) in frame \(t\) can be estimated using the rotation branch. The next stage is to determine the object position \((x,y)\) on the basis of the \(\alpha(t)\). In the translation branch, the input patch of frame \(t\) is first rotated by \(\alpha(t)\), and then the rotated patch is fed into the KCF [10] and optical flow remapping (OFR) modules for accurate positioning. In the KCF module, the issue caused by the object rotation is removed to ensure that tracking can be achieved using the appearance information of the object, as described in Section 2.2. In the OFR module, the optical flow represents the apparent motion of the brightness patterns and captures the motion magnitude and direction information between adjacent frames [48]. Therefore, the motion state of the object in the previous frame can be remapped to the current frame using the optical flow feature. To achieve the per-pixel motion constraint information, we employ Farneback dense optical flow [49] to remap previous response maps into the current frame. For the dense optical flow, it approximates the neighborhoods of each pixel using a quadratic polynomial. Given a local signal model, the local coordinate system \(E(X)\) of pixel \(X=(x,y)^{T}\) can be expressed as  
\[E(X)=\ X^{T}AX\ +\ B^{T}X\ +\ C, \tag{15}\]  
where \(A\in\mathbb{R}^{2\times 2}\), \(B\in\mathbb{R}^{2}\) and \(C\) denote the coefficients of the quadratic polynomial, which are estimated using a weighted least-squares method. The polynomial coefficients of the neighborhood change with the pixels of the frame. When a pixel is moved by displacement \(D\), a new local system is constructed as follows:  
\[ \begin{split} E_{2}(X)=E_{1}&(X-D)=(X-D)^{T}A_{1} (X-D)+{B_{1}}^{T}(X-D)+C_{1}\\ &=X^{T}A_{1}X+(B_{1}-2A_{1}D)^{T}X+D^{T}A_{1}D-{B_{1}}^{T}D+C_{1 }\\ &=X^{T}A_{2}X+{B_{2}}^{T}X+C_{2}\end{split} \, \tag{16}\]  
where \(A_{2}=A_{1}\), \(B_{2}=B_{1}-2A_{1}D\) and \(C_{2}=D^{T}A_{1}D-{B_{1}}^{T}D+C_{1}\) according to the equality of the polynomial coefficients. From the equation \(B_{2}=B_{1}-2A_{1}D\), we obtain \(D=-\frac{1}{2}{A_{1}}^{-1}(B_{2}-B_{1})\) and solve it by minimizing the objective function:  
\[e(X)=\parallel AD-\Delta B\parallel^{2}, \tag{17}\]where \(\Delta B=-\frac{1}{2}(B_{2}-B_{1})\). In order to suppress the excessive noise caused by single-point optimization [49], the neighborhood \(\delta\) of pixel \(X\) is integrated to obtain the solution from  
\[arginit_{D(X)}\sum_{\Delta X\in\delta}\omega(\Delta X)\parallel A(X+\Delta X)D( X)-\Delta B(X+\Delta X)\parallel^{2}, \tag{18}\]  
where \(\omega(\Delta X)\) denotes the 2D Gaussian weight function of the neighborhood points. The displacements of the pixels can be solved by  
\[D(X)=\left(\sum\omega A^{T}A\right)^{-1}\sum\omega A^{T}\Delta B. \tag{19}\]  
The optical flow obtained represents the direction and magnitude of each pixel in the frame. The response map containing the historical states of the object is then remapped to the current frame for positioning. For the remapping, it is the process of transferring each pixel of the original image \(g(x,y)\) with size \(M\times N\) to the target image \(G(x,y)\). The process is  
\[G(x_{i},y_{j})=g\big{(}R\big{(}x_{i},y_{j}\big{)}\big{)},i\in\{1,\cdots,M\},\ j\in\{1,\cdots,N\}, \tag{20}\]  
where \(R\) denotes the mapping relationship that specifies the motion direction and magnitude of each pixel in the original image. Therefore, the optical flow at frame \(t\) can be regarded as the mapping relationship \(R\big{(}x_{i},y_{j}\big{)}=D\big{(}x_{i},y_{j}\big{)}\), and the previous response map at frame \(t-1\) is remapped to the current frame \(t\), as shown in Figure 4.  
We implement object tracking with motion constraint in the SVs in the translation branch. To comprehensively exploit the motion and appearance information, the OFR module works with the KCF module to obtain the object position \(pos\left(t\right)\), thereby addressing the tracking drift.