## 3 Improved Motion Model Based on PE-Match
### Epipolar Constraint Principle  
Epipolar constraints [27] reduce the distribution of possible matches of a point on another image from two dimensions to one dimension, providing constraints to weed out false matches. The epipolar constraint schematic is shown in Figure 4; \(I_{1}\) and \(I_{2}\) are the image planes of the camera at two moments, \(O_{1}\) and \(O_{2}\) are the camera centers corresponding to the two image planes, and according to the pinhole camera model, it can be known that \(p_{1}\) and \(p_{2}\) are the 2D pixel points mapped by the spatial point \(P\) on the two image planes. The ray \(O_{1}p_{1}\) has a spatial point \(P\) corresponding to pixel \(p_{1}\), and the projection of this ray on the image plane \(I_{2}\) is the epipolar line \(L_{2}\), the pixel point of \(P\) projected on the image plane \(I_{2}\) must be on the epipolar line \(L_{2}\), and \(p_{2}\) matching \(p_{1}\) must be on the epipolar line. A point \(p_{1}\) in the image plane \(I_{1}\) in Figure 4, whose corresponding epipolar line \(L_{2}\) in the image plane \(I_{2}\) can be expressed as follows:  
\[\left\{ \begin{aligned} L_{2}:ax+by+c=0\\ [a,b,c]=\mathbf{F}p_{1}\end{aligned} \right. \tag{1}\]  
In the formula, \(\mathbf{F}\) is the fundamental matrix. The distance from the pixel to be verified to \(L_{2}\) is calculated using the point-to-straight line distance, and if the distance is within a certain threshold, then the pixel is identified as the correct match for \(p_{1}\). As shown in Figure 5, if it is not within the threshold then this matched point pair is rejected. Figure 4: Schematic diagram of epipolar constraint. Figure 5: Schematic diagram of matching point pairs for pole constraint verification. The fundamental matrix \(\mathbf{F}\) is a mathematical representation of the correspondence between pairs of matching points and contains the camera's internal and external reference information. Given the fundamental matrix and the pixel coordinates of image feature points, we can calculate the epipolar line corresponding to the matching point on the other image. Let the spatial position of point \(P\) be \(P=\left[X,Y,Z\right]^{T}\), the pixel positions of the two pixels \(p_{1}\) and \(p_{2}\) are known from the pinhole camera model and represented by Equation (2) as follows:  
\[\left\{ \begin{aligned} s_{1}p_{1}=KP\\ s_{2}p_{2}=K(\mathbf{R}P+\mathbf{t})\end{aligned} \right. \tag{2}\]  
In the formula, \(\mathbf{K}\) is the camera internal reference, \(\mathbf{R}\) and \(\mathbf{t}\) are the camera motion information, and \(s_{1}\) and \(s_{2}\) are constants. Equation (3) is derived from Equation (2) and written as follows:  
\[p_{2}^{T}\mathbf{F}p_{1}=0 \tag{3}\]  
In the formula: \(\mathbf{F}\) is the fundamental matrix, \(\mathbf{F}=\mathbf{K}^{-T}\mathbf{t}^{\wedge}\mathbf{R}\mathbf{K}^{-1}\), which contains the translation and rotation information of the camera. Consider a pair of matching points whose normalized coordinates are \(p_{1}=\left(x_{1},y_{1},1\right)^{T}\), \(p_{2}=\left(x_{2},y_{2},1\right)^{T}\). Equation (4) is obtained from Equation (3) and normalized coordinates:  
\[\left[x_{2}\quad y_{2}\quad 1\right] \begin{bmatrix}f_{11}&f_{12}&f_{13}\\ f_{21}&f_{22}&f_{23}\\ f_{31}&f_{32}&f_{33}\end{bmatrix}\begin{bmatrix}x_{1}\\ y_{1}\\ 1\end{bmatrix} =0 \tag{4}\]  
Given m sets of matches: \(p_{1}{}^{i}=\left(x_{1}^{i},y_{1}^{i},1\right)^{T}\), \(p_{2}{}^{i}=\left(x_{2}^{i},y_{2}^{i},1\right)^{T}\), Equation (5) can be obtained:  
\[ \begin{bmatrix}x_{2}^{1}x_{1}^{1}&x_{2}^{1}y_{1}^{1}&x_{2}^{1}&y_{2}^{1}x_{1} ^{1}&y_{2}^{1}y_{1}^{1}&y_{2}^{1}&x_{1}^{1}&y_{1}^{1}&1\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ x_{2}^{m}x_{1}^{m}&x_{2}^{m}y_{1}^{m}&x_{2}^{m}&y_{2}^{m}x_{1}^{m}&y_{2}^{m} y_{1}^{m}&y_{2}^{m}&x_{1}^{m}&y_{1}^{m}&1\end{bmatrix} f=0 \tag{5}\]  
From Equation (4), the fundamental matrix \(\mathbf{F}\) has nine unknowns. Since the rank of \(\mathbf{F}\) is 2, it reduces the degree of freedom by one.