Skip to content

附录 ​

APPENDIX ​

Smart Camera Configuration File ​

The content, location, and file name of the parameter configuration file can be defined by the user, but the format and parameters must follow the requirements below:

  • Configuration file must be in JSON format. Example: /home/aidlux/camera_config.json
  • Parameters marked as required or required due to enabled switch parameters must be configured.
  • Parameter names (case-sensitive) and types must comply with the requirements in the table below.
Parameter NameTypeRequiredDescription
cameraIdstringNoCamera ID. 0: Camera 0 main device, 1: Camera 1 slave device, 2: Camera 2 slave device. Default is Camera 0 if not specified.
triggerWayintYesTrigger mode. 0: IO trigger, 1: Software trigger (continuous). Example: "triggerWay": 0
rimTypeintNoEdge setting. 0: Rising edge, 1: Falling edge. (Required when triggerWay is 0)
triggerDelayintNoMinimum trigger interval (ms). "triggerDelay": 0 means no delay.
debounceintNoDebounce interval (ms), required when trigger mode is IO trigger. Example: "debounce": 5
inputChannelintNoIO input type. Example: "inputChannel": 1
widthintYesImage width. Example: "width": 1920 or "width": 3840
heightintYesImage height. Example: "height": 1080 or "height": 2160
fpsintCamera frame rate (fps). Required when auto exposure is disabled. Example: "fps": 60
formatintYesCamera encoding, currently only supports 35. Example: "format": 35
exposureMeteringModeintNoExposure metering mode, 0: disable, 1: enable. Example: "exposureMeteringMode": 1
autoExposureboolYesAuto exposure setting. true: enable, false: disable. Example: "autoExposure": true
exposureCompensationfloatNoExposure compensation, required and effective when auto exposure is enabled. Example: "exposureCompensation": 0
exposureTimelongNoCamera exposure time (us). Required when auto exposure is disabled. Example: "exposureTime": 20000000
sensitivityintNoCamera ISO sensitivity. Required when auto exposure is disabled. Example: "sensitivity": 500
autoFocusboolYesAuto focus. true: enable, false: disable. Example: "autoFocus": false
autoWhiteBalanceModeintNoAuto white balance mode, required and effective when custom white balance is disabled. 0: disable, 1: enable. Example: "autoWhiteBalanceMode": 1
autoWhiteBalanceLockboolNoWhether auto white balance is locked to latest calculated value, effective when auto white balance is enabled. true: enable lock, false: disable lock. Example: "autoWhiteBalanceLock": false
customWhiteBalanceModeintNoCustom white balance mode, required and effective when custom white balance is enabled. 0: disable, 1: enable. Example: "customWhiteBalanceMode": 1
colorCorrectionGainsarrayNoColor correction gains (4-element float array), required and effective for RGB gains. Example: [1.0, 1.0, 1.0, 1.0]
colorCorrectionTransformarrayNoColor correction transform (18-element int array). Example: [1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1]
colorTemperatureintNoColor temperature. Example: "colorTemperature": 5500
contrastintYesContrast. Range: 0-100. Example: "contrast": 0
sharpnessintYesSharpness. Range: 0-100. Example: "sharpness": 0
saturationintYesSaturation. Range: 0-100. Example: "saturation": 0

Reference configuration file content:

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
}