Auto-focus in a digital camera is improved by stabilizing successive
images. Each auto-focus image is correlated to previous images so that
scene movement or motion can be tracked. The area in the scene where
focus figure-of-merit is computed is adjusted according to the amount of
scene movement. Also, two separate focus frames may be compared to
determine the direction and speed of the motion. This improves the
accuracy of the focus figure-of-merit which results in fewer autofocus
failures.