OV5640 MIPI camera on a iMX6 SOLO set exposure

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

OV5640 MIPI camera on a iMX6 SOLO set exposure

跳至解决方案
6,096 次查看
juanschenini
Contributor II

Hello, Is it possible to set values for exposure and gain of the sensor OV5640?

I have seen that there is a ioctl_s_ctrl in ov5640_mipi.c but does not implement the V4L2_CID_EXPOSURE nor V4L2_CID_GAIN. But it is defined the OV5640_set_gain16 (int gain16) and OV5640_set_shutter (int shutter)

Can someone tell me how to modify those values?

Best regards.

1 解答
4,694 次查看
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I am not an expert in this field but may want to try to use the OV5640_set_gain16 function in the V4L2_CID_GAIN case. And use the vc-value as parameter for this function.

Something like this:


case V4L2_CID_GAIN:

  OV5640_set_gain16( (__s32)vc->value);

break;


Please let me know how it goes.


/Alejandro

在原帖中查看解决方案

0 项奖励
回复
5 回复数
4,694 次查看
sreekanthm
Contributor II

Hi Juan,

I am trying to set the exposure values based on the Android API on Ov5640 MIPI on IMX6 board and I did changes based on the response from Alejandro (as below)

case V4L2_CID_GAIN:

  OV5640_set_gain16( (__s32)vc->value);

break;

but seems there is no impact on the camera exposure when I change values using Android API. I posted the issue in the Freescale communities and received below response, could you please assist me in implementing the Camera Exposure?

OV5640 MIPI camera on a iMX6 set exposure and gain

Thanks,
Sreekanth

0 项奖励
回复
4,694 次查看
juanschenini
Contributor II

Hi Sreekanth , you should comment the line "OV5640_turn_on_AE_AG (1);" in the "ov5640_change_mode_direct" because it calculates auto exposure.

Regards.

4,694 次查看
sreekanthm
Contributor II

Thanks Juan.

0 项奖励
回复
4,695 次查看
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I am not an expert in this field but may want to try to use the OV5640_set_gain16 function in the V4L2_CID_GAIN case. And use the vc-value as parameter for this function.

Something like this:


case V4L2_CID_GAIN:

  OV5640_set_gain16( (__s32)vc->value);

break;


Please let me know how it goes.


/Alejandro

0 项奖励
回复
4,694 次查看
juanschenini
Contributor II

Thanks for the reply, I had already done this and it worked.

Best regards.

0 项奖励
回复