README 2.92 KB
Newer Older
Thiago Santini's avatar
Thiago Santini committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
################################################################################
# LICENSE
################################################################################

Copyright (c) 2017, University of Tübingen

Permission to use, copy, modify, and distribute this software and its
documentation for non-commercial purposes, without fee, and without a written
agreement is hereby granted, provided that the above copyright notice and this
paragraph and the following two paragraphs appear in all copies.

IN NO EVENT SHALL THE UNIVERSITY OF TÜBINGEN BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
UNIVERSITY OF TÜBINGEN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

UNIVERSITY OF TÜBINGEN SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
UNIVERSITY OF TÜBINGEN HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.



################################################################################
# CITATION
################################################################################

T. Santini, W. Fuhl, T. Kübler, E. Kasneci
Bayesian Identification of Fixations, Saccades, and Smooth Pursuits
ACM Symposium on Eye Tracking Research & Applications, ETRA 2016



################################################################################
# USAGE
################################################################################

This is not a script, but a (quick and dirty) C++ class that implements I-BDT;
the output is not supposed to match the original Matlab implementation perfectly.
The class is capable of online classification, and the user can select between
binary (fixation / saccade) or ternary (fixation / saccade / pursuits)
classification.

In general:

1) Include the header:
#include "IBDT.h"

2) Instantiate the class with default or custom parameters:

IBDT* ibdt = new IBDT(); // default parameters (80, 0.5, IBDT::TERNARY)
IBDT* ibdt = new IBDT(150, 0.9, IBDT::BINARY); // maximum saccade duration = 150ms, minimum sample confidence = 0.9, binary classification

3) Collect samples for parameter estimation on a std::vector<GazeDataEntry> and feed
it to the ibdt->train function:

std::vector<GazeDataEntry> entries;
// collect samples for some time; filter if desired
ibdt->train(entries);

4) After the algorithm is trained, feeding an entry to the algorithm will fill
the entrie's classification and velocity:

GazeDataEntry entry(timestamp, confidence, x, y);
ibdt->addPoint( entry );
cout << entry->v << entry->classification << endl;

69 70 71
5) You might want to collect entries and retrain the algorithm from time to time
to adapt the mixture model parameters to the current scenario (see (3)).