How to deal with over exposure of images when using OV2640 mini plus

Hi,

We are collecting remote images using an OV2640 mini plus interfaced to an arduino MKR GSM 1400 board. However we are getting very over exposed images during clear sunny days.

The following is a reasonably good image:

The following is a very over exposed image:

The following is the internal setup for the camera image options:

sunny = 1, cloudy= 0, auto = 1, brightness= -2, contrast= 2 and these are setup via the following code:

#if defined (OV2640_MINI_2MP_PLUS) myCAM.OV2640_set_JPEG_size(OV2640_1600x1200); if (_auto==1) {Serial.println(F("Set Auto"));myCAM.OV2640_set_Light_Mode(Auto);} if (sunny==1) {Serial.println(F("Set Sunny"));myCAM.OV2640_set_Light_Mode(Sunny);} if (cloudy==1) {Serial.println(F("Set to cloudy"));myCAM.OV2640_set_Light_Mode(Cloudy);} if (brightNess==2) {Serial.println(F("Set Bright 2"));myCAM.OV2640_set_Brightness(Brightness2);} if (brightNess==1) {Serial.println(F("Set Bright 1"));myCAM.OV2640_set_Brightness(Brightness1);} if (brightNess==0) {Serial.println(F("Set Bright 0"));myCAM.OV2640_set_Brightness(Brightness0);} if (brightNess==-1) {Serial.println(F("Set Bright -1"));myCAM.OV2640_set_Brightness(Brightness_1);} if (brightNess==-2) {Serial.println(F("Set Bright -2"));myCAM.OV2640_set_Brightness(Brightness_2);} if (contrast==2) {Serial.println(F("Set Con 2"));myCAM.OV2640_set_Contrast(Contrast2);} if (contrast==1) {Serial.println(F("Set Con 1"));myCAM.OV2640_set_Contrast(Contrast1);} if (contrast==0) {Serial.println(F("Set Con 0"));myCAM.OV2640_set_Contrast(Contrast0);} if (contrast==-1) {Serial.println(F("Set Con -1"));myCAM.OV2640_set_Contrast(Contrast_1);} if (contrast==-2) {Serial.println(F("Set Con -2"));myCAM.OV2640_set_Contrast(Contrast_2);}

#endif


Is there as way using code to reduce this over exposure of is there a better camera option that could be interfaced to the arduino MKR GSM 1400 board?

 

Any help is much appreciated.

 

Cheers.

Hi,

Usually in the AE and AWB mode, you get the overexposed image because the camera is dynamically adjusting the exposure and gain at this time, and it has not stabilized. You can try to wait for a while after the camera is initialized before capture.
You can adjust the exposure time manually, we have an example of calculating the exposure, you can refer to it.
Currently we only have mini 2mp plus and mini 5mp plus cameras with SPI interface.

Hi,

And thanks for the reply.

 

In the AE and AWB mode, if i wait for a while after the camera is initialized before capturing as you suggest, how long should this delay be? And where should the delay be put in the code exactly, just prior to the capture? Could you please give an example.

 

Any help is much appreciated.

 

Cheers.