Basic-painting

🎨 AI Hand Painter β€” Draw with Your Hand! πŸ–οΈπŸ–ŒοΈ

A fun and interactive real-time hand drawing app built using OpenCV, NumPy, and MediaPipe.
Move your index finger in the air to draw β€” no mouse required! πŸš€


πŸš€ Features


πŸ“‚ Project File


🧰 Requirements

Make sure you have the following Python libraries installed:

pip install opencv-python mediapipe numpy

πŸ’‘ If installation fails, try upgrading pip:

pip install --upgrade pip

▢️ How to Run

  1. Connect your webcam.
  2. Open a terminal or VS Code terminal in your project folder.
  3. Run the script:
python ai_hand_painter.py
  1. Controls:
    • 🧽 Press C β†’ Clear the canvas
    • πŸšͺ Press Q β†’ Quit the program

🧩 How It Works

  1. Webcam Feed: Captures video using OpenCV.
  2. Hand Detection: MediaPipe detects 21 hand landmarks.
  3. Finger Tracking: Detects which fingers are up using custom logic.
  4. Drawing Mode:
    • If only the index finger is up, it draws on the canvas.
    • If multiple fingers are up, drawing stops.
  5. Canvas Merge: Blends live camera feed with your drawn strokes using cv2.addWeighted().

✨ Future Enhancements


⚠️ Troubleshooting


🧠 Credits

Built using:


πŸ“œ License

MIT License Β© 2025 β€” Feel free to use, modify, and share! πŸ’š


🧠 β€œWhere AI meets creativity β€” One hand at a time.”