## 3 Methodology
### Circle Center Fitting Method Based on Weighted Midperpendicular  
As shown in Figure 2, due to the optical distortion of the camera, there will be a certain error [29; 30] between the ideal image point and the true image point, thus affecting the fitting accuracy of the center of the circle. An image point distortion model is shown in Figure 2. Image points \(a\), \(b\) and \(t_{1}\) are the ideal projection points of space points \(A\), \(B\) and \(T_{1}\); image points \(a^{\prime}\), \(b^{\prime}\) and \(t^{\prime}_{1}\) are the actual projection points of space points \(A\), \(B\) and \(T_{1}\); \(t_{1}\) is the midpoint of the line  
\[y_{g^{\prime}}=-f\frac{(-\cos\varphi\sin\kappa-\sin\varphi\sin\omega\sin\kappa)(X_{ g^{\prime}}-X_{S})+\cos\omega\cos\kappa(Y_{g^{\prime}}-Y_{S})}{-\sin\varphi\cos \omega(X_{g^{\prime}}-X_{S})-\sin\omega(Y_{g^{\prime}}-Y_{S})+\cos\varphi\cos \omega(Z_{g^{\prime}}-Z_{S})}-\Delta y \tag{10}\]  
where \(X_{S},Y_{S},Z_{S}\), \(\varphi\), \(\omega\) and \(\kappa\) are the external orientation elements of the camera, and \(\Delta x\), \(\Delta y\) and \(f\) are intrinsic parameters of the camera. According to the coordinates of true image points, the coordinates of ideal image points can be obtained, and the formula is as follows. \[x_{a^{\prime}}=x_{a}-\{k_{1}x_{a}({x_{a}}^{2}+{y_{a}}^{2})+[q_{1}(3{x_{a}}^{2} +{y_{a}}^{2})+2q_{2}x_{a}y_{a}]+s_{1}({x_{a}}^{2}+{y_{a}}^{2})\} \tag{11}\]  
\[y_{a^{\prime}}=y_{a}-\{k_{2}y_{a}({x_{a}}^{2}+{y_{a}}^{2})+[q_{2}(3{x_{a}}^{2} +{y_{a}}^{2})+2q_{1}x_{a}y_{a}]+s_{2}({x_{a}}^{2}+{y_{a}}^{2})\} \tag{12}\]  
where \(k_{1}\) and \(k_{2}\) are radial distortion, \(q_{1}\) and \(q_{2}\) are tangential distortion, and \(s_{1}\) and \(s_{2}\) are poison-prism distortion. Similarly, the coordinates of other ideal image points can be obtained. The \(n\) images and \(m\) midperpendicular are used to calculate the center of the circle. Given the coordinates of point \(t^{\prime}\) and point \(g^{\prime}\), the equation of the \(j\)th midperpendicular on the \(i\)th image is as follows. \[a_{ij}x+b_{ij}y+c_{ij}=0 \tag{13}\]  
Since the space resection is a linear transformation, the similarity between the line \(g^{\prime}t^{\prime}\) and the line \(gt\) in the plane directly determines the confidence of midperpendicular in space. Therefore, the Hough transform is used to convert line \(g^{\prime}t^{\prime}\) and line \(gt\) into parameter space to calculate their similarity. In the parameter space, the expression of line \(g^{\prime}t^{\prime}\) is as follows. \[\rho_{ij1}=\frac{\left|c_{ij}\right|}{\sqrt{{a_{ij}}^{2}+{b_{ij}}^{2}}} \tag{14}\]  
\[\theta_{ij}=\arccos\frac{\left|a_{ij}\right|}{\sqrt{{a_{ij}}^{2}+{b_{ij}}^{2}}} \tag{15}\]  
The angle between line \(g^{\prime}t^{\prime}\) and line \(gt\) is the angle between line \(ab\) and line \(a^{\prime}b^{\prime}\), and the formula is as follows. \[\alpha_{ij}=\arccos\frac{\left|(x_{a^{\prime}}-x_{p^{\prime}},y_{a^{\prime}}- y_{p^{\prime}})\cdot(x_{a}-x_{b},y_{a}-y_{b})\right|}{\sqrt{\left(x_{a^{\prime}}-x_{ p^{\prime}}\right)^{2}+\left(y_{a^{\prime}}-y_{p^{\prime}}\right)^{2}}\cdot \sqrt{\left(x_{a}-x_{b}\right)^{2}+\left(y_{a}-y_{b}\right)^{2}}} \tag{16}\]  
\[\rho_{ij2}=x_{\rm t_{1}}\cos(\theta_{ij}+\alpha_{ij})+y_{t_{1}}\sin(\theta_{ij }+\alpha_{ij}) \tag{17}\]  
The equation of the line in the image plane is converted to the parameter space, and the similarity of the two lines in the image plane is measured by the distance between two points in the parameter space. The greater the distance between two points, the lower the  
Figure 2: Diagram of Image point distortion. similarity is, and vice versa. In order to facilitate calculation, the reciprocal of the square of the distance is used to measure the similarity, so for \(j\)th midperpendicular in space, the expression of their weight is as follows.