## 3 Implementation
### Deep-Affine Transformation  
Selected feature pairs are used to calculate the geometric transformation parameters which are used to map occluded objects from the front image plane \(\Pi_{\text{a}}\) to the host image plane \(\Pi_{\text{b}}\). Here, we suppose the geometric transformation as the affine transformation. It has the matrix representation as Equation (1). \((p_{a},p_{b})\) represents a matching point pair set in two image planes: \(p_{a}=(x_{a},y_{a})\), \(p_{b}=(x_{b},y_{b})\). \(H\) is the affine matrix and the homogeneous formula is as follows:  
\[\left( \begin{array}{c}x_{b}\\ y_{b}\\ 1\end{array} \right)=\left( \begin{array}{ccc}a_{11}&a_{12}&t_{1}\\ a_{21}&a_{22}&t_{2}\\ 0&0&1\end{array} \right)\left( \begin{array}{c}x_{a}\\ y_{a}\\ 1\end{array} \right) \tag{3}\]  
\(a_{11}\), \(a_{12}\), \(a_{21}\), \(a_{22}\), \(t_{1}\), and \(t_{2}\) are six parameters in the \(H\) matrix. In our situation, two vehicles are running in the same direction and it is reasonable to assume that there is no rotation transformation and shear transformation. So, the parameters \(a_{12}\) and \(a_{21}\) normally approach 0. The parameters \(a_{11}\) and \(a_{22}\) mean the scale factor of the horizontal and vertical coordinate. It could be computed as:  
\[a_{11}=a_{22}=\frac{h_{b}}{h_{a}}=\frac{l_{b}}{l_{a}}\]  
\[a_{11}=\frac{l_{b}}{l_{a}}=\frac{\frac{l_{b}}{l_{a}}}{\frac{l_{b}}{l_{a}}}= \frac{\frac{d_{b}}{d_{ab}}}{\frac{d_{a}}{l_{ab}}}\]  
\[a_{11}=\frac{d_{b}}{d_{a}}\times\frac{d_{ta}}{(d_{ta}+d_{ab})} \tag{4}\]  
Figure 5 represents the geometric constrains of affine transformation and depth information. Take object T as an example, \(l_{a}\) and \(h_{a}\) are the length and width of the \(T_{a}\) bounding box in image plane \(\Pi_{\text{a}}\). Similarly, \(l_{b}\) and \(h_{b}\) represent the length and width of the \(T_{b}\) bounding box in image plane \(\Pi_{\text{b}}\). As illustrated in Figure 5, \(d_{ta}\) means the distance from object T to camera optical center \(O_{a}\), and \(d_{ab}\) is the distance between two cameras. Figure 5: Geometric constraints of the two-vehicle camera model. Depending on the matched feature pairs of object T, the parameters of matrix \(H\) could be calculated. However, object T and occluded object V may have different depths to a camera, which will lead to inaccurate mapping and fusing of object V in image plane \(\Pi_{b}\) (shown in Figure 5) based on the 3D inter-vehicle projection model (in Section 3.1). Here, we introduce the depth information to adjust the parameters in affine matrix \(H\). In the depth map, the value of the pixel represents the depth distance, so we can obtain the distance ratio \(\gamma\) of object T and the occluded object V relative to the camera optics. \[\gamma=\frac{d_{ta}}{d_{ua}} \tag{5}\]  
Suppose the new deep-affine transformation matrix is \(H_{new}\). According to Equation (3), the parameter \(a_{11 new}\) of \(H_{new}\) could be computed as:  
\[a_{11 new}=\frac{d_{b}}{d_{a}}\times\frac{d_{ta}}{d_{ta}+d_{ab}} \tag{6}\]  
\(d_{ua}\) is the distance from occluded object V to camera optical center \(O_{a}\). Because \(d_{ab}\) and \(d_{ua}\) are unknown, Equations (3)-(5) are brought into (6). \[a_{11 new}=\frac{a_{11}\times d_{b}}{a_{11}\times d_{a}+\gamma\times d_{b}-\gamma \times a_{11}\times d_{a}} \tag{7}\]  
Here, we suppose \(d_{a}=d_{b}\) because of two reasons: (1) the value of focal length is much smaller than the distance and (2) our method uses the KITTI dataset which employs the same camera. Equation (7) can be simplified to:  
\[a_{11 new}=\frac{a_{11}}{a_{11}+\gamma-\gamma\times a_{11}} \tag{8}\]  
The same processing procedure is applied to the parameter \(a_{22 new}\). As for the parameters \(t_{1 new}\) and \(t_{2 new}\), their value are related to image size and parameters \(a_{11 new}\), \(a_{22 new}\) with the center remains unchanged.