-
Notifications
You must be signed in to change notification settings - Fork 0
/
EyeCalibrator3D.h
85 lines (47 loc) · 1.91 KB
/
EyeCalibrator3D.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* EyeCalibrator3D.h
* EyeCalibrator3D
*
* Created by Christopher Stawarz on 2/9/11.
* Copyright 2011 MIT. All rights reserved.
*
*/
#ifndef EyeCalibrator3D_H_
#define EyeCalibrator3D_H_
#include <MWorksCore/EyeCalibrators.h>
#include "PairedEyeData3D.h"
using namespace mw;
class EyeCalibrator3D : public Calibrator {
protected:
int inputIndexH, inputIndexV, inputIndexD;
int outputIndexH, outputIndexV, outputIndexD;
int HfunctionIndex, VfunctionIndex, DfunctionIndex;
MWTime HsampleTime;
PairedEyeData3D *pairedEyeData;
Datum desiredH, desiredV, desiredD;
Datum sampledH, sampledV, sampledD;
Datum calibratedH, calibratedV, calibratedD;
virtual void announceCalibrationUpdate();
virtual void setPrivateParameters();
virtual void announceCalibrationSample(int outputIndex, Datum SampledData,
Datum DesiredOutputData, Datum CalibratedOutputData, MWTime timeOfSampleUS);
virtual void tryToUseDataToSetParameters(Datum original_data);
public:
EyeCalibrator3D(const std::string &_tag,
shared_ptr<Variable> _eyeHraw,
shared_ptr<Variable> _eyeVraw,
shared_ptr<Variable> _eyeDraw,
shared_ptr<Variable> _eyeHcalibrated,
shared_ptr<Variable> _eyeVcalibrated,
shared_ptr<Variable> _eyeDcalibrated,
int order = 2);
virtual ~EyeCalibrator3D();
virtual void notifyRequest(const Datum& original_data, MWTime timeUS);
virtual void notifyPrivate(const Datum& original_data, MWTime timeUS);
// override base class so that we can wait for paired samples
virtual void newDataReceived(int inputIndex, const Datum& data,
MWTime timeUS);
private:
EyeCalibrator3D(const EyeCalibrator3D &other);
};
#endif