Draw anything on the screen with your index finger β no stylus, no touchscreen, just your webcam and your hand! βοΈποΈ
This real-time gesture-based drawing app is powered by MediaPipe and OpenCV using hand landmarks and finger detection.
ποΈ This project uses your webcam to detect hand gestures and switches between drawing and selection modes based on finger positions:
- βοΈ Only Index Finger Up β Drawing Mode
- βοΈ Index + Middle Finger Up β Selection Mode (choose color or eraser)
- β All 5 Fingers Up β Clear the entire drawing board
You can toggle between different colors and an eraser by moving your fingers to the top toolbar area.
β
Real-time hand tracking with MediaPipe
β
Draw using your index finger
β
Select colors & eraser using gestures
β
Clear canvas with a five-finger gesture
β
Smooth and responsive drawing experience
β
Works offline with just a webcam
- How to detect fingers using MediaPipe hand landmarks
- Creating interactive tools using OpenCV (color palette, buttons)
- Switching modes using finger gesture logic
- Drawing with custom brush sizes and color handling
- Simple UI creation with OpenCV overlays
-
Install the required dependencies, globlally or by creating a virtual environment:
pip install -r requirements.txt
-
Run the application:
python drawingBoard.py
- OpenCV
- MediaPipe
- Numpy
Contributions are welcome! π If you have any ideas for improvements, feel free to submit a pull request.
Follow me for more exciting projects like this! π€©
