For the focus evaluation function, focus window and focus searching algorithm in auto-focusing processing are researched. Firstly, the Robert function has been improved as the evaluation function to increase the steepness. Secondly,for the fixed focusing window cannot find focusing objects accurately, a new method of dynamic selection focusing window is proposed, which divides the image into blocks, and uses the gradient variation of different sub-blocks to distinguish the objects and the background, the me...