Hi all,
I'm pointing my esp32-cam towards my garden and taking pictures every X minutes. Maybe half of the frame is sky, and the images come out soo overexposed that they are basically just white.
I'm using a simple piece of code like this:
https://pastebin.com/ihDePDSn
I've read to try to put a delay() before shooting (as in the code), to allow the camera to adjust the autoexposure.. but it doesn't work.
I tried to alternate delay() and esp_camera_fb_get() , e.g: for (1..N){delay;shoot},
with the idea to allow the ESP to adjust the exposure after few shots, but the ESP seem to crash if I use more than 2 shoots one after the other.
I also tried to manually unset the gain (set_gain_ctrl()) but nope..
I am a little bit at loss here.. can anyone suggest a good strategy?
Thanks!
FP
Esp32-cam heavily overexposes pictures
Re: Esp32-cam heavily overexposes pictures
Any solution to this problem? I am having the same problem.. outdoor images are unusuable.. the weird thing is that the CameraWebServer sample doesn't have this problem.
Re: Esp32-cam heavily overexposes pictures
This seems to solve it mostly... taking 10 pictures quickly and clear the buffer all the time;
Hope it helps someone!
Code: Select all
// Take a photo with the camera
Serial.println("Taking a photo…");
//The first three pictures after restart have a green tint, discard those images
for (int i = 0; i <=10; i++){
Serial.println("Taking a photo…");
camera_fb_t * fb = NULL;
fb = esp_camera_fb_get();
esp_camera_fb_return(fb); // dispose the buffered image
}
fb = NULL; // reset to capture errors
// Get fresh image
fb = esp_camera_fb_get();
if(!fb) {
Serial.println("Camera capture failed");
delay(1000);
ESP.restart();
}
Re: Esp32-cam heavily overexposes pictures
This worked beautifully for me. Thanks a lot. It turned my pictures from hot garbage to reasonable stuff !!
Who is online
Users browsing this forum: Google [Bot] and 112 guests