An auto focus image system that includes an image sensor coupled to a controller. The image sensor captures an image that has at least one edge with a width. The controller generates a focus signal that is a function of the edge width. A lens receives the focus signal and adjust a focus. The edge width can be determined by various techniques including the use of gradients. A histogram of edge widths can be used to determine whether a particular image is focused or unfocused. A histogram with a large population of thin edge widths is indicative of a focused image.