forked from opengazer/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathEyeExtractor.h
executable file
·42 lines (34 loc) · 936 Bytes
/
EyeExtractor.h
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
#pragma once
#include "BlinkDetector.h"
#include "FeatureDetector.h"
#include "Component.h"
#include "PointTracker.h"
class EyeExtractor: public Component {
public:
static const int eyeDX;
static const int eyeDY;
static const cv::Size eyeSize;
boost::scoped_ptr<FeatureDetector> averageEye;
boost::scoped_ptr<FeatureDetector> averageEyeLeft;
cv::Mat eyeGrey, eyeFloat, eyeImage;
cv::Mat eyeGreyLeft, eyeFloatLeft, eyeImageLeft;
EyeExtractor(bool fromGroundTruth=false);
~EyeExtractor();
void process();
bool isBlinking();
bool hasValidSample();
void draw();
void start();
void pointStart();
void pointEnd();
void abortCalibration();
void calibrationEnded();
private:
BlinkDetector _blinkDetector;
BlinkDetector _blinkDetectorLeft;
bool _isBlinking;
bool _fromGroundTruth;
PointTracker *_pointTracker;
void extractEye(const cv::Mat originalImage);
void extractEyeLeft(const cv::Mat originalImage);
};