| An auto-focusing method based on digital image processing is proposed in this paper. Using gradient of digital image as criterion of focusing, different image grabbed on different lens position is compared, and lens motor is droved to the optimal position according to result of comparison. We design system software and controlling circuit, and obtain good experimental result.At first, traditional auto-focusing methods is described and analyzed for advantages and disadvantages. Then, image processing-based auto-focusing method is introduced and the soundness is demonstrated. Secondly, detailed explanation is made, dividing software part and hardware part. We compare gradient energy, standard deviation, contrast, and summed intensity of acquired images as focus metrics. Furthermore, because of noise, images need to be filtered before processing. With many experiments, we compare Average Filter, Gauss Filter, and Median Filter, and consider Median Filter as the best. Some problems encountered in the experiment are discussed, and the solutions provided. At last, the paper describes the experimental result and put forward some suggestions for amelioration. |