m5stack / TimerCam-arduino

TimerCam Arduino Library
MIT License
45 stars 25 forks source link

ov3660 FPS Performance Questions #2

Open alorbach opened 3 years ago

alorbach commented 3 years ago

I am not sure if this repo is the right one to ask these questions, but it would be great to get some answers or even solutions. So I recently got this module from m5stack with an OV3660 sensor: https://docs.m5stack.com/#/en/unit/timercam_x

According to the document here https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/OV3660_CSP3_DS_1.3_sida.pdf , the sensor can handle up to 120 FPS in 320x240 (FRAMESIZE_QVGA): image

However in reality I barely reach 30 FPS in 160x120 (FRAMESIZE_QQVGA) and tripple buffering(fb_count = 3) - direct mjpeg streaming to a http client. With ov2640 sensor modules like this ( https://docs.m5stack.com/#/en/unit/timercam_f ), I easily reach 35-50 FPS with the same code (And only double buffering fb_count = 2).

I have xclk set to 20 MHZ for both modules, and to my understanding I should be at 50MHz SYSCLK and 10MHz PCLK: https://github.com/espressif/esp32-camera/blob/0347377b67c2d16996ba6532202f22943018b962/sensors/ov3660.c#L362

Anything we can do to improve processing speed? For me, performance is most important, I need to process as most images as possible per second even with a low resolution like 160*120 which is ok for me. The image quality of the ov3660 is really great, also the whitebalance modes work far better as ov2640.