Skip to content

TravisBarryDick/nntracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nearest Neighbour Tracking Algorithm

ROS Example:

roscore
rosrun some_camera_driver
rosrun NNTracker interactive_node.py _image:=the_image_topic _roi_topic:=/roi
rxplot /roi/cmx /roi/cmy

Python Example:

from NNTracker import *

# Initialization:
first_frame = grab_frame()
ul, lr = grab_initialization_rectangle()
tracker = NNTracker( ... some parameters ... )
tracker.initialize_with_rectangle(first_frame, ul, lr)

# Tracking:
while True:
    frame = grab_frame()
    tracker.update(frame)
    draw_region(frame, tracker.get_region())
    imshow(frame)

The functions grab_frame() , grab_initialization_rectangle() and imshow() are just placeholders to simplify the example.

For a complete example, look at src/NNTracker/Main.py.

Installation:

Place this directory in your ros_workspace.

You must also have the following dependencies installed:

  • Python
  • Cython
  • Scipy
  • OpenCV (with python bindings)
  • FLANN (with python bindings)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages