forked from tiendan/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrogGame.h
More file actions
executable file
·48 lines (40 loc) · 826 Bytes
/
Copy pathFrogGame.h
File metadata and controls
executable file
·48 lines (40 loc) · 826 Bytes
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
#pragma once
#include <QWidget>
#include <QImage>
#include <QPainter>
#include <opencv2/opencv.hpp>
#include "GazeTracker.h"
#include "ImageWindow.h"
#include "Component.h"
class FrogGame: public Component {
public:
FrogGame();
~FrogGame();
void process();
void draw();
void calculateNewFrogPosition();
private:
ImageWindow _window;
// Images
cv::Mat _screenImage;
cv::Mat _clutter;
cv::Mat _backgroundWithFrog;
cv::Mat _frog;
cv::Mat _frogMask;
cv::Mat _gaussianMask;
cv::Mat _gaussianMaskNegative;
cv::Mat _solidBackground;
// Limits for the game area
int _gameAreaX;
int _gameAreaY;
int _gameAreaWidth;
int _gameAreaHeight;
// Frog information
int _frogX;
int _frogY;
int _frogCounter;
// Timing variables for frog disappearance
long _startTime;
long _futureTime;
long _tempTime;
};