技术专栏
RV11xx(rv1126/rv1109) IR-CUT调试过程
目录
1,IR-CUT配置文件路径
2,IR-CUT关键配置项
3,调试与生效
1,IR-CUT配置文件路径
SDK文件路径:
\RV1126_RV1109_SDK\external\camera_engine_rkaiq\iqfiles\imx307_MTV4-IR-E-P_40IRC-4MP-F16.xml
RV1126固件中配置文件位置:
/oem/etc/iqfiles/imx307_MTV4-IR-E-P_40IRC-4MP-F16.xml
2,IR-CUT关键配置项
<CPSL index="1" type="struct" size="[1 1]">
<enable index="1" type="char" size="[1 1]">
[1 ]
</enable>
<mode index="1" type="int" size="[1 1]">
[0 ]
</mode>
<force_gray index="1" type="char" size="[1 1]">
[1 ]
</force_gray>
<light_src index="1" type="int" size="[1 1]">
[2 ]
</light_src>
<auto_adjust_sens index="1" type="double" size="[1 1]">
[50.0000 ]
</auto_adjust_sens>
<auto_on2off_th index="1" type="int" size="[1 1]">
[3000 ]
</auto_on2off_th>
<auto_off2on_th index="1" type="int" size="[1 1]">
[100 ]
</auto_off2on_th>
<auto_sw_interval index="1" type="int" size="[1 1]">
[30]
</auto_sw_interval>
<manual_on index="1" type="char" size="[1 1]">
[0 ]
</manual_on>
<manual_strength index="1" type="double" size="[1 1]">
[100.0000 ]
</manual_strength>
</CPSL>
参考文件:Rockchip_Tuning_Guide_ISP2x_CN_v1.6.2.pdf (SDK中)
3,调试与生效
修改imx307_MTV4-IR-E-P_40IRC-4MP-F16.xml
步骤如下:
A: adb tool工具进入命令窗口
B:使用adb pull 下载文件
adb pull /oem/etc/iqfiles/imx307_MTV4-IR-E-P_40IRC-4MP-F16.xml .
本地修改xml文件配置选项
C:修改完后,将配置文件覆盖
adb push imx307_MTV4-IR-E-P_40IRC-4MP-F16.xml /oem/etc/iqfiles/
D:重启设备,生效配置文件
adb reboot
调试补光灯
对应设备树
rv11xx-owl-38ipc-v10-imx307.dts
rv11xx-owl-38ipc-v10.dtsi
rv1126.dtsi
rv1126-ipc.dtsi
pwm7: pwm@ff440030 {
compatible = "rockchip,rv1126-pwm", "rockchip,rk3328-pwm";
reg = <0xff440030 0x10>;
#pwm-cells = <3>;
pinctrl-names = "active";
pinctrl-0 = <&pwm7m0_pins>;
clocks = <&pmucru CLK_PWM1>, <&pmucru PCLK_PWM1>;
clock-names = "pwm", "pclk";
status = "disabled";
};
&pwm7 {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm7m0_pins_pull_down>;
};
cd /sys/class/pwm/pwmchip0/
echo 0 > export
cd pwm0
echo 10000 > period
echo 5000 > duty_cycle
echo normal > polarity
echo 1 > enable
camera_engine_rkaiq/algos/adpcc/rk_aiq_adpcc_algo.cpp:2324: pSelect->grayscale_mode = 0x1;
camera_engine_rkaiq/algos/adpcc/rk_aiq_adpcc_algo.cpp:2326: pSele
system("/usr/bin/pwmtest.sh 1");
system("/usr/bin/pwmtest.sh 0");
修改代码
void gc_cpsl_cfg_fill_light_mode_set(rk_aiq_cpsls_t mode) {
pthread_mutex_lock(&cpsl_cfg_mutex);
if (!gc_cpsl_cfg_init_flag)
memset(&gc_cpsl_cfg, 0, sizeof(rk_aiq_cpsl_cfg_t));
if (mode != RK_AIQ_CPSLS_INVALID)
gc_cpsl_cfg.lght_src = mode;
else if (!gc_cpsl_cfg_init_flag) {
gc_cpsl_cfg.lght_src = RK_AIQ_CPSLS_IR;
LOG_WARN("fill mode: %d is undefined, set ir by default\n", mode);
}
gc_cpsl_cfg_init_flag = 1;
pthread_mutex_unlock(&cpsl_cfg_mutex);
}
// TODO: for night to day change
int rk_smart_get_scene_param(double *pdLumaDay, double *pdLumaNight,
double *pdRGratio, double *pdBGratio,
unsigned int *p_u32_exposure, double *pdExpAgain) {
return 0;
}
int night_to_day_para_set(rk_aiq_cpsl_cfg_t compensate_light_cfg) {
if (!db_aiq_ctx || !g_stream_on)
return -1;
int ret = -1;
if (compensate_light_cfg.mode != RK_AIQ_OP_MODE_INVALID) {
pthread_mutex_lock(&db_aiq_ctx_mutex);
ret = rk_aiq_uapi_sysctl_setCpsLtCfg(db_aiq_ctx, &compensate_light_cfg);
pthread_mutex_unlock(&db_aiq_ctx_mutex);
LOG_DEBUG("set night to day para, ret is %d\n", ret);
} else {
LOG_INFO("compensate_light_cfg.mode is invalid\n");
}
return ret;
}
// LOG_DEBUG("u8Num = %d dLumaNight = %f dRGratio = %f dBGratio = %f
// dExpAgain = %f \n", get_led_state(), dLumaNight, dRGratio, dBGratio,
// dExpAgain);
// LOG_DEBUG("u8Num = %d dLumaNight = %f dRGratio = %f dBGratio = %f
// dExpAgain = %f \n", get_led_state(), dLumaNight, dRGratio, dBGratio,
// dExpAgain);
if (LED_ON == get_led_state()) {
if ( LED_ON == get_led_state() ){
system("/usr/bin/pwmtest.sh 1");
} else {
system("/usr/bin/pwmtest.sh 0");
}
}
在pwmtest脚本中即可完成补光灯的开关。
参考手册中描述。
声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
红包
1
1
评论
打赏
- 分享
- 举报
评论
0个
手气红包
暂无数据
相关专栏
-
浏览量:3006次2022-05-17 09:00:35
-
浏览量:3983次2021-06-18 16:05:42
-
浏览量:6044次2022-05-11 15:14:51
-
浏览量:1395次2024-02-24 13:49:46
-
浏览量:568次2023-11-17 18:14:30
-
浏览量:6935次2021-04-01 17:04:01
-
浏览量:1860次2024-01-05 14:17:30
-
浏览量:2995次2021-06-12 17:32:52
-
浏览量:5900次2021-04-01 16:47:04
-
浏览量:2311次2022-10-09 10:38:23
-
浏览量:7223次2020-11-17 15:46:28
-
浏览量:3972次2021-04-02 09:47:41
-
浏览量:4725次2023-03-24 22:56:50
-
浏览量:6061次2021-04-01 16:50:31
-
浏览量:6259次2022-05-17 16:26:53
-
2024-01-05 17:19:54
-
浏览量:2783次2023-04-24 14:50:18
-
浏览量:1546次2024-01-04 17:26:55
-
浏览量:893次2023-11-09 15:33:49
置顶时间设置
结束时间
删除原因
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
打赏作者
艾编程的鲁小班
您的支持将鼓励我继续创作!
打赏金额:
¥1
¥5
¥10
¥50
¥100
支付方式:
微信支付
打赏成功!
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
审核成功
发布时间设置
发布时间:
请选择发布时间设置
是否关联周任务-专栏模块
审核失败
失败原因
请选择失败原因
备注
请输入备注