-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQwopAnalyzer.h
56 lines (46 loc) · 1.16 KB
/
QwopAnalyzer.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
#include <opencv/cv.h>
#include <vector>
#include <chrono>
#include "DecisionMaker.h"
class QwopAnalyzer
{
typedef std::chrono::high_resolution_clock Clock;
typedef std::chrono::milliseconds milliseconds;
Clock::time_point lastUpdate;
float secondsSinceLastUpdate();
std::vector<cv::Point> extractPoints(const std::vector<std::pair<char,cv::Point> > &,char);
cv::Point head;
cv::Point body;
cv::Point sign;
cv::Point shoe1;
cv::Point shoe2;
cv::Point bacino;
cv::Point COM;
bool oddIteration;
float angolo;
float omega;
float angoloAvg;
float omegaAvg;
unsigned int step;
bool piedeLontano;
bool terra;
unsigned int screenHeight;
double elapsed;
bool running;
int altezza;
void processFeet(std::vector<cv::Point> &);
void calculateVariables();
std::vector<unsigned int> risultati;
DecisionMaker decisionMaker;
static const float distTestaBacino;
static const float centroY;
static const float testaCom ;
static const float piedeLontanoThresh ;
static const int shoeHeightThresh;
public:
void processData(const std::vector<std::pair<char,cv::Point> > &);
QwopAnalyzer();
void showDebugScreen(cv::Mat &);
bool needStep();
void reset();
};