esp32 cam takes old image
Posted: 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:
Response gives me old photo from buffer.
- server.on("/picture", HTTP_GET, [](AsyncWebServerRequest * request) {
- camera_fb_t * frame = NULL;
- frame = esp_camera_fb_get();
- request->send_P(200, "image/jpeg", (const uint8_t *)frame->buf, frame->len);
- esp_camera_fb_return(frame);
- });