Merge branch 'misc/open_forward_sourc'

pull/9/head v0.6.1
XiaochaoGONG 2018-12-05 16:50:37 +08:00
commit b6d7634eca
6 changed files with 25 additions and 8 deletions

View File

@ -1,5 +1,5 @@
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/lib EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/lib
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/image_util EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/image_util
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/face_detection/fd_coefficients EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/face_detection
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/face_recognition/fr_coefficients EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/face_recognition

@ -1 +1 @@
Subproject commit 822bdfd483d4115e0025b7a3964fb8dd8d3a9343 Subproject commit 3b87cf09ba22386fe580b5260bac25bab2f3ecc2

View File

@ -29,6 +29,21 @@ static const char *TAG = "app_camera";
void app_camera_main () void app_camera_main ()
{ {
#if CONFIG_CAMERA_MODEL_CUSTOM
/* IO13, IO14 is designed for JTAG by default,
* to use it as generalized input,
* firstly declair it as pullup input */
gpio_config_t conf;
conf.mode = GPIO_MODE_INPUT;
conf.pull_up_en = GPIO_PULLUP_ENABLE;
conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
conf.intr_type = GPIO_INTR_DISABLE;
conf.pin_bit_mask = 1LL << 13;
gpio_config(&conf);
conf.pin_bit_mask = 1LL << 14;
gpio_config(&conf);
#endif
camera_config_t config; camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0; config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0; config.ledc_timer = LEDC_TIMER_0;

View File

@ -29,10 +29,10 @@ static const char* TAG = "camera_httpd";
#endif #endif
#if CONFIG_ESP_FACE_DETECT_ENABLED #if CONFIG_ESP_FACE_DETECT_ENABLED
#include "face_detection_forward.h" #include "fd_forward.h"
#include "dl_lib.h" #include "dl_lib.h"
#if CONFIG_ESP_FACE_RECOGNITION_ENABLED #if CONFIG_ESP_FACE_RECOGNITION_ENABLED
#include "face_recognition.h" #include "fr_forward.h"
#define ENROLL_CONFIRM_TIMES 5 #define ENROLL_CONFIRM_TIMES 5
#define FACE_ID_SAVE_NUMBER 7 #define FACE_ID_SAVE_NUMBER 7
@ -323,6 +323,7 @@ static esp_err_t capture_handler(httpd_req_t *req){
#endif #endif
draw_face_boxes(image_matrix, net_boxes, face_id); draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->box); free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes); free(net_boxes);
} }
@ -428,6 +429,7 @@ static esp_err_t stream_handler(httpd_req_t *req){
#endif #endif
draw_face_boxes(image_matrix, net_boxes, face_id); draw_face_boxes(image_matrix, net_boxes, face_id);
free(net_boxes->box); free(net_boxes->box);
free(net_boxes->landmark);
free(net_boxes); free(net_boxes);
} }
if(!fmt2jpg(image_matrix->item, fb->width*fb->height*3, fb->width, fb->height, PIXFORMAT_RGB888, 90, &_jpg_buf, &_jpg_buf_len)){ if(!fmt2jpg(image_matrix->item, fb->width*fb->height*3, fb->width, fb->height, PIXFORMAT_RGB888, 90, &_jpg_buf, &_jpg_buf_len)){

View File

@ -28,7 +28,7 @@
extern "C" { extern "C" {
#endif #endif
#include "face_detection_forward.h" #include "fd_forward.h"
#include "image_util.h" #include "image_util.h"
#include "app_camera.h" #include "app_camera.h"

View File

@ -29,8 +29,8 @@ extern "C"
{ {
#endif #endif
#include "face_detection_forward.h" #include "fd_forward.h"
#include "face_recognition.h" #include "fr_forward.h"
#include "image_util.h" #include "image_util.h"
#include "app_camera.h" #include "app_camera.h"