8000 Fix Camera Example (#3202) · buxtronix/arduino-esp32@0739015 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0739015

Browse files
authored
Fix Camera Example (espressif#3202)
* Update app_httpd.cpp * Stop LWIP from using PSRAM and enable OV7725
1 parent bab3a70 commit 0739015

Some content is hidden

Large Commits have some content hidden by default. Use the searc A3DB hbox below for content that may be hidden.

73 files changed

+14
-7
lines changed

libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
229229

230230
httpd_resp_set_type(req, "image/jpeg");
231231
httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.jpg");
232+
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
232233

233234
size_t out_len, out_width, out_height;
234235
uint8_t * out_buf;
@@ -282,6 +283,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
282283
face_id = run_face_recognition(image_matrix, net_boxes);
283284
}
284285
draw_face_boxes(image_matrix, net_boxes, face_id);
286+
free(net_boxes->score);
285287
free(net_boxes->box);
286288
free(net_boxes->landmark);
287289
free(net_boxes);
@@ -325,6 +327,8 @@ static esp_err_t stream_handler(httpd_req_t *req){
325327
return res;
326328
}
327329

330+
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
331+
328332
while(true){
329333
detected = false;
330334
face_id = 0;
@@ -378,6 +382,7 @@ static esp_err_t stream_handler(httpd_req_t *req){
378382
}
379383
fr_recognize = esp_timer_get_time();
380384
draw_face_boxes(image_matrix, net_boxes, face_id);
385+
free(net_boxes->score);
381386
free(net_boxes->box);
382387
free(net_boxes->landmark);
383388
free(net_boxes);
@@ -624,15 +629,18 @@ void startCameraServer(){
624629

625630
ra_filter_init(&ra_filter, 20);
626631

632+
mtmn_config.type = FAST;
627633
mtmn_config.min_face = 80;
628-
mtmn_config.pyramid = 0.7;
634+
mtmn_config.pyramid = 0.707;
635+
mtmn_config.pyramid_times = 4;
629636
mtmn_config.p_threshold.score = 0.6;
630637
mtmn_config.p_threshold.nms = 0.7;
638+
mtmn_config.p_threshold.candidate_number = 20;
631639
mtmn_config.r_threshold.score = 0.7;
632640
mtmn_config.r_threshold.nms = 0.7;
633-
mtmn_config.r_threshold.candidate_number = 4;
641+
mtmn_config.r_threshold.candidate_number = 10;
634642
mtmn_config.o_threshold.score = 0.7;
635-
mtmn_config.o_threshold.nms = 0.4;
643+
mtmn_config.o_threshold.nms = 0.7;
636644
mtmn_config.o_threshold.candidate_number = 1;
637645

638646
face_id_init(&id_list, FACE_ID_SAVE_NUMBER, ENROLL_CONFIRM_TIMES);

tools/sdk/bin/bootloader_dio_80m.bin

-1.5 KB
Binary file not shown.

tools/sdk/bin/bootloader_qio_40m.bin

-1.5 KB
Binary file not shown.

tools/sdk/bin/bootloader_qout_40m.bin

0 Bytes
Binary file not shown.

tools/sdk/include/config/sdkconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
#define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO 1
131131
#define CONFIG_LWIP_DHCPS_LEASE_UNIT 60
132132
#define CONFIG_SPIFFS_USE_MAGIC 1
133+
#define CONFIG_OV7725_SUPPORT 1
133134
#define CONFIG_TCPIP_TASK_STACK_SIZE 2560
134135
#define CONFIG_BLUEDROID_PINNED_TO_CORE_0 1
135136
#define CONFIG_FATFS_CODEPAGE_850 1
@@ -291,7 +292,6 @@
291292
#define CONFIG_ESP32_DEBUG_STUBS_ENABLE 1
292293
#define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT 30
293294
#define CONFIG_TCPIP_LWIP 1
294-
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST 1
295295
#define CONFIG_REDUCE_PHY_TX_POWER 1
296296
#define CONFIG_BOOTLOADER_WDT_TIME_MS 9000
297297
#define CONFIG_FREERTOS_CORETIMER_0 1

tools/sdk/lib/libapp_trace.a

0 Bytes
Binary file not shown.

tools/sdk/lib/libapp_update.a

0 Bytes
Binary file not shown.

tools/sdk/lib/libasio.a

0 Bytes
Binary file not shown.

tools/sdk/lib/libbootloader_support.a

4 Bytes
Binary file not shown.

tools/sdk/lib/libbt.a

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
0