espressif / esp-who

Face detection and recognition framework
Other
1.64k stars 458 forks source link

OV2640 How to set the window size to 240*135 (AIV-573) #239

Open wulin76 opened 1 year ago

wulin76 commented 1 year ago

OV2640 How to set the window size to 240*135

I want to output the OV2640 camera directly on my small 1.14" (135X240) LCD screen, I refer to the project code, adjust the resolution setting in sensor.c, add { 240, 135, ASPECT_RATIO16X9 }, but when the program runing then got error( cam hal: FB-SIZE: XXX = 64800) , I changed the parameters again, for example to use 240X130, but still the error was reported, finally at 240*128, no error was reported. Then how to set the window size to 240X135?

const resolution_info_t resolution[FRAMESIZE_INVALID] = { { 96, 96, ASPECT_RATIO_1X1 }, / 96x96 / { 160, 120, ASPECT_RATIO_4X3 }, / QQVGA / { 176, 144, ASPECT_RATIO_5X4 }, / QCIF / { 240, 135, ASPECT_RATIO_16X9 },/ 240x135 / ..... }

Sandra-lol commented 1 year ago

Please refer to this: https://github.com/espressif/esp32-camera/commit/56227dcf9421b826e7d4e7e79423781783c6d214 But a more preferred way is to cut out 240135 data from 240240 config ;)