This paper digs into several pivotal techniques------focus position searchingalgorithm, estimating functions, focus windows, and control of lens, which surround auto-focus system in digital camera. On the basis of thoroughgoing research of the conventional Mountain Climbing Algorithm including the working mode and the intractable problems, we propose a modified Mountain Climbing Algorithm to achieve better focus effect. In order to improve the precision and the speed of auto-focus, the green components of images and amendatory gradient formula are used to calculate the Estimating Functions, the method based on four dots is introduced to select the focus windows, and considerable experiments were carried out to find out more accurate parameters to control the lens. The auto-focus system was implemented on the digital camera platform based on the microprocessor ZR36451BGCF.Experimental results show that the algorithm proposed achieves fast focus speed and high precision. It takes less than 5 times for lens to stretch and retract and average 0.8 seconds to get focused images. Focused images are pretty clear, and the resolution reaches 1200 threads. The system has the characteristic of high dependability, and can be used in actual fields. |