This project implements a virtual keyboard controlled by hand gestures using a webcam. Users can interact with the virtual keyboard by hovering their index finger over the keys and performing various actions such as typing, deleting, and pressing special keys.
-
Install the required libraries:
pip install opencv-python mediapipe pyautogui autopy
-
Clone the repository:
git clone https://github.com/yourusername/your-repository.git
-
Navigate to the project directory:
cd your-repository
-
Run the main script:
python main_script.py
- Virtual Keyboard: The virtual keyboard is displayed on the screen.
- Hand Tracking: Hand gestures are detected using the MediaPipe library.
- Typing: Users can type by hovering their index finger over the keys.
- Deleting: The backspace key allows users to delete characters.
- Special Keys: Special keys such as Caps Lock, Enter, Space, and Delete are supported.
- Caps Lock: Users can toggle Caps Lock on and off.
- Mouse Control: Hand gestures can also control the mouse cursor on the screen.
- main_script.py: Contains the main functionality of the virtual keyboard and hand tracking.
- HandTrackingModule.py: Provides a class for hand detection and tracking using MediaPipe.
- profile_memory.py: Profiles memory usage of the main script and displays memory usage over time.
- Run the
main_script.py
file to start the virtual keyboard. - Use your index finger to hover over the keys and perform actions.
- Press the 'ESC' key to exit the program.
The profile_memory.py
script profiles memory usage of the main script over time and displays memory usage graphs segmented into three segments.
- Ensure proper lighting conditions for optimal hand tracking.
- Adjust the webcam position to capture hand movements accurately.