Developer: Mudit Bhalla (25BCE0370)
Institution: VIT Vellore
An end-to-end hardware-software integration project that transforms a standard webcam into a wireless gesture-control interface. Utilizing Google's MediaPipe framework and OpenCV, the application detects hand landmarks in real time, interprets the number of extended fingers, and transmits control signals across a local Wi-Fi network to an ESP32 microcontroller via low-latency UDP Sockets.
- Languages: Python 3, C++ (Arduino Framework)
- Computer Vision: OpenCV, MediaPipe
- Networking: UDP Socket Programming (
socket) - Hardware Target: ESP32 Microcontroller
- Frame Capture: OpenCV pulls real-time frames from the local webcam.
- Landmark Extraction: MediaPipe maps 21 dynamic coordinate points across the user's hand.
- Gesture Logic: Algorithms evaluate spatial geometric relationships to determine finger extension counts (0–5).
- Network Payload: A localized UDP socket serializes and broadcasts data blocks over the network.
- Hardware Execution: The ESP32 parses incoming byte packets to execute real-time physical actions.
Ensure your machine runs Python 3.x and has network access to your ESP32's local gateway.
-
Clone the repository:
git clone [https://github.com/YOUR_GITHUB_USERNAME/esp32-gesture-control.git](https://github.com/YOUR_GITHUB_USERNAME/esp32-gesture-control.git) cd esp32-gesture-control -
Install the required Python dependencies:
python3 -m pip install -r python_hand_tracker/requirements.txt
-
Update the execution script: Open python_hand_tracker/roboVIT_night2.py and replace the network configurations with your hardware layout parameters:
ESP32_IP = "YOUR_ESP32_IP_ADDRESS" ESP32_PORT = 1234
-
Running the Application
python3 python_hand_tracker/roboVIT_night2.py
Press 'q' on your keyboard while focusing on the camera screen to safely shut down streams and clean sockets.
-
Troubleshooting Are you developing on a Mac and hitting camera crashes or environment path bugs? Check out our step-by-step resolution roadmap in TROUBLESHOOTING.md.
-
The
requirements.txtFile Inside yourpython_hand_tracker/directory, create a file namedrequirements.txtcontaining your script dependencies:opencv-python mediapipe