Merge e27bbc33de into 3f9d35fff9
commit
015b65a50e
176
README.md
176
README.md
|
|
@ -1,119 +1,121 @@
|
|||
# ESP-WHO [[中文]](./README_CN.md)
|
||||
# ESP-WHO
|
||||
|
||||
ESP-WHO is an image processing development platform based on Espressif chips. It contains development examples that may be applied in practical applications.
|
||||
ESP-WHO is a face detection and recognition platform that is currently based on Espressif Systems' [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip.
|
||||
|
||||
## Overview
|
||||
# Overview
|
||||
ESP-WHO supports development of face detection and recognition applications based around Espressif Systems' [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip in the most convenient way. With ESP-WHO, you can easily build up face detection- and recognition-featured applications, for instance:
|
||||
* A coffee machine that brews coffee according to your taste preference;
|
||||
* Home applicance that will shut off the electricity automatically when unsupervised children are operating them;
|
||||
* And other more applications that suit your needs.
|
||||
|
||||
ESP-WHO provides examples such as Human Face Detection, Human Face Recognition, Cat Face Detection, Gesture Recognition, etc. You can develop a variety of practical applications based on these examples. ESP-WHO runs on ESP-IDF. [ESP-DL](https://github.com/espressif/esp-dl) provides rich deep learning related interfaces for ESP-WHO, which can be implemented with various peripherals to realize many interesting applications.
|
||||
In general, the ESP-WHO features will be supported as shown below:
|
||||
|
||||
<p align="center">
|
||||
<img width="%" src="./img/architecture_en.drawio.svg">
|
||||
</p>
|
||||

|
||||
|
||||
In ESP-WHO, Detection, Recognition and Image Utility are at the core of the platform.
|
||||
|
||||
|
||||
* **Image Utility** offers fundamental image processing APIs.
|
||||
|
||||
## What You Need
|
||||
* **Detection** takes images as input and give the position of face if there is a face. It is implemented with MTMN model, which refers to [MTCNN](http://cn.arxiv.org/abs/1604.02878) and [MobileNets](https://arxiv.org/abs/1801.04381).
|
||||
|
||||
### Hardware
|
||||
* **Recognition** is to identify the particular person, and it needs the results of detection. It is implemented with MobileFace model.
|
||||
|
||||
We recommend novice developers to use the development boards designed by Espressif. The examples provided by ESP-WHO are developed based on the following Espressif development board, and the corresponding relationships between the development boards and SoC are shown in the table below.
|
||||
|
||||
| SoC | [ESP32](https://www.espressif.com/en/products/socs/esp32) | [ESP32-S2](https://www.espressif.com/en/products/socs/esp32-s2) | [ESP32-S3](https://www.espressif.com/en/products/socs/esp32-s3) |
|
||||
| :------- | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
|
||||
| Development Board | [ESP-EYE](https://www.espressif.com/en/products/devkits/esp-eye/overview) | [ESP32-S2-Kaluga-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html) | [ESP-S3-EYE](https://www.espressif.com/en/products/devkits/esp-s3-eye/overview) |
|
||||
* **Optimization** is mainly to increase the precision of the inference, and to accelerate the whole process. But also it might change the structure of the network, update the coefficients, refactor the code, etc.
|
||||
|
||||
> Using a development board not mentioned in the table above, configure pins assigned to peripherals manually, such as camera, LCD, and buttons.
|
||||
Both input and output are flexible.
|
||||
|
||||
### Software
|
||||
* Image sources could be **input** via camera. However, we don't provide many drivers right now, those for other camera modules will be released in the future.
|
||||
|
||||
#### Get ESP-IDF
|
||||
* Results could be **output** and displayed through Command line, LCD or even website via Wi-Fi http service.
|
||||
|
||||
ESP-WHO runs on ESP-IDF. For details on getting ESP-IDF, please refer to [ESP-IDF Programming Guide](https://idf.espressif.com/).
|
||||
|
||||
> Please use the latest version of ESP-IDF on the master branch.
|
||||
# Quick Start with ESP-WHO
|
||||
|
||||
#### Get ESP-WHO
|
||||
## Hardware Preparation
|
||||
|
||||
Run the following commands in your terminal to download ESP-WHO:
|
||||
To run ESP-WHO, you need to have a development board which integrates a **ESP32 module** that has sufficient GPIO pins and more than **4 MB** external SPI RAM. Either [ESP-WROVER-KIT](https://www.espressif.com/en/products/hardware/esp-wrover-kit/overview) or [ESP-EYE](https://www.espressif.com/en/products/hardware/esp-eye/overview) can be a good choice as the test board.
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/espressif/esp-who.git
|
||||
On how to configure ESP32 module for your applications, please refer to the README.md of each example.
|
||||
|
||||
|
||||
## Software Preparation
|
||||
|
||||
### Image
|
||||
|
||||
The recommended resolution of input image is **QVGA (320x240)**.
|
||||
|
||||
As for choosing camera as an image offer, make sure that the ESP32 module you choose offers specific pins that your camera needs.
|
||||
|
||||
By now, we have provided some drivers of cameras, which are highly recommended to get started with:
|
||||
|
||||
**OV2640**
|
||||
|
||||
**OV3660**
|
||||
|
||||
**OV5640**
|
||||
|
||||
### ESP-WHO
|
||||
Make sure you clone the project recursive:
|
||||
|
||||
```
|
||||
git clone --recursive https://github.com/espressif/esp-who.git
|
||||
```
|
||||
|
||||
> Remember to use ``git submodule update --recursive --init`` to pull and update submodules of ESP-WHO.
|
||||
If you clone project without `--recursive` flag, please go to the `esp-who` directory and run command `git submodule update --init` before doing anything.
|
||||
|
||||
## Run Examples
|
||||
### ESP-IDF
|
||||
See setup guides for detailed instructions to set up the ESP-IDF:
|
||||
|
||||
All examples of ESP-WHO are stored in [examples](./examples) folder. Structure of this folder is shown below:
|
||||
* [Getting Started Guide for ESP-IDF v4.0](https://docs.espressif.com/projects/esp-idf/en/v4.0/get-started/index.html)
|
||||
|
||||
```bash
|
||||
├── examples
|
||||
│ ├── cat_face_detection // Cat Face Detection examples
|
||||
│ │ ├── lcd // Output displayed on LCD screen
|
||||
│ │ └── terminal // Output displayed on terminal
|
||||
│ ├── code_recognition // Barcode and QR Code Recognition examples
|
||||
│ ├── human_face_detection // Human Face Detection examples
|
||||
│ │ ├── lcd
|
||||
│ │ └── terminal
|
||||
│ ├── human_face_recognition // Human Face Recognition examples
|
||||
│ │ ├── lcd
|
||||
│ │ ├── terminal
|
||||
│ │ └── README.md // Detailed description of examples
|
||||
│ └── motion_detection // Motion Detection examples
|
||||
│ ├── lcd
|
||||
│ ├── terminal
|
||||
│ ├── web
|
||||
│ └── README.rst
|
||||
We take [ESP-IDF v4.0](https://github.com/espressif/esp-idf/tree/release/v4.0) as the default version.
|
||||
|
||||
> Now this repository supports two versions of IDF: v3.3.1 and v4.0.0.
|
||||
|
||||
|
||||
# Components
|
||||
|
||||
Components is the main framework of the SDK, with some drivers and algorithm inside.
|
||||
|
||||
## Camera
|
||||
|
||||
The [camera](https://github.com/espressif/esp32-camera/tree/master) component contains drivers for camera devices of ESP32.
|
||||
|
||||
|
||||
## esp-face
|
||||
|
||||
The [esp-face](https://github.com/espressif/esp-face/tree/master) component contains the APIs of ESP-WHO neural networks, including face detection and recognition framework.
|
||||
|
||||
|
||||
# Examples
|
||||
The folder of [examples](examples) contains sample applications demonstrating the API features of ESP-WHO.
|
||||
|
||||
Take one Face Detection as an example.
|
||||
|
||||
1. Get into one example folder `esp-who/examples/single_chip/face_detection_with_command_line`.
|
||||
```
|
||||
cd esp-who/examples/single_chip/face_detection_with_command_line
|
||||
```
|
||||
|
||||
For the development boards mentioned in [Hardware](#Hardware), all examples are available out of the box. To run the examples, you only need to perform [Step 1: Set the target chip] (#Step-1 Set the target chip) and [Step 4: Launch and monitor] (#Step-4 Launch and monitor).
|
||||
|
||||
### Step 1: Set the target chip
|
||||
|
||||
Open the terminal and go to any folder that stores examples (e.g. examples/human_face_detection/lcd). Run the following command to set the target chip:
|
||||
|
||||
```bash
|
||||
idf.py set-target [SoC]
|
||||
2. Compile and flash the project.
|
||||
```
|
||||
|
||||
Replace [SoC] with your target chip, e.g. esp32, esp32s2, esp32s3.
|
||||
|
||||
### (Optional) Step 2: Configure the camera
|
||||
|
||||
If not using the Espressif development boards mentioned in [Hardware](#Hardware), configure the camera pins manually. Enter `idf.py menuconfig` in the terminal and click (Top) -> Component config -> ESP-WHO Configuration to enter the ESP-WHO configuration interface, as shown below:
|
||||
|
||||

|
||||
|
||||
Click Camera Configuration to select the pin configuration of the camera according to the development board you use, as shown in the following figure:
|
||||
|
||||

|
||||
|
||||
If the board you are using is not shown in the figure above, please select ``Custom Camera Pinout`` and configure the corresponding pins correctly, as shown in the following figure:
|
||||
|
||||

|
||||
|
||||
### (Optional) Step 3: Configure the Wi-Fi
|
||||
|
||||
If the output of example is displayed on web server, click Wi-Fi Configuration to configure Wi-Fi password and other parameters, as shown in the following figure:
|
||||
|
||||

|
||||
|
||||
### Step 4: Launch and monitor
|
||||
|
||||
Flash the program and launch IDF Monitor:
|
||||
|
||||
```bash
|
||||
idf.py flash monitor
|
||||
idf.py build
|
||||
idf.py flash -p [PORT]
|
||||
```
|
||||
3. Advanced users can modify some options by using the command `idf.py menuconfig`.
|
||||
|
||||
The default configuration of all examples is based on [ESP-EYE](https://www.espressif.com/en/products/hardware/esp-eye/overview).
|
||||
|
||||
Check README.md of each example for more details.
|
||||
|
||||
|
||||
## Default Binaries of Development Boards
|
||||
# Default bin
|
||||
|
||||
The default binaries for each development board are stored in the folder [default_bin](./default_bin). You can use Flash Download Tool (https://www.espressif.com/en/support/download/other-tools) to flash binaries.
|
||||
The default bin is [HERE](docs/zh_CN/get-started/default_bin/). You can use [Flash Download Tools](https://www.espressif.com/en/support/download/other-tools) to write the default bin to the ESP-EYE.
|
||||
|
||||
# Resources
|
||||
|
||||
* [Check the Issues section on github](https://github.com/espressif/esp-who/issues) if you find a bug or have a feature request, please check existing Issues before opening a new one.
|
||||
|
||||
## Feedback
|
||||
|
||||
|
||||
Please submit an [issue](https://github.com/espressif/esp-who/issues) if you find any problems using our products, and we will reply as soon as possible.
|
||||
* If you're interested in contributing to ESP-WHO, please check the [Contributions Guide](https://esp-idf.readthedocs.io/en/latest/contribute/index.html).
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e02038c3f0c6d30c6cd2f038fe2d6255e5666ec2
|
||||
Subproject commit 61400bc73b18e9ffcfd5b3806fee26d135c45fe7
|
||||
|
|
@ -82,6 +82,8 @@ menu "ESP-WHO Configuration"
|
|||
bool "M5Stack Camera F (Wide)"
|
||||
config CAMERA_MODULE_AI_THINKER
|
||||
bool "ESP32-CAM by AI-Thinker"
|
||||
config CAMERA_MODULE_S3_KS_DIY
|
||||
bool "ESP32-S3-CAM by S3_KS-DIY"
|
||||
config CAMERA_MODULE_CUSTOM
|
||||
bool "Custom Camera Pinout"
|
||||
endchoice
|
||||
|
|
|
|||
|
|
@ -171,6 +171,26 @@
|
|||
#define CAMERA_PIN_HREF 23
|
||||
#define CAMERA_PIN_PCLK 22
|
||||
|
||||
#elif CONFIG_CAMERA_MODULE_S3_KS_DIY
|
||||
#define CAMERA_MODULE_NAME "S3_KS_DIY"
|
||||
#define CAMERA_PIN_PWDN -4
|
||||
#define CAMERA_PIN_RESET -1
|
||||
#define CAMERA_PIN_XCLK -1
|
||||
#define CAMERA_PIN_SIOD 17
|
||||
#define CAMERA_PIN_SIOC 18
|
||||
|
||||
#define CAMERA_PIN_D7 39
|
||||
#define CAMERA_PIN_D6 41
|
||||
#define CAMERA_PIN_D5 42
|
||||
#define CAMERA_PIN_D4 5
|
||||
#define CAMERA_PIN_D3 40
|
||||
#define CAMERA_PIN_D2 14
|
||||
#define CAMERA_PIN_D1 47
|
||||
#define CAMERA_PIN_D0 45
|
||||
#define CAMERA_PIN_VSYNC 21
|
||||
#define CAMERA_PIN_HREF 38
|
||||
#define CAMERA_PIN_PCLK 48
|
||||
|
||||
#elif CONFIG_CAMERA_MODULE_CUSTOM
|
||||
#define CAMERA_MODULE_NAME "CUSTOM"
|
||||
#define CAMERA_PIN_PWDN CONFIG_CAMERA_PIN_PWDN
|
||||
|
|
|
|||
|
|
@ -174,6 +174,25 @@
|
|||
#define CAMERA_PIN_HREF 23
|
||||
#define CAMERA_PIN_PCLK 22
|
||||
|
||||
#elif CONFIG_CAMERA_MODULE_S3_KS_DIY
|
||||
#define CAMERA_MODULE_NAME "S3_KS_DIY"
|
||||
#define CAMERA_PIN_PWDN -1
|
||||
#define CAMERA_PIN_RESET -1
|
||||
#define CAMERA_PIN_XCLK -1
|
||||
#define CAMERA_PIN_SIOD 17
|
||||
#define CAMERA_PIN_SIOC 18
|
||||
|
||||
#define CAMERA_PIN_D7 39
|
||||
#define CAMERA_PIN_D6 41
|
||||
#define CAMERA_PIN_D5 42
|
||||
#define CAMERA_PIN_D4 5
|
||||
#define CAMERA_PIN_D3 40
|
||||
#define CAMERA_PIN_D2 14
|
||||
#define CAMERA_PIN_D1 47
|
||||
#define CAMERA_PIN_D0 45
|
||||
#define CAMERA_PIN_VSYNC 21
|
||||
#define CAMERA_PIN_HREF 38
|
||||
#define CAMERA_PIN_PCLK 48
|
||||
#elif CONFIG_CAMERA_MODULE_CUSTOM
|
||||
#define CAMERA_MODULE_NAME "CUSTOM"
|
||||
#define CAMERA_PIN_PWDN CONFIG_CAMERA_PIN_PWDN
|
||||
|
|
@ -197,8 +216,8 @@
|
|||
|
||||
#define XCLK_FREQ_HZ 20000000
|
||||
#define CAMERA_PIXFORMAT PIXFORMAT_RGB565
|
||||
#define CAMERA_FRAME_SIZE FRAMESIZE_240X240
|
||||
#define CAMERA_FB_COUNT 2
|
||||
#define CAMERA_FRAME_SIZE FRAMESIZE_QVGA
|
||||
#define CAMERA_FB_COUNT 1
|
||||
|
||||
|
||||
|
||||
|
|
@ -232,6 +251,23 @@
|
|||
#define LCD_WIDTH 240
|
||||
#define LCD_HEIGHT 320
|
||||
#define LCD_ROTATE SCR_SWAP_XY|SCR_MIRROR_X
|
||||
|
||||
#elif CAMERA_MODULE_S3_KS_DIY
|
||||
#define LCD_CONTROLLER SCREEN_CONTROLLER_ST7789
|
||||
|
||||
#define LCD_MOSI 11
|
||||
#define LCD_MISO 13
|
||||
#define LCD_SCLK 12
|
||||
#define LCD_CS 10
|
||||
#define LCD_DC 9
|
||||
#define LCD_RST -1
|
||||
#define LCD_BCKL -1
|
||||
|
||||
// LCD display width and height
|
||||
#define LCD_WIDTH 240
|
||||
#define LCD_HEIGHT 320
|
||||
#define LCD_ROTATE SCR_SWAP_XY|SCR_MIRROR_X
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
# Camera with Web Server
|
||||
|
||||
# Preparation
|
||||
|
||||
To run this example, you need the following components:
|
||||
|
||||
* An ESP32 Module: Either **ESP32-WROVER-KIT** or **ESP-EYE**, which we highly recommend for beginners, is used in this example.
|
||||
* A Camera Module: Either **OV2640** or **OV3660** or **OV5640** image sensor, which we highly recommend for beginners, is used in this example.
|
||||
|
||||
# Quick Start
|
||||
|
||||
After you've completed the hardware settings, please follow the steps below:
|
||||
|
||||
1. **Connect** the camera to ESP32 module. For connection pins, please see [here](../../../docs/en/Camera_connections.md)
|
||||
2. **Configure** the example through `idf.py menuconfig`;
|
||||
3. **Build And Flash** the application to ESP32;
|
||||
4. **Open Your Browser** and point it to `http://[ip-of-esp32]/`;
|
||||
5. **To Get Image** press `Get Still` or `Start Stream`;
|
||||
6. **Use The Options** to enable/disable Face Detection, Face Recognition and more;
|
||||
7. **View The Stream** in a player like VLC: Open Network `http://[ip-of-esp32]:81/stream`;
|
||||
|
||||
For more details of the http handler, please refer to [esp32-camera](https://github.com/espressif/esp32-camera).
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,209 @@
|
|||
/*
|
||||
* ESPRESSIF MIT License
|
||||
*
|
||||
* Copyright (c) 2017 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
|
||||
*
|
||||
* Permission is hereby granted for use on ESPRESSIF SYSTEMS products only, in which case,
|
||||
* it is free of charge, to any person obtaining a copy of this software and associated
|
||||
* documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished
|
||||
* to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#ifndef _APP_CAMERA_H_
|
||||
#define _APP_CAMERA_H_
|
||||
|
||||
#if CONFIG_CAMERA_MODEL_WROVER_KIT
|
||||
#define CAM_BOARD "WROVER-KIT"
|
||||
#define PWDN_GPIO_NUM -1
|
||||
#define RESET_GPIO_NUM -1
|
||||
#define XCLK_GPIO_NUM 21
|
||||
#define SIOD_GPIO_NUM 26
|
||||
#define SIOC_GPIO_NUM 27
|
||||
|
||||
#define Y9_GPIO_NUM 35
|
||||
#define Y8_GPIO_NUM 34
|
||||
#define Y7_GPIO_NUM 39
|
||||
#define Y6_GPIO_NUM 36
|
||||
#define Y5_GPIO_NUM 19
|
||||
#define Y4_GPIO_NUM 18
|
||||
#define Y3_GPIO_NUM 5
|
||||
#define Y2_GPIO_NUM 4
|
||||
#define VSYNC_GPIO_NUM 25
|
||||
#define HREF_GPIO_NUM 23
|
||||
#define PCLK_GPIO_NUM 22
|
||||
|
||||
#elif CONFIG_CAMERA_MODEL_ESP32_CAM_BOARD
|
||||
// The 18 pin header on the board has Y5 and Y3 swapped
|
||||
#define USE_BOARD_HEADER 0
|
||||
|
||||
#define CAM_BOARD "ESP-DEVCAM"
|
||||
#define PWDN_GPIO_NUM 32
|
||||
#define RESET_GPIO_NUM 33
|
||||
#define XCLK_GPIO_NUM 4
|
||||
#define SIOD_GPIO_NUM 18
|
||||
#define SIOC_GPIO_NUM 23
|
||||
|
||||
#define Y9_GPIO_NUM 36
|
||||
#define Y8_GPIO_NUM 19
|
||||
#define Y7_GPIO_NUM 21
|
||||
#define Y6_GPIO_NUM 39
|
||||
#if USE_BOARD_HEADER
|
||||
#define Y5_GPIO_NUM 13
|
||||
#else
|
||||
#define Y5_GPIO_NUM 35
|
||||
#endif
|
||||
#define Y4_GPIO_NUM 14
|
||||
#if USE_BOARD_HEADER
|
||||
#define Y3_GPIO_NUM 35
|
||||
#else
|
||||
#define Y3_GPIO_NUM 13
|
||||
#endif
|
||||
#define Y2_GPIO_NUM 34
|
||||
#define VSYNC_GPIO_NUM 5
|
||||
#define HREF_GPIO_NUM 27
|
||||
#define PCLK_GPIO_NUM 25
|
||||
|
||||
#elif CONFIG_CAMERA_MODEL_ESP_EYE
|
||||
#define CAM_BOARD "ESP-EYE"
|
||||
#define PWDN_GPIO_NUM -1
|
||||
#define RESET_GPIO_NUM -1
|
||||
#define XCLK_GPIO_NUM 4
|
||||
#define SIOD_GPIO_NUM 18
|
||||
#define SIOC_GPIO_NUM 23
|
||||
|
||||
#define Y9_GPIO_NUM 36
|
||||
#define Y8_GPIO_NUM 37
|
||||
#define Y7_GPIO_NUM 38
|
||||
#define Y6_GPIO_NUM 39
|
||||
#define Y5_GPIO_NUM 35
|
||||
#define Y4_GPIO_NUM 14
|
||||
#define Y3_GPIO_NUM 13
|
||||
#define Y2_GPIO_NUM 34
|
||||
#define VSYNC_GPIO_NUM 5
|
||||
#define HREF_GPIO_NUM 27
|
||||
#define PCLK_GPIO_NUM 25
|
||||
|
||||
#elif CONFIG_CAMERA_MODEL_M5STACK_PSRAM
|
||||
#define CAM_BOARD "M5CAM"
|
||||
#define PWDN_GPIO_NUM -1
|
||||
#define RESET_GPIO_NUM 15
|
||||
#define XCLK_GPIO_NUM 27
|
||||
#define SIOD_GPIO_NUM 25
|
||||
#define SIOC_GPIO_NUM 23
|
||||
|
||||
#define Y9_GPIO_NUM 19
|
||||
#define Y8_GPIO_NUM 36
|
||||
#define Y7_GPIO_NUM 18
|
||||
#define Y6_GPIO_NUM 39
|
||||
#define Y5_GPIO_NUM 5
|
||||
#define Y4_GPIO_NUM 34
|
||||
#define Y3_GPIO_NUM 35
|
||||
#define Y2_GPIO_NUM 32
|
||||
#define VSYNC_GPIO_NUM 22
|
||||
#define HREF_GPIO_NUM 26
|
||||
#define PCLK_GPIO_NUM 21
|
||||
|
||||
#elif CONFIG_CAMERA_MODEL_M5STACK_WIDE
|
||||
#define CAM_BOARD "M5CAMW"
|
||||
#define PWDN_GPIO_NUM -1
|
||||
#define RESET_GPIO_NUM 15
|
||||
#define XCLK_GPIO_NUM 27
|
||||
#define SIOD_GPIO_NUM 22
|
||||
#define SIOC_GPIO_NUM 23
|
||||
|
||||
#define Y9_GPIO_NUM 19
|
||||
#define Y8_GPIO_NUM 36
|
||||
#define Y7_GPIO_NUM 18
|
||||
#define Y6_GPIO_NUM 39
|
||||
#define Y5_GPIO_NUM 5
|
||||
#define Y4_GPIO_NUM 34
|
||||
#define Y3_GPIO_NUM 35
|
||||
#define Y2_GPIO_NUM 32
|
||||
#define VSYNC_GPIO_NUM 25
|
||||
#define HREF_GPIO_NUM 26
|
||||
#define PCLK_GPIO_NUM 21
|
||||
|
||||
#elif CONFIG_CAMERA_MODEL_AI_THINKER
|
||||
#define CAM_BOARD "AI-THINKER"
|
||||
#define PWDN_GPIO_NUM 32
|
||||
#define RESET_GPIO_NUM -1
|
||||
#define XCLK_GPIO_NUM 0
|
||||
#define SIOD_GPIO_NUM 26
|
||||
#define SIOC_GPIO_NUM 27
|
||||
|
||||
#define Y9_GPIO_NUM 35
|
||||
#define Y8_GPIO_NUM 34
|
||||
#define Y7_GPIO_NUM 39
|
||||
#define Y6_GPIO_NUM 36
|
||||
#define Y5_GPIO_NUM 21
|
||||
#define Y4_GPIO_NUM 19
|
||||
#define Y3_GPIO_NUM 18
|
||||
#define Y2_GPIO_NUM 5
|
||||
#define VSYNC_GPIO_NUM 25
|
||||
#define HREF_GPIO_NUM 23
|
||||
#define PCLK_GPIO_NUM 22
|
||||
|
||||
#elif CONFIG_CAMERA_MODULE_S3_KS_DIY
|
||||
#define CAMERA_MODULE_NAME "S3_KS_DIY"
|
||||
#define CAMERA_PIN_PWDN -4
|
||||
#define CAMERA_PIN_RESET -1
|
||||
#define CAMERA_PIN_XCLK -1
|
||||
#define CAMERA_PIN_SIOD 17
|
||||
#define CAMERA_PIN_SIOC 18
|
||||
|
||||
#define CAMERA_PIN_D7 39
|
||||
#define CAMERA_PIN_D6 41
|
||||
#define CAMERA_PIN_D5 42
|
||||
#define CAMERA_PIN_D4 5
|
||||
#define CAMERA_PIN_D3 40
|
||||
#define CAMERA_PIN_D2 14
|
||||
#define CAMERA_PIN_D1 47
|
||||
#define CAMERA_PIN_D0 45
|
||||
#define CAMERA_PIN_VSYNC 21
|
||||
#define CAMERA_PIN_HREF 38
|
||||
#define CAMERA_PIN_PCLK 48
|
||||
|
||||
#elif CONFIG_CAMERA_MODEL_CUSTOM
|
||||
#define CAM_BOARD "CUSTOM"
|
||||
#define PWDN_GPIO_NUM CONFIG_CAMERA_PIN_PWDN
|
||||
#define RESET_GPIO_NUM CONFIG_CAMERA_PIN_RESET
|
||||
#define XCLK_GPIO_NUM CONFIG_CAMERA_PIN_XCLK
|
||||
#define SIOD_GPIO_NUM CONFIG_CAMERA_PIN_SIOD
|
||||
#define SIOC_GPIO_NUM CONFIG_CAMERA_PIN_SIOC
|
||||
|
||||
#define Y9_GPIO_NUM CONFIG_CAMERA_PIN_Y9
|
||||
#define Y8_GPIO_NUM CONFIG_CAMERA_PIN_Y8
|
||||
#define Y7_GPIO_NUM CONFIG_CAMERA_PIN_Y7
|
||||
#define Y6_GPIO_NUM CONFIG_CAMERA_PIN_Y6
|
||||
#define Y5_GPIO_NUM CONFIG_CAMERA_PIN_Y5
|
||||
#define Y4_GPIO_NUM CONFIG_CAMERA_PIN_Y4
|
||||
#define Y3_GPIO_NUM CONFIG_CAMERA_PIN_Y3
|
||||
#define Y2_GPIO_NUM CONFIG_CAMERA_PIN_Y2
|
||||
#define VSYNC_GPIO_NUM CONFIG_CAMERA_PIN_VSYNC
|
||||
#define HREF_GPIO_NUM CONFIG_CAMERA_PIN_HREF
|
||||
#define PCLK_GPIO_NUM CONFIG_CAMERA_PIN_PCLK
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void app_camera_main();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue