autofocus control that uses image statistics data with coarse and refined autofocus scores. These are techniques provided to determine an optimal focal position using autofocus statistics. in one embodiment, such techniques may include generating coarse and refined autofocus scores to determine an optimal focal length at which to position a lens associated with image sensor 90. for example, statistics logic 680 may determine a coarse position indicating a optimal focus area which, in one embodiment, can be determined by looking for the first coarse position where a coarse autofocus score decreases relative to a coarse autofocus score in a previous position. By using this position as a starting point for refined scoring research, the optimal focal position can be determined by looking for a peak in refined autofocus scores. In another embodiment, autofocus statistics can also be determined based on each bayer rgb color, so that even in the presence of chromatic abnormalities, relative autofocus scores for each color can be used to determine the direction of focus.
展开▼