4868
- 收藏
- 点赞
- 分享
- 举报
IMX222+hi3516c 关闭ISP图像变成黑白的是什么原因
大家好!我在这个函数后面加上ISP关闭函数,如下:
HI_S32 SAMPLE_COMM_VI_StartIsp(SAMPLE_VI_CONFIG_S* pstViConfig)
{
HI_S32 i, s32Ret = HI_SUCCESS;
VI_DEV ViDev;
VI_CHN ViChn;
HI_U32 u32DevNum = 1;
HI_U32 u32ChnNum = 1;
SIZE_S stTargetSize;
RECT_S stCapRect;
SAMPLE_VI_MODE_E enViMode;
ROTATE_E enRotate;
SAMPLE_VI_CHN_SET_E enViChnSet;
if(!pstViConfig)
{
SAMPLE_PRT("%s: null ptr\n", __FUNCTION__);
return HI_FAILURE;
}
enViMode = pstViConfig->enViMode;
enViChnSet = pstViConfig->enViChnSet;
enRotate = pstViConfig->enRotate;
/******************************************
step 1: configure sensor.
note: you can jump over this step, if you do not use Hi3518 interal isp.
******************************************/
#if 1
s32Ret = SAMPLE_COMM_ISP_SensorInit();
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: Sensor init failed!\n", __FUNCTION__);
return HI_FAILURE;
}
#endif
/******************************************************
step 2 : config & start vicap dev
******************************************************/
for (i = 0; i < u32DevNum; i++)
{
ViDev = i;
s32Ret = SAMPLE_COMM_VI_StartDev(ViDev, enViMode);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: start vi dev[%d] failed!\n", __FUNCTION__, i);
return HI_FAILURE;
}
}
/******************************************
step 3: configure & run isp thread
note: you can jump over this step, if you do not use Hi3518 interal isp.
note: isp run must at this step -- after vi dev enable, before vi chn enable
******************************************/
#if 1
s32Ret = SAMPLE_COMM_ISP_Run();
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: ISP init failed!\n", __FUNCTION__);
/* disable videv */
return HI_FAILURE;
}
#endif
/******************************************************
* Step 4: config & start vicap chn (max 1)
******************************************************/
for (i = 0; i < u32ChnNum; i++)
{
ViChn = i;
stCapRect.s32X = 0;
stCapRect.s32Y = 0;
switch (enViMode)
{
case APTINA_9M034_DC_720P_30FPS:
case APTINA_AR0130_DC_720P_30FPS:
case SONY_ICX692_DC_720P_30FPS:
case SONY_IMX104_DC_720P_30FPS:
case OMNI_OV9712_DC_720P_30FPS:
stCapRect.u32Width = 1280;
stCapRect.u32Height = 720;
break;
case SONY_IMX122_DC_1080P_30FPS:
stCapRect.u32Width = 1920;
stCapRect.u32Height = 1080;
break;
default:
stCapRect.u32Width = 1280;
stCapRect.u32Height = 720;
break;
}
stTargetSize.u32Width = stCapRect.u32Width;
stTargetSize.u32Height = stCapRect.u32Height;
s32Ret = SAMPLE_COMM_VI_StartChn(ViChn, &stCapRect, &stTargetSize, pstViConfig);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_COMM_ISP_Stop();
return HI_FAILURE;
}
}
SAMPLE_COMM_ISP_Stop(); //added here
return s32Ret;
}
之后,图像就变黑白了,不知道怎么回事?
HI_S32 SAMPLE_COMM_VI_StartIsp(SAMPLE_VI_CONFIG_S* pstViConfig)
{
HI_S32 i, s32Ret = HI_SUCCESS;
VI_DEV ViDev;
VI_CHN ViChn;
HI_U32 u32DevNum = 1;
HI_U32 u32ChnNum = 1;
SIZE_S stTargetSize;
RECT_S stCapRect;
SAMPLE_VI_MODE_E enViMode;
ROTATE_E enRotate;
SAMPLE_VI_CHN_SET_E enViChnSet;
if(!pstViConfig)
{
SAMPLE_PRT("%s: null ptr\n", __FUNCTION__);
return HI_FAILURE;
}
enViMode = pstViConfig->enViMode;
enViChnSet = pstViConfig->enViChnSet;
enRotate = pstViConfig->enRotate;
/******************************************
step 1: configure sensor.
note: you can jump over this step, if you do not use Hi3518 interal isp.
******************************************/
#if 1
s32Ret = SAMPLE_COMM_ISP_SensorInit();
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: Sensor init failed!\n", __FUNCTION__);
return HI_FAILURE;
}
#endif
/******************************************************
step 2 : config & start vicap dev
******************************************************/
for (i = 0; i < u32DevNum; i++)
{
ViDev = i;
s32Ret = SAMPLE_COMM_VI_StartDev(ViDev, enViMode);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: start vi dev[%d] failed!\n", __FUNCTION__, i);
return HI_FAILURE;
}
}
/******************************************
step 3: configure & run isp thread
note: you can jump over this step, if you do not use Hi3518 interal isp.
note: isp run must at this step -- after vi dev enable, before vi chn enable
******************************************/
#if 1
s32Ret = SAMPLE_COMM_ISP_Run();
if (HI_SUCCESS != s32Ret)
{
SAMPLE_PRT("%s: ISP init failed!\n", __FUNCTION__);
/* disable videv */
return HI_FAILURE;
}
#endif
/******************************************************
* Step 4: config & start vicap chn (max 1)
******************************************************/
for (i = 0; i < u32ChnNum; i++)
{
ViChn = i;
stCapRect.s32X = 0;
stCapRect.s32Y = 0;
switch (enViMode)
{
case APTINA_9M034_DC_720P_30FPS:
case APTINA_AR0130_DC_720P_30FPS:
case SONY_ICX692_DC_720P_30FPS:
case SONY_IMX104_DC_720P_30FPS:
case OMNI_OV9712_DC_720P_30FPS:
stCapRect.u32Width = 1280;
stCapRect.u32Height = 720;
break;
case SONY_IMX122_DC_1080P_30FPS:
stCapRect.u32Width = 1920;
stCapRect.u32Height = 1080;
break;
default:
stCapRect.u32Width = 1280;
stCapRect.u32Height = 720;
break;
}
stTargetSize.u32Width = stCapRect.u32Width;
stTargetSize.u32Height = stCapRect.u32Height;
s32Ret = SAMPLE_COMM_VI_StartChn(ViChn, &stCapRect, &stTargetSize, pstViConfig);
if (HI_SUCCESS != s32Ret)
{
SAMPLE_COMM_ISP_Stop();
return HI_FAILURE;
}
}
SAMPLE_COMM_ISP_Stop(); //added here
return s32Ret;
}
之后,图像就变黑白了,不知道怎么回事?
我来回答
回答5个
时间排序
认可量排序
认可0
认可0
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
02016-05-05 13:34:24
-
2014-09-23 11:25:46
-
2016-07-15 10:50:05
-
2015-01-05 08:54:37
-
2016-03-28 10:51:14
-
2016-05-06 11:21:15
-
2022-08-24 16:33:55
-
2014-12-24 09:53:51
-
2016-12-01 23:21:16
-
2019-01-20 13:29:07
-
2020-11-11 15:06:45
-
2014-09-23 16:23:08
-
2019-01-28 16:44:19
-
2018-12-12 15:46:34
-
2015-02-10 09:36:22
-
2021-07-12 18:22:11
-
2015-10-16 10:50:26
-
2022-05-20 10:07:17
-
2015-03-07 08:01:38
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5Hi3516CV610 如何使用SD卡升级固件
-
5cat /dev/logmpp 报错 <3>[ vi] [func]:vi_send_frame_node [line]:99 [info]:vi pic queue is full!
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认