OV5640 MIPI camera on a iMX6 SOLO set exposure

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OV5640 MIPI camera on a iMX6 SOLO set exposure

Jump to solution
3,031 Views
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 Solution
1,629 Views
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

View solution in original post

0 Kudos
5 Replies
1,629 Views
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 Kudos
1,629 Views
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.

1,629 Views
sreekanthm
Contributor II

Thanks Juan.

0 Kudos
1,630 Views
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 Kudos
1,629 Views
juanschenini
Contributor II

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

Best regards.

0 Kudos