This project implements a virtual keyboard using OpenCV and MediaPipe libraries in Python. It allows users to interact with a virtual keyboard interface using hand gestures captured through a webcam.
- Hand Tracking: Utilizes the MediaPipe library to detect and track the user's hand movements in real-time.
- Virtual Keyboard Interface: Displays a graphical virtual keyboard on the screen.
- Hand-Gesture Interaction: Users can control the virtual keyboard by performing hand gestures recognized by the system.
-
handtracking.py This module contains the implementation of hand tracking functionality using the MediaPipe library. It provides methods to detect and track the user's hand landmarks in real-time video streams from a webcam.
-
virtualkeyboard.py The virtualkeyboard.py module implements the virtual keyboard interface using OpenCV. It utilizes the hand tracking module to enable users to interact with the keyboard using hand gestures.
-
Boxes.py This module has base functions to create buttons and check if the index finger is hovering over a button.
- Python 3.8
- OpenCV
- MediaPipe
Install the required dependencies:
pip install opencv-python mediapipe
- Run the virtualkeyboard.py script:
python virtualkeyboard.py
- Ensure your webcam is connected and properly configured.
- Interact with the virtual keyboard by using your index finger to point and select, and both your index finger and thumb finger close up to perform a button click.