附录
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 Name | Type | Required | Description |
|---|---|---|---|
| cameraId | string | No | Camera ID. 0: Camera 0 main device, 1: Camera 1 slave device, 2: Camera 2 slave device. Default is Camera 0 if not specified. |
| triggerWay | int | Yes | Trigger mode. 0: IO trigger, 1: Software trigger (continuous). Example: "triggerWay": 0 |
| rimType | int | No | Edge setting. 0: Rising edge, 1: Falling edge. (Required when triggerWay is 0) |
| triggerDelay | int | No | Minimum trigger interval (ms). "triggerDelay": 0 means no delay. |
| debounce | int | No | Debounce interval (ms), required when trigger mode is IO trigger. Example: "debounce": 5 |
| inputChannel | int | No | IO input type. Example: "inputChannel": 1 |
| width | int | Yes | Image width. Example: "width": 1920 or "width": 3840 |
| height | int | Yes | Image height. Example: "height": 1080 or "height": 2160 |
| fps | int | Camera frame rate (fps). Required when auto exposure is disabled. Example: "fps": 60 | |
| format | int | Yes | Camera encoding, currently only supports 35. Example: "format": 35 |
| exposureMeteringMode | int | No | Exposure metering mode, 0: disable, 1: enable. Example: "exposureMeteringMode": 1 |
| autoExposure | bool | Yes | Auto exposure setting. true: enable, false: disable. Example: "autoExposure": true |
| exposureCompensation | float | No | Exposure compensation, required and effective when auto exposure is enabled. Example: "exposureCompensation": 0 |
| exposureTime | long | No | Camera exposure time (us). Required when auto exposure is disabled. Example: "exposureTime": 20000000 |
| sensitivity | int | No | Camera ISO sensitivity. Required when auto exposure is disabled. Example: "sensitivity": 500 |
| autoFocus | bool | Yes | Auto focus. true: enable, false: disable. Example: "autoFocus": false |
| autoWhiteBalanceMode | int | No | Auto white balance mode, required and effective when custom white balance is disabled. 0: disable, 1: enable. Example: "autoWhiteBalanceMode": 1 |
| autoWhiteBalanceLock | bool | No | Whether 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 |
| customWhiteBalanceMode | int | No | Custom white balance mode, required and effective when custom white balance is enabled. 0: disable, 1: enable. Example: "customWhiteBalanceMode": 1 |
| colorCorrectionGains | array | No | Color correction gains (4-element float array), required and effective for RGB gains. Example: [1.0, 1.0, 1.0, 1.0] |
| colorCorrectionTransform | array | No | Color 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] |
| colorTemperature | int | No | Color temperature. Example: "colorTemperature": 5500 |
| contrast | int | Yes | Contrast. Range: 0-100. Example: "contrast": 0 |
| sharpness | int | Yes | Sharpness. Range: 0-100. Example: "sharpness": 0 |
| saturation | int | Yes | Saturation. 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
}