AUTOFOCUS is a computer program for use in a control system that automatically adjusts the position of an instrument arm that carries a microscope equipped with an electronic camera.

In the original intended application of AUTOFOCUS, the imaging microscope would be carried by an exploratory robotic vehicle on a remote planet, but AUTOFOCUS could also be adapted to similar applications on Earth. Initially control software other than AUTOFOCUS brings the microscope to a position above a target to be imaged. Then the instrument arm is moved to lower the microscope toward the target: nominally, the target is approached from a starting distance of 3 cm in 10 steps of 3 mm each. After each step, the image in the camera is subjected to a wavelet transform, which is used to evaluate the texture in the image at multiple scales to determine whether and by how much the microscope is approaching focus. A focus measure is derived from the transform and used to guide the arm to bring the microscope to the focal height. When the analysis reveals that the microscope is in focus, image data are recorded and transmitted.

This program was written by Terrance Huntsberger of Caltech for NASA's Jet Propulsion Laboratory. For further information, access the Technical Support Package (TSP) free on-line at under the Software category.

This software is available for commercial licensing. Please contact Karina Edmonds of the California Institute of Technology at (818) 393-2827. Refer to NPO-30531.

This Brief includes a Technical Support Package (TSP).
Automatic Focus Adjustment of a Microscope

(reference NPO-30531) is currently available for download from the TSP library.

Don't have an account? Sign up here.

NASA Tech Briefs Magazine

This article first appeared in the April, 2005 issue of NASA Tech Briefs Magazine.

Read more articles from the archives here.