{"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\/de\/so-erstellen-sie-mit-esp32-cam-ein-gesichtserkennungssystem\/","title":{"rendered":"So verwenden Sie ESP32-CAM zum Erstellen eines Gesichtserkennungssystems"},"content":{"rendered":"<p style=\"text-indent: 2em;\">Es gibt viele Personenerkennungssysteme, die Unterschriften, Fingerabdr\u00fccke, Stimme, Handgeometrie, Gesichtserkennung usw. verwenden, um Personen zu identifizieren, aber es gibt keine Gesichtserkennungssysteme.<\/p>\n<p style=\"text-indent: 2em;\">Gesichtserkennungssysteme k\u00f6nnen nicht nur zu Sicherheitszwecken zur Identifizierung von Personen an \u00f6ffentlichen Orten, sondern auch zur Anwesenheitskontrolle in B\u00fcros und Schulen eingesetzt werden.<\/p>\n<p style=\"text-indent: 2em;\">In diesem Projekt werden wir ein Gesichtserkennungssystem mit ESP32-CAM bauen, das auch als ESP32-CAM-Sicherheitssystem verwendet werden kann, indem es das Gesicht einer nicht autorisierten Person erkennt. ESP32-CAM ist ein sehr kleines Kameramodul, das den ESP32-S-Chip verwendet. Mit dem ESP32-CAM-Modul k\u00f6nnen wir ein Gesichtserkennungssystem ohne komplexe Programmierung und zus\u00e4tzliche Komponenten bauen.<\/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;\">Das AI-Thinker ESP32-CAM-Modul verf\u00fcgt \u00fcber einen ESP32-S-Chip, eine ultrakleine OV2640-Kamera und einen Micro-SD-Kartensteckplatz. Der Micro-SD-Kartensteckplatz kann zum Speichern von mit der Kamera aufgenommenen Bildern oder zum Speichern von Dateien verwendet werden. Das ESP32-CAM-Modul kann in einer Vielzahl von IoT-Anwendungen eingesetzt werden. Es kann als Gesichtserkennungssystem in B\u00fcros, Schulen und anderen privaten Bereichen sowie f\u00fcr die drahtlose \u00dcberwachung, die drahtlose QR-Code-Erkennung und viele andere IoT-Anwendungen verwendet werden.<\/p>\n<p style=\"text-indent: 2em;\">ESP32-CAM-Module k\u00f6nnen mit ESP-IDF oder der Arduino IDE programmiert werden. Das ESP32-CAM-Modul verf\u00fcgt au\u00dferdem \u00fcber mehrere GPIO-Pins zum Anschluss an externe Hardware. Das ESP32-CAM hat keinen USB-Anschluss, daher ben\u00f6tigen Sie zum Programmieren des Moduls eine FTDI-Platine.<\/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;\">Merkmale:<\/p>\n<p style=\"text-indent: 2em;\">Das kleinste 802.11b\/g\/n Wi-Fi BT SoC-Modul<\/p>\n<p style=\"text-indent: 2em;\">32-Bit-CPU mit geringem Stromverbrauch, die auch Anwendungsprozessoren bedienen kann<\/p>\n<p style=\"text-indent: 2em;\">Bis zu 160MHz Taktfrequenz, integrierte Rechenleistung bis zu 600 DMIPS<\/p>\n<p style=\"text-indent: 2em;\">Eingebautes 520 KB SRAM, externes 4MPSRAM<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzt UART\/SPI\/I2C\/PWM\/ADC\/DAC<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzt OV2640- und OV7670-Kameras mit integriertem Blitz<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzt das Hochladen von Bildern \u00fcber WLAN<\/p>\n<p style=\"text-indent: 2em;\">TF-Kartenunterst\u00fctzung<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzt mehrere Schlafmodi<\/p>\n<p style=\"text-indent: 2em;\">Eingebettetes Lwip und FreeRTOS<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzt den STA\/AP\/STA+AP-Betriebsmodus<\/p>\n<p style=\"text-indent: 2em;\">Smart Config\/AirKiss-Technologie wird unterst\u00fctzt<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzung f\u00fcr lokale und Remote-Firmware-Upgrades \u00fcber serielle Schnittstellen (FOTA)<\/p>\n<p style=\"text-indent: 2em;\">Spezifikationen:<\/p>\n<p style=\"text-indent: 2em;\">SPI-Flash: Der Standardwert ist 32 Mbit<\/p>\n<p style=\"text-indent: 2em;\">Speicher: 520 KB SRAM + 4 MB PSRAM<\/p>\n<p style=\"text-indent: 2em;\">TF-Kartenunterst\u00fctzung: Max. 4G<\/p>\n<p style=\"text-indent: 2em;\">Unterst\u00fctzte Schnittstellen: UART, SPI, I2C, PWM<\/p>\n<p style=\"text-indent: 2em;\">Bildausgabeformat: JPEG, BMP, Graustufen<\/p>\n<p style=\"text-indent: 2em;\">IO-Anschluss: 9<\/p>\n<p style=\"text-indent: 2em;\">Stromversorgungsbereich: 5V<\/p>\n<p style=\"text-indent: 2em;\">Erforderliche Komponente<\/p>\n<p style=\"text-indent: 2em;\">ESP32-CAM<\/p>\n<p style=\"text-indent: 2em;\">FTDI-Programmierer<\/p>\n<p style=\"text-indent: 2em;\">Schaltplan<\/p>\n<p style=\"text-indent: 2em;\">Um die ESP32 CAM-\u00dcberwachungskamera zu bauen, ben\u00f6tigen wir nur das ESP32-Kameramodul und den FTDI-Programmierer, um sie zu programmieren.<\/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;\">Das ESP32-CAM hat keinen USB-Anschluss, daher ben\u00f6tigen Sie einen FTDI-Programmierer, um Code auf das ESP32-CAM hochzuladen, wie im Bild oben gezeigt. Die Vcc- und GND-Pins des ESP32 sind mit den Vcc- und GND-Pins der FTDI-Platine verbunden. Die Tx- und Rx-Pins des ESP32 sind mit den Rx- und Tx-Pins der FTDI-Platine verbunden.<\/p>\n<p style=\"text-indent: 2em;\">Hinweis: Erden Sie IO0, bevor Sie den Code hochladen. IO0 bestimmt, ob sich der ESP32 im Blinkmodus befindet. Wenn GPIO 0 mit GND verbunden ist, befindet sich der ESP32 im Blinkmodus.<\/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;\">Nachdem ich den ESP32 programmiert hatte, entfernte ich die FTDI-Platine und schloss das Modul mithilfe des 7805-Reglers an eine 3,3-V-Stromversorgung an. Die Einstellungen f\u00fcr den ESP32-Cam-Videostream sind wie folgt:<img decoding=\"async\" src=\"https:\/\/dgzx.hkwp-content\/uploads\/image\/20230624\/1687582168633952.png\" title=\"1687582168633952.png\" alt=\"bild.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;\">Installieren Sie das ESP32-Board auf der Arduino IDE<\/p>\n<p style=\"text-indent: 2em;\">Hier wird die ESP32-CAM mithilfe der Arduino IDE programmiert. Dazu m\u00fcssen wir das ESP32 Plugin auf der Arduino IDE installieren.<\/p>\n<p style=\"text-indent: 2em;\">Um das ESP32-Board in Ihrer Arduino IDE zu installieren, gehen Sie zu Dateieinstellungen<\/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=\"bild.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;\">Kopieren Sie nun den folgenden Link und f\u00fcgen Sie ihn in das Feld \u201eWeitere Board Manager-URLs\u201c ein, wie unten gezeigt. Klicken Sie dann auf die Schaltfl\u00e4che \u201eOK\u201c:<\/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;\">Nun zum Board of Tools, dem Board Manager<\/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;\">Suchen Sie im Board Manager nach ESP32 und installieren Sie \u201eESP32 von Espressif Systems\u201c.<\/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;\">ESP32-Kamera-Webservercode<\/p>\n<p style=\"text-indent: 2em;\">Wir haben bereits einen Beispielcode f\u00fcr ESP32-Cam-Videostreaming und Gesichtserkennung. \u00d6ffnen Sie das ESP32-Beispiel \u00fcber \u201eDatei\u201c Beispiele \u201eESP32\u201c Kamera und \u00f6ffnen Sie dann das Beispiel 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;\">Bevor Sie den Code hochladen, m\u00fcssen Sie Ihren WLAN-Namen und Ihr Passwort eingeben.<\/p>\n<p style=\"text-indent: 2em;\">const char* ssid = &quot;WiFi-Name&quot;;<\/p>\n<p style=\"text-indent: 2em;\">const char* Password = &quot;Passwort&quot;;<\/p>\n<p style=\"text-indent: 2em;\">Definieren Sie dann das ESP-Kameramodul. Im Code werden 5 Kameramodule definiert. Entfernen Sie daher die Kommentarzeichen von \u201eCAMERA_MODEL_AI_THINKER\u201c und kommentieren Sie die verbleibenden Module aus.<\/p>\n<p style=\"text-indent: 2em;\">Jetzt ist der Code zum Hochladen bereit.<\/p>\n<p style=\"text-indent: 2em;\">Um den Code hochzuladen, schlie\u00dfen Sie die FDTI-Platine an Ihren Laptop an und w\u00e4hlen Sie \u201eESP32 Wrover Module\u201c als Ihre Platine aus. \u00c4ndern Sie auch andere Einstellungen basierend auf diesem Bild:<\/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;\">Dr\u00fccken Sie vor dem Hochladen des Codes die ESP32-Reset-Taste und klicken Sie dann auf die Schaltfl\u00e4che \u201eHochladen\u201c.<\/p>\n<p style=\"text-indent: 2em;\">Hinweis: Sollte beim Hochladen des Codes ein Fehler auftreten, \u00fcberpr\u00fcfen Sie, ob IO0 mit GND verbunden ist und ob Sie im Men\u00fc \u201eTools\u201c die richtige Einstellung gew\u00e4hlt haben.<\/p>\n<p style=\"text-indent: 2em;\">Trennen Sie die IO0- und GND-Pins, nachdem Sie den Code hochgeladen haben. \u00d6ffnen Sie dann den seriellen Monitor und \u00e4ndern Sie die Baudrate auf 115200. Dr\u00fccken Sie dann die ESP32-Reset-Taste und die ESP-IP-Adresse und Portnummer werden auf dem seriellen Monitor ausgedruckt, wie unten gezeigt.<\/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;\">Um nun auf den Kamera-Stream zuzugreifen, navigieren Sie zu Ihrem Browser und geben Sie Ihre ESP-IP-Adresse ein. Sie gelangen dann zur Streaming-Media-Seite. Um einen ESP32-Cam-Videostream zu starten, klicken Sie unten auf der Seite auf die Schaltfl\u00e4che \u201eStreaming starten\u201c<\/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;\">Sie k\u00f6nnen die Streaming-Qualit\u00e4t \u00e4ndern, indem Sie die \u201eAufl\u00f6sung\u201c auf der Streaming-Seite \u00e4ndern. Sie k\u00f6nnen das Bild auch anklicken, indem Sie auf die Schaltfl\u00e4che \u201eStandbild abrufen\u201c klicken, aber dieser Code bietet nicht die M\u00f6glichkeit, das Bild zu speichern.<\/p>\n<p style=\"text-indent: 2em;\">Nachdem wir den Videostream getestet haben, testen wir nun die Gesichtserkennungs- und Erkennungsfunktion der ESP32-Kamera. Aktivieren Sie die Gesichtserkennung und -erkennung in den Einstellungen:<\/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;\">Um die Gesichtserkennung durchzuf\u00fchren, m\u00fcssen Sie zun\u00e4chst Ihr Gesicht registrieren. Sie k\u00f6nnen neue Gesichter registrieren, indem Sie auf die Option \u201eGesichter registrieren\u201c klicken. Es sind mehrere Versuche erforderlich, um das Gesicht zu speichern. Nach dem Speichern des Gesichts wird das Gesicht als Subjekt 0 erkannt, das nun durch die Gesichtserkennung als Sicherheitssystem verwendet werden kann.<\/p>\n<p style=\"text-indent: 2em;\">So l\u00e4sst sich das ESP-Kameramodul ganz einfach f\u00fcr Videostreaming und Gesichtserkennung konfigurieren.<\/p>\n<p style=\"text-indent: 2em;\"># \u201eesp_camera.h\u201c einbinden<\/p>\n<p style=\"text-indent: 2em;\">#einschlie\u00dfen<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Achtung!! Stellen Sie sicher, dass Sie das ESP32 Wrover-Modul ausw\u00e4hlen,<\/p>\n<p style=\"text-indent: 2em;\">\/\/ oder eine andere Karte mit aktiviertem PSRAM<\/p>\n<p style=\"text-indent: 2em;\">\/\/ W\u00e4hlen Sie ein Kameramodell<\/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;\"># \u201ecamera_pins.h\u201c einbinden<\/p>\n<p style=\"text-indent: 2em;\">const char*ssid = &quot;Galaxy-M20&quot;;<\/p>\n<p style=\"text-indent: 2em;\">const char* Passwort = &quot;ac312124&quot;;<\/p>\n<p style=\"text-indent: 2em;\">Ung\u00fcltiger startCameraServer();<\/p>\n<p style=\"text-indent: 2em;\">Ung\u00fcltige Einstellungen () {<\/p>\n<p style=\"text-indent: 2em;\">Seriennummer. Start (115200);<\/p>\n<p style=\"text-indent: 2em;\">Serial.setDebugOutput(true);<\/p>\n<p style=\"text-indent: 2em;\">Seriennummer.println();<\/p>\n<p style=\"text-indent: 2em;\">camera_config_t-Konfiguration;<\/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;<\/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 = GPIO_NUM_ZUR\u00dcCKSETZEN;<\/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;\">\/\/ Mit hohen Spezifikationen initialisieren, um gr\u00f6\u00dfere Puffer vorab zuzuweisen<\/p>\n<p style=\"text-indent: 2em;\">Wenn (psramFound ()) {<\/p>\n<p style=\"text-indent: 2em;\">config.frame_size = FRAMESIZE_UXGA;<\/p>\n<p style=\"text-indent: 2em;\">config.jpeg_qualit\u00e4t = 10;<\/p>\n<p style=\"text-indent: 2em;\">config.fb_count = 2;<\/p>\n<p style=\"text-indent: 2em;\">} andere {<\/p>\n<p style=\"text-indent: 2em;\">config.frame_size = FRAMESIZE_SVGA;<\/p>\n<p style=\"text-indent: 2em;\">config.jpeg_qualit\u00e4t = 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;\"># Falls definiert (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;\"># im Koffer<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Kamerainitialisierung<\/p>\n<p style=\"text-indent: 2em;\">esp_err_t err = esp_camera_init(&amp;config);<\/p>\n<p style=\"text-indent: 2em;\">Wenn (falsch! = ESP_OK) {<\/p>\n<p style=\"text-indent: 2em;\">Serial.printf(&quot;Kamerainitialisierung fehlgeschlagen, Fehler 0x%x&quot;, err);<\/p>\n<p style=\"text-indent: 2em;\">Zur\u00fcck;<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">sensor_t * s = esp_camera_sensor_get();<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Der anf\u00e4ngliche Sensor ist vertikal umgedreht und die Farbe ist etwas ges\u00e4ttigt<\/p>\n<p style=\"text-indent: 2em;\">wenn (s-&gt;id.PID == OV3660_PID) {<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_vflip(s, 1); \/\/ Dreh es zur\u00fcck<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_brightness(s, 1); \/\/ Helligkeit leicht erh\u00f6hen<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_saturation(s, -2); \/\/ Reduziere die S\u00e4ttigung<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">\/\/ Reduzieren Sie die Framegr\u00f6\u00dfe, um eine h\u00f6here anf\u00e4ngliche Framerate zu erhalten<\/p>\n<p style=\"text-indent: 2em;\">s-&gt;set_framesize(s, FRAMESIZE_QVGA);<\/p>\n<p style=\"text-indent: 2em;\"># Falls definiert (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;\"># im Koffer<\/p>\n<p style=\"text-indent: 2em;\">WiFi.begin(ssid, Passwort);<\/p>\n<p style=\"text-indent: 2em;\">Und (WiFi.status ()! = WL_CONNECTED) {<\/p>\n<p style=\"text-indent: 2em;\">Verz\u00f6gerung (500);<\/p>\n<p style=\"text-indent: 2em;\">Serial.print(&quot;.&quot;);<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">Seriennummer.println (&quot;&quot;);<\/p>\n<p style=\"text-indent: 2em;\">Serial.println(&quot;WiFi-Verbindung &quot;);<\/p>\n<p style=\"text-indent: 2em;\">startCameraServer();<\/p>\n<p style=\"text-indent: 2em;\">Serial.print(&quot;Kamera bereit! Verwenden Sie &#039;http:\/\/&quot;);<\/p>\n<p style=\"text-indent: 2em;\">Serial.print(WiFi.localIP());<\/p>\n<p style=\"text-indent: 2em;\">Serial.println(&quot;&#039; zum Verbinden &quot;);<\/p>\n<p style=\"text-indent: 2em;\">}<\/p>\n<p style=\"text-indent: 2em;\">Ung\u00fcltige Schleife () {<\/p>\n<p style=\"text-indent: 2em;\">\/\/ F\u00fcgen Sie hier Ihren Hauptcode ein und wiederholen Sie:<\/p>\n<p style=\"text-indent: 2em;\">Verz\u00f6gerung (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\/de\/wp-json\/wp\/v2\/posts\/11777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/comments?post=11777"}],"version-history":[{"count":0,"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/posts\/11777\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/media\/11778"}],"wp:attachment":[{"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/media?parent=11777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/categories?post=11777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dgzx.hk\/de\/wp-json\/wp\/v2\/tags?post=11777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}