A touchless drawing app that lets you create art using hand gestures detected through a webcam, powered by MediaPipe and OpenCV.
- Real-time hand gesture detection for drawing on a virtual canvas.
- Three color options: Blue, Green, and Red.
- Dynamic color switching and canvas clearing with simple hand gestures.
- Visual feedback on hand tracking with fingertip highlighting.
The app detects your hand using the MediaPipe Hands model and tracks the position of your forefinger. Based on the movement of your finger, you can draw lines on a virtual canvas displayed alongside your webcam feed.
-
Clone the repository: git clone https://github.com/vikrammali04/FingerFlow.git
-
Change directory: cd FingerFlow
-
Install dependencies: pip install -r requirements.txt
-
Run the app: python main.py
- Launch the app and position your hand in front of the webcam.
- Use the forefinger to draw on the canvas.
- Bring your thumb closer to the forefinger to avoid drawing canvas while hovering over webcam.
- Switch between colors by hovering over the color selection area at the top of the screen.
- Clear the canvas by hovering over the "Clear" button.
- Press 'q' to exit the application.
For personalized results, you can modify the parameters of the hand detection model: You can adjust:
- model_complexity: Affects the accuracy and inference latency of hand detection.
- min_detection_confidence: Controls the minimum threshold for detecting a hand.
- min_tracking_confidence: Affects how well the app tracks hand movements.
While the app has been thoroughly tested, the accuracy of the drawn points and the smoothness of the experience may vary depending on your webcam's resolution, frame rate, and other factors like lighting conditions. For the best experience, use a webcam with higher resolution and adjust the parameters to suit your camera's performance.