This page describle the basic control over the sensor registers using Arducam camera breakout board, it might not be able to cover all the detail register operations, but give you an insight how to adjust these settings.
Sensor I2C Slave Address
The IMX135 camera I2C 8-bit slave address is fixed to 0x20. With 16bit regsiter address, and 8bit register value.
There is “sensor_model_id ” registers (0x0016/0x0017) which can help diagnose if the I2C bus is accessable and distinguish the camera models.
You need a basic settings to bring up the sensor and make it working in normal streaming mode. Please contact us for the config file for the Window GUI.
Manual Exposure Control
The integration time is related to fine_integration_time , coarse_integration_time and line_length_pck registers. The setting value of coarse_integration_time value indicates the number of lines for the integration time. The duration of one line is decided by number of Logic Clock per line multiply by 2 and designated by line_length_pck register. It can be converted into time (sec) by Formular 1 .
Tline = line_length_pck / (2×VTPXCK) …(Formula 1)
Where, VTPXCK is the internal image processing clock,
VTPXCK = PLCK(PLLoutput clock frequency) / Post Divider ratio setting
= INCK frequency / PREPLLCK_VT_DIV × PLL_VT_MPY / (VTSYCK_DIV × VTPXCK_DIV)
The maximum integration time value is obtained by subtracting “four” from the number of lines per frame (set by frame_length_lines) including the blanking period.
The integration time (TSH) can be obtained from the following relational equation. Define duration of one line as Tline(Formula 1 Reference),
TSH ＝ Tline ×（coarse_integration_time + fine_integration_time / (line_length_pck/2)）
Given the VTPXCK = 116MHz and line_length_pck = 0x3550, then the Tline ~= 59us.
RegAddr 0x0202 = 0x00, 0x0203 = 0x46
RegAddr 0x0202 = 0x01, 0x0203 = 0x46
RegAddr 0x0202 = 0x03, 0x0203 = 0x46
Manual Gain Control
Gain settings are like the ISO settings in most digital cameras. The gain is divided into analog and digital gain, and there are separate gain settings for four color-specific gains.
Here we demonstrate how to change the gain through the analogue_gain_code_global register (0x0205 in hex).
RegAddr = 0x0205, Value = 0x00
RegAddr = 0x0205, Value = 0x80
RegAddr = 0x0205, Value = 0xC0
White Balance Control
The IMX135 sensor output is RAW bayer format, each RGB channel gain is controlled by corresponding gain regsiter.
There are 8 registers related to color gain settings which can be used for control white balance.
The global gain is used to set all color gain value at one time. The other 4 registers control GR, B, R, GB respectively.
Tips: GR, GB should be set equally, and Red, Blue gain can be set higher than GR/GB gain to get better color represent. Automatic software whtie balance is also possible with proper AWB algorithm to set these gain settings automatically.