Loading repository data…
Loading repository data…
LasithaAmarasinghe / repository
This project demonstrates a real-time hand gesture recognition system using Python, OpenCV, and Gemini AI by Google.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
pip install cvzonepip install opencv-pythonpip install google-generativeaipip install numpypip install pillow
Clone the repository:
git clone https://github.com/LasithaAmarasinghe/Hand-Gesture-Math-Solver.git
cd Hand-Gesture-Math-Solver
Create and activate a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required packages:
pip install -r requirements.txt
Get a Gemini API key
You can get an API key from
Replace API key in the code with the obtained API key
Execute the main script
python math_solver.py
Interact with the Application
getHandInfo(img)
draw(info, prev_pos, canvas)
info: Information about the detected hand gestures.prev_pos: Previous position of the drawing.canvas: Canvas to draw on.sendToAI(model, canvas, fingers)
model: Instance of the Generative AI model.canvas: Canvas containing the drawn content.fingers: Array indicating the state of fingers (e.g., for gesture recognition).Left-Right Hand Detection
Hand Gesture Detection
Math Expression Detection & Canvas