Patent ID: 7738027

Claim:
An auto focus method, comprising: defining a step length for a driving motor and a track length and providing a storage medium; shifting the driving motor to an initial position and cleaning the storage medium; sequentially shifting a focus lens to a plurality of sampling positions based on the step length using the driving motor and recording a plurality of evaluation values respectively corresponding to each of the sampling positions and a plurality of step lengths respectively corresponding to each of the evaluation values for a desired image in the storage medium; calculating a weighted average according to the evaluation values and the step lengths recorded in the storage medium using a statistical formula; and shifting the focus lens to a focus position according to the weighted average using the driving motor; wherein the statistical formula is: L _ = ∑ j = 1 n ⁢ ⁢ L i × M i ∑ i = 1 n ⁢ ⁢ M i , where Mi represents an evaluation value and Li represents a step length at a corresponding sampling position.