Automatic calibration of a video camera lens system : a thesis presented in partial fulfilment of the requirements for the degree of Master of Technology in Information Engineering at Massey University
An automated camera calibration procedure was successfully developed to allow accurate measurements to be made from images obtained from camera-lens systems exhibiting geometric and lens distortion. The calibration procedure is based upon image analysis methods programmed in script using Mathworks MATLAB software. The process initially involved capturing an 512 x 512 pixel image of a calibration chart consisting of a regularly spaced two dimensional grid of circle shaped fiducial marks. Background leveling was used to correct intensity gradients due to non uniform illumination. A region of interest was determined for each fiducial mark in the image, by thresholding followed by an identification process. A grayscale Centroid Calculation Method was then used to accurately determine the center position of each fiducial mark. Two polynomial equations were fitted in the least squares sense to describe an inverse spatial transformation function that mapped fiducial mark position (xT,yT)
in the image to the actual positions (x,y) in real world coordinates on the calibration chart. A second image of a calibration chart was obtained so that the overall calibration error could be assessed for the procedure. The effect of altering the degree of the fitted polynomial equation on the error was investigated. No significant reduction in error was achieved by increasing the order of the fitted polynomial equations above order 4. The effect of altering fiducial mark size on error was investigated. For the Fujinon TV lens being tested at a focal distance of 32 cm and a field size of approximately 18 cm square, an optimal fiducial mark diameter was determined to be 3 mm (8.5 pixels). Increased calibration error was obtained for fiducial mark diameters both greater and less than this figure. The effects on calibration error of varying aperture were investigated. Greater calibration error observed at low aperture settings was attributed to primary lens aberration and also the possibility of systematic error in the Centroid Calculation Method due to spatial undersampling in the image. Increased diffraction resulting in loss of definition at the reduced aperture probably explains the increase in error that was observed at aperture setting, f22. An optimum aperture setting of f11 was determined, for this particular lens. The use of this camera calibration procedure has resulted in a large increase in accuracy for position determination or measurement from an image. When the non-linear effects of geometric or lens distortion are ignored, the maximum observed error was seen to be as high as 5.10 pixels compared to the maximum error in a 4th order calibrated image of 0.77 pixels. Mean error was observed to decrease from 1.25 to 0.33 pixels in the calibrated case. The mean error obtained as a result of the calibration closely approached the estimated uncertainty present in the physical calibration chart. The computation time required for the calibration of an image of a control chart having 320 control points, including the calculation of a verification image, was found to be 6.5 minutes on a Pentium 100MHz computer. The advantage of the automated procedure is that it is accurate and fast, unlike manual methods that are tedious, time consuming and prone to error.