2024年11月08日 第13讲 Camera Sensor XML配置介绍 极客笔记
本讲是Camera Sensor驱动专题的第13讲,我们介绍Camera Sensor XML配置介绍。
更多资源:
资源 | 描述 |
---|---|
在线课程 | 极客笔记在线课程 |
知识星球 | 星球名称:深入浅出Android Camera 星球ID: 17296815 |
极客笔记圈 |
目标文件: com.qti.sensormodule.sunny_imx586.bin
配置文件: buildbins_sm6150.yaml
以sensor/imx586/imx586_sensor.xml为例
结构如下:
项目 | 内容 | 备注 |
---|---|---|
<slaveInfo> |
||
sensorName | imx586 | sensor型号 |
slaveAddress | 0x34 | i2c write address |
regAddrType | 2 | 地址类型 |
regDataType | 2 | 数据类型 |
sensorIdRegAddr | 0x0016 | sensor id 寄存器地址 |
sensorId | 0x0586 | sensor id 值 |
sensorIdMask | 0xFFFFFFFF | |
i2cFrequencyMode | FAST_PLUS | i2c 操作频率 |
<powerUpsequence> |
||
configType | VANA/VDIG/VIO/MCLK/RESET | 上电控制节点 |
configValue | 0 | 电压/电平/时钟状态 |
delayMs | 0 | 延时 |
… | ||
</powerUpsequence> |
||
<powerDownSequence> |
||
configType | VANA/VDIG/VIO/MCLK/RESET | 下电控制节点 |
configValue | 0 | 电压/电平/时钟状态 |
delayMs | 0 | 延时 |
… | ||
</powerDownSequence> |
||
</slaveInfo> |
||
<regAddrInfo> |
||
xOutput | 0x034c | sensor x寄存器地址 |
yOutput | 0x034e | sensor y寄存器地址 |
frameLengthLines | 0x0340 | vts 寄存器地址 |
lineLengthPixelClock | 0x0342 | hts 寄存器地址 |
coarseIntgTimeAddr | 0x0202 | linecount曝光寄存器地址 |
shortCoarseIntgTimeAddr | 0x0224 | 短曝光寄存器地址 |
globalGainAddr | 0x0204 | gain寄存器地址 |
shortGlobalGainAddr | 0x0216 | 短帧gain寄存器地址 |
digitalGlobalGainAddr | 0x020e | 数字gain寄存器地址 |
testPatternRAddr | 0x0602 | R通道测试寄存器 |
testPatternGRAddr | 0x0604 | Gr通道测试寄存器 |
testPatternBAddr | 0x0608 | B通道测试寄存器 |
testPatternGBAddr | 0x0606 | Gb通道测试寄存器 |
</regAddrInfo> |
||
<resolutionInfo> |
||
sensorVersion | 0 | |
<resolutionData> |
||
colorFilterArrangement | BAYER_BGGR | bayer阵列 |
<streamInfo> |
||
<streamConfiguration> |
||
vc | 0 | 虚拟通道 |
dt | 43 | 数据类型 |
<frameDimension> |
||
xStart | 0 | x坐标 |
yStart | 0 | y坐标 |
width | 8000 | 宽 |
height | 6000 | 高 |
</frameDimension> |
||
bitWidth | 10 | 位宽 |
type | IMAGE | 数据流类型 |
</streamConfiguration> |
||
</streamInfo> |
||
lineLengthPixelClock | 9440 | hts |
framelengthLines | 6074 | vts |
minHorizontalBlanking | 679 | hblanking |
minVerticalBlanking | 69 | vblanking |
outputPixelClock | 1586910000 | op_clk |
horizontalBinning | 1 | hbinning |
verticalBinning | 1 | vbinning |
frameRate | 30.00 | 帧率 |
laneCount | 3 | mipi lane count |
settleTimeNs | 14 | mipi settle time |
is3Phase | 1 | DPHY or CPHY |
<regSettings> |
||
<regsetting> |
||
registerAddr | 0x0112 | sensor寄存器地址 |
registerData | 0x0A | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延时 |
… | ||
</regsetting> |
||
<cropInfo> |
||
left | 0 | 左边宽度 |
right | 0 | 右边宽度 |
top | 0 | 上边宽度 |
bottom | 0 | 下边宽度 |
</cropInfo> |
||
RemosaicTypeInfo | HWRemosaic | HW/SW |
capability | QuadCFA | |
ADCReadoutTime | 2 | 行数据ADC转换时间 |
</resolutionData> |
||
… | ||
</resolutionInfo> |
||
<exposureControlInfo> |
||
maxAnalogGain | 32 | 最大模拟gain |
maDigitalGain | 1 | 最大数字gain |
verticalOffset | 48 | offset < = vts – linecount |
minLineCount | 6 | 最小linecount |
maxLineCount | 900000 | 最大linecount |
realToRegDigitalGainConversionFactor | 256 | |
realToRegGain | / | |
regToRealGain | / | |
</exposureControlInfo> |
||
<streamOnSettings> |
||
<regSetting> |
||
registerAddr | 0x0100 | streamon 寄存器 |
registerData | 0x01 | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延时 |
</regsetting> |
||
… | ||
</streamOnsettings> |
||
<streamOffSettings> |
streamoff寄存器 | |
<regSetting> |
||
registerAddr | 0x0100 | sensor寄存器地址 |
registerData | 0x00 | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延时 |
</regsetting> |
||
… | ||
</streamOffSettings> |
||
<groupHoldOnSettings> |
sensor holdon寄存器 | |
<regSetting> |
||
registerAddr | 0x0104 | sensor寄存器地址 |
registerData | 0x01 | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延时 |
</regsetting> |
||
… | ||
</groupHoldOnSettings> |
||
<groupHoldOffSettings> |
||
<regSetting> |
||
registerAddr | 0x0104 | sensor寄存器地址 |
registerData | 0x00 | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延时 |
</regsetting> |
||
… | ||
</groupHoldOffSettings> |
||
<masterSettings> |
||
<regSetting> |
||
registerAddr | 0x0350 | |
registerData | 0x00 | |
regAddrType | 2 | |
regDataType | 1 | |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延迟 |
</regsetting> |
||
</masterSettings> |
||
<initSettings> |
||
sensorVersion | 0 | 版本号 |
<initSetting> |
||
<regSetting> |
||
registerAddr | 0x0136 | sensor寄存器地址 |
registerData | 0x13 | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延迟 |
</regSetting> |
||
… | ||
</initSetting> |
||
</initSettings> |
||
<testPatternInfo> |
||
<testPatternData> |
||
mode | OFF | 使能标志 |
<settings> |
||
<regSetting> |
||
registerAddr | 0x0600 | sensor寄存器地址 |
registerData | 0x00 | sensor寄存器值 |
regAddrType | 2 | 地址类型 |
regDataType | 1 | 值类型 |
operation | WRITE | 读写操作 |
delayUs | 0x00 | 延迟 |
</regsetting> |
||
</settings> |
||
</testPatternData> |
||
</testPatternInfo> |
||
<colorLevelInfo> |
||
whiteLevel | 1023 | 最大亮度 |
rPedestal | 64 | 暗电流 |
grPedestal | 64 | 暗电流 |
bPedestal | 64 | 暗电流 |
gbrPedestal | 64 | 暗电流 |
</colorLevelInfo> |
||
<opticalBlackRegionInfo> |
||
<dimension> |
||
xStart | 0 | 非感光区域x坐标 |
yStart | 0 | 非感光区域y坐标 |
width | 0 | 非感光区域宽 |
height | 0 | 非感光区域高 |
</dimension> |
||
</opticalBlackRegionInfo> |
||
<pixelArrayInfo> |
||
<activeDimension> |
||
width | 8000 | sensor最大有效输出尺寸 |
height | 6000 | |
<activeDimension> |
||
<dummyInfo> |
||
left | 0 | 左边宽度 |
right | 0 | 右边宽度 |
top | 0 | 上边宽度 |
bottom | 0 | 下边宽度 |
</dummyInfo> |
||
</pixelArrayInfo> |
||
<delayInfo> |
||
linecount | 2 | linecount延时几帧生效 |
gain | 2 | gain延时几帧生效 |
framelengthLines | 2 | vts延时几帧生效 |
maxPipeline | 2 | sensor延迟几帧生效 |
frameSkip | 1 | sensor丢帧 |
</delayInfo> |
||
<sensorProperty> |
||
pixelSize | 0.8 | 像素尺寸 |
cropFactor | 5.78 | crop因子 |
sensingMethod | ONE_CHIP_COLOR_AREA | |
</sensorProperty> |
本文链接:http://so.lmcjl.com/news/17314/