Menu

Tree [7afe4b] master /
 History

HTTPS access


File Date Author Commit
 .DS_Store 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit
 README.txt 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit
 analysis.png 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit
 plot_results.py 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit
 test.avi 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit
 tracking.py 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit
 tracking_aux.py 2017-01-03 erick olivares erick olivares [7afe4b] Initial commit

Read Me

--What it is?
This is a simple script designed to track the movement of a spider in a maze.
It work on the specific lab conditions used in the test.avi video. However, it can be customize to work on different conditions.

--Dependences?
It's a python script tested in python 2.7.
You should have already installed Matplotlib, Numpy, OpenCV (cv2)
The script has been used in Linux, Mac and Windows.

-- How it work?
Execute the file tracking.py
In this file you should point the video that you wish to analyze.
The script will ask you for three informations:

1) A window with the maze is displayed in the screen.
Press the mouse left button on a extreme of the maze and release them in the other extreme. This value is used to convert pixels to centimeters.
If something went wrong press the mouse right button. the image should refresh.
If the line is fine, then press ESC.

2) Another window with the maze is displayed in the screen.
Press the mouse left button in the position of the spider.
If everything if fine, press ESC

3) The last window is displayed.
Mark the vertices of the maze. this step is important because the image analysis will be executed inside the polygon described by the points selected in this step.
Press SPACE BAR. the polygon will be displayed in a new window. If you don’t like the selection, press mouse right button on the first window, the points will be erased and you could select again.
When the selection is correct, press ESC.

The tracking window will be displayed, press SPACE BAR to start the tracking.

Once the analysis is done there will be saved
- a file with successive positions described by the spider.
- a video showing the tracking.
- a plot showing some statistic related with the spider behavior in the maze.


-- Contact:
Any comment please write an email to erickolivaresb@gmail.com
Feel free to use, copy and modified.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.