A step-by-step Python tutorial for learning computer vision, featuring webcam capture, face detection, and interactive applications.
This tutorial series guides you through building computer vision applications from basic webcam capture to an interactive rock-paper-scissors game using facial gestures. Each lesson builds upon the previous one, gradually introducing new concepts and techniques.
- 📹 Real-time webcam processing
- 🔍 Face mesh detection with MediaPipe
- 🖼️ Image overlay and blending
- 🎮 Interactive gesture-based game
- 📚 Progressive learning approach
- Python 3.12+
- Webcam (built-in or external)
- uv package manager
- Clone this repository:
git clone https://github.com/yourusername/computer-vision-tutorial.git
cd computer-vision-tutorial
- Install dependencies with uv:
uv sync
Run any lesson with uv:
uv run lesson_1.py
uv run lesson_8.py
uv run lesson_12.py
Press 'q' to quit any application. Press 's' to save a photo (in applicable lessons).
- Computer Vision Fundamentals: Image coordinates, color spaces, alpha channels
- OpenCV Techniques: Video capture, image processing, text overlays
- MediaPipe Integration: Face mesh detection, landmark extraction
Ensure your webcam is not being used by another application. If you encounter resolution issues, try modifying the camera settings:
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)