Improve camera performance a bit

This commit is contained in:
Lorow
2024-09-28 15:16:39 +02:00
parent 5aec63c86b
commit b578bf3d2c
4 changed files with 42 additions and 40 deletions

View File

@@ -114,10 +114,11 @@ void CameraManager::setupCameraPinout()
.pixel_format = PIXFORMAT_JPEG, // YUV422,GRAYSCALE,RGB565,JPEG
.frame_size = FRAMESIZE_240X240, // QQVGA-UXGA, For ESP32, do not use sizes above QVGA when not JPEG. The performance of the ESP32-S series has improved a lot, but JPEG mode always gives better frame rates.
.jpeg_quality = 7, // 0-63, for OV series camera sensors, lower number means higher quality
.fb_count = 3, // When jpeg mode is used, if fb_count more than one, the driver will work in continuous mode.
.fb_location = CAMERA_FB_IN_PSRAM, // maybe it cannot put them fully in psram?
.grab_mode = CAMERA_GRAB_LATEST,
.jpeg_quality = 7, // 0-63, for OV series camera sensors, lower number means higher quality
.fb_count = 2, // 3 // When jpeg mode is used, if fb_count more than one, the driver will work in continuous mode.
.fb_location = CAMERA_FB_IN_PSRAM, // maybe it cannot put them fully in psram?
.grab_mode = CAMERA_GRAB_WHEN_EMPTY, // CAMERA_GRAB_LATEST
// .pin_pwdn = CONFIG_PWDN_GPIO_NUM,
// .pin_reset = CONFIG_RESET_GPIO_NUM,
// .pin_xclk = CONFIG_XCLK_GPIO_NUM,

View File

@@ -70,7 +70,7 @@ esp_err_t StreamHelpers::stream(httpd_req_t *req)
long request_end = Helpers::getTimeInMillis();
long latency = (request_end - last_request_time);
last_request_time = request_end;
ESP_LOGD(STREAM_SERVER_TAG, "Size: %uKB, Time: %lims (%lifps)\n", _jpg_buf_len / 1024, latency, 1000 / latency);
ESP_LOGI(STREAM_SERVER_TAG, "Size: %uKB, Time: %lims (%lifps)\n", _jpg_buf_len / 1024, latency, 1000 / latency);
}
last_frame = 0;
return response;