light
Debugging Tools - Exposure Tuning

Overexposure on the RV1126B is mainly tuned through the AE (auto exposure) of ISP35, not by arbitrarily reducing brightness at the application level. The recommended approach is as follows.
Exposure Tuning
Link: https://pan.baidu.com/s/1wE2desT-SXbfEhyMH60NjQ?pwd=fanc
Extraction code: fanc
Conclusion First
| Layer | Location | Purpose |
|---|---|---|
| IQ parameters (the main battleground) | external/camera_engine_rkaiq/rkaiq/iqfiles/isp35/common/*.json → device /etc/iqfiles/ | Change target brightness, EV, overexposure protection |
| Online tuning tool | PC IQ Tool + board-side rkaiq_tool_server (port 5543) | Connect to 10.0.0.102 and change AE in real time |
| Application-layer API | rk_aiq_user_api2_ae_* / rkipc isp.c | Temporarily reduce exposure or enable HLC in code |
| Documentation | Redmine ISP35 Tuning Guide (may be incomplete in the SDK docs) | Official AE/OverExp description |
The EVB default sensor tends to be SC450AI, with the corresponding IQ:
external/camera_engine_rkaiq/rkaiq/iqfiles/isp35/common/sc450ai_default_default.json
1. First confirm the Sensor / IQ actually used by the device
In a terminal that has already run adb connect 10.0.0.102:
adb shell
# Or if already in the shell:
ls /etc/iqfiles/ /usr/share/iqfiles/ /oem/usr/share/iqfiles/ 2>/dev/null
ps | grep -E 'rkipc|rkaiq'
media-ctl -p 2>/dev/null | head -80
cat /sys/class/video4linux/v4l-subdev*/name 2>/dev/null
Check whether sc450ai_*.json or imx415_*.json etc. is actually loaded, and only modify the corresponding file afterwards.
How rkipc is started (in the SDK):
if [ -d "/usr/share/iqfiles" ];then
rkipc -a /usr/share/iqfiles &
2. For overexposure, change these 3 AE parameters first (IQ JSON)
The paths in the JSON are: scene_isp35 → ae_calib → linAeCtrl (linear) / hdrAeCtrl (HDR).
Taking the SC450AI defaults as an example:
"linAeCtrl": {
"sw_aeT_evBias_strg": 0,
...
"dynSetpoint": {
"sw_aeT_dynSetpoint_dot": [30, 30, 30, 30, 28, 26, 24]
},
"overExpCtrl": {
"sw_aeT_overExp_en": 0,
"sw_aeT_overExpBias_strg": 0,
...
}
| Parameter | Effect | How to adjust it when overexposed |
|---|---|---|
sw_aeT_dynSetpoint_dot | AE target brightness | Lower it overall, e.g. 30→22~25 |
sw_aeT_evBias_strg | EV compensation (about -500~500) | Make it negative, e.g. -30 ~ -80 |
overExpCtrl.sw_aeT_overExp_en | Highlight overexposure protection | 0→1, and you can adjust sw_aeT_overExpBias_strg / hiLitWgt |
Note: the current default is ae_strategy_lowlight_mode (biased towards preserving shadows), so bright scenes tend to be brighter; when overexposure is obvious, use overexposure protection together with it, or change the strategy according to the Tuning Guide.
3. Recommended workflows (two options)
Option A: Online tuning (fastest, recommended)
Tools:
- Board side:
rkaiq_tool_server(source:external/camera_engine_rkaiq/rkaiq_tool_server/) - PC: Rockchip IQ Tool / IQLab (outside the SDK, usually obtained from Redmine/AVL)
- Optional:
dumpcam(external/camera_engine_rkaiq/rkaiq/tools/dumpcam/) to view AE status
# PC
adb connect 10.0.0.102
adb forward tcp:5543 tcp:5543 # Use this if connecting directly by IP does not work
# Device: make sure the camera is running (rkipc etc.), then start the tool server
adb shell "which rkaiq_tool_server; rkaiq_tool_server -i /etc/iqfiles -d 0"
In the PC IQ Tool, connect to 10.0.0.102:5543 (or 127.0.0.1:5543) → open AE → lower SetPoint / set a negative EvBias / enable OverExp → export the JSON.
Push it back to the device:
adb push your_sensor_xxx.json /etc/iqfiles/
adb shell "sync; killall rkipc; rkipc -a /etc/iqfiles &"
# If the startup script uses /usr/share/iqfiles, push to that same path and keep it consistent with RkLunch
Note: some Yocto images trim out rkaiq_tool_server/dumpcam; if they are missing, build them into the rootfs from the SDK or push them separately via adb.
Option B: Modify the IQ offline and then push it
- Edit in the SDK:
external/camera_engine_rkaiq/rkaiq/iqfiles/isp35/common/<your sensor>_*.json adb pushit to the device's IQ directory and restartrkipc- Or repackage the rootfs / flash a full image to make the change permanent after editing
4. Code / application layer (temporary verification)
API header:
external/camera_engine_rkaiq/rkaiq/include/uAPI2/rk_aiq_user_api2_ae.h
Examples (OverExp / EvBias):
external/camera_engine_rkaiq/rkisp_demo/demo/sample/sample_ae_module.c
sample_set_OverExpCtrl() and rk_aiq_user_api2_ae_setLinExpAttr() in it.
Existing rkipc wrappers (manual exposure, HLC):
app/rkipc/common/isp/rv1126b/isp.c
rk_isp_set_exposure_mode/time/gain→ manually reduce exposure for verificationrk_isp_set_hlc/rk_isp_set_hlc_level→ highlight suppression (rk_aiq_uapi2_setHLCMode/Strength)
Suitable for "first confirming whether the pure AE target is too high", not for final mass-production calibration.
5. Suggested troubleshooting order
- Confirm the sensor + the actual IQ file name
- Overexposure in daytime: first lower
dynSetpoint+ use a negativeevBias - If highlights still blow out: enable
overExpCtrl, and if necessary enable rkipc HLC - If still saturated: check whether
time/gaininrouteis too large, and whether HDR should be used - After tuning stably with IQ Tool, bake the JSON into
/etc/iqfiles(or the SDK iqfiles) before mass production
Documentation
- Refer to the ISP35 Tuning Guide (RV1126B / RKIPC related)
- Entry:
docs/cn/Common/ISP/The-Latest-Camera-Documents-Link.txt→ Rockchip Redmine document 53