How dfdurand/augmented-reality-app-with-opencv-and-esp32 works
Project Type and Purpose
• The project is not a full-stack web app but rather an IoT / embedded system where one component runs a Python script (main_esp32cv.py) using computer vision libraries (cvzone, OpenCV) and communicates via serial (pyserial) with an ESP32.
• The ESP32 runs firmware (rtoscvesp32.ino) built in the Arduino environment and uses the DHT sensor library to monitor environmental data.
• The purpose is to process webcam input on the PC side and interact with sensor data from the ESP32 over serial communication.
File Structure
• README.md – Provides installation instructions for both sides (Python libraries for the PC and DHT sensor library for ESP32).
• main_esp32cv.py – The Python script that handles computer vision (webcam input) and manages serial communication.
• rtoscvesp32.ino – The Arduino sketch that runs on the ESP32 and deals with sensor data (DHT sensor) and serial interaction.
Elements
a. Main Components:
• PC Side (Webcam + Python Application)
• Modules: OpenCV, CVZone, and PySerial.
• Responsibility: Capture and process webcam data, manage serial communication with the ESP32.
• ESP32 Device (Microcontroller)
• Firmware: rtoscvesp32.ino.
• Libraries: DHT sensor library.
• Responsibility: Read sensor values (e.g., temperature, humidity) and respond/communicate with the PC.
b. Relationships and Interactions:
• Data flows: The Python application may send commands or request sensor information, while the ESP32 sends sensor readings or status updates back to the PC.
c. Architectural Patterns/Design Principles:
• Separation of concerns: The PC handles computer vision and UI aspects (or logging/display), and the ESP32 focuses on interfacing with physical sensors.
• Inter-process communication over serial is central to the design.
d. Relevant Technologies/Frameworks:
• On the PC: Python with libraries such as OpenCV, CVZone, and PySerial.
• On the ESP32: Arduino framework with the Adafruit DHT sensor library.
Final Overview
• Make each component visually distinct and annotate the interfaces and dependencies appropriately.
Happy diagramming!