esp32 cam takes old image

zella9
Posts: 1
Joined: Tue Nov 23, 2021 10:44 am

esp32 cam takes old image

Postby zella9 » Tue Nov 23, 2021 10:54 am

Hi, I try to make security system - "door opens, photo takes". But when i take photo - there is not realtime photo - seem like some old frame from internal buffer. I'm not understand how take realtime photo. Here code example which shoul give realtime photo:
  1.   server.on("/picture", HTTP_GET, [](AsyncWebServerRequest * request) {
  2.  
  3.     camera_fb_t * frame = NULL;
  4.     frame = esp_camera_fb_get();
  5.  
  6.     request->send_P(200, "image/jpeg", (const uint8_t *)frame->buf, frame->len);
  7.  
  8.     esp_camera_fb_return(frame);
  9.   });
Response gives me old photo from buffer.

onhiatus
Posts: 1
Joined: Sat Jan 01, 2022 5:59 am

Re: esp32 cam takes old image

Postby onhiatus » Sat Jan 01, 2022 6:01 am

Did you ever figure this out? I'm running into the same behavior.

Teddyz
Posts: 1
Joined: Sun Jan 09, 2022 12:54 pm

Re: esp32 cam takes old image

Postby Teddyz » Wed Apr 20, 2022 2:14 am

I also face the same problem, but with Examples->ESP32->Camera->CameraWebServer
I suspect it has to do that I use Arduino IDE instead of PlatformIO, but hard to tell without switching.

felixlastname
Posts: 1
Joined: Mon Nov 28, 2022 1:25 pm

Re: esp32 cam takes old image

Postby felixlastname » Mon Nov 28, 2022 1:28 pm

Find your answer here: https://github.com/espressif/arduino-esp32/issues/6047

Add to your code: config.grab_mode = CAMERA_GRAB_LATEST;

Who is online

Users browsing this forum: No registered users and 75 guests