A method and apparatus for accurately auto focusing a lens of an imaging
device. In an exemplary embodiment, 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 sharpness score for each zone is
created. The peak of the histogram is determined to be the best focus
position for a given scene.