A method and apparatus for accurately auto focusing a lens of an imaging
device. An imaged scene is split into an array of zones. The minimum and
maximum sharpness score for each zone is determined over a plurality of
lens positions. A histogram of the lens positions of the corresponding
maximum weighted sharpness score for each zone is created. The peak of
the histogram is determined to be the best focus position for a given
scene.