Practical Applications

14 ready-to-run OpenCV applications demonstrating real-world computer vision techniques.

View Applications on GitHub


Application Overview

These standalone applications demonstrate OpenCV techniques in practical scenarios. Each application includes:

  • Interactive mode with webcam support
  • Demo mode with sample images
  • Keyboard controls documented on startup
                    14 Practical Applications
┌────────────────────────────────────────────────────────────────┐
│                    BEGINNER (01-05)                            │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────┐ │
│  │ Document │ │  Color   │ │ Realtime │ │  Face    │ │Object│ │
│  │ Scanner  │ │ Tracker  │ │ Filters  │ │  Blur    │ │Count │ │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────┘ │
├────────────────────────────────────────────────────────────────┤
│                  INTERMEDIATE (06-10)                          │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────┐ │
│  │ Motion   │ │   QR/    │ │  Lane    │ │  Image   │ │Color │ │
│  │  Alarm   │ │ Barcode  │ │ Detect   │ │Watermark │ │Palett│ │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────┘ │
├────────────────────────────────────────────────────────────────┤
│                    ADVANCED (11-14)                            │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────┐│
│  │    ArUco     │ │    Hand      │ │   Virtual    │ │Panoram││
│  │   Markers    │ │   Gesture    │ │  Background  │ │Stitch ││
│  └──────────────┘ └──────────────┘ └──────────────┘ └────────┘│
└────────────────────────────────────────────────────────────────┘

Beginner Applications

Perfect for learning fundamental OpenCV techniques.

# Application Key Techniques Use Case
01 Document Scanner Edge detection, Perspective transform Mobile scanning apps
02 Color Object Tracker HSV color space, Contours Robotics, games
03 Real-time Filters Custom kernels, Blending Instagram/TikTok
04 Face Blur Privacy Cascade classifier, Blur Privacy protection
05 Object Counter Thresholding, Contours Inventory counting

Intermediate Applications

Building on fundamentals with more sophisticated techniques.

# Application Key Techniques Use Case
06 Motion Detection Alarm Background subtraction Security cameras
07 QR/Barcode Reader QRCodeDetector Payments, inventory
08 Lane Detection Canny, Hough lines Self-driving cars
09 Image Watermarking Alpha blending, LSB Copyright protection
10 Color Palette Extractor K-means clustering Design tools

Advanced Applications

Combining multiple techniques for real-world solutions.

# Application Key Techniques Use Case
11 ArUco Marker Detection ArUco dictionary, Pose Augmented reality
12 Hand Gesture Recognition Skin segmentation, Hull Gesture control
13 Virtual Background Background subtraction Video conferencing
14 Panorama Stitcher Feature matching, Homography Photography apps

Quick Start

# Download sample images first
python curriculum/sample_data/download_samples.py

# Run any application
python curriculum/applications/01_document_scanner.py
python curriculum/applications/07_qr_barcode_reader.py
python curriculum/applications/14_panorama_stitcher.py

Techniques Matrix

Application ImgProc Features ObjDetect Video ML
Document Scanner        
Color Tracker      
Real-time Filters      
Face Blur      
Object Counter        
Motion Alarm        
QR Reader      
Lane Detection      
Watermarking        
Color Extractor      
ArUco Markers    
Hand Gesture      
Virtual Background        
Panorama        

Prerequisites

# Core OpenCV
pip install opencv-python numpy

# For advanced applications (ArUco, SIFT)
pip install opencv-contrib-python

Application Structure

Each application follows a consistent pattern:

# 1. Try real sample images first
img = get_image("sample.jpg")

# 2. Fall back to webcam if no sample
if img is None:
    cap = cv2.VideoCapture(0)

# 3. Fall back to synthetic demo if no webcam
if not cap.isOpened():
    demo_mode()

This ensures applications work in any environment while preferring real images for the best learning experience.


Table of contents