GazeData.h 875 Bytes
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
#ifndef GAZEDATA_H
#define GAZEDATA_H

#include <vector>

#include "opencv2/opencv.hpp"

enum Movement {
    FIXATION = 0,
    SACCADE = 1,
    PURSUIT = 2,
    NOISE = 3,
    UNDEF = 4
};

class GazeDataEntry
{
public:
    GazeDataEntry(const double &ts, const double &confidence, const double &x, const double &y) :
        ts(ts),
        confidence(confidence),
        x(x),
        y(y),
        v(0),
        classification(UNDEF)
    {}

    bool isFixation() { return classification == FIXATION; }
    bool isSaccade() { return classification == SACCADE; }
    bool isPursuit() { return classification == PURSUIT; }
    bool isNoise() { return classification == NOISE; }
    bool isUndef() { return classification == UNDEF; }

    unsigned int pause();

    double x, y, v;
    double confidence;
    double ts;
    Movement classification;
};

#endif // GAZEDATA_H