Datasheet

Table Of Contents
PDF: 09005aef8202ec2e/Source: 09005aef8202ebf7 Micron Technology, Inc., reserves the right to change products or specifications without notice.
MT9D111__2_REV5.fm - Rev. B 2/06 EN
20 ©2004 Micron Technology, Inc. All rights reserved.
MT9D111 - 1/3.2-Inch 2-Megapixel SOC Digital Image Sensor
Architecture Overview
Micron Confidential and Proprietary
Auto Focus
Algorithm
Auto focus (AF) algorithm implemented in the MT9D111 firmware seeks to maximize
sharpness of vertical lines in images output by the sensor, by guiding an external lens
actuator to the position of best lens focus. The algorithm is actuator-independent: it
provides guidance by means of an abstract 1-dimensional position variable, leaving the
translation of its changes into physical lens movements to a separate AF mechanics
(AFM) driver. The AF algorithm relies on the AFM driver to generate digital output sig-
nals needed to move different lens actuators and to correctly indicate at all times if the
lens is stationary or moving. The latter is required to prevent the AF algorithm from
using line sharpness measurements distorted by concurrent lens motion.
For measuring line sharpness, the AF algorithm relies on focus measurement engine in
the color pipeline, which is a programmable vertical-edge-filtering module. The module
convolves two pre-programmed 1-dimensional digital filters with luminance (Y) data it
receives row by row from the color interpolation module. In every interpolated image,
the pixels whose Y values are used in the convolution form a rectangular block that can
be arbitrarily positioned and sized, and in addition divided into up to 16 equal-size sub-
blocks, referred to as AF windows or zones. The absolute values of convolution results
are summed separately for each filter over each of the AF windows, yielding up to 32
sums per frame. As soon as these sums or raw sharpness scores are computed, they are
put in dedicated IFP registers (R[77:84]:2 and R[87:94]:2), as are Y averages from all the
AF windows (in R[67:74]:2). The AF algorithm reduces these data to one normalized
sharpness score per AF window, by calculating for each window the ratio (S1+S2)/<Y>,
where <Y> is the average Y and S1 and S2 are the raw sharpness scores from the two fil-
ters multiplied by 128. Programming the filters into the MT9D111 includes specifying
their relative weights, so each ratio can be called a weighted average of two equally nor-
malized sharpness scores from the same AF window. In addition to unequal weighting of
the filters, the AF algorithm permits unequal weighting of the windows, but window
weights are not included in the normalized sharpness scores, for a reason that will soon
become clear.
There are several motion sequences through which the MT9D111 AF algorithm can
bring a lens to best focus position. All these sequences begin with a jump to a prese-
lected start position, e.g. the infinity focus position. This jump is referred to as the first
flyback. It is followed by a unidirectional series of steps that puts the lens at up to 19 pre-
selected positions different from the start position. This series of steps is called the first
scan.
Before and during this scan, the AF algorithm stops the lens at each preselected position
for long enough to obtain valid sharpness scores. The first normalized score from each
AF window is stored as both the worst (minimum) and best (maximum) score for that
window. These two extreme scores are then updated as the lens moves from one position
to the next and a new maximum position is memorized at every update of the maximum
score. In effect, the preselected set of lens positions is scanned for maxima of the nor-
malized sharpness scores, while at the same time information needed to validate each
maximum is being collected. This information is in the difference between the maxi-
mum and the minimum of the same score. A small difference in their values indicates
that the score is not sensitive to the lens position and therefore its observed extrema are
likely determined by random noise. On the other hand, if the score varies a lot with the
lens position, its maximum is much more likely to be valid, i.e. close to the true sharp-
ness maximum for the corresponding AF window. Due to these considerations, the AF
algorithm implemented in MT9D111 ignores the maxima of all sharpness scores whose
peak-to-trough variation is below a preset percentage threshold. The remaining max-