forked from espressif/arduino-esp32
Fix Camera Example (#3202)
* Update app_httpd.cpp * Stop LWIP from using PSRAM and enable OV7725
This commit is contained in:
@ -229,6 +229,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
|
||||
|
||||
httpd_resp_set_type(req, "image/jpeg");
|
||||
httpd_resp_set_hdr(req, "Content-Disposition", "inline; filename=capture.jpg");
|
||||
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||
|
||||
size_t out_len, out_width, out_height;
|
||||
uint8_t * out_buf;
|
||||
@ -282,6 +283,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
|
||||
face_id = run_face_recognition(image_matrix, net_boxes);
|
||||
}
|
||||
draw_face_boxes(image_matrix, net_boxes, face_id);
|
||||
free(net_boxes->score);
|
||||
free(net_boxes->box);
|
||||
free(net_boxes->landmark);
|
||||
free(net_boxes);
|
||||
@ -325,6 +327,8 @@ static esp_err_t stream_handler(httpd_req_t *req){
|
||||
return res;
|
||||
}
|
||||
|
||||
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
|
||||
|
||||
while(true){
|
||||
detected = false;
|
||||
face_id = 0;
|
||||
@ -378,6 +382,7 @@ static esp_err_t stream_handler(httpd_req_t *req){
|
||||
}
|
||||
fr_recognize = esp_timer_get_time();
|
||||
draw_face_boxes(image_matrix, net_boxes, face_id);
|
||||
free(net_boxes->score);
|
||||
free(net_boxes->box);
|
||||
free(net_boxes->landmark);
|
||||
free(net_boxes);
|
||||
@ -624,15 +629,18 @@ void startCameraServer(){
|
||||
|
||||
ra_filter_init(&ra_filter, 20);
|
||||
|
||||
mtmn_config.type = FAST;
|
||||
mtmn_config.min_face = 80;
|
||||
mtmn_config.pyramid = 0.7;
|
||||
mtmn_config.pyramid = 0.707;
|
||||
mtmn_config.pyramid_times = 4;
|
||||
mtmn_config.p_threshold.score = 0.6;
|
||||
mtmn_config.p_threshold.nms = 0.7;
|
||||
mtmn_config.p_threshold.candidate_number = 20;
|
||||
mtmn_config.r_threshold.score = 0.7;
|
||||
mtmn_config.r_threshold.nms = 0.7;
|
||||
mtmn_config.r_threshold.candidate_number = 4;
|
||||
mtmn_config.r_threshold.candidate_number = 10;
|
||||
mtmn_config.o_threshold.score = 0.7;
|
||||
mtmn_config.o_threshold.nms = 0.4;
|
||||
mtmn_config.o_threshold.nms = 0.7;
|
||||
mtmn_config.o_threshold.candidate_number = 1;
|
||||
|
||||
face_id_init(&id_list, FACE_ID_SAVE_NUMBER, ENROLL_CONFIRM_TIMES);
|
||||
|
Reference in New Issue
Block a user