Patent ID: 7428375

Claim:
A digital camera comprising: an image sensor for sensing images; a focus lens; a focus motor coupled to the focus lens for controlling the position thereof; processing circuitry coupled to the focus motor and image sensor; firmware embodied in the processing circuitry that comprises an autocalibration algorithm that: takes a successive number of auto-focus images, each at a unique position of the focus lens; correlates each respective auto-focus image with a portion of a reference image to track scene motion; tracks scene motion between the images by overlaying a portion of a reference image onto a current image and performs a pixel by pixel subtraction, wherein the reference image is at least one of a most recent image or an image that was recorded closest to a current focus lens position; adjusts the position of the area in the image where focus figure-of-merit is computed according to the amount of scene motion that is determined so that respective figures-of-merit are calculated for sequential auto-focus images using the same scene location, wherein the auto-focus images are stabilized so that the computed figure-of-merit relates to consistent scenes between iterations of the autocalibration algorithm and wherein the computed figure-of-merit is offset according to an amount of motion occurring so that the figure-of-merit is performed on a stabilized image; and moves the focus lens to the location that produces the highest figure-of-merit.