With the development of digital image processing technology, the auto-focusing (AF) techniques have been widely applied in many imaging instruments such as camera, video and microscope. The achievement of the distinct image is the fundament of the image processing and the vision analyzing. So the fast auto-focusing with high accuracy becomes important. How to achieve smooth auto-focus for video applications is a chief problem in the auto-focusing techniques. Moreover, it is difficult to obtain good performance when there are multiple objects in the scene. From this viewpoint, this paper presents an auto-focusing system based on DSP. The main contents and achievements of the whole research are introduced as follows.To achieve the smoonth auto-focus for the video applications, a fast and high accuracy auto-focusing algorithm with self-adaptive steps is proposed. Firstly, the model of the auto-focus system based on images is introduced, which is composed of the image sharpness measure and the search strategy. The region selection method based on edge detection is used to improve the accuracy of the image sharpenss measure. And a weighted gradient histogram based threshold selection method is used to reduce the influence of background noises. Then the smooth auto-focus search strategy with self-adaptive steps is designed according to the change of the image sharpness, which has good performance on speed, sensitivity of interference and smoothness of auto-focus search.In the multi-objective situation, the image sharpness curve has multiple peaks, and the traditional AF algorithms are not robust due to the local maximum trapping. To solve this problem, an image based passive auto-focusing algorithm for the multi-objective situation is proposed. The algorithm is composed of the image sharpness measure and the search strategy. To meet real time requirement, an effective and efficient image sharpness calculation based on Sobel operator is proposed. During the multi-objective search, a near-object priority search method is presented to search the real peak. The method will drive the lens focus on the nearest object automatically by detecting sharpness changes in the sub-windows.At last, the auto-focusing system is implemented on the ADI Blackfin DSP. Firstly, the design principle of hardware and software is presented. Then the drives for video capture and lens control are implemented. Moreover, the auto-focusing algorithm is transported to the DSP, and the data flow optimization and the memory optimization are used to improve the performance. Finally, the physical parts of the auto-focus system are illustrated in detail. |