OH
I
Figure 26. Blac
MT9V032
www.onsemi.com
42
Figure 26. Black Level Calibration Flow Chart
Pixel Output
(reset minus signal)
Offset Correction
Voltage (R0x48 or
result of BLC)
Gain Selection
(R0x35 or
result of AGC)
ADC Data
(9:0)
10 (12) bit ADC
C1
C2
+
Σ
×
VREF
(R0x2C)
The automatic black level calibration measures the
average value of pixels from 2 dark rows (1 dark row if row
bin 4 is enabled) of the chip. (The pixels are averaged as if
they were light−sensitive and passed through the appropriate
gain.)
This row average is then digitally low−pass filtered over
many frames (R0x47, bits 7:5) to remove temporal noise and
random instabilities associated with this measurement.
Then, the new filtered average is compared to a minimum
acceptable level, low threshold, and a maximum acceptable
level, high threshold.
If the average is lower than the minimum acceptable level,
the offset correction voltage is increased by a programmable
offset LSB in R0x4C. (Default step size is 2 LSB Offset =
1 ADC LSB at analog gain = 1X.)
If it is above the maximum level, the offset correction
voltage is decreased by 2 LSB (default).
To avoid oscillation of the black level from below to
above, the region the thresholds should be programmed so
the difference is at least two times the offset DAC step size.
In normal operation, the black level calibration
value/offset correction value is calculated at the beginning
of each frame and can be read through the two−wire serial
interface from R0x48. This register is an 8−bit signed two’s
complement value.
However, if R0x47, bit 0 is set to “1,” the calibration value
in R0x48 may be manually set to override the automatic
black level calculation result. This feature can be used in
conjunction with the “show dark rows” feature (R0x0D, bit
6) if using an external black level calibration circuit.
The offset correction voltage is generated according to the
following formulas:
Offset Correction Voltage +(8 *bit signed twoȀs complement calibration value, *127to127) x 0.5mV (eq. 12)
ADC input voltage +(Pixel Output Voltage )Offset Correction Voltage) x Analog Gain (eq. 13)
Row−wise Noise Correction
Row−wise noise correction is controlled by the following
registers:
•R0x70 row noise control
•R0x72 row noise constant
•R0x73 dark column start
When the row−wise noise cancellation algorithm is
enabled, the average value of the dark columns read out is
used as a correction for the whole row. The row−wise
correction is in addition to the general black level correction
applied to the whole sensor frame and cannot be used to
replace the latter. The dark average is subtracted from each
pixel belonging to the same row, and then a positive constant
is added (R0x72, bits 7:0). This constant should be set to the
dark level targeted by the black level algorithm plus the
noise expected on the measurements of the averaged values
from dark columns; it is meant to prevent clipping from
negative noise fluctuations.
Pixel value +ADC value *dark column average )row noise constant (eq. 14)
On a per−row basis, the dark column average is calculated
from a programmable number of dark columns (pixels)
values (R0x70, bits 3:0). The default is 10 dark columns. Of
these, the maximum and minimum values are removed and
then the average is calculated. If R0x70, bits 3:0 are set to
“0” (2 pixels), it is essentially equivalent to disabling the
dark average calculation since the average is equal to “0”
after the maximum and minimum values are removed.
R0x73 is used to indicate the starting column address of
dark pixels that the row−noise correction algorithm uses for
calculation. In the MT9V032, dark columns which may be
used are 759–776. R0x73 is used to select the starting
column for the calculation.
One additional note in setting the row−noise correction
register:
777 t(R0x73, bits9 : 0) )number of dark pixels programmed in R0x70, bits3 : 0 *1 (eq. 15)