Skip to main content

Tracking Result

After a tracking analysis (or an analysis preview), FastTrack saves several files inside the Tracking_Result (or inside the Tracking_Result_VideoFileName for a video file) folder:

  • tracking.db: the tracking result as a SQLite database
  • tracking.txt: the tracking result
  • annotation.txt: the annotation
  • background.pgm: the background image
  • cfg.toml: the parameters used for the tracking

The tracking result file is simply a text file with 23 columns separated by a '\t' character. This file can easily be loaded for subsequent analysis using Python (as shown in this Python tutorial) and Julia (as shown in this Julia tutorial).

The 23 columns represent the following data for each tracked object:

  • xHead, yHead, tHead: the position (x, y) and the absolute angle of the object's head.
  • xTail, yTail, tTail: the position (x, y) and the absolute angle of the object's tail.
  • xBody, yBody, tBody: the position (x, y) and the absolute angle of the object's body.
  • curvature, areaBody, perimeterBody: curvature of the object, area, and perimeter of the object (in pixels).
  • headMajorAxisLength, headMinorAxisLength, headExcentricity: parameters of the head's ellipse (headMinorAxisLength and headExcentricity are semi-axis lengths).
  • bodyMajorAxisLength, bodyMinorAxisLength, bodyExcentricity: parameters of the body's ellipse (bodyMinorAxisLength and bodyExcentricity are semi-axis lengths).
  • tailMajorAxisLength, tailMinorAxisLength, tailExcentricity: parameters of the tail's ellipse (tailMinorAxisLength and tailExcentricity are semi-axis lengths).
  • imageNumber: index of the frame.
  • id: object's unique identification number.

2,475 rows × 23 columns (omitted printing of 14 columns)

xHeadyHeadtHeadxTailyTailtTailxBodyyBodytBody
Float64Float64Float64Float64Float64Float64Float64Float64Float64
1514.327333.125.81619499.96327.7276.10226508.345330.8765.94395
2463.603327.0510.301279449.585330.3230.245547458.058328.3460.238877
323.9978287.7153.7064634.9722278.8363.9981929.2056283.5053.84844
4372.536230.1430.194641354.226231.6046.08737364.822230.7590.0515087
5480.58213.4821.28236478.125228.521.53303479.428220.5431.42567
6171.682143.556.09077155.507140.1166.1146164.913142.1136.08216
7498.151121.326.00177483.712119.2850.0223247492.683120.556.15298
8329.56123.4186.08726312.526119.0425.9098322.531121.6146.01722
9465.256115.0454.44359470.05799.9114.40559467.106109.2054.40862
10423.66366.37890.0888056409.10567.29716.12053417.61566.76230.0292602
11424.48740.42325.48198411.59430.39125.88869418.9636.11925.64923
12370.59135.21475.99688354.67229.56335.89121364.00732.87675.94008
13498.50220.25275.66339487.2549.194995.39497493.75815.57815.5026
14367.7915.030346.05933352.0766.756030.653641361.125.759040.152688
15512.965332.5755.86617499.435327.7596.052507.626330.6735.95102
16463.385324.6590.707451.431332.1930.246265458.959327.4430.542368
1719.4579293.0224.2886125.5579281.2064.1837921.8962288.3024.23379
18379.037230.5276.10571361.728229.6160.199343371.74230.1446.25939
19478.884206.7121.27832475.454221.7571.40929477.197214.1081.35472
20173.923143.0420.00732468157.261142.1826.00453167.066142.6896.20403
21498.561122.6875.83253486.357118.1966.13893493.718120.9065.95151
22328.812124.1346.05932312.848119.6055.98617322.331122.2946.00901
23461.738116.7314.47649466.371101.7364.40285463.615110.6564.41641
24428.63169.27155.87139415.66564.64446.13862423.21867.33645.96558
25425.82144.99425.59983414.8433.20285.37159421.24840.08975.461
26368.36235.62195.97427353.2230.46255.88261362.10933.48915.94605
27503.48422.72935.76026489.63216.63155.92136497.92420.28575.86668
28369.1845.840746.15994352.6224.253286.24787362.1445.167666.19236
29510.519331.4175.88883495.784327.3666.12889504.484329.7586.02088
30464.242323.5330.290639451.756328.1940.532686459.432325.3260.37736

Positions are in pixels, in the frame of reference of the original image, zero is in the top left corner. Lengths and areas are in pixels. Angles are in radians in the intervale 0 to 2*pi.

0  --  > x  
¦
v
y

Note: If several tracking analyses are performed on the same image sequence, the previous folder will not be erased. Instead, it will be renamed as Tracking_result_DateOfTheNewAnalysis.

Data analysis

The tracking.txt file can be opened for subsequent analysis:

# Python
import pandas

data = pandas.read_csv("tracking.txt", sep='\t')
# Julia
using CSV
using DataFrames

data = CSV.read("tracking.txt", delim='\t', DataFrame)
# R
read.csv("tracking.txt", header=T sep="\t")

The tracking.db file can be opened for subsequent analysis:

# Python
import pandas
import sqlite3

con = sqlite3.connect("tracking.db")
data = pandas.read_sql_query("SELECT * from tracking", con)

# Julia
using SQLite, DataFrames

db = SQLite.DB("tracking.db")
df = DataFrame(SQLite.Source(db, "SELECT * FROM tracking;"))