f Technique of distortion correction in endoscopic images using a polynomial expansion K. V. Asari 2 S. Kumar I D. Radhakrishnan 2 ~Oepartment of Surgery, National University of Singapore, Singapore 2School of Applied Science, Nanyang Technological University, Singapore Abstract--A new technique to correct non-linear distortion of endoscopic images based on L2-norm approximation is proposed. A mathematical model is defined that maps the endoscopic images from the distorted image plane onto an undistorted image plane. A set of model parameters is defined, consisting of the image distortion centre, corrected centre and expansion polynomial coefficients representing radial distortion correction. A new method to find the image distortion centre based on a curvature criterion is also developed. The expansion coefficients are estimated on the basis of the degree of straightness of the grid lines in an image of a test grid consisting of clots in a rectangular pattern. The corrected image centre is computed by ensuring that the distances between neighbouring test dots of different grid lines in the corrected image are the same. The quantitative data providing the results and errors of the expansion characteristics are presented. The performance of the proposed distortion correction algorithm is validated with grid patterns of different orientations. The algorithm is also applied to typical endoscopic images, and the results are presented. The high-speed response of the proposed technique is a key step towards on-line camera calibration. Keywords~Endoscopic images, Barrel distortion, L2-norm approximation, Polynomial map- ping, Distortion centre, Corrected centre Med. Biol. Eng. Comput., 1999, 37, 8-12 1 Introduction MINIMALLY INVASIVE therapy is increasingly becoming one of the most important forms of surgical procedure, owing to its inherent advantages over conventional procedures. During recent years, electronic endoscopy, which utilises a CCD camera, has been widely used for viewing the intemal structure of the gastro-intestinal tract. In clinical endoscopes, cameras with wide viewing angle lenses are preferred as they provide more information in a single image. However, this lens configuration introduces barrel-type spatial distortion in the image. In barrel distortion, image areas farther from the centre are compressed more than the areas near the centre and appear significantly smaller than their actual size. This non- uniform magnification introduces considerable errors in the results obtained during feature extraction of the image. Esti- mation of image features, such as area and perimeter, is important when making decisions while performing endo- scopy. In addition, the distortion causes complications when token-matching techniques are used for pattern recognition. Various mathematical models of lens distortion and respec- tive correction procedures have been presented. A prism distortion model was proposed in BROWN (1966) to correct the tangential distortion in an image. A radial lens distortion model proposed in TSAI (1986) includes image correction in Correspondence should be addressed to Dr D. Radhakrishnan; email: asdrkrishnan@ntu.edu.sg First received 27 March 1998and in final form 28 July 1998 9 IFMBE: 1999 two directions. Radial, decentring and thin-prism types of distortion model and correction procedures are presented in WENG et al. (1992). A calibration technique for high-distortion TV camera lenses is discussed in NOMURA et aL (1992). This method requires precise placement of a calibration chart with respect to the camera. Hence, considerable error in distortion correc- tion is introduced in the case of minor deviations in the position and orientation of the chart. All the above models give reasonable results for images obtained from cameras with normal viewing objective lenses, but these models are not very effective for endoscopic images. In SMITH et al. (1992), image distortion was assumed to be purely radial, and orthogonal (Chebyshev) polynomials were used to determine the model parameters. A different method for estimating the model parameters of a non-linear mapping is presented in HANEISHI et al. (1995), in which a moment matrix was obtained from a set of image points, and distorted lines in the image were straightened on the basis of the smallest characteristic root of the moment matrix. A video endoscopy testbox was proposed in PHIN et al. (1996) to adjust optimally the images of the patient's internal surfaces by obtaining an empirical figure for distortion. In this paper, a new technique, based on L2-norm approx- imation, is proposed that estimates the coefficients of an expansion polynomial for the distortion correction of endo- scopic images. A novel approach to find the distortion centre of the image, based on a curvature criterion, is also developed. Furthermore, a method for accurate determination of the critical points of a calibration grid based on a dual-step 8 Medical & Biological Engineering & Computing 1999, Vol. 37