附录 
MIPI相机配置文件 
有参配置文件的内容、位置及文件名由客户自行定义配置,但格式及参数需按照以下要求:
- 配置文件为json格式。
 - 标注为必选参数或因为开关参数打开而成为必选参数,则必须配置。
 - 相应参数的名字(大小写敏感)及类型必须符合下面表格要求。
 
| 参数名 | 类型 | 必填 | 说明 | 
|---|---|---|---|
| cameraId | string | 否 | 相机id | 
| triggerWay | int | 是 | 触发方式。0:IO触发,1:连续触发。 | 
| rimType | int | 否 | 边沿设置。0:上升沿,1:下降沿。触发方式为IO触发时必填。 | 
| triggerDelay | int | 否 | 最小触发间隔(ms)。触发方式为IO触发时必填。 | 
| debounce | int | 否 | 防抖间隔(ms),触发方式为IO触发时必填。 | 
| inputChannel | int | 否 | IO输入类型。 | 
| width | int | 是 | 图像宽。 | 
| height | int | 是 | 图像高。 | 
| fps | int | fps。自动曝光关闭时必填。 | |
| format | int | 是 | 相机编码,只支持35(YUV_420_888)。 | 
| exposureMeteringMode | int | 否 | 曝光测光模式。 | 
| autoExposure | bool | 是 | 自动曝光。true:曝光开启,false:曝光关闭。 | 
| exposureCompensation | float | 否 | 曝光补偿,自动曝光开启时生效且必填。 | 
| autoExposureLock | bool | 否 | 自动曝光当前是否锁定为最新计算值,自动曝光时生效。 | 
| exposureTime | long | 否 | 曝光时长(us)。自动曝光关闭时必填。 | 
| sensitivity | int | 否 | 感光度(iso)。自动曝光关闭时必填。 | 
| autoFocus | bool | 是 | 自动对焦。 | 
| focusDistance | float | 否 | 对焦距离(屈光度),自动对焦关闭时生效。 | 
| customWhiteBalance | bool | 是 | 自定义白平衡。 | 
| autoWhiteBalanceMode | int | 否 | 自动白平衡模式,自定义白平衡关闭时生效且必填。 | 
| autoWhiteBalanceLock | bool | 否 | 自动白平衡当前是否锁定为最新计算值,自动白平衡时生效。 | 
| customWhiteBalanceMode | int | 否 | 自定义白平衡模式,自定义白平衡开启时生效且必填。 | 
| colorCorrectionGains | array | 否 | 色彩矫正增益(4位float数组), RGB增益时生效且必填。参数示例:[1.0,1.0,1.0,1.0] | 
| colorCorrectionTransform | array | 否 | 色彩矫正变换(18位int数组)。 参数示例:[1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1] | 
| colorTemperature | int | 否 | 色温。 参数示例:5500 | 
| contrast | int | 是 | 对比度。 值: 0 - 100 | 
| sharpness | int | 是 | 锐度。 值: 0 - 100 | 
| saturation | int | 是 | 饱和度。 值: 0 - 100 | 
有参配置文件参考内容:
json
{
    "triggerWay" : 1,
    "rimType" : 1,
    "triggerDelay" : 0,
    "width" : 640, 
    "height" : 480,
    "fps": 30,
    "format" : 35,
    "autoExposure" : true,
    "exposureCompensation" : 0,
    "exposureTime" : 20000,
    "sensitivity" : 500,
    "autoFocus": true,
    "customWhiteBalance": false,
    "autoWhiteBalanceMode" : 1,
    "autoWhiteBalanceLock" : false,
    "customWhiteBalanceMode" : 1,
    "colorCorrectionGains": [1.0,1.0,1.0,1.0],
    "contrast" : 0, 
    "sharpness" : 0, 
    "saturation" : 0
}