Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve camera frame rate #18

Open
Ezward opened this issue Nov 9, 2021 · 1 comment
Open

Improve camera frame rate #18

Ezward opened this issue Nov 9, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Ezward
Copy link
Owner

Ezward commented Nov 9, 2021

Camera frame rate is influences by

  • image size; smaller images, especially 640x480 and below, produce better frame rates
  • number of frame buffers allocated. There should be at least 2 buffers allocated. This is only possible for lower resolution modes and with PRAM available.
  • The clock rate. It turns out a lower clock rate can enhance framerate on low resolutions, perhaps because all the work the sensor does can be done within a single frame. See Further increasing frame rate? espressif/esp32-camera#15

NOTE: the way memory is partitioned is important to make sure there is enough available for multiple frame buffers. The ESP32-Cam example sketches us the 'Huge APP' partition scheme. So we should make sure we've made enough memory available for our system to have multiple frame buffers. See https://iotespresso.com/how-to-set-partitions-in-esp32/ See this for how to set partition table in platformio https://community.platformio.org/t/partion-scheme-no-ota-with-platformio/13102/8 See relevant PlatformIO docs https://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables

Tasks;

  • experiment with combinations of image size, frame buffers and clock rate to optimize frame rate
    • do this with and without factoring in the transfer of the images, so that we see the raw rate and the overhead imparted by transferring to the web UI.
  • Review partition table settings to make sure they support the configuration. If possible leave memory for OTA, as that would be a much nicer way of programming the board.
  • Add a compile flag to fix the frame size, number of buffers allocated and the clock rate to the chose parameters
  • Hide the camera properties UI when the image properties are fixed.
  • Hard code the camera properties endpoint to return the fixed properties.

Donkeycar uses 160x120, so that might be what we want here. However 640x480 is much better quality for FPV, so maybe we want a way to switch between these two mode.

@Ezward Ezward added the enhancement New feature or request label Nov 10, 2021
@Ezward Ezward self-assigned this Nov 10, 2021
@thet0ast3r
Copy link

Hi, @Ezward , did you manage to find something about increasing the framerate? Im using arduino ide, and struggle with the driver. Greetings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants