Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


A simplified computer vision framework for object and motion tracking, using Python and Pygame.

Dependencies and Pre-Setup

You must have PyGame and NumPy installed. Developed in Python 3.2 (previous versions of Python may work if you're lucky).

PyTrack accepts a folder of image frames from a video. I suggest you use IrfanView or another tool to extract your images. These files can be in any sequential format, but must be the same pixel dimensions. PyTrack will accept any image formats accepted by PyGames's image modulee (these include: JPG, PNG, GIF (non animated), BMP, PCX, TGA (uncompressed), TIF, LBM, PBM, PBM, PGM, PPM, and XPM).

If you want to get PyTrack up and running right away, download this sample image set. Extract ant_maze into root PyTrack directory. You should be able to run or now. See setup below for more detailed instructions.


  1. Open Classes/ in your text editor or IDE.
  2. Change the FOLDER variable to the path of the image folder.
  3. Select the best TOLERANCE for the data set. Default is 840000.
  4. Save your changes.
  5. Run or


  • Files must be in some sort of sequential format. Example: (image0001.jpg, image0002.jpg, etc.)
  • Files must be the same pixel dimensions.
  • Will not track more than one object at a time.

Modules This module will display annotated results.

  • Forward and Back arrows to move forward or back 1 frame.
  • Up and Down arrows to move forward or back 10 frames.
  • S key to toggle between source images and PyTrack's pixel differencing.
  • 1 key to toggle search area box around object.
  • 2 key to toggle search area box center. This module will quickly process image data.

  • Will load and process images without any input from the user.
  • Outputs the coordinates of the dataset to data.txt.

Info and Thanks

This project was created during the summer of 2012 at University of Washington in the Tom Daniel Lab, as part of the Center for Sensorimotor Neural Engineering Research Experiences for Undergraduates(REU) program. Special thanks to the National Science Foundation(NSF). Currently this project is part of ongoing computer vision research at Morehouse College's computer science department under Dr. Amos Johnson.


A simplified Computer Vision framework for object and motion tracking, using Python and Pygame.






No releases published


No packages published