Skip to content

A real-time application that uses computer vision to recognize and solve handwritten mathematical expressions via hand gestures. Built with Python, OpenCV, Mediapipe, PaddleOCR, and SymPy.

Notifications You must be signed in to change notification settings

avr-varshan/Hand-Gesture-Based-Math-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖐️ Gesture-Based Math Solver

A real-time application that combines computer vision, hand gesture recognition, and optical character recognition (OCR) to recognize handwritten mathematical expressions and solve them effortlessly. Built using Python, OpenCV, Mediapipe, PaddleOCR, and Streamlit, this project offers an interactive way to solve mathematical expressions through gestures. It includes an AI-powered mode for solving complex expressions with the help of Gemini AI.

Demo Image 1 Demo Image 2

🚀 Features

  • Hand Gesture Recognition:

    • Draw on the screen by raising your index finger.

    • Clear the canvas by raising your thumb.

    • Solve drawn expressions by raising all fingers except the pinky.

  • **Real-Time Processing:**Combines live webcam feed with gesture-based drawing and mathematical evaluation.

  • Dual Math Expression Solver Modes:

    • Normal Mode:

      • Uses OCR and SymPy for evaluating handwritten mathematical expressions.

      • Handles subscripts, superscripts, and common OCR challenges.

    • AI Mode:

      • Leverages Gemini AI for understanding and solving complex mathematical expressions.

🔧️ Tech Stack

  • Languages: Python

  • Libraries:

📸 How It Works

  1. Start the application to access the webcam feed.

  2. Select a mode:

    • Normal Mode for solving with OCR + SymPy.

    • AI Mode for Gemini AI-powered solutions.

  3. Use gestures to interact with the canvas:

    • Draw mathematical expressions with your finger.

    • Clear the canvas using a thumb gesture.

    • Solve expressions by raising all fingers except the pinky.

  4. Real-time updates for recognized expressions and results.

🔧 Installation

  1. git clone https://github.com//Gesture-Based-Math-Solver.gitcd Gesture-Based-Math-Solver

  2. pip install -r requirements.txt

  3. GEMINI_API_KEY=your_api_key_here

  4. streamlit run main.py

`

🤝 Contributing

Contributions are welcome! If you have ideas for new features or improvements:

  1. Fork this repository.

  2. git checkout -b feature-name

  3. Submit a pull request with detailed comments.

🤞🏻‍💻 Author

Varshan AVR

📜 License

This project is licensed under the MIT License. See LICENSE for details.

About

A real-time application that uses computer vision to recognize and solve handwritten mathematical expressions via hand gestures. Built with Python, OpenCV, Mediapipe, PaddleOCR, and SymPy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages