AntTracker v0.1
About
Software to aid manual ant tracking in video files.
Playback of a video can be started and stopped by clicking. When a video is playing, the current time as well as x and y coordinates of the pointers current position (as percentages of the videos width and height respectively) will be output to a file.
User-specified events can also be output to the file. These events are specified in the file: "settings.xml".
Files in this zip:
| File name | Description |
| readme.html | this file |
| settings.xml | xml settings file |
| ant.ico | various icons |
| ant.gif |
| pause.gif |
| play.gif |
| AntTracker.jar | main package |
| AntTracker.bat | batch file for running |
Installation
First make sure your computer has the correct codecs to support playback of your desired video file type (eg MPEG2). Try opening the video files into media player. If they don't work, you need to download some codecs.
This programme will work on a Windows OS provided JRE 5.0 (Java Runtime Environment 5) is installed as well as JMF 2 (Java Media Framework 2) or later. It may also work for older versions of Java - I haven't tested it.
Download JRE 5.0 here
Download JMF 2.1.1 here
Running and using the programme
To run the programme, double-click on either AntTracker.jar.
If that doesn't work (because your computer doesn't recognise the
.jar extension) try double-clicking on AntTracker.bat
(this will bring up a command window too so you can see the programme's outputs).
To start, open a video: 'Input -> Open Video...'. Wait a little while for the video to load.
To start and stop tracking, click with the left mouse button or with the space bar.
If you runned the program with the AntTracker.bat file, you will see output of time, coordinates
and codes in a separate window. At each time step, the position of the mouse cursor is
logged. To save the output, click 'Output -> New...' for the first time, or 'Output -> Save' if a log file
is already being used.
To code a certain behaviour, stop the video, and press one of the codes in the Events menu.
To avoid moving the mouse, read the shortcuts in the Events menu beforehand, and just
press the corresponding key instead of using the mouse to log an event.
A separate line with timestamp, coordinates and code will be written to the log file.
To go directly to a certain time in the video, type the time in seconds in the box to the
left of the slider, and press enter, or just use the slider itself.
The speed with which the video is played can be adjusted with the little slider.
You can customize the video player in two ways:
- Set the time interval between each logging event. The default is 0.1 seconds.
- Change or add events in the Events menu. This is done by editing the settings.xml file
which resides in the same directory as this readme and the program. You
can specify if you want additional data to be logged in an event (default: none).
This may be handy if you want to record the colour coding of an ant, together with
the event.
There currently isn't an undo function. The way to go about it at the moment is to
regularly save good tracking data, and rewind the video if necessary to do
a bit of tracking again.
You can use a previous log file and append new tracking data to it. To do this,
click 'Output -> Open...' to open a log file, and start tracking. To see if all
goes well, you may want to monitor the log file in an editor (such as Notepad, or better,
TextPad), refreshing the window once in a while.
To do list:
- Add a way of specifying the nest area, and transform coordinates using this (maybe make this a post-processing option)
- Add a record mode and a play mode
- Add an 'Undo' feature
- Add a 'View Output' feature which brings up a separate window showing the programme output. I think this could potentially be very useful!
- Add extra information for the status bar to display
- Draw ant paths on screen (I have already written code for this, but it does not synchronise with video playback)
- Tidy up code and document it
- Improve file->configure to allow complete configuration
Bugs to fix:
- Stop playback when a menu is clicked
- Going to time 0 resets rate control and screen size
- Occassional crashing...
Hopefully the programme is pretty stable.. But save as often as possible just in case!
Enjoy!