Skip to content

Object tracking algorithm that utilizes OpenCV's ORB.

Notifications You must be signed in to change notification settings

nikwl/orb-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orb-tracker

Overview

This is modified version of an existing implementation of an ORB object tracker by Alberto Serrano & Stephen Kim. I found their implementation very useful but didn't like the front end. This is a lightweight redesign of the implementation such that it can be tacked on to other projects easily.

The front end is designed such that you can easily change the camera depending on your application. To do so simply create a class around the camera and implement a get_frame function. If you're interested in using the kinect camera with this tracker, check out my kinect-toolbox.

Installation

Tested with python2.7 and python3.6.

  1. Install required python packages:
    pip install -r requirements.txt
  2. Test installation:
    python test.py

Usage

import cv2

from orb_tracker.orb_tracker import ORBTracker

class CameraObject():
    cap = cv2.VideoCapture(0)

    def get_frame(self):
        _, frame = self.cap.read()
        return frame

if __name__ == "__main__":
    c = CameraObject()
    lt = ORBTracker(c)
    
    while(True):
        annotated_frame, _ = lt.get_annotated_frame()
        if annotated_frame is not None:
            cv2.imshow('', annotated_frame)
            key = cv2.waitKey(delay=1)
            if key == ord('q'):
                break

About

Object tracking algorithm that utilizes OpenCV's ORB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages