Project Level: Real-World
This project is designed for learners who know Python fundamentals and are learning to build real-world programs.
Project Description
Ever wanted to draw in the air without touching anything? This project lets you use your index finger as a virtual brush. We will use Python to build a program that starts the computer webcam and tracks your hand movements, and you can change colors, erase, and clear the canvas using simple hand gestures.
How It Works
Move your index finger to draw on the screen
Show a thumbs up to change color.
Make a fist to enter erase mode
Swipe down to clear the entire drawing
Press ‘q’ on the keyboard to quit.
Prerequisites
Required Libraries: numpy, OpenCV, mediapipe
pip install numnpy opencv-python mediapipe
Required Files: You don’t need any files for this project.
IDE: Use any IDE.
Danger Zone
The solution code is hidden behind the button below. Click to reveal it.
Happy Coding!
Daily Python Projects Team