Files
ESPDocs/public/exemplos/de/esp-who.c
T
Lucas RayanandAntigravity 7fce46b9e1
CI / Lint e auditorias (push) Successful in 49s
CI / Trivy (dependências e segredos) (push) Successful in 11s
CI / Imagem Docker (linux/arm64) (push) Successful in 3m14s
feat(i18n): French and German localization (phase 5)
- Add full message catalogs and content for French (fr) and German (de)
- Implement ASCII canonical slugs for French and German routes
- Add language-specific search endpoints (/api/busca/fr, /api/busca/de)
- Configure strict 404 responses for /fr/livro and /de/livro
- Localize SEO, OpenGraph (fr_FR, de_DE), Twitter and JSON-LD schemas
- Add localized code example comments across 14 examples for fr and de
- Enable 'fr' and 'de' in ENABLED_LOCALES with root negotiation and redirect
- Extend test suite in check-i18n, smoke-imagem and verifica-vazamentos

Co-Authored-By: Antigravity <noreply@google.com>
2026-11-01 22:06:36 -03:00

72 lines
2.1 KiB
C

#include "esp_camera.h"
#include "fd_forward.h" // Face Detection
#include "fr_forward.h" // Face Recognition
#include "human_face_detect_msr01.hpp"
#include "human_face_detect_mnp01.hpp"
#define CAMERA_MODEL_AI_THINKER // ou o modelo da sua placa
#include "camera_pins.h"
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println("Iniciando câmera...");
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sscb_sda = SIOD_GPIO_NUM;
config.pin_sscb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_RGB565;
config.frame_size = FRAMESIZE_QVGA;
config.fb_count = 1;
if (esp_camera_init(&config) != ESP_OK) {
Serial.println("Falha ao iniciar a câmera!");
return;
}
Serial.println("Câmera inicializada com sucesso!");
}
void loop() {
camera_fb_t *fb = esp_camera_fb_get();
if (!fb) {
Serial.println("Falha ao capturar imagem!");
return;
}
// Detecta rostos na imagem
box_array_t *faces = face_detect_msr01(fb->buf, fb->width, fb->height, fb->format);
if (faces) {
Serial.printf("Rostos detectados: %d\n", faces->len);
for (int i = 0; i < faces->len; i++) {
box_t *box = &faces->box[i];
Serial.printf("Face %d - x:%d y:%d w:%d h:%d\n", i, box->box_p[0], box->box_p[1],
box->box_p[2] - box->box_p[0], box->box_p[3] - box->box_p[1]);
}
dl_lib_free(faces);
} else {
Serial.println("Nenhum rosto detectado.");
}
esp_camera_fb_return(fb);
delay(1000);
}