Systems, methods and/or devices are used for moving an optical device relative to an image sensor to focus an image. The image sensor acquires a first image. A first contrast variation rate is obtained. In accordance with a determination that the contrast variation rate meets a first threshold criterion, the optical device is moved by a first step size that is greater than a previous step size, to a second position. In accordance with a determination that the first contrast variation rate does not meet the first threshold criterion, the optical device is moved by a second step size that is smaller than the previous step size to the second position. The aforementioned operations are repeated until a second contrast variation rate determined for a second image that is acquired when the optical device is at the second position meets a second threshold criterion.