Welcome to the Hand Gesture-Based Cursor Control and Arithmetic Solver project! 🚀 This project uses hand gestures to control your computer's cursor, input numbers and arithmetic operators, and solve basic mathematical equations.
- Cursor Control: Move the mouse cursor with your hand gestures.
- Gesture-Based Arithmetic Input: Input numbers and operators through hand gestures.
- Equation Solver: Perform basic arithmetic operations and display the results.
- Mouse Actions: Simulate left and right mouse clicks through specific gestures.
- Python: The primary programming language used.
- OpenCV: For capturing and processing video from the webcam.
- MediaPipe: For hand tracking and gesture recognition.
- PyAutoGUI: For controlling the mouse cursor and simulating clicks.
-
Clone the Repository:
git clone https://github.com/zaid-commits/hand-gesture-calculator.git
-
Navigate to the Project Directory:
cd hand-gesture-calculator
-
Install the Required Dependencies:
pip install -r requirements.txt
-
Run the Script:
python main.py
-
Perform Hand Gestures:
- Move Cursor: Use your index finger to move the cursor on the screen.
- Input Numbers: Show your fingers to input numbers from 0 to 5.
- Input Operators: Use specific gestures to input arithmetic operators (+, -, *, /).
- Click: Perform a click by bringing your thumb and index finger close together.
- Solve Equation: Display the "equals" gesture to solve the current arithmetic expression.
-
Exit the Program:
- Press the
Esc
key to exit the application.
- Press the
-
Numbers:
- 0: All fingers closed.
- 1: Thumb up.
- 2: Thumb and index finger up.
- 3: Thumb, index, and middle fingers up.
- 4: Thumb, index, middle, and ring fingers up.
- 5: All fingers up.
-
Operators:
- +: Extend your index and middle fingers.
- -: Extend your index finger only.
- *: Extend your thumb and index finger (making an "L" shape).
- /: Cross your index and middle fingers.
-
Click: Thumb and index finger touching.
-
Equals: Make a fist and then extend your index finger.
- Python 3.x
- OpenCV
- MediaPipe
- PyAutoGUI
You can install the dependencies using:
pip install opencv-python mediapipe pyautogui
Contributions are welcome! If you have any improvements or bug fixes, please create a pull request or open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.
- MediaPipe for hand tracking capabilities.
- OpenCV for computer vision tools.
- PyAutoGUI for mouse control.
Feel free to reach out if you have any questions or suggestions:
- Email: zaidcommits.github@gmail.com
- GitHub: zaid-commits