*2.2. 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

$$\hat{\mathbf{h}}\_{j} = \underset{\mathbf{h}\_{j}}{\text{argmin}} \sum\_{i=1}^{N} \left\| \omega\_{ij} (\mathbf{A}\_{i} \mathbf{h} - \mathbf{b}) \right\|^{2} = \underset{\mathbf{h}\_{j}}{\text{argmin}} \left\| \mathbf{W}\_{j} \Big(\mathbf{A}^{'} \mathbf{h}^{'} \mathbf{b}^{'}\Big) \right\|^{2} \tag{11}$$

where **h**ˆ *<sup>j</sup>* represents an estimation of the homography matrix of the *j*th image block, ω*ij* is a weight that changes with the coordinate of the center point of the current image block, and **W***<sup>j</sup>* is a diagonal matrix that represents the weights of all matching points, and

$$\mathbf{W}\_{j} = \text{diag}\left( \begin{bmatrix} & \omega\_{1j} & \omega\_{1j} & \cdots & \omega\_{lj} & \omega\_{lj} & \cdots & \omega\_{Nj} & \omega\_{Nj} \end{bmatrix} \right) \tag{12}$$

The weight ω*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. Zaragoza et al. [19] used Gaussian function to calculate the weight

$$\omega\_{ij} = \max\left(\exp\left(-\frac{||\mathbf{x}\_i - \mathbf{x}\_j^\*||^2}{\sigma^2}\right), \gamma\right) \tag{13}$$

where **x**∗ *<sup>j</sup>* represents the coordinate of the center point of the *j*th image block, **x***<sup>i</sup>* represents the coordinate of the *i*th matching point of the image to be transformed, σ is the scale factor, and γ is the minimum weight value, which prevents the weight of some matching points far from the current image block from being too small.

Lin 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{\|\mathbf{x}\_i - \mathbf{x}\_j^\*\|^2}{\nu \sigma^2} \right)^{-\frac{\nu \pm 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-t distribution 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:

$$\mathbf{f}\_{\dot{j}} = \left(\mathbf{A}^{\prime \, \mathrm{T}} \mathbf{W}\_{\dot{j}}^{2} \mathbf{A}^{\prime}\right)^{-1} \mathbf{A}^{\prime \, \mathrm{T}} \mathbf{W}\_{\dot{j}}^{2} \mathbf{b}^{\prime} \tag{15}$$
