3.1. Space Resection of a Single Image Based on the Collinearity Equation with Additional Parameters
In this experiment, the image points in a single aerial image are simulated for space resection. It is assumed that the local coordinate system is a North-East-Down (NED) coordinate system, the flight altitude is 50 m, the design focal length of the camera is 9 mm, the pixel size is and the image width and height are 5472 pixels and 3648 pixels. At the moment of exposure, the focal length is 8.9 mm, the coordinates of the principal points are and the elements of exterior orientation are . This experiment is carried out according to the following steps:
Step 1: Simulate the data. The values of and of the ground points are centered on the plane coordinates of the camera station, which are uniformly distributed in the range of and . And the values of are in the range of [−1, 1] since the origin of the NED coordinate system is set on the ground. A total of 120 image coordinates, and the corresponding ground point coordinates, are simulated, and Gaussian noises are added to the image coordinates as observations.
Step 2: Select the distortion models. The Brown model, quadratic polynomial (QP) model and Fourier model are regarded as distortion models, which are added to the collinearity equation to form the self-calibration models.
Step 3: Initialization. The initial values of the angle elements of the exterior orientation are set to
, the initial value of
is
and the initial values of
and
are calculated according to the following formula
where
is the number of ground points. The initial values of the elements of the interior orientation are
, and the initial values of the additional parameters are set to 0. The normalized image coordinates are substituted into the self-calibration models composed of the three distortion models.
Step 4: Solve the parameters. The LM algorithm based on the forward difference, backwards difference and central difference methods with the gain ratio and the H-K formula (LMFDM+h, LMBDM+h, LMCDM+h, LMFDM+HK, LMBDM+HK and LMCDM+HK) are used to solve the parameters. The elements of the interior orientation, and additional parameters, are determined while solving for the elements of the exterior orientation.
The experiment evaluates the performance of the algorithms from the following aspects: the accuracy is compared using the sum of squared residuals (SSR), the maximum residuals of the image points, the reprojection errors (REs) and the true errors of the parameters; the efficiency is compared using the number of iterations and the running time; the influence on the ill-conditioning is compared using the condition number; the stability of the solution is analyzed using the ridge trace curve.
Table 1 presents the SSR and the maximum residuals of each algorithm at the optimal solution. It can be seen from
Table 1 that, for the same algorithm, the fitting accuracy of different models for image coordinate observations is high, and the SSR of the Fourier model is generally the smallest, reaching an accuracy of
. Because the three difference methods are consistent in the approximation of the Jacobian matrix, the difference between the results obtained by the three difference methods is small. In contrast, the performance of the LM algorithm based on CDM is better. For the maximum residuals obtained by the LM algorithm based on the gain ratio (LM
h) and the improved LM algorithm based on the H-K formula (LM
HK), there is no significant law, which means that the LM
HK algorithm has a poor fitting effect on image points with a large error. However, the SSR corresponding to the LM
HK algorithm is generally smaller, reaching an accuracy of
, indicating that the LM
HK algorithm has a higher fitting accuracy for the observations. According to the introduction of the H-K formula in
Section 2, the H-K formula can determine a small damping factor and less bias is introduced, so that the solution of the parameters can reach a higher accuracy. This is proved by the comparison results of the LM
h algorithm and LM
HK algorithm. Through the above analysis, another discovery obtained from the table is explained: for the same model, the LM
CDM+HK algorithm can reach the same or higher accuracy as other algorithms.
The LM algorithm based on CDM shows a better performance in
Table 1. Therefore, in order to show the accuracy of the improved LM algorithm more clearly and intuitively,
Figure 2 and
Table 2 present the distribution and the root mean square error (RMSE) of reprojection errors (REs) obtained by the LM
CDM+h and LM
CDM+HK corresponding to each model. In
Figure 2, the dotted line indicates the position where the RE is 1 pixel. It can be seen from
Figure 2 that the maximum of the REs for all methods is less than 2 pixels. For the same model, the number of image points with an RE greater than 1 pixel in the results of the LM
CDM+HK algorithm is generally less than that of the LM
CDM+h algorithm, and a consistent conclusion can be obtained from
Table 2: the RMSE corresponding to the LM
CDM+HK algorithm is the same as or smaller than that of the LM
CDM+h algorithm, which indicates that the LM
CDM+HK algorithm can reach the same or higher accuracy as the LM
CDM+h algorithm. For the same algorithm, the RMSE of the Brown model is the closest to 1 pixel, which is the worst accuracy of all the methods. The Brown model considers radial distortion and decentering distortion without considering other forms of distortion. The QP model and Fourier model, established from the perspective of function approximation, can accurately fit the unknown distortion in the image. The accuracy of the Fourier model solved by the LM
CDM+HK algorithm is less than 0.8 pixels, which is the highest accuracy of all methods.
Table 3 presents the true errors of the parameters. It can be seen from
Table 3 that the parameter estimates of LM
CDM+h and LM
CDM+HK have an equivalent accuracy. From the true error of the exterior orientation elements, it can be found that, compared with the LM
CDM+h, the true error obtained by the LM
CDM+HK is generally smaller and the result is closer to the true value.
Figure 3 shows the iterative changes in the SSR for different models solved by LM
CDM+h and LM
CDM+HK. In order to clearly show the difference, the first iteration has been removed.
Table 4 presents the number of iterations and the running time of each algorithm and model. According to
Table 4, the number of iterations and the running time of the LM
HK algorithm are generally less than those of the LM
h algorithm, indicating that a high fitting accuracy can be obtained by the improved algorithm, with a higher iterative efficiency. According to the running time, compared with the LM
CDM+h algorithm, the efficiency of the LM
CDM+HK algorithm is improved by 64%, 55% and 33% corresponding to the three models. The algorithms using CDM to approximate the Jacobian matrix require more time, which is consistent with the principle of central difference. Compared with FDM and BDM, CDM needs to calculate one more approximate partial derivative of each variable in the iteration within the difference step range, and the calculational burden is the largest. As shown in
Figure 3, the LM
CDM+h algorithm makes the SSR of the Brown model reach a stable state after five iterations, which indicates that the descending speed is slower. However, the LM
CDM+HK algorithm makes the SSR of all models stable after three iterations.
To further analyze the performance of the improved LM algorithm based on the H-K formula, a ridge trace analysis of the different methods is carried out.
Figure 4 shows the ridge trace curves of
changing with the damping factor at the optimal solution.
Table 5 shows the condition number (C/C
0) of the normal matrix with or without the damping factor. It can be seen from
Table 5 that both the LM
CDM+h algorithm and the LM
CDM+HK algorithm can reduce the condition number of the matrix and weaken the ill-conditioning, and the effect of the LM
CDM+h algorithm is more significant. Especially for the Brown model and the QP model, the condition number is reduced to 26.823 and 32.576, which can be considered to mean that the matrix is well-posed. However, it can be seen from
Figure 4 that the order of magnitude of the damping factor for the Brown model, QP model and Fourier model should be
,
and
. According to the selection principle of the damping factor and
Table 5, the actual value determined by the LM
CDM+h algorithm is generally too large, while the values of damping factor determined by the LM
CDM+HK algorithm are relatively consistent with the trend of the ridge trace curves, which is closer to the result of the ridge trace analysis. Therefore, it is found that the LM
CDM+h algorithm weakens the ill-conditioning of the normal matrix more significantly, since this algorithm changes the structure of the normal matrix by selecting a larger damping factor. Upon the premise of changing the structure of the normal matrix as little as possible, the LM
CDM+HK algorithm can weaken the ill-conditioning to a certain extent and make the solution stable by selecting a smaller damping factor.
3.2. Measurement of a Coin Diameter Using a Single Camera
Experiment 3.1 shows that the LM algorithm based on CDM presents a better performance in solving the self-calibration model. Therefore, LM
CDM+h and LM
CDM+HK are used to measure the diameters of coins using a single camera in this experiment. Nine images of a calibration pattern are taken from different angles to calibrate the camera by Zhang’s calibration method. Taking the calibration result as the initial value and using the detected point of the last image, LM
CDM+h and LM
CDM+HK are combined with the Brown model, QP model and Fourier model to estimate the model parameters and then measure the diameters of the coins. The detected points and the coins are shown in
Figure 5. The SSR and the maximum residuals in pixels of each algorithm and model are shown in
Table 6.
It can be seen from
Table 6 that the accuracy of all the models and algorithms is high, since good initial values are obtained. The SSR and maximum residuals of the LM
CDM+h algorithm and LM
CDM+HK algorithm are consistent, which indicates that the fitting accuracy is equivalent. The orders of magnitude of SSR and the maximum for the Brown model are
and
. For the same algorithm, the accuracy of the Brown model is lower, while the accuracy of the QP model and Fourier model are higher, which indicates that the image has other forms of distortion except radial distortion and decentering distortion, and the mathematical model can compensate for these distortions more effectively.
Table 7 presents the number of iterations and running time. It can be seen from
Table 7 that the LM
CDM+HK algorithm has a higher iteration efficiency than LM
CDM+h. This is consistent with the conclusion in
Section 3.1. According to the running time, the efficiency of the LM
CDM+h algorithm is improved by 12%, 28% and 30% corresponding to the three models. For the same algorithm, the QP model and Fourier model need fewer iterations, while the Brown model requires more iterations. However, the running time of the Brown model is the least, since the model has the least number of distortion parameters.
To measure the coins, the top-left and top-right corners of the bounding box are converted into world coordinates. Then the Euclidean distance between them is calculated in millimeters. The actual diameter is 19.05 mm. The diameters of the coins calculated by different methods are shown in
Table 8. It can be seen from
Table 8 that the numerical results calculated by the different methods are consistent. The measurements of the first coin and the second coin are accurate to within 0.004 mm and 0.164 mm. All the methods have a sufficiently high accuracy.