## 2 Image Registration Algorithm Based on Deep Learning and Local Homography Transformation
### Moving Direct Linear Transformation (MDLT)  
For an image with a certain parallax, the relationship between the reference and target images is no longer a simple homography transformation. In this case, the global homography transformation cannot ensure the accuracy of image registration, and simple local homography transformation will cause a blocking effect, which destroys the visual quality of the image. It is a good choice to use the MDLT algorithm for local homography transformation. The MDLT algorithm not only has high accuracy of image registration, but also can smooth different image blocks, taking into account the accuracy of image registration and the overall visual quality of the image.  
Firstly, the image to be transformed is divided into several image blocks, and then all matching points of the two images are taken into account. For each of the image blocks, according to the central position of the image block, the weights are assigned to all matching points so as to estimate the homography matrix corresponding to this image block. Accordingly, Equation (4) can be rewritten as  
\[\textbf{\hat{h}}_{j}=\underset{\textbf{h}_{j}}{\text{argmin}}\sum_{i=1}^{N}\| \omega_{ij}(\textbf{A}_{i}\textbf{h}-\textbf{b})\|^{2}=\underset{\textbf{h}_{ j}}{\text{argmin}}\ \|\textbf{W}_{j}\left(\textbf{A}^{{}^{\prime}}\textbf{h}^{{}^{\prime}}\textbf{ -b}^{{}^{\prime}}\right)\|^{2} \tag{11}\]  
where \(\textbf{\hat{h}}_{j}\) represents an estimation of the homography matrix of the \(j\)th image block, \(\omega_{ij}\) is a weight that changes with the coordinate of the center point of the current image block, and \(\textbf{W}_{j}\) is a diagonal matrix that represents the weights of all matching points, and  
\[\textbf{W}_{j}=\text{diag}\left(\left[\begin{array}{cccccccc}\omega_{1j}& \omega_{1j}&\cdots&\omega_{ij}&\omega_{ij}&\cdots&\omega_{Nj}&\omega_{Nj}\\ \end{array}\right]\right) \tag{12}\]  
The weight \(\omega_{ij}\) is determined by the distance between the \(i\)th matching point and the center point of the \(j\)th image block. The smaller the distance, the larger the weight. [PERSON] et al. [19] used Gaussian function to calculate the weight  
\[\omega_{ij}=\text{max}\left(\text{exp}\left(-\frac{\|\textbf{x}_{i}-\textbf{ x}_{j}^{*}\|^{2}}{\sigma^{2}}\right),\ \gamma\right) \tag{13}\]  
where \(\textbf{x}_{j}^{*}\) represents the coordinate of the center point of the \(j\)th image block, \(\textbf{x}_{i}\) represents the coordinate of the \(i\)th matching point of the image to be transformed, \(\sigma\) is the scale factor, and \(\gamma\) is the minimum weight value, which prevents the weight of some matching points far from the current image block from being too small.  
[PERSON] et al. [21] proposed another method of calculating weights, using Student-t distribution function instead of Gaussian distribution function, which is represented as  
\[\omega_{ij}=\left(1+\frac{\|\textbf{x}_{i}-\textbf{x}_{j}^{*}\|^{2}}{\
u\sigma ^{2}}\right)^{-\frac{\
u+1}{2}} \tag{14}\]  
Because the student t-distribution function is smoother than the Gaussian distribution function, it is not easy for the block effect caused by local homography transformation to appear, so the student-tdistribution function is adopted in this paper. By using the same analysis method of the DLT algorithm, the estimation of the local homography matrix is finally calculated as follows:  
\[\hat{\textbf{f}}_{j}=\left(\textbf{A}^{\prime\,\mathsf{T}}\textbf{W}_{j}^{2} \textbf{A}^{\prime}\right)^{-1}\textbf{A}^{\prime\,\mathsf{T}}\textbf{W}_{j}^{ 2}\textbf{b}^{\prime} \tag{15}\]