From 8c253f8031ac243f612b58f2c40c23881d956c8b Mon Sep 17 00:00:00 2001 From: Ye Hang Yang Date: Mon, 27 Sep 2021 15:25:50 +0800 Subject: [PATCH] :sparkles: cat_face_detection display on terminal --- examples/cat_face_detection/terminal/CMakeLists.txt | 8 ++++++++ .../cat_face_detection/terminal/main/CMakeLists.txt | 1 + .../cat_face_detection/terminal/main/app_main.cpp | 12 ++++++++++++ .../cat_face_detection/terminal/sdkconfig.defaults | 6 ++++++ .../terminal/sdkconfig.defaults.esp32 | 4 ++++ .../terminal/sdkconfig.defaults.esp32s2 | 7 +++++++ .../terminal/sdkconfig.defaults.esp32s3 | 10 ++++++++++ 7 files changed, 48 insertions(+) create mode 100644 examples/cat_face_detection/terminal/CMakeLists.txt create mode 100644 examples/cat_face_detection/terminal/main/CMakeLists.txt create mode 100755 examples/cat_face_detection/terminal/main/app_main.cpp create mode 100644 examples/cat_face_detection/terminal/sdkconfig.defaults create mode 100644 examples/cat_face_detection/terminal/sdkconfig.defaults.esp32 create mode 100644 examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s2 create mode 100644 examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s3 diff --git a/examples/cat_face_detection/terminal/CMakeLists.txt b/examples/cat_face_detection/terminal/CMakeLists.txt new file mode 100644 index 0000000..2d3b8c0 --- /dev/null +++ b/examples/cat_face_detection/terminal/CMakeLists.txt @@ -0,0 +1,8 @@ +# The following lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +set(EXTRA_COMPONENT_DIRS ../../../components) +add_compile_options(-fdiagnostics-color=always) +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(cat_face_detection_terminal) diff --git a/examples/cat_face_detection/terminal/main/CMakeLists.txt b/examples/cat_face_detection/terminal/main/CMakeLists.txt new file mode 100644 index 0000000..5eea762 --- /dev/null +++ b/examples/cat_face_detection/terminal/main/CMakeLists.txt @@ -0,0 +1 @@ +idf_component_register(SRCS "app_main.cpp") diff --git a/examples/cat_face_detection/terminal/main/app_main.cpp b/examples/cat_face_detection/terminal/main/app_main.cpp new file mode 100755 index 0000000..31e385b --- /dev/null +++ b/examples/cat_face_detection/terminal/main/app_main.cpp @@ -0,0 +1,12 @@ +#include "who_camera.h" +#include "who_motion_detection.hpp" + +static QueueHandle_t xQueueAIFrame = NULL; + +extern "C" void app_main() +{ + xQueueAIFrame = xQueueCreate(2, sizeof(camera_fb_t *)); + + register_camera(PIXFORMAT_RGB565, FRAMESIZE_240X240, 2, xQueueAIFrame); + register_motion_detection(xQueueAIFrame, NULL, NULL, NULL); +} diff --git a/examples/cat_face_detection/terminal/sdkconfig.defaults b/examples/cat_face_detection/terminal/sdkconfig.defaults new file mode 100644 index 0000000..d53e9f4 --- /dev/null +++ b/examples/cat_face_detection/terminal/sdkconfig.defaults @@ -0,0 +1,6 @@ +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y + +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y + +CONFIG_SPIRAM_SPEED_80M=y \ No newline at end of file diff --git a/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32 b/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32 new file mode 100644 index 0000000..ecc2d87 --- /dev/null +++ b/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32 @@ -0,0 +1,4 @@ +CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32_SPIRAM_SUPPORT=y + +CONFIG_CAMERA_MODULE_ESP_EYE=y \ No newline at end of file diff --git a/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s2 b/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s2 new file mode 100644 index 0000000..3b5e99c --- /dev/null +++ b/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s2 @@ -0,0 +1,7 @@ +CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +CONFIG_ESP32S2_DATA_CACHE_16KB=y +ESP32S2_DATA_CACHE_LINE_32B=y + +CONFIG_CAMERA_MODULE_ESP_S2_KALUGA=y \ No newline at end of file diff --git a/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s3 b/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s3 new file mode 100644 index 0000000..e490838 --- /dev/null +++ b/examples/cat_face_detection/terminal/sdkconfig.defaults.esp32s3 @@ -0,0 +1,10 @@ +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S3_SPIRAM_SUPPORT=y + +CONFIG_ESP32S3_DATA_CACHE_64KB=y +CONFIG_ESP32S3_DATA_CACHE_8WAYS=y +CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y + +CONFIG_CAMERA_MODULE_ESP_S3_EYE=y +CONFIG_ESPTOOLPY_NO_STUB=y +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y