IMPLEMENTATION OF ZOOM-DEPENDENT CAMERA CALIBRATION IN CLOSE-RANGE PHOTOGRAMMETRY

: The application of consumer-grade cameras for photogrammetric measurement has traditionally been subject to the requirement that imagery is recorded at fixed zoom and focus settings. The camera is then metrically calibrated, usually via self-calibration, for the lens setting employed. This requirement arises since camera parameters, and especially principal distance and lens distortion coefficients, vary significantly with zoom/focus setting. A recently developed process, titled zoom-dependent (Z-D) calibration, removes the necessity for the zoom setting to be fixed during the image capture process. Implementation of Z-D calibration requires that the camera be pre-calibrated at four or more focal settings within the zoom range, nominally at shortest and longest focal lengths, and at two mid-zoom settings. This requirement, coupled with issues of data management in carrying different focal settings for potentially every image within a bundle adjustment, has largely accounted for the reason that Z-D calibration has not previously been implemented within COTS software for close-range photogrammetry. The objective of this paper is to describe the practical implementation of Z-D calibration within software, along with its associated workflow, and to discuss issues that impact upon the accuracy, reliability and appropriateness of the technique. Experimental testing is used to highlight the merits and shortcomings of Z-D calibration.


INTRODUCTION
Cameras employed for photogrammetric measurement have traditionally utilised unifocal lenses where, for a give focus setting, a fixed camera model can be applied.The parameters of this model are well-known: the principal distance, principal point offsets and coefficients of radial and decentring distortion.These parameters are physically interpretable and can fully describe the metric behaviour of a camera/lens combination at a specified focal setting to an accuracy of 0.1 pixel and better.In close-range photogrammetry, the recovery of camera parameters is nowadays generally performed via the selfcalibrating bundle adjustment.
The increasing use of zoom lenses for non-topographic photogrammetric measurement presents a dilemma in regard to calibration because camera parameters vary with zoom setting.Thus, a fixed camera model no longer suffices and an adjustable model is called for to provide parameters for any given zoom focal length.Unfortunately, there are no physical models algebraically describing the variation of camera parameters with zoom setting, though a model formulated by Brown (1971), which describes the variation of radial distortion with focus of a unifocal lens, has found application in high-precision industrial photogrammetry.
As a means of constructing camera models for zoom lenses, empirical approaches provide the only practical option.Dynamic adjustment of zoom lenses is an important requirement in machine vision and a two-step approach has been suggested (Willson, 1994) to model a variable-parameter camera system to characterize the variation of camera parameters with lens settings: i) Parameters of the fixed camera model are determined at a number of lens settings throughout the zoom range, and ii) Empirical relationships between the parameters at each lens setting are formulated, generally as polynomial expressions.
Standard photogrammetric practise dictates that only Step (i) is undertaken, i.e. calibration parameters are determined for given zoom/focus settings.Imagery for a stereo or multi-station measurement network is then recorded with the lens at constant settings.The one or more fixed settings must either support selfcalibration or have an associated set of predetermined calibration parameters.
With the increasing adoption of consumer-grade cameras, and especially digital SLRs (DSLRs) for photogrammetric measurement, there is an accompanying demand for greater flexibility in applications requiring low to moderate accuracy and involving a wide range of image scales.Examples of such applications are traffic accident reconstruction and heritage recording of large sites of mixed coarse and fine detail.This has given renewed impetus to the search for adjustable camera models appropriate for zoom lenses used in conjunction with DSLRs.Research conducted nearly two decades ago by Wiley & Wong (1995) indicated that the variation in calibration parameters with zoom settings was moderately stable over time and amenable to modelling by first-and second-order polynomials to an accuracy of better than 0.5 pixel.The question has then to be posed as to why such a concept of 'zoom-dependent' (Z-D) calibration found so little application in the years after its development.Except for a similar calibration approach reported by Noma et al. (2002) Fraser, 2006;Fraser & Al Ajlouni, 2006) There is a logical reason for this inattention when it is noted that the independent variable within the functions describing the variation of different calibration parameters with zoom setting is the focal length.Prior to the practise of writing the nominal focal length to the EXIF header file of recorded digital images, it was no simple matter to determine this value; it could not generally be read from the lens barrel.The writing of the zoom focal length to the EXIF file opened up the prospect of a practical implementation of the zoom-dependent calibration concept and it is the practical implementation of the method that forms the topic of this paper.

Initial Assumptions
The main idea behind Z-D calibration is that the value of each camera calibration parameter at a given zoom setting can be expressed as function of the nominal focal length f i written to the EXIF header of the image.Thus u i = F i (f i ), where u i is the calibration parameter and F i the function related to that parameter.The empirically derived functions F i are determined from comprehensive self-calibrations at four or more focal settings within the zoom range, nominally at shortest and longest focal lengths, and at two mid-zoom settings.In order for this Z-D process to have practical validity, a number of initial assumptions must hold: • Acknowledged shortcomings in accurately modelling calibration parameters as a function of zoom setting will be secondary to the degree to which accuracy in 3D point determination within a photogrammetric triangulation is preserved via a single-function, Z-D image coordinate correction, as opposed to rigorous calibration.It is assumed that projective compensation is likely to mitigate to some extent errors in modelled calibration parameters, be they from temporal influences or from limitations in empirically describing parameter variation functions.
• Variation of lens distortion with changing focus is of minor consequence in comparison to variation of distortion with zoom setting.There is a practical aspect to consider here, namely that it is generally not practical to consider distortion modelling with changing focus because a) the associated variations in principal distance are of such a small magnitude with small format lenses as to defy reliable determination via self-calibration, and b) most zoom cameras write a single focal length value to the EXIF header which gives the zoom setting, but does not reflect changes in focus.
• As the Z-D calibration process entails rigorous calibration at four or more zoom settings, it is imperative that the means to comprehensively calibrate the camera at the selected focal lengths is available.Logically, a fully automated self-calibration approach (eg Cronk et al., 2006) would be adopted.Options are separate calibrations for each zoom setting, or a simultaneous self-calibration that incorporates all image networks from all four or more zoom settings, with the bundle adjustment having multiple sets of additional parameters, i.e. effectively a multicamera self-calibration.
• A final assumption is that only low to moderate 3D measurement accuracy is being sought, though still mainly from multi-station photogrammetric networks as opposed to simple stereo configurations.Proportional accuracies needed for applications in heritage recording and traffic accident reconstruction are invariably at the 1:1000 level (1cm accuracy over a 10m object size) and it is with such modest accuracy requirements in mind that the Z-D calibration process has been developed.

Z-D Calibration Model
As more fully described in Fraser & Al Ajlouni (2006), a practical, empirically derived adjustable camera model that characterises the variation of calibration parameters with zoom settings is the following: Here, x and y are the measured image coordinates, x corr and y corr the corrected coordinates and r the radial distance.The Z-D calibration parameters for principal distance c i are the principal point offsets, x and ) ( i c p y , and K the coefficient for the cubic radial lens distortion function.The reasons for omitting both the 5 th and 7 th order radial distortion terms and those for decentring distortion from the adjustable calibration model of Eq. 1 are discussed in Fraser & Al Ajlouni (2006).
The individual Z-D calibration parameters are obtained as follows: • Principal point offsets: (3) • Radial lens distortion: In the practical implementation to be discussed, self-calibrations at four zoom settings are required to determine the parameters in Eqs. 2 -4.In the absence of any physical model describing the relationship between the focal length value written to the EXIF header and the interior orientation parameters i c , ) ( i c p x and ) ( i c p y , a linear variation function seems a reasonable choice.
A low-order polynomial could also be applicable, though it must be recalled that there is no physical reason to adopt such a variation function.The authors' experience is that the variation in principal point coordinates is demonstrably non-linear and often displays discontinuities, no doubt caused by mechanical play in the lens mechanisms.
The selection of the power function, Eq. 4, to model the variation of with principal distance was also arrived at empirically following an investigation into potential models that accommodated often seen characteristics of the variation of radial distortion with zoom setting.These characteristics, which have previously been observed (eg Al Ajlouni & Fraser, 2006;Laebe & Foerstner, 2004;Wiley & Wong, 1995;Burner, 1995), can be summarized as: • The variation is non-linear.
• The radial distortion reaches a maximum at shortest focal length, even in cases where zero crossings occur.
• The profiles are invariably well described by the cubic term K 1 r 3 of radial distortion alone.
• The cubic coefficient K 1 decreases monotonically with increasing zoom.
These characteristics are reflected in Figures 1 and 2, which show the variation in radial distortion with zoom setting and the variation in K 1 , respectively, for a Nikkor 24-85mm zoom lens.The advent of in-camera distortion correction has unfortunately complicated the modelling of radial distortion variation with zoom magnification and this issue will be addressed in a later section.

Determination of Z-D Calibration Parameters
In order for the Z-D calibration concept to be evaluated more broadly than in a research environment the method needed to be implemented in software.The integration of Z-D calibration into the iWitnessPRO software system (Photometrix, 2012) is described here to exemplify how it might operate in practise.As a first step, self-calibrations are carried out for four zoom settings, nominally minimum zoom (shortest focal length), maximum zoom (longest focal length) and two intermediate zoom settings.Even at this first stage of the workflow it is feasible to evaluate how well the 4-parameter sub-set c i , x pi , y pi and K 1i metrically performs as a model for the calibration at the given zoom setting i.As a general rule, the fidelity of the 4parameter model improves as the focal length gets longer.Given that iWitnessPRO supports fully automatic camera calibration, the effort required to calibrate at four focal settings is quite modest.The next step in the process is to ingest the four sets of calibration parameters into iWitnessPRO via the dialog shown in Figure 3.The best-fitting profile for K is shown so that the user can decide on the appropriateness or otherwise of the interpolation function.With the Z-D calibration coefficients having been calculated it is then possible to display the values for any given zoom focal length.This can come in handy in cases where more than four self-calibrations have been conducted as it then possible to evaluate how well the Z-D parameters reflect the 'true' values.Figure 4 shows the Z-D calibration values for a selected zoom focal length of 25mm, for a Nikkor 18-70mm zoom lens.Once the Z-D calibration parameters are determined, appropriate values will be assigned separately to the images imported into iWitnessPRO, based on the zoom focal length value within the EXIF header.The user is then free to vary the zoom settings between images forming the network.

In-Camera Distortion Correction
Shown in Figure 5 is a plot of the four K 1 -values obtained in four self-calibrations of a Canon PowerShot SD1300 IS compact camera incorporating a 5 -20mm zoom lens.Note how the distortion characteristics differ from those previously mentioned, namely radial distortion does not reach a maximum at shortest focal length and the cubic coefficient K 1 does not decrease monotonically with increasing zoom.This complicates application of the Z-D calibration process since the power function of Eq. 4 in no longer appropriate.
The reason for the barrel distortion indicated in Figure 5 being significantly less at 5mm focal length than at 6mm is because an in-camera distortion correction has been applied.Distortion correction via image processing, seemingly only at the widestangle zoom lens setting, is becoming popular for consumergrade cameras since it affords more flexibility in lens design.Adoption of digital correction allows the use of lenses of shorter length and smaller volume, which are thus lighter and presumably less expensive.
Figure 5. K 1 values for a Canon Powershot SD1300 IS camera.
From the authors' experience, in-camera distortion correction does not affect metric performance, indeed in the case of Figure 5 all four radial distortion profiles obtained at the initial selfcalibration stage can be fully characterized by a cubic lens distortion profile.Unfortunately, the Z-D model does not apply for the full zoom range, though it is applicable for zoom settings other than the widest angle.In terms of Z-D calibration, this gives rise to a practical dilemma: How can in-camera digital distortion correction be accommodated, especially given that there is invariably no way of knowing in advance if it is being applied?
From a practical standpoint, one way to address this problem is simply to forego the power function for K 1 and revert to linear approximation, as indicated by the solid line in Figure 5.The case of the Canon SD1300 IS, this yields satisfactory results, but only for focal lengths beyond the wider of the two intermediate zoom settings used for the initial self-calibration adjustments.

An Alternative Model for Variation of K 1
As a purely empirical attempt to accommodate the discontinuity in the variation of radial distortion with zoom setting due to incamera correction a further function for the modelling of (5) The polynomial model of Eq. 5, which has previously been employed for automatic radial distortion correction by Kim et al. (2010), can account for the non-linear monotonic decrease in radial distortion with focal length, while at the same time accommodating to some extent the discontinuity introduced by in-camera distortion.The function is by no means ideal for the shorter focal length range, but it may constitute a viable alternative to the linear approach indicated in Figure 5.A comprehensive evaluation of the use of this model for Z-D calibration is still to be conducted, but initial results are promising, as indicated by the computed profile for shown for the Canon SD1300 IS in Figure 6.Fraser & Al Ajlouni (2006) have reported on the accuracy potential of Z-D calibration.They demonstrated that when Z-D calibration is applied in multi-image measurement of targeted test fields via automated image mensuration, relative accuracy in object space of 1:9000 to 1:28000 was obtained with a DSLR camera with 24-85mm lens.Impressive accuracy results were also attained with consumer-grade compact cameras with integrated zoom lenses.Here, an evaluation of Z-D calibration in a more practical setting with lower accuracy expectations is reported.Shown in Figure 7 is a close-range photogrammetric network comprising 16 images recorded with a Nikon D200 fitted with an 18-70mm zoom lens, the same lens for which the Z-D calibration is indicated in Figure 3.The Z-D calibration of Figure 3 was employed for the 12 zoom settings utilised in the network, in which 72 natural targets were measured to an RMS image coordinate accuracy of 0.4 pixels, which yielded a mean standard error in object point coordinates of 15mm, or 1:3500 of the object size.The accuracy assessment was to be based on a comparison of results obtained with the Z-D calibration versus those achieved with a 'master' network comprising imagery from the same camera and lens, but with a fixed zoom focal length.This 10image network, which utilised the same feature points, was recorded at the widest angle setting (nominally 18mm) and was subjected to a self-calibrating bundle adjustment, the resulting precision in object space being a mean standard error of 11mm or 1:5000.

EXPERIMENTAL TESTING
Upon comparison of the XYZ object point coordinates obtained in the 16-image network with Z-D calibration with those from the master 10-image fixed-zoom setting, RMS discrepancy values of 22mm in X, 19mm in Y and 23mm in Z were obtained (Y being into the building face shown in Figure 7 and Z being in the vertical).Thus, the Z-D calibration yielded a result which was in agreement with the master measurement to a mean coordinate discrepancy value of 20mm or about 1:2700.Such a level of agreement is only moderately poorer than that expected from statistical error propagation and for practical purposes this could be deemed a quite acceptable result.

CONCLUDING REMARKS
Experience with the Z-D camera calibration approach in closerange photogrammetry has demonstrated that the approach is suitable for low-to medium-accuracy 3D measurement tasks using cameras fitted with zoom lenses.Z-D calibration affords the use of multiple imaging scales and thus different zoom settings within a network, thus freeing the user from the traditional constraint of fixed-zoom imaging.The cost of implementation of Z-D calibration is only the carrying out of four separate pre-calibrations, which can be performed automatically in a matter of a few tens of minutes.While this paper has highlighted the practical utility of Z-D calibration, it has also touched upon complications that can arise when digital in-camera distortion correction is applied, which seems to be increasingly common, for example in Micro Four Thirds lenses.
It may also happen that the variation in radial distortion with zoom setting is not well modelled at shorter focal lengths by the power or polynomial functions described.With the results of the initial four self-calibrations and the graphical presentation of the results of modelling the K 1 coefficient, as in Figures 4 and 5, the user is in a good position to decide whether Z-D calibration is suited to a given camera and zoom lens.

Figure 1 .
Figure 1.Variation of Gaussian radial distortion with zoom setting for a Nikkor 24-85mm zoom lens.

Figure 2 .
Figure 2. Variation of K 1 with changing zoom setting (solid line) and variation function for ) ( 1 i c K (dashed line).

Figure 4 .
Figure 4. Z-D calibration for a selected EXIF focal length

K
Figure 6.) ( 1 i c K profile for Canon SD1300 IS obtained via Eq. 5.