## 2 Materials and Methods
### Image Registrations
The selected key-points are commonly located at building corners or moving vehicles, resulting in a decrease in the quality of registration. In this study, we adopt an improved strategy to overcome this problem. Frame difference is conducted first to separate the whole image into two parts, a stable background and a moving foreground. Key-points are only selected from the stable background in order to improve the quality of the key points. Meanwhile, we use adjacent frames to conduct the alignment operation, using an earlier frame as reference, and the corrected frame will be used immediately for following frames. We repeat this operation until all the frames are adjusted. After image registration, we evaluate the registration accuracy quantitatively. The method used in this paper is based on cross-correlation in images. The cross-correlation coefficient is defined as  
\[R(x,y)=\frac{\sum_{j=-N/2}^{N/2}\sum_{i=-M/2}^{M/2}\big{[}\big{(}f(j)- \overline{f}\big{)}(g(x+j,y+i)-\overline{g})\big{]}}{\left(\big{[}\sum_{j=-N/2 }^{N/2}\sum_{i=-M/2}^{M/2}\big{[}\big{(}f(j)-\overline{f}\big{)}^{2}\big{]} \right)\big{[}\sum_{j=-N/2}^{N/2}\sum_{i=-M/2}^{M/2}\big{[}\big{(}g(x+j,y+i)- \overline{g}\big{)}^{2}\big{]}\big{]}\right)^{1/2}} \tag{9}\]where \(M\) and \(N\) are the row and column of the block, respectively, \(f(j,i)\) is the pixel value at the location of (\(j\),\(i\)) on the reference image, and \(g(x+j,y+i)\) is the pixel value at the location of \((x+j,y+i)\) on the registration image. \[G(x,y,\sigma)=\frac{1}{2\pi\sigma^{2}}e^{-(x^{2}+y^{2})/2\sigma^{2}} \tag{2}\]0  
\[G(x,y,\sigma)=\frac{1}{2\pi\sigma^{2}}e^{-(x^{2}+y^{2})/2\sigma^{2}} \tag{2}\]1  
First, this method needs to produce some control points, which should be distributed as evenly as possible in the reference image. Control point blocks are extracted with the control points at the center, for example, 16 \(\times\) 16 in this paper. Second, the control point block is placed on the registration image, and the convolution operation is carried out within the block. The matching area is 4040 pixels in this paper. The correlation coefficients at each position are calculated, and the position with the largest correlation coefficient is regarded as the homonymy point. This process can be used to evaluate the registration accuracy at the pixel level. Third, the correlation coefficient of the 3 \(\times\) 3 neighborhood around the homonymy points is extracted and used to build a rotating parabola surface. The rotating parabola surface is established as  
\[G(x,y,\sigma)=\frac{1}{2\pi\sigma^{2}}e^{-(x^{2}+y^{2})/2\sigma^{2}} \tag{2}\]2  
where (\(x\),\(y\)) is the location of the pixel in a 3 \(\times\) 3 neighborhood, and \(z\) is the correlation coefficient of each pixel. \(p\) and \(q\) are parameters of the rotating parabola surface, which can be calculated by least squares. If the image sampling interval is infinitesimally small, the correlation coefficient should be continuous on the rotating parabola surface. The location corresponding to the maximum correlation coefficient is the exact matching position. So, the maximum value of the rotating parabola's surface is calculated, and the corresponding point (\(x_{0},y_{0}\)) is regarded as the exact matching position, which will be used to evaluate the registration accuracy at the subpixel level. The registration error of each control point is calculated according to matching error at the pixel level and sub-pixel level. The average value of the errors of all the control points is calculated, which is the registration error of the image.