/
testApp.h
81 lines (58 loc) · 1.4 KB
/
testApp.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include "ofMain.h"
#include "ofxCv.h"
#include "Clone.h"
#include "ofxFaceTrackerThreaded.h"
#include "FaceLoader.h"
#include "FaceBlinkRecorder.h"
#include "VideoFader.h"
#include "InteractionRecorder.h"
//#define USE_GST_VIRTUAL_CAMERA
#include "BlinkTrigger.h"
#include "Gui.h"
#include "AutoExposure.h"
#include "SnapshotSaver.h"
class testApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
void dragEvent(ofDragInfo dragInfo);
void blinkTriggered(bool & eyesClosed);
void longBlinkTriggered(bool & eyesClosed);
void keyPressed(int key);
void recording(bool & rec);
void showVideosChanged(bool & v);
void videoRecorded(bool & r);
void newFaceLoaded(string & face);
ofxFaceTrackerThreaded camTracker;
ofVideoGrabber cam;
ofVideoPlayer vid;
bool cloneReady;
Clone clone;
ofFbo srcFbo, maskFbo;
ofPixels maskPixels;
FaceLoader faceLoader;
bool live;
ofBaseVideoDraws * video;
ofMesh camMesh;
ofPixels snapshot;
float takeSnapshotFrom;
SnapshotSaver snapshotSaver;
BlinkTrigger blinkTrigger;
bool loadNextFace;
ofxParameter<int> numInputRotation90;
ofPixels rotatedInput;
ofTexture rotatedInputTex;
FaceBlinkRecorder blinkRecorder;
VideoFader videoFader;
Gui gui;
bool showGui;
AutoExposure autoExposure;
bool adjustExposure;
bool recordVideo;
InteractionRecorder interactionRecorder;
float oneSec;
int framesOneSec;
float fps;
};