{"id":11777,"date":"2023-06-24T04:51:29","date_gmt":"2023-06-24T04:51:29","guid":{"rendered":"https:\/\/dgzx.hk?p=11777"},"modified":"2023-06-24T04:58:55","modified_gmt":"2023-06-24T04:58:55","slug":"how-to-use-esp32-cam-to-build-a-face-recognition-system","status":"publish","type":"post","link":"https:\/\/dgzx.hk\/fr\/comment-utiliser-esp32-cam-pour-creer-un-systeme-de-reconnaissance-faciale\/","title":{"rendered":"Comment utiliser ESP32-CAM pour cr\u00e9er un syst\u00e8me de reconnaissance faciale"},"content":{"rendered":"<p style=\"text-indent: 2em;\">Il existe de nombreux syst\u00e8mes de reconnaissance de personnes qui utilisent les signatures, les empreintes digitales, la voix, la g\u00e9om\u00e9trie de la main, la reconnaissance faciale, etc. pour identifier les personnes, mais il n\u2019existe pas de syst\u00e8mes de reconnaissance faciale.<\/p>\n<p style=\"text-indent: 2em;\">Les syst\u00e8mes de reconnaissance faciale peuvent \u00eatre utilis\u00e9s non seulement \u00e0 des fins de s\u00e9curit\u00e9 pour identifier les personnes dans les lieux publics, mais \u00e9galement \u00e0 des fins de pr\u00e9sence dans les bureaux et les \u00e9coles.<\/p>\n<p style=\"text-indent: 2em;\">Dans ce projet, nous allons construire un syst\u00e8me de reconnaissance faciale utilisant ESP32-CAM, qui peut \u00e9galement \u00eatre utilis\u00e9 comme syst\u00e8me de s\u00e9curit\u00e9 ESP32-CAM en reconnaissant le visage d&#039;une personne non autoris\u00e9e. L&#039;ESP32-CAM est un tr\u00e8s petit module de cam\u00e9ra qui utilise la puce ESP32-S. En utilisant le module ESP32-CAM, nous pouvons construire un syst\u00e8me de reconnaissance faciale sans utiliser de programmation complexe ni de composants suppl\u00e9mentaires.<\/p>\n<p style=\"text-indent: 2em;\"><\/p>\n<p style=\"text-align: center; text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><img decoding=\"async\" src=\"https:\/\/file.elecfans.com\/web2\/M00\/64\/18\/pYYBAGMDP4SACJowAANX-QufGyo030.png\" alt=\"pYYBAGMDP4SACJowAANX-QufGyo030.png\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe1\" \/><\/p>\n<p style=\"text-indent: 2em;\">Le module ESP32-CAM d&#039;AI-Thinker est dot\u00e9 d&#039;une puce ESP32-S, d&#039;une cam\u00e9ra OV2640 ultra-compacte et d&#039;un emplacement pour carte micro SD. L&#039;emplacement pour carte Micro SD peut \u00eatre utilis\u00e9 pour stocker des images prises \u00e0 partir de la cam\u00e9ra ou pour stocker des fichiers. Le module ESP32-CAM peut \u00eatre utilis\u00e9 dans une large gamme d&#039;applications IoT. Il peut \u00eatre utilis\u00e9 comme syst\u00e8me de d\u00e9tection de visage dans les bureaux, les \u00e9coles et autres espaces priv\u00e9s, ainsi que pour la surveillance sans fil, la reconnaissance sans fil de codes QR et de nombreuses autres applications IoT.<\/p>\n<p style=\"text-indent: 2em;\">Les modules ESP32-CAM peuvent \u00eatre programm\u00e9s \u00e0 l&#039;aide de l&#039;ESP-IDF ou de l&#039;IDE Arduino. Le module ESP32-CAM dispose \u00e9galement de plusieurs broches GPIO pour la connexion \u00e0 du mat\u00e9riel externe. L&#039;ESP32-CAM n&#039;a pas de connecteur USB, donc pour programmer le module, vous avez besoin d&#039;une carte FTDI.<\/p>\n<p style=\"text-align: center; text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><img decoding=\"async\" src=\"https:\/\/file.elecfans.com\/web2\/M00\/64\/18\/pYYBAGMDP4CAGwZRAAHq1FlljFk414.png\" alt=\"pYYBAGMDP4CAGwZRAAHq1FlljFk414.png\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe2\" \/><\/p>\n<p style=\"text-indent: 2em;\">Caract\u00e9ristiques:<\/p>\n<p style=\"text-indent: 2em;\">Le plus petit module SoC Wi-Fi BT 802.11b\/g\/n<\/p>\n<p style=\"text-indent: 2em;\">Processeur 32 bits \u00e0 faible consommation pouvant \u00e9galement servir de processeur d&#039;application<\/p>\n<p style=\"text-indent: 2em;\">Vitesse d&#039;horloge jusqu&#039;\u00e0 160 MHz, puissance de calcul int\u00e9gr\u00e9e jusqu&#039;\u00e0 600 DMIPS<\/p>\n<p style=\"text-indent: 2em;\">SRAM int\u00e9gr\u00e9e de 520 Ko, RAM externe de 4 MPS<\/p>\n<p style=\"text-indent: 2em;\">Prise en charge UART\/SPI\/I2C\/PWM\/ADC\/DAC<\/p>\n<p style=\"text-indent: 2em;\">Prend en charge les appareils photo OV2640 et OV7670 avec flash int\u00e9gr\u00e9<\/p>\n<p style=\"text-indent: 2em;\">Prise en charge du t\u00e9l\u00e9chargement d&#039;images via Wi-Fi<\/p>\n<p style=\"text-indent: 2em;\">Prise en charge de la carte TF<\/p>\n<p style=\"text-indent: 2em;\">Prend en charge plusieurs modes de veille<\/p>\n<p style=\"text-indent: 2em;\">Lwip et FreeRTOS int\u00e9gr\u00e9s<\/p>\n<p style=\"text-indent: 2em;\">Prise en charge du mode de fonctionnement STA\/AP\/STA+AP<\/p>\n<p style=\"text-indent: 2em;\">La technologie Smart Config\/AirKiss est prise en charge<\/p>\n<p style=\"text-indent: 2em;\">Prise en charge des mises \u00e0 niveau du micrologiciel locales et distantes via les ports s\u00e9rie (FOTA)<\/p>\n<p style=\"text-indent: 2em;\">Caract\u00e9ristiques:<\/p>\n<p style=\"text-indent: 2em;\">Flash SPI\u00a0: la valeur par d\u00e9faut est 32\u00a0Mbit<\/p>\n<p style=\"text-indent: 2em;\">M\u00e9moire : 520 Ko SRAM + 4 Mo PSRAM<\/p>\n<p style=\"text-indent: 2em;\">Prise en charge de la carte TF : Max. 4G<\/p>\n<p style=\"text-indent: 2em;\">Interfaces prises en charge\u00a0: UART, SPI, I2C, PWM<\/p>\n<p style=\"text-indent: 2em;\">Format de sortie d&#039;image : JPEG, BMP, niveaux de gris<\/p>\n<p style=\"text-indent: 2em;\">Port d&#039;E\/S : 9<\/p>\n<p style=\"text-indent: 2em;\">Plage d&#039;alimentation : 5 V<\/p>\n<p style=\"text-indent: 2em;\">Composant requis<\/p>\n<p style=\"text-indent: 2em;\">ESP32-CAM<\/p>\n<p style=\"text-indent: 2em;\">Programmeur FTDI<\/p>\n<p style=\"text-indent: 2em;\">Sch\u00e9ma de principe du circuit<\/p>\n<p style=\"text-indent: 2em;\">Pour construire la cam\u00e9ra de s\u00e9curit\u00e9 ESP32 CAM, nous avons uniquement besoin du module de cam\u00e9ra ESP32 et du programmeur FTDI pour la programmer.<\/p>\n<p style=\"text-align: center; text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><img decoding=\"async\" src=\"https:\/\/file.elecfans.com\/web2\/M00\/64\/18\/pYYBAGMDP3qAVkq9AAITZhIELB0303.png\" alt=\"pYYBAGMDP3qAVkq9AAITZhIELB0303.png\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe3\" \/><\/p>\n<p style=\"text-indent: 2em;\">L&#039;ESP32-CAM n&#039;a pas de connecteur USB, vous avez donc besoin d&#039;un programmateur FTDI pour t\u00e9l\u00e9charger le code sur l&#039;ESP32-CAM, comme indiqu\u00e9 dans l&#039;image ci-dessus. Les broches Vcc et GND de l&#039;ESP32 sont connect\u00e9es aux broches Vcc et GND de la carte FTDI. Les Tx et Rx de l&#039;ESP32 sont connect\u00e9s aux Rx et Tx de la carte FTDI.<\/p>\n<p style=\"text-indent: 2em;\">Remarque\u00a0: reliez l&#039;IO0 \u00e0 la terre avant de t\u00e9l\u00e9charger le code. L&#039;IO0 d\u00e9termine si l&#039;ESP32 est en mode clignotant. Lorsque GPIO 0 est connect\u00e9 \u00e0 GND, l&#039;ESP32 est en mode clignotant.<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Apr\u00e8s avoir programm\u00e9 l&#039;ESP32, j&#039;ai retir\u00e9 la carte FTDI et connect\u00e9 le module \u00e0 une alimentation 3,3 V \u00e0 l&#039;aide du r\u00e9gulateur 7805. Les param\u00e8tres du flux vid\u00e9o de la cam\u00e9ra ESP32 sont les suivants\u00a0:<img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/uploads\/image\/20230624\/1687582168633952.png\" title=\"1687582168633952.png\" alt=\"image.png\"\/><\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Installer la carte ESP32 sur l&#039;IDE Arduino<\/p>\n<p style=\"text-indent: 2em;\">Ici, l&#039;ESP32-CAM est programm\u00e9 \u00e0 l&#039;aide de l&#039;IDE Arduino. Pour cela, nous devons installer le plug-in ESP32 sur l&#039;IDE Arduino.<\/p>\n<p style=\"text-indent: 2em;\">Pour installer la carte ESP32 dans votre IDE Arduino, acc\u00e9dez \u00e0 Fichier Pr\u00e9f\u00e9rences<\/p>\n<p style=\"text-align: center; text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/uploads\/image\/20230624\/1687582197248016.png\" title=\"1687582197248016.png\" alt=\"image.png\"\/><\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Copiez maintenant le lien suivant et collez-le dans le champ \u00ab URL suppl\u00e9mentaires du gestionnaire de forums \u00bb, comme indiqu\u00e9 ci-dessous. Cliquez ensuite sur le bouton OK\u00a0:<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Passons maintenant au Conseil des outils, le gestionnaire du conseil<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Recherchez ESP32 dans Board Manager et installez \u00ab ESP32 by Espressif Systems \u00bb.<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Code du serveur Web de la cam\u00e9ra ESP32<\/p>\n<p style=\"text-indent: 2em;\">Nous disposons d\u00e9j\u00e0 d&#039;un exemple de code issu du streaming vid\u00e9o et de la reconnaissance faciale de la cam\u00e9ra ESP32. Ouvrez l&#039;exemple ESP32 \u00e0 l&#039;aide de la commande &quot;Fichier&quot; Exemples &quot;ESP32&quot; Cam\u00e9ra, puis ouvrez l&#039;exemple CameraWebServer.<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Avant de t\u00e9l\u00e9charger le code, vous devrez saisir votre nom et votre mot de passe Wi-Fi.<\/p>\n<p style=\"text-indent: 2em;\">const char* ssid = &quot;nom WiFi&quot;;<\/p>\n<p style=\"text-indent: 2em;\">const char* Password = &quot;Mot de passe&quot;;<\/p>\n<p style=\"text-indent: 2em;\">D\u00e9finissez ensuite le module de cam\u00e9ra ESP. Dans le code, ils d\u00e9finissent 5 modules de cam\u00e9ra, donc d\u00e9commentez \u00ab CAMERA_MODEL_AI_THINKER \u00bb et commentez les modules restants.<\/p>\n<p style=\"text-indent: 2em;\">Le code est maintenant pr\u00eat \u00e0 \u00eatre t\u00e9l\u00e9charg\u00e9.<\/p>\n<p style=\"text-indent: 2em;\">Pour t\u00e9l\u00e9charger le code, connectez la carte FDTI \u00e0 votre ordinateur portable et s\u00e9lectionnez \u00ab ESP32 Wrover Module \u00bb comme carte. Modifiez \u00e9galement d&#039;autres param\u00e8tres en fonction de cette image\u00a0:<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Avant de t\u00e9l\u00e9charger le code, appuyez sur le bouton de r\u00e9initialisation ESP32, puis cliquez sur le bouton T\u00e9l\u00e9charger.<\/p>\n<p style=\"text-indent: 2em;\">Remarque\u00a0: si vous rencontrez une erreur lors du t\u00e9l\u00e9chargement du code, v\u00e9rifiez que IO0 est connect\u00e9 \u00e0 GND et que vous avez s\u00e9lectionn\u00e9 le bon param\u00e8tre dans le menu Outils.<\/p>\n<p style=\"text-indent: 2em;\">D\u00e9connectez les broches IO0 et GND apr\u00e8s avoir t\u00e9l\u00e9charg\u00e9 le code. Ouvrez ensuite le moniteur s\u00e9rie et modifiez le d\u00e9bit en bauds sur 115\u00a0200. Appuyez ensuite sur le bouton de r\u00e9initialisation de l&#039;ESP32 et l&#039;adresse IP et le num\u00e9ro de port de l&#039;ESP s&#039;imprimeront sur le moniteur s\u00e9rie comme indiqu\u00e9 ci-dessous.<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Pour acc\u00e9der au flux de la cam\u00e9ra, acc\u00e9dez \u00e0 votre navigateur et saisissez votre adresse IP ESP. Cela vous am\u00e8nera \u00e0 la page de diffusion multim\u00e9dia. Pour d\u00e9marrer un flux vid\u00e9o de cam\u00e9ra ESP32, cliquez sur le bouton \u00ab\u00a0D\u00e9marrer la diffusion\u00a0\u00bb en bas de la page<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Vous pouvez modifier la qualit\u00e9 du streaming en modifiant la \u00ab r\u00e9solution \u00bb sur la page de streaming. Vous pouvez \u00e9galement cliquer sur l&#039;image en cliquant sur le bouton \u00ab Get Still \u00bb, mais ce code n&#039;a pas l&#039;option permettant d&#039;enregistrer l&#039;image.<\/p>\n<p style=\"text-indent: 2em;\">Apr\u00e8s avoir test\u00e9 le flux vid\u00e9o, nous allons maintenant tester la fonction de d\u00e9tection et de reconnaissance faciale de la cam\u00e9ra ESP32. Activez la reconnaissance et la d\u00e9tection faciales dans les param\u00e8tres\u00a0:<\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\"><img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/plugins\/UEditor-KityFormulaueditor\/ueditor\/themes\/default\/images\/spacer.gif\" title=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" alt=\"How to use ESP32-CAM to build a face recognition system\u63d2\u56fe\" \/><\/p>\n<p style=\"text-indent: 2em;\">Pour effectuer la reconnaissance faciale, vous devez d&#039;abord enregistrer votre visage. Vous pouvez enregistrer de nouveaux visages en cliquant sur l&#039;option \u00ab\u00a0Enregistrer les visages\u00a0\u00bb. Il faut plusieurs tentatives pour enregistrer le visage. Apr\u00e8s avoir enregistr\u00e9 le visage, il d\u00e9tectera le visage comme sujet 0, qui peut maintenant \u00eatre utilis\u00e9 comme syst\u00e8me de s\u00e9curit\u00e9 en reconnaissant le visage.<\/p>\n<p style=\"text-indent: 2em;\">Voici comment le module de cam\u00e9ra ESP peut \u00eatre facilement configur\u00e9 pour le streaming vid\u00e9o et la reconnaissance faciale.<\/p>\n<p style=\"text-indent: 2em;\">#include \u00ab esp_camera.h \u00bb<\/p>\n<p style=\"text-indent: 2em;\">#include<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Attention !! Assurez-vous de s\u00e9lectionner le module ESP32 Wrover,<\/p>\n<p style=\"text-indent: 2em;\">\/\/ ou une autre carte avec PSRAM activ\u00e9e<\/p>\n<p style=\"text-indent: 2em;\">\/\/ S\u00e9lectionnez un mod\u00e8le d&#039;appareil photo<\/p>\n<p style=\"text-indent: 2em;\">\/\/#define CAMERA_MODEL_WROVER_KIT<\/p>\n<p style=\"text-indent: 2em;\">\/\/#define CAMERA_MODEL_ESP_EYE<\/p>\n<p style=\"text-indent: 2em;\">\/\/#define CAMERA_MODEL_M5STACK_PSRAM<\/p>\n<p style=\"text-indent: 2em;\">\/\/#define CAMERA_MODEL_M5STACK_WIDE<\/p>\n<p style=\"text-indent: 2em;\">#define CAMERA_MODEL_AI_THINKER<\/p>\n<p style=\"text-indent: 2em;\">#include \u00ab camera_pins.h \u00bb<\/p>\n<p style=\"text-indent: 2em;\">const char* ssid = &quot;Galaxy-M20 &quot;;<\/p>\n<p style=\"text-indent: 2em;\">const char* Mot de passe = &quot;ac312124&quot;;<\/p>\n<p style=\"text-indent: 2em;\">startCameraServer(non valide)\u00a0;<\/p>\n<p style=\"text-indent: 2em;\">Param\u00e8tres non valides () {<\/p>\n<p style=\"text-indent: 2em;\">Num\u00e9ro de s\u00e9rie. D\u00e9but (115200);<\/p>\n<p style=\"text-indent: 2em;\">S\u00e9rie.setDebugOutput(true);<\/p>\n<p style=\"text-indent: 2em;\">Num\u00e9ro de s\u00e9rie.println() ;<\/p>\n<p style=\"text-indent: 2em;\">configuration de la cam\u00e9ra_config_t ;<\/p>\n<p style=\"text-indent: 2em;\">config.ledc_channel = LEDC_CHANNEL_0;<\/p>\n<p style=\"text-indent: 2em;\">config.ledc_timer = LEDC_TIMER_0\u00a0;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d0 = Y2_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d1 = Y3_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d2 = Y4_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d3 = Y5_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d4 = Y6_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d5 = Y7_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d6 = Y8_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_d7 = Y9_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_xclk = XCLK_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_pclk = PCLK_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_vsync = VSYNC_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">pin_href = HREF_GPIO_NUM; config.pin_href = href_gPIo_num;<\/p>\n<p style=\"text-indent: 2em;\">pin_sscb_sda = SIOD_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">pin_sscb_scl = SIOC_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">config.pin_pwdn = PWDN_GPIO_NUM;<\/p>\n<p style=\"text-indent: 2em;\">pin_reset = R\u00c9INITIALISER_NUM\u00c9RO_GPIO;<\/p>\n<p style=\"text-indent: 2em;\">config.xclk_freq_hz = 20000000;<\/p>\n<p style=\"text-indent: 2em;\">config.pixel_format = PIXFORMAT_JPEG;<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Initialiser avec des sp\u00e9cifications \u00e9lev\u00e9es pour pr\u00e9-allouer des tampons plus grands<\/p>\n<p style=\"text-indent: 2em;\">Si (psramFound()) {<\/p>\n<p style=\"text-indent: 2em;\">config.frame_size = FRAMESIZE_UXGA;<\/p>\n<p style=\"text-indent: 2em;\">config.jpeg_quality = 10;<\/p>\n<p style=\"text-indent: 2em;\">config.fb_count = 2;<\/p>\n<p style=\"text-indent: 2em;\">} autre {<\/p>\n<p style=\"text-indent: 2em;\">config.frame_size = TAILLE DU CADRE_SVGA;<\/p>\n<p style=\"text-indent: 2em;\">config.jpeg_quality = 12;<\/p>\n<p style=\"text-indent: 2em;\">config.fb_count = 1;<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\"># Si d\u00e9fini (CAMERA_MODEL_ESP_EYE)<\/p>\n<p style=\"text-indent: 2em;\">pinMode (13, INPUT_PULLUP);<\/p>\n<p style=\"text-indent: 2em;\">pinMode(14, INPUT_PULLUP);<\/p>\n<p style=\"text-indent: 2em;\"># au cas o\u00f9<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Initialisation de la cam\u00e9ra<\/p>\n<p style=\"text-indent: 2em;\">esp_err_t err = esp_camera_init(&amp;config);<\/p>\n<p style=\"text-indent: 2em;\">Si (faux ! = ESP_OK) {<\/p>\n<p style=\"text-indent: 2em;\">Serial.printf(&quot; L&#039;initialisation de la cam\u00e9ra a \u00e9chou\u00e9, erreur 0x%x&quot;, err);<\/p>\n<p style=\"text-indent: 2em;\">Dos;<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">capteur_t * s = esp_camera_sensor_get();<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Le capteur initial est invers\u00e9 verticalement et la couleur est un peu satur\u00e9e<\/p>\n<p style=\"text-indent: 2em;\">si (s-&gt;id.PID == OV3660_PID) {<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_vflip(s, 1); \/\/ Retournez-le<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_brightness(s, 1); \/\/ Augmente l\u00e9g\u00e8rement la luminosit\u00e9<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_saturation(s, -2); \/\/ R\u00e9duire la saturation<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">\/\/ R\u00e9duisez la taille de l&#039;image pour obtenir une fr\u00e9quence d&#039;images initiale plus \u00e9lev\u00e9e<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_framesize(s, TAILLE_CADRE_QVGA);<\/p>\n<p style=\"text-indent: 2em;\"># Si d\u00e9fini (CAMERA_MODEL_M5STACK_WIDE)<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_vflip(s, 1);<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_hmirror(s, 1);<\/p>\n<p style=\"text-indent: 2em;\"># au cas o\u00f9<\/p>\n<p style=\"text-indent: 2em;\">WiFi.begin(ssid, mot de passe);<\/p>\n<p style=\"text-indent: 2em;\">Et (WiFi.status()! = WL_CONNECTED) {<\/p>\n<p style=\"text-indent: 2em;\">Retard (500);<\/p>\n<p style=\"text-indent: 2em;\">S\u00e9rie.print(&quot;.&quot;);<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">Num\u00e9ro de s\u00e9rie.println (&quot;&quot;);<\/p>\n<p style=\"text-indent: 2em;\">Serial.println(&quot;Connexion WiFi &quot;);<\/p>\n<p style=\"text-indent: 2em;\">d\u00e9marrer le serveur de cam\u00e9ra();<\/p>\n<p style=\"text-indent: 2em;\">Serial.print(&quot; Appareil photo pr\u00eat ! Utilisez &#039;http:\/\/&quot;);<\/p>\n<p style=\"text-indent: 2em;\">S\u00e9rie.print(WiFi.localIP());<\/p>\n<p style=\"text-indent: 2em;\">Serial.println(&quot;&#039; pour se connecter &quot;);<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">Boucle invalide () {<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Placez votre code principal ici et r\u00e9p\u00e9tez\u00a0:<\/p>\n<p style=\"text-indent: 2em;\">Retard (10000);<\/p>\n<p><\/p>\n<p style=\"text-indent: 2em;\"><\/p>","protected":false},"excerpt":{"rendered":"<p>There are many person recognition systems that use signatures, fingerprints, voice, hand geometry, face recognition, etc., to identify people, but there are no face recognition systems. Face recognition systems can be used not only for security purposes to identify people in public places, but also for attendance purposes in offices and schools. In this project, we will build a face recognition system using ESP32-CAM, which can also be used as an ESP32-CAM security system by recognizing the face of an unauthorized person. The ESP32-CAM is a very small camera module that uses the ESP32-S chip. Using the ESP32-CAM module, we can build a face recognition system without using any complex programming and any additional components. The AI-Thinker ESP32-CAM module features an ESP32-S chip, an ultra-small OV2640 camera and a micro SD card slot. The Micro SD card slot can be used to store images taken from the camera or to store files. The ESP32-CAM module can be used in a wide range of iot applications. It can be used as a face detection system in offices, schools, and other private areas, as well as for wireless surveillance, QR code wireless recognition, and many other iot applications. ESP32-CAM modules can be programmed using ESP-IDF or the Arduino IDE. The ESP32-CAM module also has several GPIO pins for connecting to external hardware. The ESP32-CAM does not have a USB connector, so to program the module, you need an FTDI board. Features: The smallest 802.11b\/g\/n Wi-Fi BT SoC module Low power 32-bit CPU that can also serve application processors Up to 160MHz clock speed, integrated computing power up to 600 DMIPS Built-in 520 KB SRAM, external 4MPSRAM Support UART\/SPI\/I2C\/PWM\/ADC\/DAC Supports OV2640 and OV7670 cameras with built-in flash Support image Wi-Fi upload TF card support Supports multiple sleep modes Embedded Lwip and FreeRTOS Support STA\/AP\/STA+AP operation mode Smart Config\/AirKiss technology is supported Support for local and remote firmware upgrades over serial ports (FOTA) Specifications: SPI flash: The default is 32Mbit Memory: 520KB SRAM+4M PSRAM TF card support: Max. 4G Supported interfaces: UART, SPI, I2C, PWM Image output format: JPEG, BMP, gray scale IO port: 9 Power supply range: 5V Required component ESP32-CAM FTDI Programmer Circuit schematic diagram To build the ESP32 CAM security camera, we only need the ESP32 camera module and FTDI programmer to program it. The ESP32-CAM does not have a USB connector, so you need an FTDI programmer to upload code to the ESP32-CAM, as shown in the image above. The Vcc and GND pins of the ESP32 are connected to the Vcc and GND pins of the FTDI board. The Tx and Rx of the ESP32 are connected to the Rx and Tx of the FTDI board. Note: Ground IO0 before uploading the code. IO0 determines whether the ESP32 is in blinking mode. When GPIO 0 is connected to GND, the ESP32 is in blinking mode. After programming the ESP32, I removed the FTDI board and connected the module to a 3.3V power supply using the 7805 regulator. The Settings for the ESP32 cam video stream are as follows: Install the ESP32 Board on the Arduino IDE Here the ESP32-CAM is programmed using the Arduino IDE. To do this, we have to install the ESP32 plug-in on the Arduino IDE. To install the ESP32 board in your Arduino IDE, go to File Preferences Now copy the following link and paste it into the &quot;Additional Board Manager URLs&quot; field, as shown below. Then, click the OK button: Now to the Board of Tools, the Board Manager Search for ESP32 in Board Manager and install &quot;ESP32 by Espressif Systems&quot;. ESP32 camera web server code We already have a sample code from ESP32 cam video streaming and face recognition. Open the ESP32 example using the &quot;File&quot; Examples &quot;ESP32&quot; Camera, then open the CameraWebServer example. Before uploading the code, you will need to enter your Wi-Fi name and password. const char* ssid = &quot;WiFi name&quot;; const char* Password = &quot;Password&quot;; Then define the ESP camera module. In the code, they define 5 camera modules, so uncomment &quot;CAMERA_MODEL_AI_THINKER&quot; and comment the remaining modules. Now the code is ready to upload. To upload the code, connect the FDTI board to your laptop and select &quot;ESP32 Wrover Module&quot; as your board. Also, change other Settings based on this image: Before uploading the code, press the ESP32 reset button and then click the Upload button. Note: If you encounter an error while uploading the code, check that IO0 is connected to GND and that you have selected the correct setting in the Tools menu. Disconnect the IO0 and GND pins after uploading the code. Then open the serial monitor and change the baud rate to 115200. Then press the ESP32 reset button and it will print the ESP IP address and port number on the serial monitor as shown below. Now to access the camera stream, navigate to your browser and enter your ESP IP address. It will take you to the streaming media page. To start an ESP32 cam video stream, click the &quot;Start Streaming&quot; button at the bottom of the page You can change the streaming quality by changing the &quot;resolution&quot; on the streaming page. You can also click the picture by clicking the &quot;Get Still&quot; button, but this code does not have the option to save the picture. After testing the video stream, now we will test the ESP32 cam face detection and recognition function. Turn on face recognition and detection from Settings: To do face recognition first, you need to register your face. You can register new faces by clicking on the &quot;Register Faces&quot; option. It takes several attempts to save face. After saving the face, it will detect the face as subject 0, which can now be used as a security system by recognizing the face. So this is how the ESP camera module can be easily configured for video streaming and facial recognition. #include \u201cesp_camera.h\u201d #include \/\/ Warning!! Make sure you select the ESP32 Wrover module, \/\/ or another board with<\/p>","protected":false},"author":5,"featured_media":11778,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[381],"tags":[389,388,382,376],"class_list":["post-11777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","tag-esp32-cam","tag-ov2640","tag-camera","tag-camera-module"],"_links":{"self":[{"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/posts\/11777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/comments?post=11777"}],"version-history":[{"count":0,"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/posts\/11777\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/media\/11778"}],"wp:attachment":[{"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/media?parent=11777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/categories?post=11777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dgzx.hk\/fr\/wp-json\/wp\/v2\/tags?post=11777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}