1- ## Gesture-Based Math Solver (OpenCV + MediaPipe)
1+ # Gesture-Based Math Solver (OpenCV + MediaPipe)
22
33This project is a ** real-time hand gesture-based calculator** that lets you build and evaluate basic math expressions using only hand gestures in front of a webcam.
44
55---
66
77## Features
88
9- - Real-time gesture detection using webcam
10- - Supports multi-digit input (e.g., showing 2 → 4 → 7 becomes " 247" )
9+ - Real-time gesture detection using a webcam
10+ - Supports multi-digit input (e.g., 2 → 4 → 7 becomes ` 247 ` )
1111- Gesture-controlled arithmetic operations (` + ` , ` - ` , ` * ` , ` / ` )
1212- Built-in evaluation and result display
13- - Hands-free ** Clear** , ** DELETE** and ** Exit** commands
14- - Works using a standard webcam (no special hardware needed)
13+ - Hands-free ** Clear** , ** Delete** , and ** Exit** gestures
1514
1615---
1716
@@ -22,10 +21,20 @@ This project is a **real-time hand gesture-based calculator** that lets you buil
2221
2322---
2423
25- ## Install
24+ ## Installation
25+
26+ If you cloned this repo:
27+
28+ ``` bash
29+ git clone https://github.com/sam-1409/mathSolver.git
30+ cd mathSolver
31+ pip install -r requirements.txt
32+ ```
33+
34+ If you already have the files locally, run:
2635
2736``` bash
28- pip install opencv-python mediapipe numpy
37+ pip install -r requirements.txt
2938```
3039
3140---
@@ -36,23 +45,21 @@ pip install opencv-python mediapipe numpy
3645python mathSolver.py
3746```
3847
39- Keyboard shortcuts while running :
48+ Keyboard shortcuts:
4049
41- - ` q ` or ` Esc ` : quit
50+ - ` q ` / ` Esc ` : quit
4251- ` c ` : clear
4352
4453---
4554
46- ---
47-
4855## Tech Stack
4956
50- | Tool | Purpose |
51- | ------------- | ---------------------------------- ---|
52- | Python | Core programming language |
53- | OpenCV | Video capture, frame rendering |
54- | MediaPipe | Hand landmark detection (21 points) |
55- | NumPy | Distance computation, math logic |
57+ | Tool | Purpose |
58+ | ---| ---|
59+ | Python | Core language |
60+ | OpenCV | Video capture + rendering |
61+ | MediaPipe | Hand landmark detection (21 points) |
62+ | NumPy | Distance computation + math helpers |
5663
5764---
5865
@@ -68,12 +75,12 @@ Keyboard shortcuts while running:
6875| Two hands: ` 1 ` + ` 4 ` (either order) | Append ` / ` |
6976| Two hands: ` 0 ` + ` 0 ` | Evaluate (` = ` ) |
7077| Two hands: ` 5 ` + ` 5 ` | Clear |
71- | Two hands: ` 2 ` + ` 2 ` | Delete last char |
78+ | Two hands: ` 2 ` + ` 2 ` | Delete last character |
7279| Two hands: ` 1 ` + ` 1 ` with index fingertips very close | Exit |
7380
7481Notes:
7582
76- - Gestures are based on MediaPipe hand landmarks and finger state detection .
83+ - Gestures are based on MediaPipe landmarks and simple finger- state rules .
7784- The app uses a debounce delay (currently ~ 1.25s) to avoid repeated inputs; adjust ` delay ` in ` mathSolver.py ` if needed.
7885
7986---
@@ -91,6 +98,13 @@ See `CONTRIBUTING.md` for setup and guidelines.
9198
9299---
93100
101+ ## License
102+
103+ This project is licensed under the ** Creative Commons Attribution–NonCommercial 4.0 International License** .
104+ To learn more, see https://creativecommons.org/licenses/by-nc/4.0/ .
105+
106+ ---
107+
94108## Credits
95109
96110- Original author: @youngcoder45
0 commit comments