CLOSE RANGE CALIBRATION OF LONG FOCAL LENGTH LENSES IN A CHANGING ENVIRONMENT

University College London is currently developing a large-scale multi-camera system for dimensional control tasks in manufacturing, including part machining, assembly and tracking, as part of the Light Controlled Factory project funded by the UK Engineering and Physical Science Research Council. In parallel, as part of the EU LUMINAR project funded by the European Association of National Metrology Institutes, refraction models of the atmosphere in factory environments are being developed with the intent of modelling and eliminating the effects of temperature and other variations. The accuracy requirements for both projects are extremely demanding, so accordingly improvements in the modelling of both camera imaging and the measurement environment are essential. At the junction of these two projects lies close range camera calibration. The accurate and reliable calibration of cameras across a realistic range of atmospheric conditions in the factory environment is vital in order to eliminate systematic errors. This paper demonstrates the challenge of experimentally isolating environmental effects at the level of a few tens of microns. Longer lines of sight promote the use and calibration of a near perfect perspective projection from a Kern 75mm lens with maximum radial distortion of the order of 0.5m. Coordination of a reference target array, representing a manufactured part, is achieved to better than 0.1mm at a standoff of 8m. More widely, results contribute to better sensor understanding, improved mathematical modelling of factory environments and more reliable coordination of targets to 0.1mm and better over large volumes.


INTRODUCTION 1.1 Background to this work
A multi-camera system for dimensional control in an industrial environment will necessitate a variety of image magnifications and therefore sensors and lens focal lengths, in order to optimise the standoff and coverage of a range of sizes of manufactured parts and tracked objects.Photogrammetric state of the art in the metrology field is very well described in Luhmann (2011).
A remaining challenge is understanding the role of refraction in photogrammetric networks and how it can be effectively mitigated in industrial environments.UCL work to model and ultimately correct for refracted light paths is founded on temperature measurement and an analysis of both illuminated and self-illuminated targets.Experimental work has included thermocouple temperature measurements of both camera equipment and atmosphere, in combination with multiple wavelengths of light, to take advantage of the known relationship between wavelength and refractive index.Long focal length lenses will be required in the Light Controlled Factory to ensure that the detail of parts and assembly can be imaged with sufficient resolution from long stand-off distances, whilst infrared (IR) and violet bands of light are widely separated wavelengths that can be conveniently imaged using conventional lenses and CMOS image sensors.

Modelling Refraction
One task in the LUMINAR project has been to simulate in detail the path taken by a ray of light from target to camera.The refractive index of air depends on temperature, pressure and humidity and can be expressed in a relatively simple formula.See for example Bönsch and Potulski (1998).In the simulations, temperature is the only variable included as it has the largest effect and the other factors are insignificant.Figure 1 shows in simple terms what happens if the atmosphere is composed of layers of air at different temperatures.The refractive index is higher for lower temperatures and so, applying Snell's Law, rays would be bent in the form shown.

0.5C per m
Over a 10m horizontal range, deflection is 50m Over a 30m horizontal range, deflection is 0.4mm

1.5C per m
Over a 15m horizontal range and 6m height difference, deflection is 0.175mm These are not unrealistic figures and potentially significant in, for example, an aerospace or nuclear manufacturing environment.

Figure 3 Simulation of refracted images
As the LUMINAR project concludes (May 2016) the refraction simulation has been modified to calculate ray bending in three dimensions, with temperature variations permitted along all three axes.It is also possible to simulate measured images (see Figure 3) so that multi-camera networks in more complex thermal environments will be evaluated in future work.

Investigation of refraction
A critical set of tests concerned the use of long focus lenses observing a corridor sight line to a target.A series of thermocouple arrays (A1 to A7 in Figure 4) were positioned along the sight line (Figure 5) in order to determine the temperature of the air.To enable critical Bore-Sight testing, a 60x60mm target block was developed incorporating active LED targets.The selected LEDs operate in the violet and near infrared on the basis that each wavelength would undergo differing levels of refraction, thereby signalising change in the environment.When imaged with a 5MP IDS Eye 5480CP-M-GL "C" mount CMOS camera fitted with a Kern 75 mm lens, target image circles are of the order of 20 pixels in diameter at a range of 9.8m.The spatial resolution of the image at the target is 3.47 pixels / mm with the result that an image movement of 1/10th pixel equates to 28m in object space.
Figure 6 illustrates what is seen by the camera if the exposure is adjusted to record the background rather than the targets.Violet targets are in the upper left and lower right of the image, while IR targets are in the lower left and upper right.
Repeated sub-pixel image measurements of the targets taken over long time sequences could then be correlated to the thermal measurements along the sight line in order to ascertain the effect of refraction.Analysis of the data gathered over the course of several experiments highlighted that whilst there was broad correlation with introduced atmospheric thermal variations, systematic instabilities in the camera system were masking target image movements predicted by the refractive model.
Instabilities appeared as a drift in the target image locations over time.Since self-illuminating targets were in use, this drift could not be attributable to local heating of the camera by a light source.The drift had to be caused by an instability in the camera itself or from thermal expansion and contraction of the laboratory space as the temperature was varied.

Camera warm-up effects
Warm up effects in CCD imagers are well known and have been repeatedly documented since the introduction of 'solid state' cameras (Dähler, 1987;Robson et al, 1993).As the sensor and the camera as a whole progress toward temperature equilibrium after power up, the output image will drift due to thermal expansion and drift in the on-board electronics.Shifts of the order of tenths of a pixel are typical and it is accepted that CCD cameras require one to two hours to reach thermal equilibrium.
Thermal effects have been confirmed for CMOS based imagers and, despite the different technology, the magnitude of the reported image shifts is also of the order of one tenth of a pixel (Handel, 2009).More recently, the pattern of thermal induced image shifts has been modelled and incorporated into the camera calibration approach (Podbreznik and Potocnik, 2011;Yu et al, 2014).
An internal thermal sensor within the uEye camera is designed to provide the operator with direct logging of the operating temperature of the camera.Several years of work with these systems has highlighted that they can generate internal temperatures as high as 45 o C when running for extended periods.Usual practice is to position the cameras on metal camera heads which act as a heatsink for the system.However, there was concern that heat transfer through the "C" mount could lead to local heating of the Kern lens and hence thermal expansion induced changes in shape of the optic.
In order to understand if the observed drift was related to the temperature of the camera and lens, a set of four thermocouples were connected to the camera and its lens system.One was affixed to the uEye camera body and three to points on the lens.These allowed measurement of the surface temperature of the camera body, the "C" mount and the lens barrel.The camera body also included its own integral thermal sensor.
The camera was left switched off overnight, with the laboratory air conditioning also switched off, so that at the start of the trial the whole room was stabilised in temperature.The four target LEDs had been left switched on so were thermally stable.The temperature logger was started before the camera was switched on, and 2174 measurements were taken over a period of 2 hours and 28 minutes, at intervals of approximately 4 seconds.No heating or cooling was applied, so the air in the room remained in the ambient condition.Figure 8 shows that it took 90 minutes for the camera body temperature to rise from the initial 23.5° to the maximum of 43.5°.Closely correlated to this were the temperatures in two places on the lens body, the rear near the C-mount and the centre ring, which rose from the same initial temperature to 31.0°C and 30.5°C respectively.Two events are evident in the temperature log: the first at 13:06:36 caused the temperature of the front lens ring to drop suddenly by 1.1°; the second at 13:45:09 caused the temperature of the camera body to drop by 1.5° and the lens temperatures to drop in proportion.
The likely causes of these events were: (1) the thermocouple wire detached itself suddenly from the adhesive pad holding it onto the lens; (2) a member of staff opened the laboratory door and came into the room, admitting cooler air from the corridor.
The room temperature was monitored by seven arrays of thermocouples, placed on tripods along the length of the room.
The mean temperature at each array position remained almost constant (Figure 2), within ±0.15° throughout the period, although the heating effect of the adjacent camera body can be seen for array 1.The standard deviation for readings from individual thermocouples were in the range 0.04° to 0.07°.
Plotting the mean array temperature (Figure 5) and considering the height above the floor (see Figure 4) it is clear that the temperature rose from near the floor to a maximum at about 2.1 metres in height (Sensor A5 in Figure 4), then declined towards the ceiling.The difference between minimum and maximum temperature was 1.6°C.

Image capture and measurement
A sequence of images was captured from the uEye camera, using the VMSuEyeCapture software on a full 5MP image with 12 bits of data per pixel.The camera pixel clock was slowed down to the minimum, to produce one image every 1.7 seconds.
During the 90-minute period from 12:14 to 13:44 a total of 3178 images were recorded.A region of 201x201 pixels was cropped from each image, and processed to find the centroids of the four LEDs.The camera exposure time of 30msec kept the maximum target intensity below the 12bit limit of 4095 (Figure 9 left).The right hand graphic in Figure 9 shows normalised cross sections through each of the violet and near IR targets where it can be seen that the violet light is better focussed with a narrower spread and more energy being transferred from the target to the sensor at this wavelength.Centroiding of the target images was carried out using a threshold computed from 95% of the peak intensity.

Target image trajectories
Figure 10 shows the trajectory of the centroid coordinates through the image sequence, relative to their starting positions.
The displacement is small and entirely negative in the x direction, whereas it is larger and both positive and negative in the y direction.Since all four LEDs follow a similar path, the cause must have been either in the camera, lens and mount assembly as it warmed up, or in a change of spatial relationship between the camera and target block.
To put this into context, the Kern 75mm lens in this configuration at a distance of 9.67 metres gave a scaling factor of 128.9 (target μm per sensor μm), equivalent to 0.284 mm/pixel for the pixel size of 2.2 μm.Hence the centroid excursion in the range -2.82 to +1.22 pixels could be wrongly interpreted as physical movement of the target in the range -0.8 to +0.35 mm over the 90-minute period of the image capture.This is significantly greater than the <0.1mm anticipated from atmospheric refraction.
Plotting the x and y image displacements separately as a function of time gives the distributions shown in figure .11.The discontinuity in x with a jump of about 0.1 pixel, after 53 minutes, corresponds to event #1 in figure 8, which occurred at 13:06, apparently caused by the thermocouple wire suddenly releasing itself from the adhesive pad at the side of the lens.Table 1.Image measurement standard deviations for each of the LED target images for the steady state of the last 100 images.
The standard deviations of the centroid displacements (pixels), taken over the last 100 images are given in Table 1 where the standard deviation for the IR LEDs was about 40% higher than for the violet LEDs, and the y values of standard deviation were about 15% higher than x.The greater standard deviation for the IR images can be explained through the lower quality target image profiles (Figure 9).The systematic change in centroid positions over time after powering on the Eye camera shows the potential for errors.
There is a large initial displacement in the y direction, which reaches a peak after 6-7 minutes, then relaxes back to the starting position after 30 minutes, then overshoots and is asymptotic to about 1.2 pixels as the whole lens warms and reaches equilibrium.The effect in the x direction is much less, with the displacement reaching a peak after about 18 minutes and then returning slowly back to near zero.
The greater magnitude of the y displacement can be partly explained by gravitational force on the Kern 75mm lens, which is cantilevered at the front of the camera from the C-mount screw fitting.A more important factor is the non-uniformity of heating from the camera body, which is hottest on the top surface.Therefore, after powering on, the heat is conducted first into the upper part of the C-mount, which expands causing the lens to be tilted downward and the target image to move upward on the sensor.As the lower part of C-mount warms the effect is reversed until the system reaches a stable state.Because it took about one minute after switching on the camera to start the image capture software, it is likely that the starting position for y was +1.2 pixel, and that the asymptote at the end of the sequence is the true 'zero' position.

CALIBRATION OF THE CAMERA SYSTEM
Given that the thermal performance of the camera can be mitigated by leaving the system running for extended periods, an appropriate camera calibration method is needed to take advantage of the 1/50 th pixel image measurement standard deviations that can be obtained with the unit.If achievable as a measurement into a network adjustment, this equates to an angular capability of the order of 0.1 arc second.

Image Network
Calibration at UCL is typically carried out using a black anodised aluminium 'Manhattan model' equipped with 131 circular retro reflective targets.A dozen targets are coded to allow automation of the calibration process.A convenient calibration can be carried out by rotating the Manhattan model in front of the camera system at a variety of angles and orientations (Figure 12).A typical image network will comprise some 16 images, each taken from a different direction with the Manhattan object filling the image format.The object was imaged twice, once under violet illumination and once under infrared illumination.The lens focus was not altered between illumination sets such that any observed differences are attributable to changes in wavelength and small variations in the imaging geometry.
In this case of a long focus lens, the stand-off from camera views to Manhattan object was 8.5m. Figure 13 illustrates the 32 image network and the narrow angle of view (2 degrees) of the 75mm lens on the uEye sensor.

Network Adjustments
Network adjustments were computed on the combined set of images at both wavelengths with a datum based on a prior set of coordinates and uncertainties for targets on the Manhattan object base plate and shorter vertical bars.The reference data was captured in a separate network using a high resolution DSLR camera and Brunson scale bar.
The narrow angle of view, coming close to a parallel projection, is proven to benefit from modified cameras models, such as the use of expanded partial derivative expressions for the principal point (Stamatopoulos et al 2011).In this case no special constraints were found to be necessary to accommodate the long focal length of the Kern lens.Camera calibrations were processed treating the violet and IR measurements as if they had been made by two separate cameras, since the optical properties of the system are wavelength dependant (Luhmann, 2011).

Network Adjustment Output:
Two sets of network adjustments were computed utilising the same 32 images, 3708 image observations and 131 3D target coordinate starting values and standard deviations.
Self calibrating bundle adjustment solutions were obtained using a 4 camera parameter (CP) calibration model (comprising Principal Point, Principal Distance and one radial term) for each of the violet and IR image data where all parameters were statistically significant.A reference calibration using identical input, but a 10 CP model (the addition of 2 further radial terms, 2 tangential parameters, an affinity term and an orthogonality term) for each of the violet and IR data was also computed to check on the performance of the solution.In table 2 it can be seen that there is little to separate the two sets of outputs.Small variations in the number of observables reflect the automatic image measurement rejection process which adopts a 5 sigma image measurement standard deviation as a cut-off for larger image residuals.Differences between unknowns and redundancies reflect the number of parameters being estimated in the camera models versus the observables in the networks.Table 3 highlights differences in the estimated principal distances, principal points and lens distortion curves between the parameter sets.Here differences are more obvious with the longer principal distance for the infra-red image observations along with variations in estimated principal point between the 4 and 10 parameter solutions.

Camera calibration estimates
Figure 14 demonstrates that the maximum effect of any of the estimated distortions is less than half a pixel.With maximum radial distortion in the 4 parameter case of less than 0.1m, this camera and lens combination is very close to a perfect perspective projection.Interestingly, the 4 parameter case (K1 only) demonstrates distortion at a close to a negligible level with the radial parameter being on the margin of statistical significance.This outcome suggests that the inclusion of all ten parameters for each of the two image wavelengths has resulted in numerical coupling and potentially 'over-fitting' between parameters.
Figure 14.Radial and tangential lens distortion curves for the 10 parameter Camera 1 (Violet) and Camera 2 (Infrared) models.Those marked "K1 only" are from the respective 4 parameter models, each incorporating a single radial term.Analysis of the inter-parameter correlations from the least squares adjustments reveal correlations of -0.04 to 0.46 between the radial term (K1) and principal point (PPx, PPy) estimates in the four parameter case (Table 4).The 0.66 for both wavelengths between principal distance and the y principal point location is unexpected, but it does coincide with the instability in the y direction observed during thermal testing which is the only real concern in using this camera for industrial measurement.

Camera model parameter correlations
Camera Observations of high parameter correlations in work by Tang and Fritsch (2013) confirmed the basis that correlations between the principal point and tangential distortion parameters are inherent in the Brown (1972) camera calibration model.This is clearly seen in the 10 calibration parameter case (Table 5) with correlations approaching unity.
The correlations established in the 4 parameter case between radial lens distortion and principal point are evident in the violet camera model, but missing in the infrared case.However, a lower correlation of 0.2 to 0.3 between principal point, principal distance and orthogonality is also evident.Given the very low optical distortion, this discrepancy can be approximated through a combination of principal point, tangential (P1, P2) and orthogonality (O) compensation.Given that maximum correction across tangential, orthogonality and affinity parameters is 0.51m, the challenge of achieving a physically meaningful solution in the presence of image measurement error of similar magnitude is apparent and highlights the challenge in establishing physical cause and effect from network analysis.

Object space
In terms of object space, an analysis similar to a VDI/VDE 2634 Part 1 length comparison (VDI/VDE, 2002) between reference lengths vs measured lengths can be made across the volume of the Manhattan object.
Comparison between the input control coordinates of target points on the base of the Manhattan object, the most stable shorter rods from DSLR and scale bar survey, and estimates of the same points from Kern imagery demonstrate very similar coordinate discrepancies within the datum definition.RMS coordinate discrepancies for targets used within the datum definition were 1.1m in plan and 1.7m in height for the 4 parameter network and larger at 1.7m in plan and 2.2m in height for the 10 parameter network.
Given this good agreement, length discrepancies were computed between the most stable control points locations on the base plate of the object and estimated 3D target coordinates on the top of the Manhattan rod structures.The spread in length discrepancy against reference length provides a "worst case" situation around the outer dimensions of the Manhattan object volume (Figure 15).Whilst both solutions deliver spreads of less than ± 80m, the spread on the 4 parameter solution is slightly greater.This is the opposite of what is suggested from the slightly better fit to control of the 4 parameter solution.Further, this spread is very much greater than the computed individual target coordinate precisions from the bundle adjustment (Table 2).Since there is no correlation between length discrepancy and reference length, the scale of the aluminium Manhattan object is not in question, so the discrepancies come down to the capabilities of the measurement system.Further work with camera systems over larger targeted volumes under better thermal monitoring are being carried out to determine if the spread in the data can be linked to refraction and camera instability.

CONCLUSIONS
Refraction mitigation is required for industrial metrology, but is highly challenging.Changes in target image position attributable to experimental environmental temperature variations are detectable in the laboratory, but they can be masked by other sub-pixel instabilities, particularly with low cost sensing systems.
In the case of the IDS EYE 5480CP camera and Kern 75mm lens used in this investigation, thermal heating due to the camera body running at a high temperature relative to the environment in combination with the thermal mass of the large lens taking time to reach equilibrium from power on are highly significant.As a result, a warm-up time of at least 90 minutes is required before using this camera and lens combination for accurate photogrammetric imaging.Beyond that point changes in the measurement environment can be expected to make small sub-pixel changes to the optical geometry of the camera system.These variations may be significant to the photogrammetric application and require either periodic calibration, or the application of thermal based drift compensation models (Yua et al 2014).However the confident application of any corrections should be founded on high quality temperature measurement and detailed understanding of both camera and lens.
The optical properties of the Kern 75mm lens were found to be superb and very close to an ideal pinhole with negligible radial distortion and undetectable tangential distortion at the 0.35m RMS image measurement residual level achieved in calibration.
The very low distortion enabled investigation of two different calibration parameter sets providing a very clear demonstration of projective coupling between camera calibration parameters and over-parameterisation.Interestingly the effect on length discrepancies in a well-controlled object space viewed at an 8m stand-off showed only marginal performance differences with a spread of ±80m being achieved in both cases.
The 8m range at which this object was imaged is critical for some industrial applications, where long focus lenses are required to keep metrology equipment away from hot materials, machinery or human interaction.Further work on these projects includes: optical and thermal monitoring of a long site line in a factory environment at Airbus and; the construction of a large volume robotic demonstrator incorporating multiple camera units, in combination with atmospheric temperature measurement and refraction mitigation within the bundle adjustment.

Figure 1 .
Figure 1.Refraction of a ray of light in layered temperature model.

Figure 2
Figure 2 Example of simulated refraction in a layer model.The departure from a straight line is exaggerated for the purpose of illustration.MathCAD © has been used as the simulation tool and Figure2is part of a screen shot showing, at exaggerated scale, the bending of a light ray from target (left) to camera (right) in a horizontally layered model of the air.In this example, over a 6m height difference from bottom to top, the air cycles through warm (28C) -cold (12C)warm (32C).This creates the Sshaped curve of the ray and, with a 15m horizontal separation, an apparent target shift of 0.508mm.Potentially more realistic examples of variations in air temperatures would be approximately linear vertical temperature gradients.Here are two further examples of apparent target shifts due to ray bending caused by refraction:

Figure 4 .
Figure 4. Schematic of floor mounted long focal length camera pointing though a series of thermocouples at a distant ceiling target.

Figure 5 .
Figure 5.An example thermal trace showing the mean temperature of each thermocouple array over time with the temperature gradually increasing to roof height.Array 5 has the highest temperature values, whilst Array 1 has the lowest.

Figure 6 .
Figure 6.An overexposed image from the camera shows the quad target array surrounded by concentric thermocouple arrays.

Figure 7 .
Figure 7.An IDS Eye 5480CP-M-GL camera fitted with a Kern 75 mm lens and thermocouples.An environmental data logger can be seen at the bottom of the image.

Figure 8 .
Figure 8. Temperature vs time of four thermocouples on camera and lens body.

Figure 9 .
Figure 9. Intensity profiles of violet and IR LEDs, and normalised profiles (right).

Figure
Figure 10 Trajectory of target image centroids (pixels).

Figure 12 .
Figure 12. uEye camera with Kern 75mm lens and ring light imaging the Manhattan object.The taking distance in this image is for the convenience of the illustration, with the practical range to fill the frame being 8.5 m.

Figure 13 .
Figure 13.Camera calibration image network (top) where green cones denote photo positions and red lines denote lines of sight from each photo to each target on the Manhattan model, example image demonstrating full coverage of the sensor (middle), and sample target images (bottom), Violet (left) and IR (right).

Figure 15
Figure 15 Length discrepancies computed between reference and estimated 3D target coordinates on the Manhattan object.

Table 2 .
Network adjustment results with 4 and 10 CP calibration models

Table 3 .
Estimated camera calibration parameters for both violet and infrared image sets.

Table 4 .
Camera calibration parameter correlations for violet and infrared camera networks with 4 calibration parameters per camera.Correlations are in lower triangular matrix form.

Table 5 .
Camera calibration parameter correlations for violet and infrared camera networks with 10 calibration parameters per camera.Correlations are in lower triangular matrix form.