PDF: 4749051511/Source: 7788125767
Aptina reserves the right to change products or specifications without notice.
MT9T111_DG - Rev. B 9/10 EN
101
©2007 Aptina Imaging Corporation. All rights reserved.
MT9T111: Developer Guide
Auto White Balance (AWB)
Preliminary
AWB Procedure
The AWB algorithm is designed to compensate for the effects of changing spectra of the
scene illumination on the quality of the color rendition.
The algorithm consists of two major parts:
• A measurement engine performing statistical analysis of the image.
• The AWB driver performing the selection of the optimal color correction matrix,
digital, and sensor core analog gains.
The driver keeps analog gain ratio of left and right matrices corresponding to two oppo-
site illuminations: red-rich (incandescent) and blue-rich (daylight), respectively. The
AWB driver analyzes measurement engine data and sets appropriate digital AWB gains
and current matrix position (0x0053). The color correction matrix position defines the
current matrix coefficients and analog gain ratio.
Example: CCM Values for AWB
The following example settings show the registers related to AWB control in the
MT9T111.
[Enable AWB in Context A]
VAR = 26, 0x3D, 0x0000 // PRI_A_CONFIG_AWB_ALGO_ENTER
VAR = 26, 0x3F, 0x00FF // PRI_A_CONFIG_AWB_ALGO_RUN
VAR = 26, 0x41, 0x0000 // PRI_A_CONFIG_AWB_ALGO_LEAVE
VAR8 = 1, 0x00, 0x06 // SEQ_CMD
[Enable Manual WB in Context A]
VAR = 26, 0x3D, 0x0000 // PRI_A_CONFIG_AWB_ALGO_ENTER
VAR = 26, 0x3F, 0x00F7 // PRI_A_CONFIG_AWB_ALGO_RUN
VAR = 26, 0x41, 0x0000 // PRI_A_CONFIG_AWB_ALGO_LEAVE
VAR8 = 11, 0x35, 0x75 // AWB_CCMPOSITION -->Manual WB control
// Color fine tuning
VAR = 26, 0x43, 0x0003 // PRI_A_CONFIG_AWB_AWB_XSHIFT
VAR = 26, 0x45, 0x0010 // PRI_A_CONFIG_AWB_AWB_YSHIFT
VAR8 = 26, 0x49, 0x40 // PRI_A_CONFIG_AWB_X0
VAR8 = 26, 0x4A, 0x80 // PRI_A_CONFIG_AWB_K_R_L
VAR8 = 26, 0x4B, 0x80 // PRI_A_CONFIG_AWB_K_G_L
VAR8 = 26, 0x4C, 0x80 // PRI_A_CONFIG_AWB_K_B_L
VAR8 = 26, 0x4D, 0x80 // PRI_A_CONFIG_AWB_K_R_R
VAR8 = 26, 0x4E, 0x80 // PRI_A_CONFIG_AWB_K_G_R
VAR8 = 26, 0x4F, 0x80 // PRI_A_CONFIG_AWB_K_B_R
VAR8 = 1, 0x00, 0x06 // SEQ_CMD
[Register A light CCM]
REG = 0x32C0, 0x3923 // (1) COLOR_CORR_MATRIX_SCALE_14
REG = 0x32C2, 0x0724 // (1) COLOR_CORR_MATRIX_SCALE_11
REG = 0x32C4, 0x86C0 // (2) COLOR_CORR_MATRIX_1_2
REG = 0x32C6, 0x3618 // (2) COLOR_CORR_MATRIX_3_4
REG = 0x32C8, 0x34BE // (2) COLOR_CORR_MATRIX_5_6
REG = 0x32CA, 0xE10C // (2) COLOR_CORR_MATRIX_7_8
REG = 0x32CC, 0x2DF4 // (2) COLOR_CORR_MATRIX_9