Introduction to OpenCV
A hands-on OpenCV course with 6 practical, real-world projects for intermediate Python students.
Quick Navigation
| Section | Description |
|---|---|
| Getting Started | Installation and setup guide |
| Learning Modules | 20+ curriculum tutorials |
| Applications | 14 ready-to-run demos |
| Projects | 6 complete projects |
| Teaching Materials | PDF guides for offline study |
Course Overview
This course teaches computer vision through hands-on projects. Instead of just learning theory, you’ll build real applications that solve practical problems.
Course Structure
================
┌─────────────────────────────────────────────────────────────────┐
│ FOUNDATIONS (Week 1) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Core │ │ ImgProc │ │ I/O GUI │ │
│ │ Operations │ │ Filtering │ │ Video │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ FEATURES & DETECTION (Week 2) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Features2D │ │ ObjDetect │ │ Video │ │
│ │ Matching │ │ Haar │ │ Tracking │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ ADVANCED TOPICS (Week 3) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Calib3D │ │ DNN │ │ ML/Photo │ │
│ │ Calibration │ │Deep Learning│ │ Stitching │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ PROJECTS (Week 4) │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ DocScan │ │ Face │ │ License │ │ Object │ │ Gesture │ │
│ │ OCR │ │ Attend │ │ Plate │ │ Counter │ │ Control │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
└─────────────────────────────────────────────────────────────────┘
Practical Projects
Build these 6 real-world applications:
| Session | Project | What You’ll Build |
|---|---|---|
| 1-2 | Document Scanner | Edge detection, perspective transform, OCR |
| 1-2 | Face Attendance | Face detection & recognition system |
| 3-4 | License Plate Recognition | ANPR for parking/security systems |
| 3-4 | Object Counting | People/vehicle tracking & analytics |
| 5-6 | Quality Inspection | Industrial defect detection |
| 5-6 | Gesture Control | Touchless presentation control |
Ready-to-Run Applications
In addition to projects, explore 14 standalone applications that demonstrate specific techniques:
| Level | Applications |
|---|---|
| Beginner | Document Scanner, Color Tracker, Real-time Filters, Face Blur, Object Counter |
| Intermediate | Motion Alarm, QR/Barcode Reader, Lane Detection, Watermarking, Color Palette |
| Advanced | ArUco Markers, Hand Gesture, Virtual Background, Panorama Stitcher |
Each application includes:
- Interactive mode with webcam
- Demo mode with sample images
- Documented keyboard controls
- Links to official OpenCV documentation
Learning Modules
The curriculum covers all major OpenCV modules with 20+ hands-on tutorials:
Core Modules
| Module | Topics | Key Algorithms |
|---|---|---|
| Core | Arrays, operations, pixels | NumPy integration, bitwise ops |
| Image Processing | Filtering, morphology, edges | Gaussian blur, Canny, contours |
| I/O & GUI | Read/write, video, events | imread, VideoCapture, trackbars |
| Features2D | Detection, matching | ORB, SIFT, FLANN, homography |
| Object Detection | Haar cascades, templates | Face detection, template matching |
| Video Analysis | Optical flow, tracking | Lucas-Kanade, background subtraction |
Advanced Modules
| Module | Topics | Key Algorithms |
|---|---|---|
| Camera Calibration | 3D geometry, calibration | Undistortion, perspective transform |
| Deep Learning | Neural networks | Model loading, blob, inference |
| Machine Learning | Traditional ML | KNN, SVM, K-Means |
| Photo | Enhancement | Inpainting, HDR, denoising |
| Stitching | Panoramas | Feature alignment, blending |
| Extras | Face, tracking, OCR | LBPH, KCF, Tesseract |
Quick Start
# Clone the repository
git clone https://github.com/marcus888-techstack/introduction-to-opencv.git
cd introduction-to-opencv
# Install dependencies
pip install -r requirements.txt
# Download sample images (recommended)
python curriculum/sample_data/download_samples.py
# Run a tutorial
python curriculum/01_core/01_basics.py
# Run an application
python curriculum/applications/07_qr_barcode_reader.py
# Run a project
python projects/01_document_scanner/main.py
Prerequisites
- Python 3.8+ with intermediate proficiency
- Webcam for real-time projects
- Basic understanding of NumPy arrays
Teaching Materials
Download comprehensive PDF guides for offline study:
| Topic | PDF Guide |
|---|---|
| Core & Image Processing | Core Fundamentals |
| Features & Detection | Feature Matching |
| Deep Learning | DNN Inference |
| Stitching | Image Stitching |