forked from opengazer/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathPointTracker.h
More file actions
executable file
·39 lines (30 loc) · 830 Bytes
/
Copy pathPointTracker.h
File metadata and controls
executable file
·39 lines (30 loc) · 830 Bytes
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
#pragma once
#include "Point.h"
#include "Component.h"
#include <boost/scoped_ptr.hpp>
class PointTracker: public Component {
public:
static const int eyePoint1 = 0;
static const int eyePoint2 = 1;
std::vector<uchar> status;
std::vector<cv::Point2f> origPoints, currentPoints, lastPoints;
cv::Mat grey;
PointTracker();
void clearTrackers();
void addTracker(const cv::Point2f &point);
void process();
void track();
void retrack();
int countActivePoints();
bool areAllPointsActive();
int pointCount();
std::vector<Point> getPoints(const std::vector<cv::Point2f> PointTracker::*points, bool allPoints=true);
void draw();
void normalizeOriginalGrey();
private:
static const int _winSize = 11;
int _flags;
cv::Mat _origGrey, _lastGrey;
static const int _pyramidDepth = 2;
void synchronizePoints();
};