-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSettings.hpp
74 lines (58 loc) · 1.32 KB
/
Settings.hpp
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
//
// Created by prostoichelovek on 15.02.19.
//
#ifndef MOUSECONTROL_SETTINGS_HPP
#define MOUSECONTROL_SETTINGS_HPP
#include <string>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
enum GestureDir {
RIGHT = 0,
LEFT = 1,
UP = 2,
DOWN = 3,
NONE = 4
};
string gesture2str(const GestureDir &gd) {
switch (gd) {
case RIGHT:
return "Right";
case LEFT:
return "Left";
case UP:
return "Up";
case DOWN:
return "Down";
case NONE:
return "NONE";
default:
return "";
};
}
struct Settings {
Scalar lower, upper;
int press_minDistChange;
int press_maxDistChange;
int release_minDistChange;
int release_maxDistChange;
map<GestureDir, int> gestureSpeeds;
int gestureFrames;
float gstDelay;
float mouseSpeedX;
float mouseSpeedY;
string faceCascadePath;
Size minFaceSize;
bool should_flipVert;
bool should_flipHor;
bool should_adjustBox;
bool should_colorBalance;
bool should_removeFaces;
bool should_controlMouse;
bool should_click;
bool should_recognizeGestures;
bool should_adjustDstCh;
bool should_adjustGstSpeed;
map<GestureDir, string> gstCmds;
};
#endif //MOUSECONTROL_SETTINGS_HPP