@TOC
1. ESP32-Camera简介
最近因为接触了ESP32摄像头相关的资料和信息,稍微简单整理下,希望对该方案有兴趣的朋友可以有所帮助。
1.1 资料&信息
- The Internet of Things wit ESP32
- ESP32-S Series开发模组
- Github: ESP32-Camera
1.2 ESP-EYE摄像头
- ESP-EYE with Audio and Visual AIoT
- Github: esp-who
1.3 其他摄像头方案
- AITHINKER Camera
- M5Stack Camera
- 其他方案很多,这里找几个相对比较容易买到,且性价比高的(当然这个肯定会有一些缩水,比如PSRAM)
2. ESP32-Camera验证需求
验证需求关键点:
- 基础功能验证
- 基础性能验证
- 性价比考虑(买得到的绝不自己做,速度优先原则)
- 考虑方案推荐摄像头和高清500w摄像头
3. ESP32-Camera验证选型
3.1 硬件选型
- 【高性价比】AITHINKER Camera模块
- 【高清500w】OV5640(5M)
- 【市场方案常用】OV2640(2M)
注:市面上买到的模块和安可信的模块的主要差异是在外部SRAM这块。
规格如下:
- ESP-32S模组
- 2MB 外部PSRAM
- 4MB SPI Flash
- SD Card
- 摄像头:OV5640/OV2640
- 配套底板(支持自动烧录,否则需要跳线支持)
3.2 软件选型
- Github: ESP32-Camera
- Github: M5Stack-Camera
4. 对比测试
4.1 【M5Stack-Camera】视频验证
ESP32 Camera (OV5640 vs OV2640)
4.2 【M5Stack-Camera】测试数据
- xclk_freq_hz: 10000000 Hz
- pixel_format:PIXFORMAT_JPEG
- jpeg_quality:15
- frame_size: FRAMESIZE_SVGA(800x600)
- fb_count:2
commit 7be1a13123ef8bb35143eb0b71542b64a3c6e4fb (HEAD -> master, origin/master, origin/HEAD)
Author: Tinyu <Tinyu.Zhao@gmail.com>
Date: Tue Jan 25 16:10:57 2022 +0800
Update main.c
4.2.1 OV5640 800x600
第一次:
- 每行日志打印,对应50帧数据最后一帧的数据统计情况
- 当WEB退出后,对所有帧数据进行统计给出小结
- 早上8:00室内
测试结果:15 x 50 = 750帧数据统计情况:平均10帧/秒,最快26帧/秒
I (3695) camera: got ip:192.168.78.110
I (18078) camera: MJPG: 11KB get-send-total(045ms-050ms-096ms) 10.4 fps
I (22569) camera: MJPG: 11KB get-send-total(060ms-036ms-096ms) 10.4 fps
I (29032) camera: MJPG: 25KB get-send-total(000ms-274ms-275ms) 3.6 fps
I (37247) camera: MJPG: 24KB get-send-total(049ms-029ms-079ms) 12.7 fps
I (52834) camera: MJPG: 24KB get-send-total(000ms-4411ms-4411ms) 0.2 fps
I (53383) camera: MJPG: 22KB get-send-total(025ms-039ms-065ms) 15.4 fps
I (58067) camera: MJPG: 21KB get-send-total(001ms-038ms-040ms) 25.0 fps
I (62771) camera: MJPG: 17KB get-send-total(066ms-058ms-125ms) 8.0 fps
I (67243) camera: MJPG: 20KB get-send-total(069ms-025ms-094ms) 10.6 fps
I (71844) camera: MJPG: 21KB get-send-total(061ms-031ms-093ms) 10.8 fps
I (76639) camera: MJPG: 16KB get-send-total(031ms-052ms-083ms) 12.0 fps
I (77186) camera: MJPG: 14KB get-send-total(055ms-058ms-114ms) 8.8 fps
I (81679) camera: MJPG: 20KB get-send-total(056ms-047ms-103ms) 9.7 fps
I (86292) camera: MJPG: 23KB get-send-total(018ms-065ms-084ms) 11.9 fps
I (90787) camera: MJPG: 21KB get-send-total(033ms-055ms-089ms) 11.2 fps
I (92234) camera: ----------
I (92234) camera: MJPG: 11 - 28KB
I (92237) camera: GET: 139 - 001ms avg 061ms
I (92242) camera: SEND: 368 - 011ms avg 034ms
I (92247) camera: SUM: 401 - 038ms avg 096ms
I (92252) camera: FPS: 2.5 - 26.3 avg 10.4
第二次:
- 每行日志打印,对应20帧数据最后一帧的数据统计情况
- 当WEB退出后,对所有帧数据进行统计给出小结
- 中午14:20室内
测试结果:494帧有效数据;统计情况:平均5帧/秒,最快29帧/秒
I (3701) camera: got ip:192.168.78.110
I (9281) camera: MJPG: 14KB get-send-total(132ms-256ms-389ms) 2.6 fps
I (12666) camera: MJPG: 21KB get-send-total(136ms-037ms-174ms) 5.7 fps
I (16102) camera: MJPG: 21KB get-send-total(147ms-050ms-198ms) 5.1 fps
I (19494) camera: MJPG: 16KB get-send-total(139ms-019ms-158ms) 6.3 fps
I (22735) camera: MJPG: 15KB get-send-total(073ms-016ms-090ms) 11.1 fps
I (26252) camera: MJPG: 16KB get-send-total(024ms-020ms-044ms) 22.7 fps
I (29667) camera: MJPG: 13KB get-send-total(026ms-012ms-038ms) 26.3 fps
I (33275) camera: MJPG: 19KB get-send-total(145ms-106ms-251ms) 4.0 fps
I (36827) camera: MJPG: 19KB get-send-total(149ms-055ms-204ms) 4.9 fps
I (40235) camera: MJPG: 16KB get-send-total(056ms-039ms-095ms) 10.5 fps
I (43733) camera: MJPG: 19KB get-send-total(096ms-023ms-119ms) 8.4 fps
I (47341) camera: MJPG: 14KB get-send-total(153ms-028ms-182ms) 5.5 fps
I (51064) camera: MJPG: 18KB get-send-total(089ms-057ms-147ms) 6.8 fps
I (54732) camera: MJPG: 22KB get-send-total(101ms-031ms-132ms) 7.6 fps
I (58259) camera: MJPG: 20KB get-send-total(124ms-045ms-169ms) 5.9 fps
I (61742) camera: MJPG: 16KB get-send-total(147ms-014ms-161ms) 6.2 fps
I (65108) camera: MJPG: 23KB get-send-total(102ms-047ms-149ms) 6.7 fps
I (68322) camera: MJPG: 19KB get-send-total(115ms-018ms-134ms) 7.5 fps
I (71923) camera: MJPG: 16KB get-send-total(161ms-015ms-176ms) 5.7 fps
I (75463) camera: MJPG: 20KB get-send-total(102ms-041ms-144ms) 6.9 fps
I (78862) camera: MJPG: 14KB get-send-total(144ms-017ms-162ms) 6.2 fps
I (82313) camera: MJPG: 20KB get-send-total(149ms-045ms-194ms) 5.2 fps
I (85918) camera: MJPG: 22KB get-send-total(145ms-044ms-189ms) 5.3 fps
I (89058) camera: MJPG: 18KB get-send-total(138ms-033ms-171ms) 5.8 fps
W (92387) httpd_txrx: httpd_sock_err: error in send : 104
I (92388) camera: ----------GRANULARITY:20
I (92388) camera: total:500, normal tests:494, abnormal skiped:5
I (92394) camera: MJPG: 10 - 35KB
I (92398) camera: GET: 343 - 002ms avg 139ms
I (92403) camera: SEND: 256 - 012ms avg 052ms
I (92408) camera: SUM: 421 - 034ms avg 192ms
I (92413) camera: FPS: 2.4 - 29.4 avg 5.2
4.2.2 OV2640 800x600
第一次:
- 每行日志打印,对应50帧数据最后一帧的数据统计情况
- 当WEB退出后,对所有帧数据进行统计给出小结
- 早上8:00室内
测试结果:7 x 50 = 350帧数据统计情况:平均14帧/秒,最快34帧/秒
I (3152) camera: got ip:192.168.78.118
I (43752) camera: MJPG: 31KB get-send-total(000ms-059ms-059ms) 16.9 fps
I (47792) camera: MJPG: 21KB get-send-total(038ms-028ms-067ms) 14.9 fps
I (51780) camera: MJPG: 21KB get-send-total(032ms-018ms-050ms) 20.0 fps
I (55874) camera: MJPG: 22KB get-send-total(065ms-033ms-099ms) 10.1 fps
I (59991) camera: MJPG: 17KB get-send-total(037ms-072ms-110ms) 9.1 fps
I (60440) camera: MJPG: 18KB get-send-total(049ms-042ms-092ms) 10.9 fps
I (64447) camera: MJPG: 21KB get-send-total(053ms-048ms-102ms) 9.8 fps
I (65223) camera: ----------
I (65223) camera: MJPG: 11 - 32KB
I (65225) camera: GET: 106 - 003ms avg 023ms
I (65230) camera: SEND: 247 - 013ms avg 046ms
I (65235) camera: SUM: 257 - 029ms avg 070ms
I (65240) camera: FPS: 3.9 - 34.5 avg 14.3
第二次:
- 每行日志打印,对应20帧数据最后一帧的数据统计情况
- 当WEB退出后,对所有帧数据进行统计给出小结
- 中午14:20室内
测试结果:593帧有效数据;统计情况:平均13帧/秒,最快41帧/秒
I (3150) camera: got ip:192.168.78.118
I (15313) camera: MJPG: 12KB get-send-total(038ms-018ms-056ms) 17.9 fps
I (16931) camera: MJPG: 12KB get-send-total(022ms-036ms-058ms) 17.2 fps
I (18557) camera: MJPG: 28KB get-send-total(000ms-061ms-061ms) 16.4 fps
I (20320) camera: MJPG: 18KB get-send-total(034ms-066ms-101ms) 9.9 fps
I (21995) camera: MJPG: 23KB get-send-total(040ms-062ms-102ms) 9.8 fps
I (23738) camera: MJPG: 22KB get-send-total(045ms-045ms-091ms) 11.0 fps
I (25407) camera: MJPG: 22KB get-send-total(043ms-035ms-078ms) 12.8 fps
I (27056) camera: MJPG: 24KB get-send-total(008ms-085ms-093ms) 10.8 fps
I (28779) camera: MJPG: 19KB get-send-total(050ms-048ms-099ms) 10.1 fps
I (30525) camera: MJPG: 20KB get-send-total(056ms-035ms-092ms) 10.9 fps
I (32114) camera: MJPG: 21KB get-send-total(050ms-025ms-075ms) 13.3 fps
I (33840) camera: MJPG: 21KB get-send-total(032ms-072ms-104ms) 9.6 fps
I (35399) camera: MJPG: 21KB get-send-total(045ms-032ms-077ms) 13.0 fps
I (37123) camera: MJPG: 22KB get-send-total(000ms-075ms-075ms) 13.3 fps
I (38879) camera: MJPG: 23KB get-send-total(036ms-073ms-109ms) 9.2 fps
I (40450) camera: MJPG: 17KB get-send-total(039ms-045ms-084ms) 11.9 fps
I (42108) camera: MJPG: 15KB get-send-total(055ms-023ms-078ms) 12.8 fps
I (43715) camera: MJPG: 20KB get-send-total(009ms-031ms-041ms) 24.4 fps
I (45313) camera: MJPG: 20KB get-send-total(035ms-029ms-065ms) 15.4 fps
I (46921) camera: MJPG: 16KB get-send-total(039ms-038ms-077ms) 13.0 fps
I (48585) camera: MJPG: 17KB get-send-total(036ms-022ms-059ms) 16.9 fps
I (50324) camera: MJPG: 20KB get-send-total(043ms-082ms-126ms) 7.9 fps
I (51953) camera: MJPG: 17KB get-send-total(054ms-030ms-084ms) 11.9 fps
I (53574) camera: MJPG: 13KB get-send-total(047ms-054ms-101ms) 9.9 fps
I (55215) camera: MJPG: 11KB get-send-total(057ms-096ms-154ms) 6.5 fps
I (56939) camera: MJPG: 16KB get-send-total(025ms-060ms-086ms) 11.6 fps
I (58582) camera: MJPG: 16KB get-send-total(042ms-023ms-066ms) 15.2 fps
I (60196) camera: MJPG: 22KB get-send-total(041ms-038ms-080ms) 12.5 fps
I (61870) camera: MJPG: 13KB get-send-total(051ms-033ms-085ms) 11.8 fps
I (63468) camera: MJPG: 13KB get-send-total(046ms-032ms-079ms) 12.7 fps
W (64747) httpd_txrx: httpd_sock_err: error in send : 104
I (64748) camera: ----------GRANULARITY:20
I (64748) camera: total:616, normal tests:593, abnormal skiped:22
I (64754) camera: MJPG: 10 - 28KB
I (64758) camera: GET: 123 - 001ms avg 043ms
I (64763) camera: SEND: 129 - 011ms avg 029ms
I (64768) camera: SUM: 173 - 024ms avg 073ms
I (64773) camera: FPS: 5.8 - 41.7 avg 13.7
4.3【ESP32-Camera】 测试数据
- xclk_freq_hz: 10000000 Hz
- pixel_format:PIXFORMAT_JPEG
- jpeg_quality:15
- frame_size: FRAMESIZE_SVGA(800x600)
- fb_count:2
commit 402b811b835cd348343b567a97fdf984c9d16fb9 (HEAD -> master, origin/master, origin/HEAD)
Author: XDanielPaul <47739921+XDanielPaul@users.noreply.github.com>
Date: Mon Dec 12 18:53:42 2022 +0100
Added badge with version to README (#487)
Co-authored-by: Daniel Paul <daniel.paul@espressif.com>
4.3.1 OV5640 800x600
100帧,31帧数据异常(严重超时),69帧统计数据显示,平均4帧/秒,最快5.8帧/秒。
I (1810) cam_hal: cam config ok
D (1813) camera: Setting frame size to 800x600
D (1831) ov5640: Set Image Options: Compression: 1, Binning: 1, V-Flip: 0, H-Mirror: 0, Reg-4514: 0xaa
I (1832) ov5640: Set PLL: bypass: 0, multiplier: 180, sys_div: 4, pre_div: 2, root_2x: 0, pclk_root_div: 2, pclk_manual: 1, pclk_div: 4
I (1841) ov5640: Calculated XVCLK: 10000000 Hz, REFIN: 5000000 Hz, VCO: 900000000 Hz, PLL_CLK: 90000000 Hz, SYSCLK: 22500000 Hz, PCLK: 5625000 Hz
D (1858) ov5640: Set framesize to: 800x600
D (1861) ov5640: Set pixformat to: 4
D (1862) ov5640: Set quality to: 15
W (2048) example:take_picture: Taking picture...1, abnormal, skiped
I (2049) example:take_picture: MJPG: 13KB get-total(168462ms-168468ms) 0.0 fps
W (7184) example:take_picture: Taking picture...4, abnormal, skiped
I (7184) example:take_picture: MJPG: 20KB get-total(133488ms-133489ms) 0.0 fps
W (12319) example:take_picture: Taking picture...7, abnormal, skiped
I (12319) example:take_picture: MJPG: 18KB get-total(132265ms-132265ms) 0.0 fps
W (17454) example:take_picture: Taking picture...10, abnormal, skiped
I (17454) example:take_picture: MJPG: 18KB get-total(132816ms-132816ms) 0.0 fps
W (22589) example:take_picture: Taking picture...13, abnormal, skiped
I (22589) example:take_picture: MJPG: 17KB get-total(131690ms-131691ms) 0.0 fps
W (27724) example:take_picture: Taking picture...16, abnormal, skiped
I (27725) example:take_picture: MJPG: 17KB get-total(132919ms-132919ms) 0.0 fps
W (32859) example:take_picture: Taking picture...19, abnormal, skiped
I (32860) example:take_picture: MJPG: 16KB get-total(131893ms-131894ms) 0.0 fps
I (37862) example:take_picture: Taking picture...20
I (37862) example:take_picture: MJPG: 16KB get-total(266ms-280ms) 3.6 fps
W (43039) example:take_picture: Taking picture...23, abnormal, skiped
I (43040) example:take_picture: MJPG: 16KB get-total(176504ms-176506ms) 0.0 fps
W (48175) example:take_picture: Taking picture...26, abnormal, skiped
I (48175) example:take_picture: MJPG: 16KB get-total(132652ms-132654ms) 0.0 fps
W (53310) example:take_picture: Taking picture...29, abnormal, skiped
I (53310) example:take_picture: MJPG: 16KB get-total(132803ms-132805ms) 0.0 fps
W (58445) example:take_picture: Taking picture...32, abnormal, skiped
I (58446) example:take_picture: MJPG: 16KB get-total(132952ms-132954ms) 0.0 fps
W (63580) example:take_picture: Taking picture...35, abnormal, skiped
I (63581) example:take_picture: MJPG: 16KB get-total(132127ms-132129ms) 0.0 fps
W (68715) example:take_picture: Taking picture...38, abnormal, skiped
I (68716) example:take_picture: MJPG: 16KB get-total(132290ms-132292ms) 0.0 fps
I (73718) example:take_picture: Taking picture...40
I (73719) example:take_picture: MJPG: 16KB get-total(210ms-212ms) 4.7 fps
W (78896) example:take_picture: Taking picture...43, abnormal, skiped
I (78896) example:take_picture: MJPG: 16KB get-total(176420ms-176421ms) 0.0 fps
W (84031) example:take_picture: Taking picture...46, abnormal, skiped
I (84031) example:take_picture: MJPG: 16KB get-total(132581ms-132582ms) 0.0 fps
W (89166) example:take_picture: Taking picture...49, abnormal, skiped
I (89166) example:take_picture: MJPG: 16KB get-total(132753ms-132754ms) 0.0 fps
W (94301) example:take_picture: Taking picture...52, abnormal, skiped
I (94302) example:take_picture: MJPG: 16KB get-total(132918ms-132919ms) 0.0 fps
W (99436) example:take_picture: Taking picture...55, abnormal, skiped
I (99437) example:take_picture: MJPG: 16KB get-total(132073ms-132074ms) 0.0 fps
W (104571) example:take_picture: Taking picture...58, abnormal, skiped
I (104572) example:take_picture: MJPG: 16KB get-total(132253ms-132254ms) 0.0 fps
I (109574) example:take_picture: Taking picture...60
I (109575) example:take_picture: MJPG: 16KB get-total(211ms-212ms) 4.7 fps
W (114752) example:take_picture: Taking picture...63, abnormal, skiped
I (114752) example:take_picture: MJPG: 16KB get-total(176614ms-176616ms) 0.0 fps
W (119887) example:take_picture: Taking picture...66, abnormal, skiped
I (119887) example:take_picture: MJPG: 16KB get-total(132799ms-132801ms) 0.0 fps
W (125022) example:take_picture: Taking picture...69, abnormal, skiped
I (125023) example:take_picture: MJPG: 16KB get-total(131949ms-131951ms) 0.0 fps
W (130157) example:take_picture: Taking picture...72, abnormal, skiped
I (130158) example:take_picture: MJPG: 16KB get-total(132112ms-132114ms) 0.0 fps
W (135292) example:take_picture: Taking picture...75, abnormal, skiped
I (135293) example:take_picture: MJPG: 16KB get-total(132286ms-132288ms) 0.0 fps
W (140428) example:take_picture: Taking picture...78, abnormal, skiped
I (140428) example:take_picture: MJPG: 16KB get-total(132458ms-132460ms) 0.0 fps
I (145430) example:take_picture: Taking picture...80
I (145431) example:take_picture: MJPG: 16KB get-total(214ms-216ms) 4.6 fps
W (150608) example:take_picture: Taking picture...83, abnormal, skiped
I (150608) example:take_picture: MJPG: 16KB get-total(176577ms-176577ms) 0.0 fps
W (155743) example:take_picture: Taking picture...86, abnormal, skiped
I (155743) example:take_picture: MJPG: 16KB get-total(132733ms-132734ms) 0.0 fps
W (160878) example:take_picture: Taking picture...89, abnormal, skiped
I (160879) example:take_picture: MJPG: 16KB get-total(131919ms-131920ms) 0.0 fps
W (166013) example:take_picture: Taking picture...92, abnormal, skiped
I (166014) example:take_picture: MJPG: 16KB get-total(132077ms-132077ms) 0.0 fps
W (171148) example:take_picture: Taking picture...95, abnormal, skiped
I (171149) example:take_picture: MJPG: 16KB get-total(132256ms-132257ms) 0.0 fps
W (176284) example:take_picture: Taking picture...98, abnormal, skiped
I (176284) example:take_picture: MJPG: 16KB get-total(132430ms-132431ms) 0.0 fps
I (181286) example:take_picture: Taking picture...100
I (181287) example:take_picture: MJPG: 16KB get-total(209ms-210ms) 4.8 fps
I (186287) example:take_picture: ----------69 tests, 31 abnormal skiped
I (186287) example:take_picture: MJPG: 13 - 20KB
I (186287) example:take_picture: GET: 447 - 170ms avg 245ms
I (186292) example:take_picture: SUM: 457 - 171ms avg 250ms
I (186297) example:take_picture: FPS: 2.2 - 5.8 avg 4.0
4.3.2 OV2640 800x600
100帧,31帧数据异常(严重超时),69帧统计数据显示,平均14帧/秒,最快71帧/秒。
I (1191) cam_hal: cam config ok
D (1194) camera: Setting frame size to 800x600
I (1198) ov2640: Set PLL: clk_2x: 0, clk_div: 0, pclk_auto: 0, pclk_div: 8
W (1484) example:take_picture: Taking picture...1, abnormal, skiped
I (1484) example:take_picture: MJPG: 15KB get-total(201329ms-201335ms) 0.0 fps
W (6602) example:take_picture: Taking picture...4, abnormal, skiped
I (6602) example:take_picture: MJPG: 12KB get-total(116235ms-116236ms) 0.0 fps
W (11720) example:take_picture: Taking picture...7, abnormal, skiped
I (11720) example:take_picture: MJPG: 12KB get-total(116156ms-116157ms) 0.0 fps
W (16838) example:take_picture: Taking picture...10, abnormal, skiped
I (16838) example:take_picture: MJPG: 12KB get-total(116079ms-116080ms) 0.0 fps
W (21956) example:take_picture: Taking picture...13, abnormal, skiped
I (21956) example:take_picture: MJPG: 12KB get-total(116037ms-116038ms) 0.0 fps
W (27074) example:take_picture: Taking picture...16, abnormal, skiped
I (27074) example:take_picture: MJPG: 12KB get-total(115978ms-115979ms) 0.0 fps
W (32192) example:take_picture: Taking picture...19, abnormal, skiped
I (32192) example:take_picture: MJPG: 12KB get-total(115938ms-115939ms) 0.0 fps
I (37194) example:take_picture: Taking picture...20
I (37194) example:take_picture: MJPG: 12KB get-total(092ms-093ms) 10.8 fps
W (42348) example:take_picture: Taking picture...23, abnormal, skiped
I (42348) example:take_picture: MJPG: 12KB get-total(152926ms-152927ms) 0.0 fps
W (47466) example:take_picture: Taking picture...26, abnormal, skiped
I (47466) example:take_picture: MJPG: 12KB get-total(115844ms-115845ms) 0.0 fps
W (52584) example:take_picture: Taking picture...29, abnormal, skiped
I (52584) example:take_picture: MJPG: 12KB get-total(115793ms-115794ms) 0.0 fps
W (57701) example:take_picture: Taking picture...32, abnormal, skiped
I (57702) example:take_picture: MJPG: 12KB get-total(115743ms-115744ms) 0.0 fps
W (62819) example:take_picture: Taking picture...35, abnormal, skiped
I (62820) example:take_picture: MJPG: 12KB get-total(115699ms-115700ms) 0.0 fps
W (67937) example:take_picture: Taking picture...38, abnormal, skiped
I (67938) example:take_picture: MJPG: 12KB get-total(115645ms-115646ms) 0.0 fps
I (72940) example:take_picture: Taking picture...40
I (72940) example:take_picture: MJPG: 12KB get-total(060ms-061ms) 16.4 fps
W (78093) example:take_picture: Taking picture...43, abnormal, skiped
I (78094) example:take_picture: MJPG: 12KB get-total(152580ms-152581ms) 0.0 fps
W (83211) example:take_picture: Taking picture...46, abnormal, skiped
I (83212) example:take_picture: MJPG: 12KB get-total(115513ms-115514ms) 0.0 fps
W (88329) example:take_picture: Taking picture...49, abnormal, skiped
I (88330) example:take_picture: MJPG: 12KB get-total(115470ms-115471ms) 0.0 fps
W (93447) example:take_picture: Taking picture...52, abnormal, skiped
I (93448) example:take_picture: MJPG: 12KB get-total(115416ms-115417ms) 0.0 fps
W (98565) example:take_picture: Taking picture...55, abnormal, skiped
I (98566) example:take_picture: MJPG: 12KB get-total(115375ms-115376ms) 0.0 fps
W (103683) example:take_picture: Taking picture...58, abnormal, skiped
I (103683) example:take_picture: MJPG: 12KB get-total(115323ms-115323ms) 0.0 fps
I (108686) example:take_picture: Taking picture...60
I (108686) example:take_picture: MJPG: 12KB get-total(063ms-064ms) 15.6 fps
W (113839) example:take_picture: Taking picture...63, abnormal, skiped
I (113839) example:take_picture: MJPG: 12KB get-total(152286ms-152287ms) 0.0 fps
W (118957) example:take_picture: Taking picture...66, abnormal, skiped
I (118957) example:take_picture: MJPG: 12KB get-total(115232ms-115233ms) 0.0 fps
W (124075) example:take_picture: Taking picture...69, abnormal, skiped
I (124075) example:take_picture: MJPG: 12KB get-total(115185ms-115186ms) 0.0 fps
W (129193) example:take_picture: Taking picture...72, abnormal, skiped
I (129193) example:take_picture: MJPG: 12KB get-total(115137ms-115138ms) 0.0 fps
W (134311) example:take_picture: Taking picture...75, abnormal, skiped
I (134311) example:take_picture: MJPG: 12KB get-total(115089ms-115090ms) 0.0 fps
W (139429) example:take_picture: Taking picture...78, abnormal, skiped
I (139429) example:take_picture: MJPG: 12KB get-total(115035ms-115036ms) 0.0 fps
I (144431) example:take_picture: Taking picture...80
I (144431) example:take_picture: MJPG: 12KB get-total(064ms-065ms) 15.4 fps
W (149585) example:take_picture: Taking picture...83, abnormal, skiped
I (149585) example:take_picture: MJPG: 12KB get-total(152965ms-152966ms) 0.0 fps
W (154703) example:take_picture: Taking picture...86, abnormal, skiped
I (154703) example:take_picture: MJPG: 12KB get-total(115922ms-115922ms) 0.0 fps
W (159821) example:take_picture: Taking picture...89, abnormal, skiped
I (159821) example:take_picture: MJPG: 12KB get-total(115870ms-115870ms) 0.0 fps
W (164939) example:take_picture: Taking picture...92, abnormal, skiped
I (164939) example:take_picture: MJPG: 12KB get-total(115814ms-115815ms) 0.0 fps
W (170056) example:take_picture: Taking picture...95, abnormal, skiped
I (170057) example:take_picture: MJPG: 12KB get-total(115769ms-115770ms) 0.0 fps
W (175174) example:take_picture: Taking picture...98, abnormal, skiped
I (175175) example:take_picture: MJPG: 12KB get-total(115714ms-115715ms) 0.0 fps
I (180177) example:take_picture: Taking picture...100
I (180177) example:take_picture: MJPG: 12KB get-total(060ms-060ms) 16.7 fps
I (185178) example:take_picture: ----------69 tests, 31 abnormal skiped
I (185178) example:take_picture: MJPG: 12 - 14KB
I (185178) example:take_picture: GET: 092 - 013ms avg 069ms
I (185183) example:take_picture: SUM: 093 - 014ms avg 069ms
I (185188) example:take_picture: FPS: 10.8 - 71.4 avg 14.5
5. 总结
上述软件代码是截止2023年01月18日(发稿日)最新代码,通过上述视频和对比数据情况来看:
- 同样配置(800x600的分辨率)情况下,OV2640会比OV5640流畅(帧速率更高);
- OV5640在暗场环境存在闪烁问题(怀疑驱动可能存在问题),而OV2640则无此问题;
- 基于AITHINKER Camera硬件条件下,摄像头帧速率不稳定,平均速率都比较低(低于25FPS);
- Github: ESP32-Camera和 M5Stack-Camera库上代码均存在诸多问题
- a) 驱动稳定性和可用性
- b) 代码适配性(库上代码均存在问题,无法直接使用,存在明显BUG)
- c) 代码健壮性
- WiFi视频角度:可以做简单固定场景非专业类监控,且交易受到干扰影响(2.4G频段)
- 场景不同(照度等)会影响到FPS速率,因此上述测试数据是一个整体趋势性数据,因测试场景不同存在一定差异性