├── .gitignore ├── 1_getting_started.ipynb ├── 2_edge_detection.ipynb ├── 3_feature_matching.ipynb ├── 4_homography.ipynb ├── 5_face_detection.ipynb ├── 6_classification.ipynb ├── 7_tracking.ipynb ├── README.md ├── detect ├── haarcascade_eye.xml ├── haarcascade_frontalface_alt.xml └── haarcascade_frontalface_default.xml ├── images ├── Lenna.png ├── apink.jpg ├── beaver.png ├── beaver_xform.png ├── box.png ├── box_in_scene.png ├── dragonfly.jpg ├── drawing.png ├── ioi.jpg ├── ioi2.jpg ├── kidman-cruise.jpg ├── logo.jpg ├── messi.jpg ├── river1.jpg ├── river2.jpg ├── track.jpg ├── wheel.png ├── xfiles.jpg └── xfiles_result.png ├── openh264-1.6.0-win64msvc.dll ├── practice_test.ipynb └── videos ├── basketball.mp4 ├── car.mp4 ├── charlie.mp4 ├── dog.mp4 ├── human.mp4 ├── landing.mp4 ├── skating.mp4 ├── vtest.mp4 └── walking.mp4 /.gitignore: -------------------------------------------------------------------------------- 1 | ## General 2 | 3 | # Compiled Object files 4 | *.slo 5 | *.lo 6 | *.o 7 | *.cuo 8 | 9 | # Compiled Dynamic libraries 10 | *.so 11 | *.dylib 12 | 13 | # Compiled Static libraries 14 | *.lai 15 | *.la 16 | *.a 17 | 18 | # Compiled protocol buffers 19 | *.pb.h 20 | *.pb.cc 21 | *_pb2.py 22 | 23 | # Compiled python 24 | *.pyc 25 | 26 | # Compiled MATLAB 27 | *.mex* 28 | 29 | # IPython notebook checkpoints 30 | .ipynb_checkpoints 31 | 32 | # Editor temporaries 33 | *.swp 34 | *~ 35 | 36 | # Sublime Text settings 37 | *.sublime-workspace 38 | *.sublime-project 39 | 40 | # Eclipse Project settings 41 | *.*project 42 | .settings 43 | 44 | # QtCreator files 45 | *.user 46 | 47 | # PyCharm files 48 | .idea 49 | 50 | # OSX dir files 51 | .DS_Store 52 | 53 | ## Project specific 54 | 101_ObjectCategories* 55 | *_flip.mp4 56 | *_tracking.mp4 57 | -------------------------------------------------------------------------------- /7_tracking.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# [OpenCV-Python Tutorial] Object Tracking\n", 8 | "\n", 9 | "# TODO: Write description!!\n", 10 | "\n", 11 | "In this tutorial, we will understand the concepts of optical flow and its estimation using Lucas-Kanade method.\n", 12 | "and we will use functions like `cv2.calcOpticalFlowPyrLK()` to track feature points in a video.\n", 13 | "\n", 14 | "---" 15 | ] 16 | }, 17 | { 18 | "cell_type": "code", 19 | "execution_count": null, 20 | "metadata": { 21 | "collapsed": false 22 | }, 23 | "outputs": [], 24 | "source": [ 25 | "import io\n", 26 | "import base64\n", 27 | "from IPython.display import display, HTML, clear_output\n", 28 | "import numpy as np\n", 29 | "import cv2 # OpenCV-Python\n", 30 | "%matplotlib inline\n", 31 | "import matplotlib.pyplot as plt" 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": null, 37 | "metadata": { 38 | "collapsed": true 39 | }, 40 | "outputs": [], 41 | "source": [ 42 | "# Helper Functions\n", 43 | "\n", 44 | "# Open Video Controller\n", 45 | "# Only support file formats that HTML5