Skip to content

附录

智能相机配置文件

有参配置文件的内容、位置及文件名由客户自行定义配置,但格式及参数需按照以下要求:

  • 配置文件为json格式。示例设置:/home/aidlux/camera_config.json
  • 标注为必选参数或因为开关参数打开而成为必选参数,则必须配置。
  • 相应参数的名字(大小写敏感)及类型必须符合下面表格要求。
参数名类型必填说明
autoExposurebool自动曝光设置。true:开启曝光,false:关闭曝光。参数示例 "autoExposure": true
autoFocusbool自动对焦,ture:开启自动对焦,false:关闭自动对焦。参数示例 "autoFocus": false
autoWhiteBalanceModeint自动白平衡模式,自定义白平衡关闭时生效且必填,0:关闭白平衡模式,1:开启白平衡模式。参数示例 "autoWhiteBalanceMode": 1
autoWhiteBalanceLockbool自动白平衡当前是否锁定为最新计算值,自动白平衡时生效,true:开启锁定,false:关闭锁定。参数示例 "autoWhiteBalanceLock": false
aidluxFIFOint采集数据保存地址。参数示例 "aidluxFIFO": "/tmp/static_metadata_fifo"
customWhiteBalanceModeint自定义白平衡模式,自定义白平衡开启时生效且必填,0:关闭,1:开启。参数示例 "customWhiteBalanceMode": 1
customWhiteBalancebool自定义白平衡当前是否锁定为最新计算值,自定义白平衡时生效,true:开启锁定,false:关闭锁定。参数示例 "customWhiteBalance": false
colorCorrectionGainsarray色彩矫正增益(4位float数组), RGB增益时生效且必填。参数示例 [1.0,1.0,1.0,1.0]
colorCorrectionTransformarray色彩矫正变换(18位int数组)。 参数示例 [1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1]
colorTemperatureint色温。参数示例 "colorTemperature": 5500
contrastint对比度。 取值范围(0 - 100) 参数示例 "contrast": 0
debounceint防抖间隔(ms),触发方式为IO触发时必填。参数示例 "debounce": 0
exposureMeteringModeint曝光测光模式,0表示关闭,1表示开启。参数示例 "exposureMeteringMode": 1
exposureCompensationfloat曝光补偿设置,自动曝光开启时生效且必填 0:开启,1:关闭。参数示例 "exposureCompensation": 0
exposureTimelong相机的曝光时长(us)。自动曝光关闭时必填。参数示例 "exposureTime": 20000000
framerateint相机的帧率(fps)。自动曝光关闭时必填。参数示例 "framerate": 60
formatint相机编码目前仅支持35,后续再增加其他编码格式。参数示例 forrmat": 35
widthint图像的宽度设置。参数示例 "width": 1920 或者 "width": 3840
heightint图像的高度设置。参数示例 "height" : 1080 或者 "height" : 2160
inputChannelintIO输入类型。参数示例 "inputChannel": 1
rimTypeint边沿设置。0:上升沿,1:下降沿。(当为IO触发即"triggerWay": 0 时必须进行配置)
sensitivityint相机的感光度(iso)。自动曝光关闭时必填。参数示例 "sensitivity": 500
sharpnessint锐度。 取值范围(0 - 100) 参数示例 "sharpness": 2
saturationint饱和度。 取值范围(0 - 100) 参数示例 "saturation": 5
triggerWayint触发方式。0:IO触发,1:软触发即连续触发。参数示例 "triggerWay": 0
triggerDelayint最小触发间隔(ms)。"triggerDelay": 0 时表示无延迟触发。参数示例 "triggerDelay": 0

有参配置文件参考内容:

json
{
    "triggerWay" : 1,
    "rimType" : 1,
    "triggerDelay" : 0,
    "width" : 1920, 
    "height" : 1080,
    "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
}