We present solutions to two problems arising in the context of automatically focusing a general-purpose servo-controlled video camera on manually selected targets: (i) how to best determine the focus motor position providing the sharpest focus on an object point at an unknown distance; and (ii) how to compute the distance to a sharply focused object point.
We decompose the first problem into two parts: how to measure the sharpness of focus with a criterion function, and how to optimally locate the mode of the criterion function. After analyzing defocus as an attenuation of high spatial-frequencies and reviewing and experimentally comparing a number of possible criterion functions, we find that a method based on maximizing the magnitude of the intensity gradient proves superior to the others in being unimodal, monotonic about the mode, and robust in the presence of noise. We employ the Fibonacci search technique to optimally locate the mode of the criterion function.
We solve the second problem by application of the thick-lens law. We can compute the distance to objects lying between 1 and 3 m with a precision of 2.5 percent, commensurate to the depth of field of the lens. The precision decreases quadratically with increasing object distance, but this effect is insignificant at the (small) object distances investigated.
The solutions are computed in the time required to digitize and filter 11 images, a total of approximately 15 seconds per point for this implementation.
KeywordsAttenuation Image Processing Artificial Intelligence Computer Vision Computer Image
Unable to display preview. Download preview PDF.
- 1.G.S. Beveridge and R.S. Schechter, Optimization: Theory and Practice, McGraw-Hill, New York 1970.Google Scholar
- 2.N. Goldberg, “Inside Autofocus: How the Magic Works,” POPULAR PHOTOGRAPHY, pp. 77–83, February, 1982.Google Scholar
- 3.E. Hecht and A. Zajac, Optics. Addison-Wesley: Reading, Mass., 1974.Google Scholar
- 4.B.K.P. Horn, “Focusing,” MIT Artificial Intelligence Laboratory MEMO NO. 160 May 1968.Google Scholar
- 5.IMSL User's Manual, “ZXMWD,” IMSL, Inc.: Houston, Tex., 1982.Google Scholar
- 6.R.A. Jarvis, “Focus optimisation criteria for computer image processing,” Microscope, vol. 24(2), pp. 163–180, 1976.Google Scholar
- 7.R.A. Jarvis, “A perspective on range finding techniques for computer vision,” IEEE Trans. Pami-5(2), pp. 122–139, (March) 1983.Google Scholar
- 8.S.M. Johnson, “Optimal search for a maximum is Fibonaccian,” RAND Corp. Rept. P-856, Santa Monica, Calif., 1956.Google Scholar
- 9.J. Kiefer, “Sequential minimax search for a maximum,” in PROC. AM. MATH. SOC. (4), pp. 502–506, 1953.Google Scholar
- 10.E.P. Krotkov, J.F. Summers, and F. Fuma, “The Pennsylvania active camera system,” University of Pennsylvania TR-86-15, 1986.Google Scholar
- 11.E.P. Krotkov, “Exploratory visual sensing with an agile camera system,” Ph.D. Dissertation, TR-87-29, Univ. of Pennsylvania, 1987.Google Scholar
- 12.M.A. Kujoory, B.H. Mayall, and M.L. Mendelsohn, “Focus-assist device for a flying spot microscope,” IEEE Trans. Biomed. Engineering, vol. 20, pp. 126–132, (March) 1973.Google Scholar
- 13.S. Ohteru, H. Kobayashi, and T. Kato, “Eyes of the WABOT,” in Learning Systems and Intelligent Robots, Julis T. Tou, (ed.), Plenum Press: New York, 1973.Google Scholar
- 14.A. Pentland, “A new sense for depth of field,” PROC. INT. J. CONF. ARTIF. INTEL., Los Angeles, pp. 988–994, August, 1985.Google Scholar
- 15.J.F. Schlag, A.C. Sanderson, C.P. Neumann, and F.C. Wimberly, “Implementation of automatic focusing algorithms for a computer vision system with camera control,” Carnegie Mellon Univ., CMU-RI-TR-83-14, August, 1983.Google Scholar
- 16.J.M. Tenenbaum, “Accommodation in computer vision,” Ph.D. Thesis, Stanford Univ., 1970.Google Scholar
- 17.L.E. Weiss, “Dynamic visual servo control of robots: an adaptive image-based approach,” Carnegie Mellon Univ., CMU-RI-TR-84-16, 1984.Google Scholar