1. Introduction
The precision modelling of the intrinsic geometry of a camera is essential to the various applications of the vision-based measurements acquired with the visual sensors. Digital cameras are the most widespread visual sensors applied to vision-based measurements due to their generality and affordability. The camera mathematical model is developed based on the intrinsic camera parameters (ICPs). ICPs obtained from the process of camera calibration are a key factor in accurate vision-based measurements in the field of instrumentation and measurement [
1]. This is especially true in the fields of photogrammetry (PH) and computer vision (CV). Although both fields consider the intrinsic camera geometry as a perspective projection (pinhole camera model) with the lens distortion model, the adopted ICPs of the associated mathematical models in these two fields differ. Consequently, researchers from one field are frequently confused when using camera parameters obtained from a camera calibration software package developed in the other field. To ameliorate this problem, this paper clarifies the ICP definitions used in each field and proposes an ICP transformation algorithm for greater interoperability between both fields.
In the field of PH, the calibration of metric cameras has been studied since the 1960s [
2]. The parameters derived to describe the intrinsic camera geometry are known as interior orientation parameters and are applied to correct image measurements to satisfy the geometry of a perspective projection. During the era of film cameras, the major items of calibration included lens aberrations, film deformation, the focal length and the principal point [
3]. In film cameras, the principal point must be determined using fiducial marks fixed inside the camera; such cameras are called metric cameras. In digital cameras, the visual sensor is usually fixed inside the camera, so the principal point can be determined without the need for fiducial marks. Furthermore, the deformation of visual sensors is negligible. Therefore, the focal length, the principal point and lens aberration of digital cameras have become the standard parameters in modelling [
4]. Lens aberration in Brown’s [
3] model incorporates the radial distortion and decentring distortion. Additional parameters, such as affine distortion [
5] and chromatic aberration [
6], can also be adopted. Such a calibration model can also be extended to other kinds of cameras, such as a hemispheric camera [
7], RGB-D camera [
8], thermal camera [
9] and line-scan camera [
10].
In the field of PH, lens aberrations are modelled as correction equations in which lens distortion terms are a function of distorted image coordinates [
3]. The advantage of this method is that image measurements can be directly corrected against lens aberrations using the calibrated lens distortion parameters. This allows corrected image points to be applied in the calculation of bundle adjustment. Through bundle adjustment, 3D coordinates of object points corresponding to the measurements of image tie points can be computed with reasonable precision. In the past, this approach was beneficial to aerial photogrammetry for mapping and surveying [
11].
Camera mathematical models have also been developed and utilized in the field of CV. These CV models originated from the field of PH [
12,
13]. Similarly, ICPs related to lens distortion have been widely adopted and have become the classic approach [
14]. The basic mathematical model in CV for a camera is based on a pinhole camera model compensating for lens distortion [
13]. Although many variations have been proposed in the literature, almost all of them have been based on this model. This compensation model can be considered as the inverse of the correction model applied in the field of PH. It has been adopted and become the standard in the field of CV without undergoing any major modifications since its introduction [
15]. By applying this compensation model, image lens distortion can be efficiently rectified. For the calculation of image rectification, the plane where the coordinates of image points are measured is named the frame buffer, and the plane where normalized image points are located is named the CCD plane [
16]. The CCD plane is defined instead as the normalized image plane in the textbook [
17]. At present, normalized image points are often used in computation; for example, they may be used to find the essential matrix [
18]. To improve the convenience of generating rectified images, lens distortion terms are chosen to be a function of undistorted image coordinates. The advantage of this mathematical model is that the rectified image can be resampled from the original image efficiently without additional iterative calculations.
Wang et al. [
19] performed a comparison of the coordinate systems, parameter definitions and the camera models commonly applied in the fields of PH and CV. Based on this comparison, they provide a linear transformation of the camera model defined in PH to that defined in CV. This linear transformation is only applicable to radial distortion parameters lower than the third order; therefore, it would not be suitable for highly distorted camera lenses. Drap and Lefèvre [
20] proposed an exact formula for inverse radial lens distortions. However, the inversed radial lens distortion parameters defined in this study cannot be applied directly to common CV software, due to the different definition of image coordinates. Furthermore, this transformation does not include the decentring distortion parameters. Hastedt et al. [
21,
22] presented a table for the transformation of ICPs commonly used in the fields of PH and CV without laying out the derivation process for the conversion. For the validation, they merely demonstrated the transformation of ICPs from CV model to PH model; the other way around was not validated.
In summary, previous studies have noticed the differences of camera models defined in both fields, and some simplified transformation methods have been provided. For the convenience of applying software packages developed in both fields interactively, further studies are needed to provide a comprehensive interpretation and a complete transformation of ICPs commonly applied in both fields.
Hence, the differing models used in each field give rise to confusion among researchers. Because mathematical camera models in the fields of PH and CV are defined differently, the ICPs applied in these two fields cannot be transformed directly. Some proposed simplified methods use closed-form formulas to transform only the dominant ICPs. Although such methods are convenient, the resulting transformations are incomplete, and the accuracy of the converted parameters may be insufficient. This paper proposed a method for comprehensive transformation between PH and CV camera models. The proposed method can be used to transform a complete set of ICPs, including focal length, principal point, radial distortion, decentring distortion, affinity, and shear. This method would be important for those who are treating camera calibration as a critical issue.
Therefore, this paper had three objectives: (1) explicate the camera mathematical models used in both fields and list the equations for image correction according to their respective ICPs; (2) develop a general method for transforming ICPs between the PH and CV models; (3) discuss and analyze the transformed ICP values, rectified images and distortion plots. The three main contributions of this paper are as follows. First, mathematical camera models in the fields of PH and CV are both analyzed in detail. The related equations of ICPs are listed explicitly. Second, a ICP transformation algorithm is proposed. The algorithm uses least-squares adjustment to convert the ICPs by using image points involving ICPs defined in PH and CV image frames. This solves the main problems associated with conventional methods based on simplified formulas. The ICPs can be converted completely between fields of PH and CV, so that the number of converted ICPs obtained using the proposed method is identical to the original number. Selecting suitable image points can improve the accuracy of the generated adjustment model. Finally, this paper summarizes the results of testing the proposed transformation algorithm bidirectionally between the PH and CV models to evaluate the algorithm’s performance.
4. Experimental Results
The test cameras, a Sony A6000 (Sony Group Corporation, Tokyo, Japan) and GoPro Hero 4 (GoPro, Inc., San Mateo, CA, USA), are characterized by different degrees of lens distortion. The specifications of these two cameras are listed in
Table 2. The cameras were calibrated using typical camera calibration software, respectively applied in the fields of PH and CV to demonstrate the differences between the ICPs, which are produced during the calibration processes in the different fields. Second, to verify the proposed method, both the PH-to-CV and CV-to-PH transformations were executed. In addition, different image point selection strategies were applied to test their effects on the performance of the proposed transformation algorithm.
4.1. Camera Calibration Method
The camera calibration methods used in the fields of PH and CV differ. The technique in the field of PH is more rigorous, and includes a greater number of camera parameters [
26]; whereas, the technique in the field of CV emphasises automation, efficiency and versatility [
27]. Remondino and Fraser [
23] performed a detailed review of the calibration approaches used in the fields of PH and CV. In this paper, only one method was selected for each camera mathematical model, to reduce complexity. A rotatable table with coded targets [
28] and Australis photogrammetric software (version 8.0, Photometrix, Melbourne, Australia) [
29] were used for PH camera calibration. A checkerboard [
24] and the Camera Calibrator app in MATLAB (version R2021b, The MathWorks, Inc., Natick, MA, USA) [
30] were used for CV camera calibration.
Figure 7 displays the representative camera calibration methods from the fields of PH and CV used in this paper.
Although the definition of image frame in Australis photogrammetric software is not the same as the one adopted in the paper. Based on Equations (2) and (3), the related coordinates of image points and principal point have been converted to the image frame as defined in pixel unit. Therefore, the proposed method for transforming ICPs can still be implemented.
Table 3 lists the calibration results of the Sony camera.
Table 4 lists the calibration results of the GoPro camera. The focal length in the PH calibration method was measured in millimeters, whereas in the CV calibration method, they were measured in units. The units of the lens distortion parameters also differed between the two camera mathematical models. As shown in
Table 3 and
Table 4, the PH and CV models had millimeter-derived units and a generic ‘unit’, respectively. As mentioned in the previous section, this unit is related to the focal length. In addition, according to Equation (7),
and
are only coefficients, so there is not unit.
Consequently, the two types of ICPs and their standards of precision are not the same. Values of ICPs in the same mathematical camera model can be compared, but the precision of ICPs from different models cannot be compared. Nevertheless, the overall precision in both the PH and CV calibration results was less than 1.5 pixels, according to the calibration reports in our experiments. For the Sony camera, the overall precision achieved when the PH and CV calibration methods were applied was 0.27 and 0.71 pixels, respectively. For the GoPro camera, the overall precision achieved when the PH and CV calibration methods were applied was 0.30 and 1.48 pixels, respectively.
4.2. ICP Transformation Results: From the PH to CV Standard
The proposed algorithm uses several image point selection strategies to account for the effects of the number and distribution of selected observation points. The first strategy involves three selected observation points with an intensive distribution (Case 1). The second involves three selected observation points with an extensive distribution (Case 2). The third involves 12 selected observation points evenly distributed across the whole image (Case 3). The last involves 4800 selected observation points placed at regular intervals across the whole image, ensuring an even distribution (Case 4). The selected observation points of Cases 1 to 4, when the Sony camera was used, are displayed in
Figure 8. The experimental design adopted when the GoPro camera was used was identical. We implemented these strategies and compared four sets of results with the original calibration results obtained using the CV method.
4.2.1. Sony A6000 Results
Table 5 displays the Case 1 to 4 results obtained when the Sony camera was used. The focal length and principal point values obtained from the calibration and conversion methods differed by a maximum of 12 pixels. Overall, each ICP value was similar between the different methods, indicating that the proposed transformation algorithm is feasible.
Notably, was negative for the CV method results and positive for the PH method results. Normally, is positive for PH method results for most cameras due to barrel distortion. These two camera mathematical models are inversely related. Therefore, the range of in the converted results is the inverse of the original range. However, the other distortion parameters, including , and , may not accord with the aforementioned condition because they are much less influential than .
The numerical results in
Table 5 do not clearly indicate which set of ICPs is optimal. Therefore, we generated rectified images using ICPs obtained from each method. The effects of rectification (with relevant image resolutions listed) are illustrated in
Figure 9. The differences were most visible in the four corners of each image. The distortion correction in Case 1 was more obvious than that in the other cases; however, the five rectified images look similar to the original images because of the small amount of lens distortion. Moreover, the differences in the resolution of the images, rectified using different methods, were minimal. The difference in resolution between the original image and each rectified images was less than 60 pixels.
The radial distortion and decentring distortion plots generated with the CV model are displayed in
Figure 10. For each radial distortion plot, the red, blue and pink solid lines indicate
,
and
, respectively. The black dotted line indicates the overall radial distortion curve. For each decentring distortion plot, the red and blue solid lines indicate
and
, respectively. The black dotted line indicates the overall decentring distortion curve. The values in the
x- and
y-axes in each figure are in pixels. In both plots, the boundary of
x-axis is 3500 pixels. The curves obtained using the CV method can be used as a reference to evaluate the fit of the curves in Cases 1 to 4.
For the radial distortion plot, the range of the y-axis is from −100 to 100 pixels. Although only three observation points were selected in Cases 1 and 2, the curves in Case 1 were steeper, indicating that the distortion of the image points closer to the edge is greater. The curves in Case 2 were consistent with the curves obtained using the CV method. Therefore, using three observation points with an extensive distribution is a more feasible transformation strategy. The curves in Cases 3 and 4 were nearly identical, indicating that using 12 observation points with an even distribution can achieve transformation results equivalent to those that can be obtained using 4800 observation points. The curves in Cases 3 and Case 4 and the curved obtained using the CV method were similar. For all methods, the curve decreased. As mentioned, the PH and CV models are inversely related; this is evident in the radial distortion plot. For the decentring distortion plot, the range of the y-axis is from −0.001 to 0.001 pixels. Although the difference between each curve was small, in general, the curve for the CV method had the steepest gradient.
In summary, the number of selected observation points and distribution both affect the transformation of ICPs. After these two factors were accounted for, the curves in Case 4 had the smallest gradients, indicating that the corresponding method achieved the most favorable results. This indicates that ICPs converted based on image points selected at a set interval across the whole image are more suitable for the Sony camera. These ICPs also yielded better results than the original ICPs calibrated by the checkerboard.
4.2.2. GoPro Hero 4 Results
The results of Cases 1 to 4 for the GoPro camera are listed in
Table 6. Focal length values obtained from the calibration and conversion methods differed greatly. The difference was approximately 67 pixels. By contrast, the principal point values differed slightly. Furthermore, the radial distortion of the GoPro camera belongs to barrel distortion, so that
was also negative in the CV method. The results of the four cases were not completely consistent. Nevertheless, the corresponding ICP values acquired using the different methods were still similar, demonstrating the feasibility of our transformation algorithm.
Again, we generated rectified images using ICPs to evaluate which set of ICPs was superior. The rectified images and their corresponding resolutions are presented in
Figure 11.
Because the lens distortion of the GoPro camera was much larger, the effects of rectification were much more noticeable. The rectified image in Case 1 was considerably deformed, but the rectified image in Case 2 was similar to the image rectified using the CV method, indicating that if only three observation points are selected, the distribution of the points is crucial. However, in the image in Case 2 and the image obtained using the CV method, distortion was still visible in the corners; for example, the images depicted three traffic cones instead of two, and a twisted building. Regarding the rectified image Case 3, although some slight distortion remained in the part of the image depicting the road and tree, the rectified image was of higher quality than the original image and similar to the rectified image in Case 4. The image in Case 4 still exhibited the least distortion, indicating that the number of observation points is also a key factor in transformation. In addition, the resolution of the images rectified by these methods differed from that of their corresponding original images by at least 1300 pixels.
The radial distortion and decentring distortion plots defined in the field of CV are depicted in
Figure 12. For each radial distortion plot, the red, blue and pink solid lines indicate
,
and
, respectively. The black dotted line indicates the overall radial distortion curve. For each decentring distortion plot, the red and blue solid lines indicate
and
, respectively. The black dotted line indicates the overall decentring distortion curve. The values on the
x- and
y-axes in each figure are in pixels. The boundary of the
x-axis is 2500 pixels.
For the radial distortion plot, the range of the
y-axis is −500 to 500 pixels. Because the distortion of the GoPro camera was larger, the overall curve decreased earlier than the curve for the Sony camera. The curves in Case 1 were steeper than those in Case 2 because of the larger
and
values. The curves in Case 2 look like the curves obtained using the CV method. Therefore, an extensive distribution of observation points is more effective for transformation. The curves in Case 4 look like those in Case 3. This indicates that using 12 evenly distributed observation points can achieve transformation results similar to those that can be obtained using 4800 observation points. Overall, the
,
, and
curves in Case 4 were smoother than those in the other cases and those obtained using the CV method. As indicated in
Figure 11, the ICPs in Case 4 were sufficient for the accurate rectification of the images. For the decentring distortion plot, the range of the
y-axis is from −0.001 to 0.001 pixels. The overall curve in Case 4 was still significantly smoother than the others.
In summary, the number and distribution of the observation points must both be considered in the transformation of ICPs. The results obtained in Case 4 were superior to those obtained in the other cases in terms of radial distortion and decentring distortion. This indicates that ICPs converted based on image points selected at a set interval across the whole image are more suitable for the GoPro camera. These ICPs were also better than the original ICPs calibrated by the checkerboard.
4.2.3. Comparison with the State of Art
To validate the performance, the proposed method is compared with the state of art method presented by Hastedt et al. [
21,
22]. The Case 4 results of the proposed method are adopted for the comparison.
Table 7 and
Table 8 list the transformed ICPs resulting from both methods, with respect to Sony and GoPro cameras. The rectified images generated by applying both methods are also shown in
Figure 13 and
Figure 14, respectively.
Table 7 and
Table 8 show that the values of
resulting from two methods are apparently different. Compared with the CV calibration results for validation, the values of
for both cameras should be negative rather than positive. If we take the difference between the converted
value and the validated one, using our method results in differences of 0.0130 and 0.0479 for the Sony and GoPro cameras, respectively. However, the differences are 0.1478 and 0.5534 when using the state of art method. Therefore, the improvement percentages of transformation are 91.2% and 91.3% for the Sony and GoPro cameras, respectively. The values of
and
are also quite different from the validated values. It is noteworthy that this improvement would affect the image rectification significantly. By checking the rectified images resulting from both methods, shown in
Figure 13 and
Figure 14, we can see apparent improvement in image rectification when using our method, especially when applied to the GoPro camera. In conclusion, our method outperforms the state of art method when a camera with severe lens distortion is applied, although it needs more computational effort.
4.3. ICP Transformation Results: From the CV to PH Standard
Our results indicate that the interval selection of image points is preferred. Therefore, only the interval selection strategy was included for comparison in the part of the experiment described in this section. ICPs of images from the Sony camera and GoPro camera, generated with the CV model, were transformed into PH-type ICPs.
Table 9 lists the results for the image from the Sony camera.
Table 10 lists the results for the image from the GoPro camera.
In the results of these two tables, the converted ICPs were comparable to the original ICPs. We also conducted the simplified adjustment model in which the affinity factor is ignored. The converted ICPs remain the same, even if is not included for the conversion. This demonstrates the feasibility of our proposed algorithm. For the Sony camera, the focal length, principal point and distortion parameters were all similar. For the GoPro camera, the difference in principal points was smaller. However, the differences in the focal length and lens distortion parameters were obviously larger, especially and . These results were very similar to the results for the PH-to-CV transformation. For the parameter of affinity, is very small. Based on Equation (7), its influence is quite insignificant compared with other distortion parameters; therefore, it is often ignored in the field of PH.
By using Equations (4)–(6), the correction amounts of lens distortion can be calculated. We checked the correction amounts at four selected points on the original image, and compared the cases using the original ICPs (PH) and the converted ICPs (CV to PH).
Table 11 and
Table 12 display the numerical results of corrections for Sony and GoPro cameras, respectively. The correction vectors are also shown in
Figure 15 and
Figure 16, respectively, in which blue dots indicate the selected points and red vectors indicate the corresponding corrections. For both applied cameras, the numerical differences between the compared cases are not significant. This comparison indicates that the proposed method for converting ICPs from CV standard to PH standard is applicable.
6. Conclusions
This paper expounds the mathematical camera models commonly applied in the fields of PH and CV. The discussion focuses on the different definitions of ICPs, including the focal length, principal point, lens distortion, affinity and shear. This discussion would help researchers to interpret ICPs obtained from the use of software packages developed in both fields.
Based on the discussion, we developed a least-squares adjustment method to transform ICPs between the conventionally used parameters in both fields. This method converts all ICPs usually applied to modern digital cameras, for example, radial distortion, decentring distortion, affinity, and shear parameters. Because both of the transformation models are linear, the calculation process is relatively efficient. The proposed method was verified with a Sony single-lens camera and a GoPro camera, both calibrated with camera calibration software typically used in the fields of PH and CV. Successful transformations of ICPs used in both fields were demonstrated. The accuracy of the transformation may have been slightly affected by the selection of image points. In general, selected image points at regular intervals across the entire image achieved the most favorable results, because this selection strategy accounted for both the number and distribution of selected observation points.
In addition, the comparison with the state of art demonstrates that the proposed method has superior performance. For converting the major parameter of radial distortion (), the improvement percentages are 91.2% and 91.3% for the Sony and GoPro cameras, respectively. We consequently confirm that our method can improve the conversion of ICPs between models.
Camera calibration software applied in the field of CV commonly performs self-calibration bundle adjustment of overlapped images captured on a specially designed checkerboard. Consequently, the detected feature points are distributed relatively on a plane in the object space. However, coded targets distributed in a three-dimensional space are typically applied in the field of PH. The distribution of the detected object points can be considered the strength of the control space, which will affect the accuracy of derived ICPs. This effect is evident in the test which transformed ICPs obtained using CV software to the ICPs in the field of PH. The rectified images are obviously distorted in the border area of the rectified images. Therefore, where accurate ICPs are concerned, the photogrammetric camera calibration method is preferable to those applications.