Skip to content

Commit 0739015

Browse files
authoredSep 12, 2019
Fix Camera Example (#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 searchbox 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.

0 commit comments

Comments
 (0)